[00:00] robertj: OBonio, basically all the work node is doing its running in a seperate thread and checking back on it in the main loop [00:00] OBonio: so not single threaded... [00:00] augustl: OBonio: what are you refering to? [00:01] augustl: I said "I'd imagine" [00:01] augustl: OBonio: whatever the case, all your code executes in a single thread [00:01] davidascher has joined the channel [00:02] robertj: any thoughts on dirty tricks for limiting memory usage of untrusted code via dirty tricks? [00:02] liar has joined the channel [00:02] robertj: I was thinking basically all calls could return a proxy object of some kind that did some memory accounting? [00:03] shinuza has joined the channel [00:04] robi42 has joined the channel [00:05] OBonio: ok, i can see node.js having its uses... mainly SOA.. not OLTP maybe [00:05] gavin_huang has joined the channel [00:05] augustl: OBonio: it's 0.x ;) [00:08] akihito_s has joined the channel [00:10] OBonio: augustl: thanks.. :) [00:10] robertj: are harmony proxies planned? [00:10] cjm has joined the channel [00:10] Destos has joined the channel [00:11] mmalecki: robertj: node --harmony_proxies [00:12] robertj: mmalecki, thanks [00:13] bengrue has joined the channel [00:13] boltR has joined the channel [00:15] lyte_ has joined the channel [00:16] towski has joined the channel [00:19] adrianF has joined the channel [00:20] chrislorenz has joined the channel [00:24] broofa has joined the channel [00:24] stantona has joined the channel [00:24] jbrokc_ has joined the channel [00:26] stantona has joined the channel [00:27] martin_sunset has joined the channel [00:28] jacobolus has joined the channel [00:30] jocafa has joined the channel [00:35] avih has joined the channel [00:37] phiggins has joined the channel [00:41] storrgie has joined the channel [00:42] RyanW: how do I make npm install depdencies recursively? [00:42] jtrudeau has joined the channel [00:43] robertj: any dirty tricks to get the in memory size of an object? [00:43] darrylhebbes has joined the channel [00:45] slifty has joined the channel [00:45] kitt has joined the channel [00:45] robertj: are there docs on --prof anywher? [00:45] kitt has joined the channel [00:48] SirFunk: when using mongodb would i wrap each query in a db.open or would i wrap my whole app in db.open? [00:48] devongovett has joined the channel [00:48] MatthewS has joined the channel [00:49] igl1 has joined the channel [00:50] Aria: Depends on the lifetime of the app vs the lifetime of a query. [00:50] Aria: How long does your app run? [00:50] Aria: And does it need to re-open connections after they close? [00:50] isaacs has joined the channel [00:50] astralab has joined the channel [00:52] josh-k has joined the channel [00:54] SirFunk: Aria: my app is prettymuch just a backend to the database [00:54] SirFunk: or frontend .. i guess [00:54] neurodrone has joined the channel [00:55] SirFunk: grrr.. i the way mongodb works is frustrating.. i wish mongoose had better support [00:57] jocafa: i'm totally digging mocha + should [00:57] RyanW: Hmm, it seems I need to delete my node_modules folder before publishing or dependencies break [00:58] Aria: SirFunk: What kind of app, though? A persistent daemon? A short script? Something that services short requests? Long ones? [00:59] Aria: How frequent? [00:59] Aria: (Chances are, I'd build a connection pool for a long-lived app.) [01:00] Aria: (And I'd start some connections right away, and open more as I needed them.) [01:00] lyte has joined the channel [01:00] lyte has joined the channel [01:01] isaacs has joined the channel [01:02] SirFunk: Aria: daemon, potentially fairly frequent [01:02] SirFunk: hmm [01:04] k1ttty has joined the channel [01:09] JakeyChan has joined the channel [01:09] adrianmg1 has joined the channel [01:10] CIA-109: node: 03Ben Noordhuis 07master * r2445fb8 10/ src/node_version.h : Fix double #define of NODE_VERSION_IS_RELEASE - http://git.io/D45QxQ [01:11] adrianmg1 has left the channel [01:16] MatthewS has joined the channel [01:18] liar has joined the channel [01:18] robertj: so i'm pondering a mud where folks can run their own code, seems like they would need to interact with a world of proxys and weakmaps basically? [01:19] avih has joined the channel [01:20] plutoniiiix has joined the channel [01:21] davidascher has joined the channel [01:23] JakeyChan has joined the channel [01:24] pixel13 has joined the channel [01:24] pixel13 has left the channel [01:24] k1ttty has joined the channel [01:25] Aria: Likely. [01:25] Aria: Or separate processes. [01:27] ShinyDarkness has joined the channel [01:28] akihito_s has joined the channel [01:30] clithe: hello, im currenlty developing a chat app with node and socket.io, because chat will be moderated and priv messaging is also a feature i need to be able to operate specific sockets (sending messages to specific chat user by motherator, priv messaging); at the moment my quick solution was to use a "socket pool" (js object with sockets assigned to chat users' nicknames) and it works fine, but i was wondering if there is more elegant solution to [01:36] cjm has joined the channel [01:38] Clex: I don't find this particularly not-elegant. [01:38] slifty has joined the channel [01:39] jrogers has joined the channel [01:39] stantona has joined the channel [01:40] robotmay has joined the channel [01:40] PaOne has joined the channel [01:40] kazupon has joined the channel [01:40] akihito__ has joined the channel [01:42] Daegalus has joined the channel [01:43] davidbanham has joined the channel [01:43] akihit___ has joined the channel [01:43] jgautier has joined the channel [01:44] jbrokc_ has joined the channel [01:44] davidban_ has joined the channel [01:46] jgautier has joined the channel [01:46] stantona has joined the channel [01:49] avalanche123 has joined the channel [01:50] clithe: Clex: i also find this a "standard approach", i was just wondering if there is a socket.io feature that can be levereaged for this task (like capability to join/leave/handle rooms about which i didn't find any info in socket.io's docs/wiki) [01:50] tomlion has joined the channel [01:52] stantona has joined the channel [01:52] catshirt has joined the channel [01:53] SirFunk: anyone have any good way for handling/manipulating trees of data? [01:53] stantona has joined the channel [01:54] jbrokc_ has joined the channel [01:54] jasonmchristos_ has joined the channel [01:54] robertj: so apparently proxys are not valid execution contexts? [01:54] jasonmchristos_: anyone know about a python module for gpg? [01:54] phiggins has joined the channel [01:57] maxogden: SirFunk: https://github.com/substack/js-traverse [01:58] jasonmchristos_: anyone know about a python module for gpg? [01:58] jasonmchristos_: isnt node.js coded in python ? [01:58] mmalecki: no, it's not. it's coded in C and C++/ [01:59] SirFunk: jasonmchristos_: lol [01:59] mmalecki: you can write a binding fot that [01:59] maxogden: jasonmchristos is a known troll for the record [01:59] johnnywengluu: jasonmchristos_: =) [01:59] mmalecki: oh! ok [01:59] johnnywengluu: haha funny [01:59] mmalecki: maxogden: wait, the Jesus one? [01:59] defunctzombie has joined the channel [01:59] maxogden: mmalecki: 'mormon backdoors' yeah [01:59] defunctzombie: anyone around that has extensive experience with node.js c++ modules? [01:59] mmalecki: maxogden: ah, lol [02:02] jasonmchristos_: My shell has node and it loads gpg python modules [02:04] jbrokc_ has joined the channel [02:10] k1ttty has joined the channel [02:12] akihito_s has joined the channel [02:12] Illusioneer1 has joined the channel [02:15] xeodox: Should I use Jade or EJS for my tempting engine? [02:16] maxogden: yes [02:16] jasonmchristos_: anyone know about these python gpg modules? [02:17] alejandromgs: xeodox yes. but all depends on your needs, I prefer jade because I don't like to do <% Something like this %> [02:17] xeodox: What are the pros and cons? [02:17] mmalecki: I like plates [02:17] mmalecki: https://github.com/flatiron/plates [02:17] clithe: xeodox: guess you gotta check yourself, i also prefer jade [02:17] mmalecki: but I'm biased [02:18] alejandromgs: plates is cool also... [02:19] clithe: mmalecki: pozdro znad morza :> [02:19] mmalecki: clithe: hahaha :D, cześć :) [02:20] clithe: mmalecki: nie ma to jak andrzejki przy kodzie - god i love it :D [02:20] mmalecki: lol [02:20] mmalecki: anyways, plates is cool if you don't like DSL [02:20] mmalecki: *DSLs [02:21] mmalecki: and Jade is easy to get and easy to write [02:22] Wizek-other has joined the channel [02:22] chrisvwebdev has joined the channel [02:22] clithe: and jade it supports blocks which i like in django :> [02:23] chrisvwebdev has left the channel [02:25] saadiq has joined the channel [02:27] KBM has joined the channel [02:28] KBM: hey guys, i came across something and i can't figure out why its happening, is it a bug or I'm i missing something? https://gist.github.com/1396828 [02:29] KBM: why do i see "test" in my console twice? [02:29] KBM: if i request the page once... [02:29] Aria: Let me guess, the client is the browser? [02:30] KBM: hum... [02:30] KBM: curl.. once [02:30] KBM: ok. [02:30] KBM: explain :D [02:30] Aria: favicon.ico [02:31] SubStack: how did that convention even get started I don't even [02:31] SubStack: the bested, favoritest icon dot ico [02:32] KBM: i don't see this in the documentation… point me to some good reading? [02:32] elevenarms has joined the channel [02:32] Aria: Most browsers fetch /favicon.ico to get the favorite icon to put in the URL bar. [02:32] KBM: ahhh. [02:32] Aria: So you hit a new domain, it asks for /favicon.ico AND / [02:32] KBM: -- i feel so dumb [02:32] purr: Let it be known that KBM hates i feel so dumb. [02:33] Aria: I think this might be a FAQ, actually. It's totally not-obvious, it's the only thing of its kind in browserland. [02:33] SubStack: favicon would be a great supervillain [02:33] KBM: feels dumb [02:33] SubStack: the favicon strikes again! [02:33] Aria: and it's a dumb ass design. Thanks, Microsoft. [02:33] KBM: lol [02:35] Daegalus has joined the channel [02:35] Draco_ has joined the channel [02:35] clithe: yeah, it's a bitch, caused me some problems with CSRF-secured login forms when favicon was not present [02:36] Draco_ has joined the channel [02:37] diogogmt has joined the channel [02:39] SirFunk: maxogden: got any other resources on trees? I need to save/read/manipulate a tree stored in mongo [02:40] SirFunk: that lib seems great for manipulating a tree.. but i need to construct it first :-P [02:40] Aria: A tree more complex than just storing an object? [02:42] SirFunk: Aria: well.. right now i'm storing them as seperate objects with references to the id's of their children/parents [02:42] SirFunk: it works _great_ wth ruby/mongoid/mongoid-tree [02:43] josh_k has joined the channel [02:43] marcostoledo has joined the channel [02:43] SirFunk: does not work so hot with mongoose nor can i figure an elegant way to navigate it with mongodb-native [02:43] jbrokc_ has joined the channel [02:43] clithe: good nite mates [02:43] jdpacker has joined the channel [02:44] Aria: How's that queried? N queries for N depth? [02:49] SirFunk: Aria: prettymuch [02:50] Aria: Heh. That would involve a fair amount of callback management. [02:50] amigojapan has joined the channel [02:50] Aria: Revealing the inefficiency there. Is that really the most natural query pattern for your task? [02:50] lyte has joined the channel [02:50] lyte has joined the channel [02:52] SirFunk: Aria: hmm.. yeah each object can have rather frequent updates. If i have them all embedded it'll have to re-write the one huge object all the time [02:52] shipit has joined the channel [02:52] Aria: Ah, fun. And you have to traverse the whole stack each time? [02:53] SirFunk: Aria: not on writes. only on reads which are less common [02:54] Aria: ah, good [02:54] Aria: Sounds like the right pattern [02:54] Aria: One of these days I'll have to play with mongoose and such [02:55] SirFunk: what is your db of choice? [02:56] tilgovi: is jspec still around? jspec.info 404s on tj's repo. [02:56] tilgovi: appears to have vanished [02:56] Daegalus has joined the channel [02:56] Aria: Me? When I can't use git or a plain filesystem, usually postgresql [02:56] Aria: But most of what I do is streaming, not database [02:57] SirFunk: Aria: ahh... yeah i'm mainly getting into node for socket.io streaming. but i need to persist the data somehow [02:58] Aria: ACTION nods. [02:58] Aria: Oh, and redis. I've done a bit with Redis. [02:58] mattly has joined the channel [02:58] MUILTFN has joined the channel [03:00] jrogers has joined the channel [03:01] Wizek-other2 has joined the channel [03:02] Daegalus has joined the channel [03:02] hij1nx has joined the channel [03:02] SirFunk: man i've spent like 8 hours on this today and have gotten nowhere [03:02] Aria: Wow. [03:02] Metal3d has joined the channel [03:04] maxogden: SirFunk: i dont use mongo sorry [03:04] jbrokc_ has joined the channel [03:04] joshthecoder has joined the channel [03:06] RedSofa has joined the channel [03:06] jbrokc_ has joined the channel [03:06] saadiq has joined the channel [03:07] boltR has joined the channel [03:10] Daegalus has joined the channel [03:13] kkszysiu_ has joined the channel [03:14] issackelly_ has joined the channel [03:14] cjheath has joined the channel [03:15] EYES_ has joined the channel [03:18] swaj: so I'm using connect sessions, through express, and I'd like my mongoose model to be able to read the current user's session data in a pre-save event. Is there a way to get the current session from connect without having access to a "req" (request) object? [03:20] IrishGringo has joined the channel [03:22] Daegalus has joined the channel [03:24] jbrokc__ has joined the channel [03:25] ekryski has joined the channel [03:25] Wizek-other has joined the channel [03:26] akihito__ has joined the channel [03:33] ekryski has joined the channel [03:34] jbrokc_ has joined the channel [03:34] harthur has joined the channel [03:34] rwasielewski has joined the channel [03:34] slifty has joined the channel [03:35] progrock`: in express, how to I access functions from inside my code in my jade templates? [03:36] russfrank: progrock`: pass in a ref to the function? [03:36] russfrank: that was just a guess. it would probably work but I don't actually know [03:36] progrock`: russfrank: yeah, thats what im tring now [03:36] russfrank: feels like there should be a better way [03:37] swaj: progrock`: what you're looking for is either a helper or a dynamicHelper [03:37] swaj: if your function needs access to the req,res objects, use a dynamicHelper [03:37] gischy has joined the channel [03:38] progrock`: swaj: thanks.. yeah, I htink I have it wokring, but i dont know why markdown is not processing liek I expect it to [03:38] swaj: http://expressjs.com/guide.html <-- search for "app.helpers" and "app.dynamicHelpers" and you'll see how they're used. [03:38] akihito_s has joined the channel [03:39] progrock`: it didnt throw errors, so i think I got it working as a helper.. but still need to figure out why this string isnt processed as markdown.. sing markdown.toHTML [03:40] Wizek-other2 has joined the channel [03:40] swaj: make sure you call your method as != [03:40] swaj: for example, if you made a helper called "markdown" then !=markdown(blah) [03:40] tilgovi: so, yeah. no jspec users here have any idea where it went? [03:41] progrock`: swaj: yes, I am.. I need to inspect the code.. since its owkring on my server, not locally, and I dont see any changes to the code that would make it work different [03:43] Kunda has joined the channel [03:44] RedSofa has joined the channel [03:44] Daegalus has joined the channel [03:45] davidascher has joined the channel [03:45] mpoz2 has joined the channel [03:46] ryanfitz has joined the channel [03:46] nixer1102 has joined the channel [03:47] jtsnow has joined the channel [03:47] mjr_ has joined the channel [03:48] chrislorenz has joined the channel [03:50] louissmit has joined the channel [03:50] Wizek-other2 has joined the channel [03:54] progrock`: hahahaha [03:55] progrock`: markdown was working.. i'm just stupid and was doing : instead of # for hadings [03:55] torsd has joined the channel [03:57] subbyyy has joined the channel [03:57] sorin has joined the channel [03:58] jtsnow has joined the channel [03:59] Wizek-other has joined the channel [03:59] heavysixer has joined the channel [04:00] dreamdust has joined the channel [04:01] dreamdust: Are there any node frameworks that leverage backbone.js in any way? [04:04] tzusman has joined the channel [04:04] plutoniix has joined the channel [04:05] tzusman: how come I can't use an npm package that shows up when I run "npm -g list" [04:06] aude has joined the channel [04:06] nicholasf: does anyone know of a js cloud api - like what fog is for ruby? https://github.com/fog/fog [04:07] torsd has joined the channel [04:08] avalanche123 has joined the channel [04:09] booyaa has joined the channel [04:09] k1ttty has joined the channel [04:10] alejandromg: nicholasf: for aws or rackspace? [04:11] nicholasf: either - I just want to see what's available [04:11] nicholasf: I might want to play with it to also fit an australian cloud [04:11] alejandromg: Let me check... [04:12] shanebo has joined the channel [04:12] tomlion has joined the channel [04:12] alejandromg: i.e: awssum [04:13] torsd has joined the channel [04:13] alejandromg: also [04:13] alejandromg: https://github.com/nodejitsu/node-cloudservers [04:13] anon has joined the channel [04:14] konobi: there's also a node library/cli interface for interacting with joyent cloud too [04:15] alejandromg: Yeah... Plus is pretty straight forward to write one [04:16] anon: konobi: i was listening to nodeup #7 and a reference was mentioned to a www.eisler ???... do you know what the actuall reference is? [04:16] alejandromg: nicholasf: awssum -> https://github.com/appsattic/node-awssum [04:16] isaacs: tzusman: npm faq <-- run that command, and read it [04:16] nicholasf: k thans [04:16] Nuck: Anyone know if Request handles caching? [04:17] maxogden: it sets etags [04:17] maxogden: im assuming you mean mikeal/request [04:17] OneOfOne has joined the channel [04:17] Nuck: I need to do a cross-domain request for a template, but it shouldn't change too often, so I figure I'll want caching [04:17] Nuck: And yes, mikeal/request [04:18] tzusman: isaacs: ah, thanks. I guess i made a bad assumption about what installing globally meant [04:19] konobi: anon: nope [04:19] Zach has joined the channel [04:19] skm has joined the channel [04:19] anon: k, thx [04:20] maxogden: Nuck: oh i dont think theres built in caching like that [04:20] Nuck: hmm [04:20] TheLifelessOne: on windows, is there any reason why putting a module in the same folder as the executable would cause a "not found" error? [04:21] TheLifelessOne: or do I have that totally wrong? [04:21] maxogden: Nuck: its pretty easy to implement though. hash the req options object and store the result in an object [04:21] maxogden: and write a wrapper function that performs the cached request [04:21] rbright has joined the channel [04:21] ekryski has joined the channel [04:22] Nuck: maxogden: Well, isn't there some way to tell if a resource has been modified since the last request? [04:22] Nuck: I'm not clear on all the details of how HTTP works, of course, so I'm probably wrong. [04:22] isaacs: tzusman: you can use `npm link` to link global things into your local space [04:23] tzusman: isaacs: yep, saw that [04:23] isaacs: i use the hell out of that command [04:24] tzusman: i wish i had read the faq earlier. I'm trying to get npm, redis, and a nodejs_redis package installed via chef and was pulling my hair out trying to make my node script be able to load the nodejs_redis module [04:24] isaacs: tzusman: yeah, it's a tough problem. you put enough sign posts down, and it starts to be just another (less pretty) forest [04:25] booyaa has joined the channel [04:25] tzusman: maybe a warning message when a -g flag is passed to the install script? [04:26] meso has joined the channel [04:27] isaacs: yeah… but… what if you want a global install? [04:27] tzusman: it wouldn't block the script, just be a little reminder [04:29] russfrank: Nuck: last modified header [04:29] elliottcable has joined the channel [04:29] russfrank: o_O [04:31] Draco_ has joined the channel [04:31] ritch has joined the channel [04:32] martin_sunset has joined the channel [04:33] shanebo: hey guys is it always a no no to use namespaced globals? [04:34] maushu_ has joined the channel [04:34] pquerna: has anyone made little class for an auto-growing buffer? [04:35] jacobolus has joined the channel [04:35] phzbOx has joined the channel [04:35] pquerna: nm, guess bufferlist is something like i want. [04:36] Destos has joined the channel [04:37] TheLifelessOne: Aha, npm on windows! <3 [04:42] jesusabdullah: shanebo: I've never found much use for globals outside of require, process and console [04:42] interrupt has joined the channel [04:43] jtsnow has joined the channel [04:44] jbrokc__ has joined the channel [04:44] TheLifelessOne: with the request module, do I need to do anything special to retreive JSON data? [04:45] rchavik has joined the channel [04:45] rchavik has joined the channel [04:46] CarterL has joined the channel [04:49] akihito_s has joined the channel [04:50] rchavik has joined the channel [04:51] D_rwin has joined the channel [04:51] openpercept has joined the channel [04:52] progrock`: anyone using css3 pie or cssfx, or similar? [04:53] davidbanham has joined the channel [04:53] matin has joined the channel [04:54] matin: hey guys [04:54] matin: does anyone know how to use npm in 0.6.3? [04:54] jbrokc_ has joined the channel [04:54] TheLifelessOne: what platform? [04:54] Squeese has joined the channel [04:55] matin: mac [04:55] TheLifelessOne: Linux/Mac, it should be pretty easy to install if I remember correctly. [04:55] TheLifelessOne: Ok. [04:55] matin: i just upgraded [04:55] matin: oh wait [04:55] matin: that's weird [04:55] matin: I'm on 0.6.2 [04:56] matin: lol [04:56] TheLifelessOne: Weird indeed. [04:56] matin: well thats awkward [04:56] matin: i forgot to update node [04:56] matin: i mean npm [04:56] TheLifelessOne: I know the feeling. I do it all the time [04:57] matin: oops i broke it [04:58] matin: Error: EACCES, permission denied '/usr/local/share/man/man1/npm-adduser.1' [04:58] TheLifelessOne: D'you need admin permissions? [04:58] matin: im an admin [04:58] matin: and i used sudo [04:58] TheLifelessOne: I see. [04:58] TheLifelessOne: ACTION doesn't know much about Macs. [04:59] matin: lol [04:59] shanebo: jesusabdullah, yeah usually I agree. However I have a scenario where I need to get the exact instance of a class for the project I'm in and can't see another way besides namespaced globals [04:59] TheLifelessOne: Yep. I'm still stuck on Windows. :( [04:59] matin: i used to be a windows [05:00] D_rwin has left the channel [05:00] jacobolus has joined the channel [05:01] rchavik has joined the channel [05:01] rchavik has joined the channel [05:01] matin: ohhh [05:01] matin: i had to do sudo sh [05:01] matin: got it :) [05:02] xeodox: What are you guys building? [05:03] TheLifelessOne: Tryin' to get working http requests [05:03] Heisenmink has joined the channel [05:05] TheLifelessOne: Hmm. [05:05] TheLifelessOne: Is there any reason why request breaks when using .json as the file extension? [05:06] maushu__ has joined the channel [05:07] gavin_huang has joined the channel [05:10] slifty has joined the channel [05:10] romanb has joined the channel [05:11] progrock`: Anyone have some "must have" poly fills they always use with modernizr... theres so much overlap, dont know which route to go for CSS3 support, etc [05:15] gregmoreno has joined the channel [05:15] maushu has joined the channel [05:18] Advant: Anyone know how to escape a single quote with jade template engine, I've tried \, but isn't working [05:20] dr0id has joined the channel [05:21] davidbanham has joined the channel [05:22] kpko-fn has joined the channel [05:22] kpko-fn: hi guys :-) [05:22] heatxsink has joined the channel [05:23] kpko-fn: does anyone know what "npm ERR! Error: getaddrinfo ENOENT" means? That error occurs on every "npm install". Node and NPM are the latest (0.6.3, windows) [05:24] jbrokc__ has joined the channel [05:24] kpko-fn: nobody? [05:26] kpko-fn: too bad =( [05:27] alejandromg: issacs: ping [05:27] shanebo: alejandromg spelled it wrong :) [05:28] alejandromg: shanebo: lol XD yeah! double aa not s [05:28] shanebo: kpko-fn isaacs is the one we can thank for npm so he may know [05:29] kpko-fn: oh :D [05:29] kpko-fn: that explains a lot :D [05:32] towski has joined the channel [05:33] Aria: That sounds like it can't look up a hostname. Are your DNS servers working? [05:35] jbrokc_ has joined the channel [05:35] JakeyChan: hi ? [05:36] JakeyChan: because my server has installed httpd and run at port 80, but I also want user access node site without the port number. [05:36] JakeyChan: do you have solution for this ? [05:36] kpko-fn: @Aria: if you meant me, hmm, my dns server is nothing special (router), it works as normal [05:37] Aria: kpko-fn: Might be worth trying something like Google's resovers at 8.8.8.8 [05:37] alejandromg: JakeyChan Proxy pass? [05:37] interrupt has joined the channel [05:37] JakeyChan: alejandrong: don't know... [05:37] kpko-fn: i will try a nslookup vor the url at the npm error log [05:38] Aria: Could also be that your router sends malformed DNS packets that Windows reads but Node doesn't. [05:38] JakeyChan: alejandromg: I really don't know, [05:38] Aria: Node has its own resolver. [05:38] JakeyChan: and trying to ask help or tips [05:38] Aria: JakeyChan: Proxy. [05:38] Aria: Or get another IP. [05:38] JakeyChan: Aria: you mean setup proxy for node ? [05:38] Aria: Proxy to node. [05:38] JakeyChan: ok [05:39] Aria: If you have something already occupying the port, it'll have to cooperate. [05:39] JakeyChan: let me search it with google [05:39] mattpardee has joined the channel [05:41] JakeyChan: Aria: you mean this ? [05:41] JakeyChan: http://httpd.apache.org/docs/2.0/mod/mod_proxy.html [05:42] Aria: Sure, if the httpd on port 80 is Apache 2.0 [05:43] JakeyChan: Aria: thanks a lot ! [05:43] JakeyChan: let me setup it [05:45] torsd has joined the channel [05:45] akihito_s has joined the channel [05:48] Draco_ has joined the channel [05:49] ryanfitz has joined the channel [05:52] konobi: piscisaureus_: ping [05:53] MatthewS has joined the channel [05:54] shapeshed has joined the channel [05:58] chrislorenz has joined the channel [05:58] Aria: Note to everyone: weird DNS failures installing things in NPM can be a bad HTTP_PROXY variable. [05:58] isaacs: Aria: yes, that will also cause weird dns errors from curl and wget [05:58] jacobolus has joined the channel [05:59] jacobolu_ has joined the channel [06:00] schwab has joined the channel [06:00] AAA_awright has joined the channel [06:00] __class__ has joined the channel [06:02] localhost has joined the channel [06:04] Overshee has joined the channel [06:05] otakutomo has joined the channel [06:05] Aria: Grr. Lack of traceback on stack error is a real pain [06:11] Squeese has joined the channel [06:11] chrislorenz has joined the channel [06:12] konobi: Aria: are you throwing new Error? [06:21] Aria: Nope! [06:22] Aria: v8 is bailing because my stack is too large. [06:23] dhasenan has joined the channel [06:24] MatthewS has joined the channel [06:25] jbrokc__ has joined the channel [06:26] kpko-fn has left the channel [06:32] konobi: heh [06:32] konobi: infinite recusrion ftw [06:34] HT has joined the channel [06:34] plutoniix has joined the channel [06:37] caffine has joined the channel [06:38] booyaa has joined the channel [06:41] Draco_ has joined the channel [06:41] davidascher has joined the channel [06:42] akihito_s has joined the channel [06:42] ffranky has joined the channel [06:45] jbrokc_ has joined the channel [06:52] CiRlE_ has joined the channel [06:55] incon has joined the channel [07:05] npa has joined the channel [07:06] nicholasf has joined the channel [07:06] Youdaman has joined the channel [07:07] criswell has joined the channel [07:09] Youdaman: npm ERR! Error: npm link not supported on windows -- is there an alternative doing "npm link"? i'm a noob, be gentle. [07:09] isaacs: Youdaman: just install locally [07:09] Youdaman: i.e. how do i "install" a package not published via npm but that i cloned from github? [07:09] isaacs: (that is, no.) [07:09] isaacs: Youdaman: npm install ../some/folder/ [07:09] shapeshed has joined the channel [07:09] Youdaman: just following Marak's cheatsheet, oh ok [07:09] Youdaman: ty [07:09] isaacs: Youdaman: or, `npm install git://github.com/blahblahblah` [07:10] isaacs: Youdaman: but, changes won't' be reflected right away [07:10] isaacs: Youdaman: another trick: just develop in a folder named "node_modules" [07:10] isaacs: and then check things out as their module naem [07:10] JumpMast3r has joined the channel [07:10] Youdaman: yeah i read a comment of yours re it not working due to Win not doing symlinks :) but i have used a shell extension that does do some kind of symlinking windowz-stylee [07:10] Youdaman: ty ty [07:10] isaacs: Youdaman: read `npm help folders`. what it actually does is pretty simple, really. [07:10] Youdaman: isaacs: sweet. rtfm ftw. [07:11] secoif: There's no 'convention' to not any other send data with an err in a callback is there? eg, callback(err, data), I don't have to null data do I? [07:11] echoSMILE has joined the channel [07:12] secoif: way to go english sentence [07:12] echoSMILE: trying running this app: https://github.com/rogchap/SampleProjects/blob/master/NodeChat/app.js but I get: http://pastebin.com/f3ZNWpqv [07:12] Youdaman: but re the development of node on win, apparently the command mklink -D Link Target works? is there any future plan to extend npm to use this? [07:12] echoSMILE: Error: Cannot find module 'socket.io-client' <- but where? [07:13] isaacs: secoif: no, you can just leave it empty [07:13] Youdaman: i guess i could test the symlink method myself and just use it instead of having duplicate dirs, or do as suggested above [07:13] isaacs: Youdaman: you need to run as administrator to create symlinks, and node's fs.symlink is a no-op on windows [07:14] jbrokc__ has joined the channel [07:14] secoif: isaacs sorry, I mean, is it bad practice to send data along with a non-null err in a callback? [07:15] secoif: ie if (err) {callback(err)} else { callback(null, data) } VS callback(err, data) [07:17] echoSMILE: btw, after oficial documention, what other reference (book,webpage,... )can be suggested to learn about node.js ? [07:19] isaacs: secoif: oh, i dunno. i do that sometimes [07:19] isaacs: secoif: it should be the same data that would be sent if there was no error [07:20] isaacs: i.e., you don't want to send like cb(error, reason) [07:20] otakutomo has joined the channel [07:20] Youdaman: isaacs: ty again. will just stick with the "just git clone the repo into your node_modules folder within your app folder" technique -- that probably IS the simplest way. [07:20] isaacs: if "reason" isn't what a success would get [07:20] isaacs: Youdaman: look into the `npm submodule` command [07:20] Youdaman: kk [07:20] isaacs: Youdaman: npm submodule express <-- checks express out into ./node_modules/express. [07:20] secoif: yep, i figure it might be good practice since it allows downstream code to potentially ignore the error… [07:20] isaacs: Youdaman: then later, `npm explore express -- git pull origin master` [07:21] Youdaman: re this "npm help X" i get a "Top Hits" listing... how do i read/explore the actual hits/topics? [07:21] isaacs: Youdaman: `npm help ` where is one of the topics on the left. [07:22] Youdaman: yeah that's what i thought, but it just brings up the listing again, e.g. "npm help submodule" brings up the "Top Hits" showing me that "npm help submodule" is possible :P [07:23] isaacs: Youdaman: oh, that's not right [07:23] isaacs: yeah, i think that's a bug, actually :) [07:23] Youdaman: bug in win? [07:23] Youdaman: haha [07:23] Youdaman: was going a bit loopy there for a second [07:23] isaacs: bug in the windows msi installer [07:23] Youdaman: d'oh. [07:23] Youdaman: ACTION shakes fist at Win [07:23] isaacs: Youdaman: nono, this is totally my fault. [07:23] isaacs: not windows' :) [07:23] isaacs: http://npmjs.org/dist/ [07:23] neoesque has joined the channel [07:24] isaacs: get a zip from there, unpack it wherever node.exe lives [07:24] Youdaman: i had 0.60 but then saw npm came bundled with node so uninstalled and got 0.6.2 [07:24] Youdaman: kk [07:24] jbrokc_ has joined the channel [07:24] isaacs: then it should put back the missing files. [07:25] Youdaman: i prob should have left my old install as-is, as it prob didn't have the bug :P but i got all excited after reading marak's cheatsheet and thought i'd start fresh. if anything, working out wtf npm does and things like the diff between -g versus no -g and the "best practice" of installing modules local to your app -- all these concepts became clear and i finally thought "i get it now" [07:26] isaacs: awesome :) [07:27] Youdaman: isaacs: oh wow that is cool! npm help submodule launched the help html in my browser!!! [07:27] Youdaman: :D [07:28] isaacs: :) [07:28] Youdaman: i think npm is the key to grokking node from the perspective of someone like me that's come from Perl originally where we have CPAN -- understanding how to properly install modules and layout your file/folder structure is key atop actually doing the coding [07:29] isaacs: on unixes it opens it up in a man pager type thing, but windows doesn't have one of those [07:29] chrislorenz has joined the channel [07:30] Youdaman: isaacs: i just keep hanging onto Win for games. used to use Linux predominantly for several years. being stubborn about getting a Mac -- everyone has Mac now it's like... a cult. Or maybe I just like being different :P [07:30] isaacs: i just got a new mac. for the first time in a long time, i'm actually starting over, rather than just laying my old machine onto it with Time Machine [07:30] RyanW: Mac too mainstream? [07:31] isaacs: i'd had basically the same machine, in different hardware, for about 6 years. [07:33] Youdaman: RyanW: maybe that's exactly it :P isaacs: i was the same, but with winXP... only just came to win7 in the past couple of months. i'm not a zealot, but i prefer to use a win/linux combo, as i just felt that as a gamer, i wouldn't be happy going to mac, even though they've done well to capture the web/dev market with their "unix underneath" setup [07:33] RyanW: Hey isaacs, I made 2 npm packages but they have different email addresses next to the 'maintainer' of the package, even though the username is the same. Is it possible for me to change the email address of one? [07:33] RyanW: At the moment I have to run 'npm adduser' and change the email address in order to publish updates [07:33] shapeshed has joined the channel [07:34] Youdaman: isaacs: do you want me to file a bug re the help not working for the latest node? i'm guessing it's already been filed if you knew though. [07:34] isaacs: RyanW: why not just have one maintainer? you can add one to the other package using `npm owner add ` [07:34] isaacs: Youdaman: yeah, known, got a fix already [07:34] chrislorenz has joined the channel [07:34] RyanW: isaacs: I do only have 1 maintainer. But somehow it has a different email address assigned to either package. [07:35] RyanW: It validates against username and email address when you publish, but I can't change the email address on the package. [07:36] RyanW: So I end up with "Error: forbidden _npmUser must be a current maintainer." [07:36] npa has joined the channel [07:36] CIA-109: node: 03koichik 07v0.6 * r5451ba3 10/ (lib/tls.js test/simple/test-https-drain.js): [07:36] CIA-109: node: tls: fix https with fs.openReadStream hangs [07:36] CIA-109: node: Fixes #2185. [07:36] CIA-109: node: Fixes #2198. - http://git.io/vIHAHw [07:37] RyanW: I guess I need to made a 2nd maintainer. Add that. Delete the original. Readd the original with the right email addres the delete the 2nd maintiner. [07:38] RyanW: But I'm not sure that'd even work [07:40] Youdaman: so I'm guessing the main/only diff between 'npm install foo' and 'npm submodule foo' is that the latter requires you to update foo manually or something like that? after reading marak's cheatsheet i just figured you could do 'npm install foo' in each app directory and it grabs that package and plonks it in ./node_modules [07:41] Youdaman: in other words: why would i do 'npm submodule foo' at all? does it not do something that 'npm install foo' does do that you wouldn't want it to? [07:41] Youdaman: ACTION is RTFM [07:42] isaacs: Youdaman: submodule means that it's a git submodule [07:42] isaacs: Youdaman: which is kind of ok if you're using git, and want to check it in as a submodule [07:42] mattpardee has left the channel [07:42] RyanW: Maybe I'll just script it to change the maintainer email every time I publish [07:44] Youdaman: isaacs: yeah my concrete use-case is mikael/maxogden's https://github.com/mikeal/node.couchapp.js#readme -- the install instructions use 'npm link' so i'm wonder what "best practice" is for me in this case? guessing submodule. [07:44] isaacs: Youdaman: probably the best approach there would be to `npm install` it locally, and then set up a "scripts": { "push": "couchapp sync blah blah blah" } in your package.json, so you could do `npm run push` [07:45] isaacs: to sync it [07:45] dshaw_ has joined the channel [07:45] Youdaman: isaacs: fair enough. ty ty. i'll leave you be for a bit :D [07:46] wmage has joined the channel [07:47] RyanW: isaacs: Am I able to update the 'maintiners' of my package directly by using some REST interface to registry.npmjs.org? [07:48] RyanW: grr what's annoying is 'unpublish' works, so my package got deleted, but 'publish' fails because that vlaidates the maintiner more strictly. [07:54] rurufufuss has joined the channel [07:55] openpercept has joined the channel [08:00] enos_feedler has joined the channel [08:00] progrock`: exit [08:00] progrock`: oops wrong window [08:01] lzskiss has joined the channel [08:02] franck34 has joined the channel [08:02] lzskiss has joined the channel [08:02] lzskiss: yo [08:09] jbpros has joined the channel [08:11] gavin_huang has joined the channel [08:11] crcn has joined the channel [08:12] gavin_huang has joined the channel [08:12] npa has joined the channel [08:13] Youdaman has joined the channel [08:13] braoru has joined the channel [08:14] kazupon has joined the channel [08:15] F_ has joined the channel [08:19] interrupt has joined the channel [08:20] k1ttty has joined the channel [08:20] mikeal has joined the channel [08:21] dennisjbell has joined the channel [08:23] _bat has joined the channel [08:25] passionke has joined the channel [08:27] wookiehangover: sup [08:27] fangel has joined the channel [08:29] lzskiss has joined the channel [08:29] lzskiss: yo [08:32] jondot has joined the channel [08:32] jondot: hi guys, i'm looking for guidelines for error handling in production apps; try/catch over everything? is there a central place for that? do a certain framework (express?) handle that for me? [08:34] jondot: i see this repeatedly with my apps. once i finish them up, to push them into real life (prod), i have 2 things missing: proper hierarchial configuration (by environment) and robust error handling + logging (i.e. don't crash my server) [08:34] rskuja has joined the channel [08:34] jondot: so far i'm mixing node config and winston for that [08:35] lzskiss has joined the channel [08:37] fly-away has joined the channel [08:37] maga has joined the channel [08:38] idl3 has joined the channel [08:38] jtr__ has joined the channel [08:39] benlyng has joined the channel [08:43] Daegalus has joined the channel [08:44] lzskiss has joined the channel [08:45] EuroNerd has joined the channel [08:52] herbySk has joined the channel [08:54] Druid_ has joined the channel [08:56] boehm has joined the channel [08:57] djko has joined the channel [09:00] Dreamer3 has joined the channel [09:02] Wizek has joined the channel [09:02] gavin_huang has joined the channel [09:03] interrupt has joined the channel [09:03] SamuraiJack has joined the channel [09:04] cjm has joined the channel [09:06] blueadept has left the channel [09:13] dartforce has joined the channel [09:14] jBaron has joined the channel [09:16] Margle has joined the channel [09:17] jBaron has left the channel [09:17] deoxxa has joined the channel [09:18] simenbrekken has joined the channel [09:23] djko has joined the channel [09:24] ioNull has joined the channel [09:25] d0k has joined the channel [09:25] wolftankk has joined the channel [09:26] `3rdEden has joined the channel [09:27] akihito_s has joined the channel [09:29] mange has joined the channel [09:32] adambeynon has joined the channel [09:38] piscisaureus_ has joined the channel [09:41] ecin has joined the channel [09:43] ecin_ has joined the channel [09:47] qFox has joined the channel [09:50] bbommarito has joined the channel [09:51] bbommarito: Anyone here know of a blog post, or article or something, on doing encryption in a node app? Not, hashing, but full two way encryption. [09:52] josh-k has joined the channel [09:53] konobi: ryah: unlikely... but ping? [10:01] lmorchard has joined the channel [10:02] mendel_ has joined the channel [10:02] lemonad has joined the channel [10:02] secoif: Anyone looked at ignitejs and have an opinion on it? http://ignitejs.com/getting_started/introduction.html [10:02] interrupt has joined the channel [10:03] liar has joined the channel [10:07] thalll has joined the channel [10:08] churp has joined the channel [10:09] konobi: when people dive into UML... it generally turns into academic wankery imo [10:09] robhawkes has joined the channel [10:10] akihito_s has joined the channel [10:10] lzskiss has joined the channel [10:11] mike5w3c has joined the channel [10:13] arcanis has joined the channel [10:14] sivang has joined the channel [10:14] hipsterslapfight has joined the channel [10:17] sivang: hi all, I would like to use node.js to create an imap client that will fetch as much content as bandwidth allows at the same time, to be able to replicate a crowded mailbox [10:18] sivang: Is there any example like this that also manipulates the message data - this seems just to deal with the fetching itself - https://github.com/mscdex/node-imap [10:18] SoulRaven has joined the channel [10:18] SoulRaven has joined the channel [10:18] SoulRaven has joined the channel [10:18] SoulRaven has joined the channel [10:20] devaholic has joined the channel [10:21] broofa has joined the channel [10:21] Neil_ has joined the channel [10:21] tomlion has joined the channel [10:24] teknopaul has joined the channel [10:26] chirag has joined the channel [10:28] mraleph has joined the channel [10:29] secoif: konobi agreed, overengineering abounds, though sometimes you get complex problems whose architecture might be aided by some diagramming, UML or whatever [10:29] shipit has joined the channel [10:30] secoif: though I was less interested in it for the uml, and more for the statemachines [10:31] jxie has joined the channel [10:32] gut4 has joined the channel [10:33] rfw has joined the channel [10:34] rfw: hello, quick question: what's the recommended way of throwing errors from asynchronous functions in node.js? [10:34] rfw: should i just tack on an errback to each async function? [10:35] whitman has joined the channel [10:35] rfw: but i'm not sure how that works with the .on() style of callbacks [10:35] Heisenmink has joined the channel [10:36] jtr__ has joined the channel [10:36] secoif: rfw usually you'll call a callback, with the error as the first parameter [10:36] igl has joined the channel [10:36] secoif: but with event emitters, you'll fire an 'error' event [10:37] rfw: ah, okay [10:37] lzskiss has joined the channel [10:38] jtr__ has joined the channel [10:38] rfw: oh, there's an EventEmitter prototype [10:39] secoif: look for patterns used in core, you'll see the err param in callbacks used in fs, and you'll see 'error' event anything that looks like a streams [10:39] secoif: yeah you can just do [10:39] secoif: var MyConstructor = function() {}; MyConstructor.prototype = require('events').EventEmitter; [10:39] rfw: is it safe to just do Foo.prototype = new events.EventEmitter(); [10:39] rfw: okay, awesome [10:40] secoif: yeah [10:40] secoif: actually [10:40] secoif: mine is wrong [10:40] secoif: new EventEmitter() [10:40] secoif: is correct. [10:40] jtr__ has joined the channel [10:41] sveisvei has joined the channel [10:41] rfw: okay, thanks :) [10:41] teknopaul: Hi all anyone know how to get the MAC address of an IP in node, do I have to start parsing /proc/net/arp or is there something cross paltform that exists? [10:41] _baton_ has joined the channel [10:43] nils_r has joined the channel [10:45] jtr__ has joined the channel [10:52] interrupt has joined the channel [10:54] interrupt has joined the channel [10:55] plutoniix has joined the channel [10:56] EuroNerd has joined the channel [10:57] madhums has joined the channel [10:58] bosphorus has joined the channel [10:59] binaryjohn has joined the channel [11:00] dubenstein has joined the channel [11:07] otakutomo has joined the channel [11:12] tuhoojabotti has joined the channel [11:13] tuhoojabotti: Ho [11:13] jomoho has joined the channel [11:13] EuroNerd: booyah [11:14] Margle has joined the channel [11:15] MUILTFN has joined the channel [11:16] tuhoojabotti: Okay, some one who knows how to use c9.io tells me how to use git? [11:16] tuhoojabotti: Because it used to be available in the commandline [11:17] yogurt_truck has joined the channel [11:19] raincole has joined the channel [11:21] Locke23rus has joined the channel [11:24] teknopaul: Hi All: I need to write a hacky module to parse the output of arp , anyone got a MAC handy? [11:24] teknopaul: could you post the output from arp -an 192.168.1.1 including whitespace [11:27] lxsameer has joined the channel [11:28] lxsameer: i can't install any thing using npm , it seems that it did not access to internet, but i have internet access [11:28] teknopaul: npm is working for me [11:31] lxsameer: here is the error log http://dpaste.com/662268/ [11:31] bbommarito: Now, does Node.js support the ECMAScript 5 spec? So stuff like Array#indexOf? [11:33] stride: lxsameer: that happens to me with a couple of modules as well, not sure why. I think it's in the stage where the module is downloaded and gets linked [11:33] serroba_ has joined the channel [11:33] stride: (same node and npm version) [11:35] lxsameer: so what should i do then ? [11:35] teknopaul: you could look at the source code of graceful-fs.js [11:35] teknopaul: I just took a looko but I have a different version [11:36] adambeynon has joined the channel [11:37] jtr__ has joined the channel [11:40] robotmay has joined the channel [11:40] lxsameer: teknopaul: ok thanks [11:41] teknopaul: any luck? did you see anythign usefull? [11:41] lxsameer: no, [11:41] tuhoojabotti: halp! [11:41] Sorella has joined the channel [11:41] lxsameer: i just get the stable version [11:41] lxsameer: but it seems that its not stable enough [11:47] stride: open(/tmp/npm-1322394386758/1322394386758-0.08135653752833605/___package.npm/package/lib/socket.io-client.js, undefined, null, function()) [11:47] stride: yeah, that doesn't look right [11:47] teknopaul: 1.1.0-alpha-2 does nto sound like a stable version [11:48] stride: teknopaul: it's bundled with node stable though [11:48] teknopaul: ok [11:51] augustl: how do I disable warnings in node? A dependency causes 'The "sys" module is now called "util". It should have a similar interface.' to be printed, I want to disable that warning so I can take a screenshot of my programs output.. [11:52] mmalecki: you don't. it was discussed before, but nobody did anything [11:52] Bonuspunk: fake the screenshot? ^^ [11:52] mmalecki: augustl: modify node_modules/harass the author [11:52] stride: constants.O_SYMLINK being undefined there might be the root cause, though I'm just guessing there [11:52] augustl: oh, really? [11:52] augustl: guess that's what you get in a 0.x release.. [11:57] hipsterslapfight has joined the channel [11:58] amigojapan has joined the channel [11:58] gut4 has joined the channel [11:59] augustl: hmm find . -type f -exec grep "require('sys" {} \; only prints the match, and not the file name [12:00] stride: O_SYMLINK got into nodes internal node_constants.cc back in march by isaacs (used by npm and causing that failure I believe). I can't really see who / why it was removed [12:00] mmalecki: augustl: grep "require('sys" -R * [12:01] augustl: mmalecki: I want to not grep in symlinks though [12:01] augustl: find . -type f | xargs grep "require('sys" seems to work fine [12:02] stride: teknopaul: oh, it's still there in master, it's just dropped by the preprocessor I guess [12:02] pksunkara: https://github.com/pkumar/npm-police [12:03] hipsterslapfight has joined the channel [12:03] lxsameer: how can i install a package using source [12:04] augustl: would be nice if node could at least print the file that caused the warning.... [12:04] stride: teknopaul: what distro are you using? [12:04] svnlto has joined the channel [12:04] augustl: people actually use node for CLIs, sucks to not have control of the output [12:05] stride: I think my npm might be failing because the constant is getting dropped when node is compiled because I forgot to install linux-headers-... on this box. I'll have to recompile node to check if I'm correct though, will get back to you [12:09] augustl: aait https://github.com/joyent/node/issues/2205 [12:09] teknopaul: stride: it is lxsameer that has the problem I was just poking my nose in. [12:09] stride: teknopaul: oh, sorry :) [12:10] lxsameer: teknopaul: hmm how can i downgrade the npm [12:10] motill has joined the channel [12:10] __doc__ has joined the channel [12:10] augustl: so there's absolutely no way to disable warnings in node? Not even a compile time flga? [12:10] blup has joined the channel [12:10] augustl: flag* [12:11] stride: last time I checked those where just console.logs in the core code [12:11] tring has joined the channel [12:12] mmalecki: yes [12:12] augustl: amateurs :P [12:12] mmalecki: ok, lets find the ticket and change it [12:12] tring: are there any ramifications on not ending the response for a particular request? ( ex: res.end() ) [12:13] stride: a kitten dies and the connection might not be closed by the client [12:13] augustl: tring: the connection doesn't close [12:14] augustl: where's lib/sys.js on an installed node? Is it compiled into the binary? [12:14] tring: cool thanks :) [12:14] davv3_: die kittens [12:14] stride: augustl: https://github.com/joyent/node/blob/master/lib/sys.js [12:15] mmalecki: I think that sys will be removed shortly [12:16] stride: think they're compiled in [12:16] flexd has joined the channel [12:16] mmalecki: in 0.8, I'd say? [12:16] augustl: I'll patch node and recompile then [12:16] mmalecki: augustl: harass module author [12:17] mmalecki: who is it/what module is it? [12:17] stride: can't you just pull the parts of sys.js out that you need? it'll change any time node changes anyway [12:17] mmalecki: piscisaureus_: hey, you there? [12:17] npa has joined the channel [12:18] stride: hm. any core people here that know where O_SYMLINK is supposed to be defined? [12:18] teknopaul: lxsameer: I'm running from source code so to dowgrade you git branch v0.6.0 and rebuild [12:18] Juan77 has joined the channel [12:18] lxsameer: teknopaul: thanks [12:19] teknopaul: sorry git checkout v0.6.0 [12:19] teknopaul: git tag shows you the options [12:20] flexd has joined the channel [12:21] stride: constants.O_SYMLINK = 0x200000; [12:21] stride: in graceful-fs.js:28 helps as well :> [12:22] augustl: mmalecki: not sure :) [12:22] augustl: mmalecki: faye, I think [12:23] mmalecki: augustl: what's the module name? [12:25] augustl: mmalecki: faye [12:25] mmalecki: ah! ok [12:26] mmalecki: augustl: no [12:27] mmalecki: augustl: actually, yes [12:27] N0va` has joined the channel [12:27] mmalecki: augustl: https://github.com/jcoglan/faye/commit/3e15f00852d3edbb43ad09ee000763d34a7a73a4 [12:28] augustl: yey [12:29] ph^ has joined the channel [12:29] Margle has joined the channel [12:29] gut4 has joined the channel [12:30] adammw111 has joined the channel [12:30] adrianmg has joined the channel [12:31] adammw111: Hi, is a ReadableStream pipe directly equivilant to just writing on('data') and ending on('end'), or is there more to it performance-wise? Say for example if I wanted keep .pipe's performance but include a progressbar, how could I do that? [12:32] adrianmg has left the channel [12:34] stride: it handles pausing, resuming and multiple stuff piping the same stream iirc [12:35] stride: https://github.com/joyent/node/blob/master/lib/stream.js#L33-L122 @ adammw111 [12:37] stride: changed a bit, but there's not much more to it than implementing it yourself, no fancy dives in c++ land or something, shouldn't matter performance-wise [12:37] neurodrone has joined the channel [12:37] fairwinds has joined the channel [12:38] uchuff has joined the channel [12:39] adammw111: ok.. I was secretly hoping that pipe had a secret option to include a callback for tracking progress or something, but I guess copy-and-pasting to make my own shouldn't be so bad. [12:39] adammw111: thx [12:39] Davsebamse has joined the channel [12:40] cfq has joined the channel [12:41] Davsebamse: Hi, How do I load a class that I have made in another file? It seems that I cannot use require. It dies with the error: Object.CALL_NON_FUNCTION_AS_CONSTRUCTOR (native). I am building a module to talk to the lego mindstorms [12:44] xy has joined the channel [12:44] Davsebamse: le codes: http://pastebin.com/h3jg6dAC [12:44] grekko has joined the channel [12:46] phate408 has joined the channel [12:46] phiggins has joined the channel [12:46] flexd has joined the channel [12:48] phate408 has left the channel [12:49] akihito_s has joined the channel [12:52] jtr__ has joined the channel [12:53] Davsebamse: Anyone with experince in creating a node module? [12:54] flexd has joined the channel [12:56] konobi: Davsebamse: you need to read the docs for Modules [12:56] Davsebamse: konobi: Also regarding the earlier things that i wrote? [12:57] lzskiss has joined the channel [12:59] christine has joined the channel [13:00] stride: davsebamse: yeah, the stuff on exports is missing in your code [13:01] scttnlsn has joined the channel [13:01] jankeromnes has joined the channel [13:02] sivang has joined the channel [13:02] rwasielewski has joined the channel [13:05] matin has joined the channel [13:05] Davsebamse: stride: but even is I add a module.exports.Test = Test; in the buttom, does it not work.. [13:06] stride: do you access it in the other code by require('modulename').Test ? [13:08] AD7six has joined the channel [13:08] beakybal4 has joined the channel [13:08] beakybal4: afternoon :) [13:09] Davsebamse: stride: no, but var Test = require('./Test'); isnt it the same? [13:09] konobi: no [13:09] sivang has joined the channel [13:10] konobi: for one, your module file isn't called Test.js... it's called test_class1.js [13:10] petrjanda has joined the channel [13:10] Davsebamse: konobi: I changed that [13:11] Davsebamse: I can access it using require('./Test').Test("adsf","asdf") [13:11] salva has joined the channel [13:11] konobi: exports is the object that is returned by require [13:12] Adman65 has joined the channel [13:12] Adman65: Hey, what's a good way to run a benchmark for concurrent connections to a fay server [13:12] Davsebamse: ah, and since I do a module.exports.Test = Test; then it return it correctly? [13:12] beakybal4: what's the best way of doing push notification style thing, rather than long polling [13:12] beakybal4: ? [13:13] stride: beakybal4: to the browser? tried socket.io? [13:13] beakybal4: stride: correct, not yet, no. [13:13] beakybal4: stride: i'll check out the github, thanks :) [13:14] Wizek has joined the channel [13:15] stride: there are several modules that build on socket.io as well, depending on your needs. nowjs and dnode for example [13:16] beakybal4: i've been warned off nowjs lol [13:17] stride: heh :) [13:17] Davsebamse: stride and konobi thanks for you help. I was using node-serialport as an template, but I had overlooked something [13:17] Draco_ has joined the channel [13:18] Wizek-other has joined the channel [13:19] gavin_hu_ has joined the channel [13:21] beakybal4: stride: so this would be a way of firing an event on the client's browser when something happens server side? [13:22] robi42 has joined the channel [13:23] maligree has joined the channel [13:23] Xano has joined the channel [13:24] kiilo has joined the channel [13:24] Arthorius has joined the channel [13:24] stride: beakybal4: sure. it uses websockets and other transports as they are available (polling is a fallback) to establish a bidirectional communication between the client and the server [13:24] Glenjamin_ has joined the channel [13:25] stride: adn with that connection, you can do whatever you like :) [13:25] beakybal4: ahhh, ok, thanks [13:25] beakybal4: j [13:25] beakybal4: just trying to figure out all this node.js stuff [13:25] beakybal4: been using php and jQuery for years now, but this is all new to me! [13:25] beakybal4: it's good to be learning again :) [13:25] Glenjamin_: Hi guys, what's the best way to figure out the host/path for an incoming request? [13:26] Glenjamin_: I'm trying to get a nice clear rest api, but not sure how to build the URIs so it'll work wherever its run [13:26] Metal3d has joined the channel [13:27] stride: glenjamin_: the host is a header, available in the headers object, the rest of the url is available in request.url [13:27] Glenjamin_: isn't that only sent by HTTP 1.1 clients? [13:27] EuroNerd has joined the channel [13:27] Glenjamin_: and even then, only when they stick to the spec [13:27] stagas has joined the channel [13:29] stride: sure, but it's the only way I know if you want to determine the host [13:29] paq has joined the channel [13:29] stride: other than using different IPs [13:32] louissmit has joined the channel [13:34] Glenjamin_: i see, thanks [13:34] erichynds has joined the channel [13:37] Kunda has joined the channel [13:39] beakybal4: arrrrrf [13:40] beakybal4: Error: Cannot find module 'socket.io' [13:40] beakybal4: ;( [13:40] beakybal4: i npm installed as sudo in my nodejs directory [13:41] adulteratedjedi has joined the channel [13:42] beakybal4: ooooo [13:42] beakybal4: nvm :p [13:42] stagas has joined the channel [13:44] tomlion has joined the channel [13:46] maushu has joined the channel [13:50] beakybal4: i don't think i'm doing this right :( [13:51] beakybal4: http://d.beakybal4.co.uk:8124 [13:51] beakybal4: i'm trying the first socket.io example :( [13:51] Glenjamin_: anyone familar with coffee-script and require() ? I've got a pure JS lib and I want to require() a coffeescript-based dependency [13:52] robertj: if I schedule 4 tasks via setTimeout will they run concurrently on different cores? [13:52] kadoppe has joined the channel [13:52] torsd has joined the channel [13:52] Glenjamin_: robertj: no, each node process is a single thread for JS [13:53] robertj: that's what I thought, thx [13:54] maushu_ has joined the channel [13:55] RedSofa has joined the channel [13:56] martin_sunset has joined the channel [13:58] jackbean has joined the channel [13:59] jldbasa has joined the channel [14:00] seebees has joined the channel [14:00] Draco_ has joined the channel [14:00] slifty has joined the channel [14:03] maligree has joined the channel [14:03] shinuza has joined the channel [14:04] wangguan04 has joined the channel [14:05] wangguan04: I think the method util is not good [14:06] kwmiebach has joined the channel [14:06] ifreenow has joined the channel [14:07] wangguan04: when if A inherit from B,A will lost all the orignal prototype properties [14:08] sivang has joined the channel [14:08] wangguan04: hello [14:08] reid has joined the channel [14:09] beakybal4: yay it works :D [14:10] wangguan04: ? [14:11] kwmiebach has joined the channel [14:11] Brandon_R has joined the channel [14:11] Brandon_R: hey guys [14:11] Brandon_R: what are some projects to build in node to learn the library? [14:11] wangguan04: who is the developer of nodejs? [14:12] Brandon_R: ryan dhal and others [14:12] wangguan04: i find a problem [14:12] beakybal4: marak? [14:12] gut4 has joined the channel [14:12] zivester has joined the channel [14:14] bergie has joined the channel [14:14] wangguan04: ctor.prototype = Object.create(superCtor.prototype, { [14:14] wangguan04: constructor: { [14:14] wangguan04: value: ctor, [14:14] wangguan04: enumerable: false, [14:14] wangguan04: writable: true, [14:14] wangguan04: configurable: true [14:14] phzbOx has joined the channel [14:14] wangguan04: } [14:14] mAritz has joined the channel [14:14] wangguan04: }); [14:14] wangguan04: here should be extend(ctor.prototype,Object.create... [14:15] mAritz: i'm trying to use nvm but calling "./nvm.sh install v0.4.12" (or any other command i tried so far, including help) just does exactly nothing [14:16] shinuza has joined the channel [14:17] mmalecki: mAritz: . nvm.sh && nvm install v0.4.12 [14:19] mAritz: mmalecki: thanks, fixed it. i thought that was only a suggestion and i didn't really want to add it to my sources :( [14:19] mAritz: oh well, whatever [14:20] lyte has joined the channel [14:20] lyte has joined the channel [14:21] chaowang has joined the channel [14:22] ifreenow: and nvm can't use in zsh [14:23] mmalecki: ifreenow: it mostly works [14:24] ifreenow: em, when i source it, it return 13 [14:24] ifreenow: $ . ~/.nvm/nvm.sh [6:23:29] FAIL: 13 [14:24] schwab has joined the channel [14:25] mmalecki: ifreenow: I source it in .zshrc and it works for me [14:26] ifreenow: oh, why? [14:26] Brandon_R: hey guys [14:26] Brandon_R: does expressjs work with node.js cluster? [14:27] Brandon_R: the default library [14:27] bosphorus has joined the channel [14:27] AvianFlu has joined the channel [14:28] N0va` has joined the channel [14:32] malkomalko has joined the channel [14:32] MrNibbles has joined the channel [14:35] jtr__ has joined the channel [14:35] Brandon_R: hi [14:35] kriszyp3 has joined the channel [14:36] interrupt has joined the channel [14:37] boltR has joined the channel [14:37] jtr__ has joined the channel [14:39] felixge has joined the channel [14:40] Margle has joined the channel [14:41] k1ttty has joined the channel [14:42] zemm has joined the channel [14:45] MrNibbles: Hmm, on osx it seems the ctime property within data returned from readFile dont match so the OS's created time [14:46] CarterL has joined the channel [14:46] Brandon_R: what kind of mac do u have? [14:46] Jarda has joined the channel [14:47] AvianFlu has joined the channel [14:47] ayaz has joined the channel [14:47] rails_noob has joined the channel [14:47] MrNibbles: Brandon_R: 10.7.2, macbook air [14:48] Brandon_R: how much did it cost [14:48] MrNibbles: im not really sure thats relevant? [14:49] rails_noob: Hey folks, i'm trying to start learning a little node, but i installed the windows 0.6.3 package and my command prompt doesn't recognize the node or npm command, am i missing something [14:49] stride: rails_noob: did you follow the install instructions that include putting it on PATH and stuff? [14:49] Glenjamin_: JSON.stringify(new Error()): 0.4 it gives an object with error's properties, 0.6 it gives an empty object - anyone know if this is intentional? [14:49] Brandon_R: try putting node.exe in the ev var [14:50] mmalecki: Glenjamin_: yes [14:50] mmalecki: Glenjamin_: properties are no longer enumerable [14:50] Glenjamin_: i breaks the JSON response of connect.errorHandler :( [14:50] mmalecki: I mean, Error properties [14:50] mmalecki: Glenjamin_: yeah, and many different libs >.< [14:50] rails_noob: stride: no i didn't, i'll have to look those up and try again [14:51] AvianFlu: mmalecki, Glenjamin_, the Error object can be circular [14:51] AvianFlu: that's why that's now the case [14:52] Glenjamin_: i see [14:52] mmalecki: fair enough [14:52] Glenjamin_: patch to connect coming up then.. [14:52] r04r: Are there any popular nodejs wrappers/daemoizers? [14:52] simenbrekken has joined the channel [14:52] Heisenmink has joined the channel [14:53] mmalecki: r04r: forever [14:53] Glenjamin_: for dev or for deploy? [14:53] mmalecki: r04r: not sure what you mean by wrapping, but haibu-carapace is some sore of wrapper [14:53] r04r: Glenjamin: Dev pretty much [14:53] Glenjamin_: node-dev is good for auto-reloading [14:53] r04r: mmalecki: I tried forever, but npm is giving me a segmentation fault when trying to install it [14:54] AvianFlu: r04r, what node version / os? [14:54] r04r: node v0.6.3 on debian lenny [14:54] r04r: AvianFlu ^ [14:54] AvianFlu: that's genuinely strange. can you gist me your npm-debug.log, or the error output? [14:55] AvianFlu: ACTION doesn't let segfaults go [14:55] r04r: AvianFlu: Sure, one sec [14:55] r04r: AvianFlu: https://gist.github.com/1397658 [14:55] seebees has joined the channel [14:55] maushu has joined the channel [14:57] jbrokc_ has joined the channel [14:58] mAritz: hm, the v8 date timezone change broke my lib in 2 test cases. i hate timezones [15:00] AvianFlu: a compile-time segfault... that sounds like a ton of fun to debug! [15:00] Glenjamin_: hrm, anyone know if TJ is about? [15:00] Glenjamin_: just clone connect from github, and it's 2.0 alpha - API's changed and examples don't work :s [15:01] r04r: AvianFlu: >.< I'm not going to bother with it myself seeing as node itself seems to work, and most other installs from npm do as well [15:01] mAritz: Glenjamin_: it's 7 am in his timezone, guess he's not gonna be here for 1-2 hours :P [15:02] Glenjamin_: heh, good point [15:02] AvianFlu: r04r, for you, right now, there's no way around that, sadly [15:02] Brandon_R: hey guys [15:03] Glenjamin_: oo, i looks like 2.0 is abstracted away from HTTP [15:03] Brandon_R: what is the future of dart and nodejs? [15:03] slifty has joined the channel [15:03] Glenjamin_: nobody cares about dart. [15:03] AvianFlu: hopefully the future of dart will only exist over drinks as we laugh about it years from now [15:03] r04r: AvianFlu: That's too bad, thanks though [15:03] mmalecki: XD [15:03] Brandon_R: oh [15:03] Brandon_R: dart has classes etc [15:04] AvianFlu: ES6, at this rate, will probably have classes [15:05] rails_noob: i'm not seeing any install directions for 0.6.3 for windows [15:05] lxsameer: i used npm to install socket.io, but i get "Error: Cannot find module 'socket.io'" when i want to use socket.io [15:06] jondot has joined the channel [15:06] jondot: help! i'm having problems with error handling to the point that we're thinking of rewriting in another language :( [15:06] plutoniix has joined the channel [15:06] jondot: i'm using everyauth, and it seems that when it decides to throw, node crashes with unhandled exception. [15:07] jondot: doing a process.on unhandledException keeps requests in the air (i don't have access to the request).. which eventually crashes the server [15:07] jondot: is there anything we can do about it? [15:07] Glenjamin_: don't throw exceptions [15:08] mmalecki: jondot: everyauth shouldn't throw [15:08] Glenjamin_: catch the 'error' event [15:08] jondot: mmalecki: i've been staring at this very, very sadly: https://github.com/bnoguchi/everyauth/issues/36 [15:09] coaster has joined the channel [15:09] jondot: funny thing is, that the application is 50LOC, is very elegant *except* the error handling part. i wouldn't like to ditch node.js just because of that -- it would feel very silly [15:10] jondot: so i'm starting to rewrite this with express instead of connect, to see if it betters anything. [15:10] mAritz has left the channel [15:10] broofa has joined the channel [15:11] rev087 has joined the channel [15:12] Brandon_R: hey guys [15:12] marshall has joined the channel [15:12] marshall: hey node [15:12] petrjanda has joined the channel [15:12] Brandon_R: are there any nodejs modules that uses cluster correctly that i can view? [15:12] Brandon_R: to see how to properly use cluster [15:13] Brandon_R: not the learnboost cluster but the default nodejs cluster [15:18] enmand has joined the channel [15:20] cognominal has joined the channel [15:20] lzskiss has joined the channel [15:21] kpko-fn has joined the channel [15:23] Vennril has joined the channel [15:24] marshall: does anybody have experience making custom error classes that trigger exceptions? I'm kinda struggling here: http://codr.cc/fed06e [15:24] tomlion has joined the channel [15:25] mAritz has joined the channel [15:25] rails_noob has joined the channel [15:25] gigawatt has joined the channel [15:25] dingomanatee: The only point of this would be to log errors in whatever manner you choose. I would suggest doing this via extending the Error class - and that class is not well documented. [15:26] mAritz: guys, i need a really quick node@0.6.4. becuase i'm about to release nohm@0.6.4 which upgrades to nodeunit@0.6.4 and fixes tests for node@0.6 [15:26] gigawatt: heya guys, is there any pre-build repl interfaces for socket.io, so i can access statistics of a running server from telnet, or would I have to create my own ? [15:26] gigawatt: pre-built [15:29] ziMpy has joined the channel [15:29] seebees has joined the channel [15:30] CodeRarity has joined the channel [15:31] CodeRarity: hey, so i'm really confused, how much does no.de cost? [15:32] CodeRarity: it says, "Joyent is pleased to announce access to our Node.js Cloud Services including free Node SmartMachines.", but are there other things I have to pay for? [15:32] seebees has joined the channel [15:32] tdegrunt has joined the channel [15:32] bbommarito: CodeRarity: Those Joyent machines are basically sold out. [15:33] gigawatt: Good Question CodeRarity [15:34] buttface has joined the channel [15:34] jondot: so i'm still having a problem with error handling with node.js [15:34] jondot: is it really a best practice to let the instance crash and respawn? [15:35] CodeRarity: bbommarito: oh, I see [15:36] CodeRarity: is nodester a reasonable alternative? http://nodester.com/ [15:36] ekryski has joined the channel [15:36] bbommarito: CodeRarity: They are, but very slow to send out beta invites. [15:37] rendar has joined the channel [15:38] CodeRarity: and there's nodesocket, which is also in beta.... [15:38] CodeRarity: so is there an option that's not full or in beta? [15:38] idl3 has joined the channel [15:38] Glenjamin_: isn't nodejitsu something similar? [15:38] bbommarito: Heroku offers Node.js [15:38] rails_noob: i still can't figurehow to get node up and running for development on my windows machine [15:39] Adman65: hmm [15:39] rails_noob: i tried just running the windows installer from nodejs.org but no response on the cmd prompt [15:39] braoru has joined the channel [15:39] rails_noob: is there a set of instructions i'm not aware of? [15:39] Adman65: I have fay deployed to heroku, but can't it from my test file. I get: Origin null is not allowed by Access-Control-Allow-Origin. Anyone have any ideas? [15:39] pksunkara: CodeRarity: Try nodejitsu [15:39] mmalecki has joined the channel [15:40] bbommarito: nodejitsu is also private beta right now pksunkara [15:40] CodeRarity: yeah [15:40] pksunkara: bbommarito: join #nodejitsu and ask for an invite [15:40] pksunkara: CodeRarity: ^ [15:41] CodeRarity: lol ok [15:41] bbommarito: Well, my app needs full access to open sockets, and something tells me most of those hosts will block that access (Or will have so few available it will be pointless), so I am using my own VPS. [15:42] FMJaggy: i just installed node 0.6.3 from source and npm seems to have trouble opening files, i tried npm install socket.io and get errors wrt /tmp/* http://pastebin.com/raw.php?i=7QkdW9mp [15:43] mmalecki: FMJaggy: too many open files? [15:44] madhums has joined the channel [15:47] lxsameer: is it any daemonizing tool for node ? [15:48] tuhoojabotti: many [15:52] lxsameer: tuhoojabotti: thanks [15:52] rails_noob has left the channel [15:52] tuhoojabotti: :D [15:53] tuhoojabotti: np [15:53] lzskiss has joined the channel [15:54] jtr__ has joined the channel [15:55] pokoli has joined the channel [15:57] supjeff: Could somebody help me figure out a good way to write custom exceptions? http://codr.cc/fed06e/js (editable) [15:59] supjeff: jondot: I'm looking for a good way to throw errors too [16:01] jondot: supjeff: i dont need to throw, i need to bullet proof the app. but catching on process all unhandled exceptions suck - i can't res.end() [16:03] Squeese has joined the channel [16:04] supjeff: jondot: this is what I'm trying to get at: http://codr.cc/fed06e/js [16:04] gut4 has joined the channel [16:05] supjeff: jondot: the idea is that you would be able to tell what kind of exception you've caught and handle it. If it isn't handled, it should dump a stacktrace and stuff. [16:06] tuhoojabotti: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types ? [16:07] tuhoojabotti: supjeff: ^ [16:07] Destos has joined the channel [16:09] mange has joined the channel [16:09] supjeff: tuhoojabotti: yeah, you can throw pretty much whatever you want as an error and handle it, but I want node to freak out if I throw something that isn't caught [16:09] supjeff: tuhoojabotti: the same way throw new Error('wtf') does [16:09] tuhoojabotti: 'freak out'? [16:09] supjeff: show a stack trace [16:10] tuhoojabotti: It doesn't do it? [16:10] supjeff: no, if I just do `throw {name: 'CustomError', message: 'uh oh'}` [16:10] supjeff: it doesn't freak [16:11] reid has joined the channel [16:13] tuhoojabotti: Yep, tested it. [16:14] supjeff: tuhoojabotti: could you show me what you did here? http://codr.cc/fed06e/js [16:14] supjeff: that paste sort of illustrates what I'm trying to do [16:15] reid has joined the channel [16:16] ekryski has joined the channel [16:16] teknopaul: supjeff: have you seen Event: 'uncaughtException' [16:16] GrizzLyCRO has joined the channel [16:17] supjeff: teknopaul: no [16:17] teknopaul: process.on('uncaughtException', function (err) { console.log('Caught exception: ' + err); }); [16:17] teknopaul: will "freak out" if any exception is not handled [16:18] supjeff: teknopaul: oh, good to know [16:18] matin has joined the channel [16:18] supjeff: teknopaul: if I could, I'd like to subclass the `Error` constructor though, so I can still get the trace [16:18] astralab has joined the channel [16:19] cjm has joined the channel [16:20] k1ttty has joined the channel [16:21] mAritz has joined the channel [16:21] bosphorus has joined the channel [16:22] jondot: supjeff: in a web app, there is no meaning for that. your requests would just hang [16:23] lzskiss has joined the channel [16:23] matin has left the channel [16:24] russfrank: anyone know if there [16:24] russfrank: s something like python's cmd for node js [16:24] russfrank: ie, helps you make readline-based command line interfaces [16:25] SirFunk: anyone here use mongoose much? [16:25] dingomanatee: just type "node" in the command line [16:25] dingomanatee: it puts you into "REPL mode" and you can enter js commands line by line << rusfrank [16:25] dingomanatee: a little - why, SirFunk? [16:27] bnoordhuis has joined the channel [16:29] Xano has joined the channel [16:30] SirFunk: dingomanatee: i'm having a problem where i need a virtual getter to do a db query and return something but it'ls always returning null since the query is async [16:30] SirFunk: dingomanatee: anythign you've run into before [16:30] dingomanatee: post your code? [16:30] SirFunk: ? [16:30] SirFunk: sure [16:30] SirFunk: hanogn [16:31] dingomanatee: though honestly from what you say I'd suggest virtual getters are not going to solve your problem. [16:31] dingomanatee: you really can't "Pipe" a callback through a function. [16:32] amigojapan_ has joined the channel [16:32] poincare101 has joined the channel [16:32] dingomanatee: you might be able to "get the seed" of a callback you keep outside the model but you probably can't embed a callback-centric routine in a virtual getter. [16:33] saesh has joined the channel [16:34] SirFunk: dingomanatee: https://gist.github.com/1397768 around line 54 is my problem [16:34] mmalecki: bnoordhuis: poke. [16:35] Squeese has joined the channel [16:35] dingomanatee: wouldn't you be getting depth, not setting it? [16:35] bnoordhuis: mmalecki: you as a catholic should of all people know that we don't work on sunday [16:35] mmalecki: bnoordhuis: I'm not a catholic [16:35] bnoordhuis: mmalecki: you are polish [16:36] bnoordhuis: therefore it follows you are a catholic [16:36] dingomanatee: ah I see the problem - you "set" because you want to pass a callback. [16:36] mmalecki: bnoordhuis: nice proof you have there [16:36] bnoordhuis: mmalecki: flawless, isn't it? [16:37] mmalecki: bnoordhuis: I bet nobody will want to check statistics, so yeah [16:37] SirFunk: dingomanatee: derp yeah.. sorry that's what i was trying to do... i had changed some things and re-typed it wrong :-P [16:37] SirFunk: i meant get [16:37] Squeese has joined the channel [16:37] SirFunk: doesn't work with get either.. always returns 0 [16:38] SirFunk: dingomanatee: https://gist.github.com/1397768 [16:38] dingomanatee: Yes - I would step outside the model context and just create an independent module that finds the depth of a passed model and accepts (model, callback) [16:38] mmalecki: bnoordhuis: anyways, poke piscisaureus when he's around, not sure what he means by incompatibility with server stuff. [16:38] dingomanatee: Also be careful about the contextulaization of "this" - every time you call "this" inside a function, this == the function. [16:39] Morkel has joined the channel [16:39] bnoordhuis: mmalecki: he's a calvinist protestant so he's surely not working today [16:39] SirFunk: dingomanatee: this gets the right things inside the .get [16:40] mmalecki: bnoordhuis: I'm not good at stereotypes, where does he live? [16:40] dingomanatee: The pattern of healthy "this" ing in methods are MyClass.prototype.MyMethod(value, callback){ var self = this; function _foo(value, callback){ self.do_thing(value, callback)})} [16:40] bnoordhuis: mmalecki: nowadays in amsterdam [16:40] bnoordhuis: which is a godless city, of course [16:40] dingomanatee: right [16:41] bnoordhuis: okay, enough trolling - time for dinner, biab :) [16:41] dingomanatee: SirFunk - I don't think this is going to be doable with the mongoose virtual methods. [16:41] SirFunk: hmm [16:41] dingomanatee: You really need to just create an independent function that handles this from an external perspective. [16:41] SirFunk: ok, let me think about that [16:41] dingomanatee: virtual get/setters presume that all the data you need is inside the context of the model itself. [16:41] gut4 has joined the channel [16:41] sorin has joined the channel [16:42] dingomanatee: Its for things like adding shopping cart prices and summing the results, not multi-record calculations. [16:42] broofa has joined the channel [16:43] IrishGringo has joined the channel [16:44] dingomanatee: SirFunk - look into http://www.sitepoint.com/hierarchical-data-database-2/ - you can do this in mongo and just pull all the parents of a single record with one call. [16:45] GrizzLyCRO: any nice tool to automatically resart node server after changes to files? [16:46] r04r: GrizzLyCRO: I was pointed towards node-dev earlier which seems to work well, but breaks when its an SFTP upload that caused the file change [16:46] Lingerance: There's a bunch [16:46] mmalecki: GrizzLyCRO: forever can do that [16:46] GrizzLyCRO: something noob friendly? [16:46] SirFunk: dingomanatee: interesting. way to do that.. hmmm [16:46] phzbOx has joined the channel [16:47] dingomanatee: Yep if you look at at the numbers, all the parents of a given node have left < this.left and right > this.right. [16:47] dingomanatee: so you can use a single query to get all the parent.s [16:48] dingomanatee: Downside being you have to touch a lot of records every time you edit the tree [16:48] shinuza has joined the channel [16:48] GrizzLyCRO: node-dev looks good for my needs, however i will probably move to forever later, thanks guys :) [16:48] dingomanatee: forever has a lot of fans. [16:48] adam__ has joined the channel [16:49] _bat has joined the channel [16:50] TheJH has joined the channel [16:51] jtsnow has joined the channel [16:52] caolanm has joined the channel [16:52] SirFunk: dingomanatee: it seems like it would be VERY complicated to change the position of an item, no? [16:53] dingomanatee: All you do is change the sort key and/or parent ID and run the numbering algorithm over the entire branch. [16:53] SirFunk: hmm [16:54] dingomanatee: sorry wrong [16:54] TheNumb has joined the channel [16:56] d_low has joined the channel [16:56] dingomanatee: http://www.sitepoint.com/hierarchical-data-database-3/ describes the update algorighm [16:56] devongovett has joined the channel [16:57] SirFunk: dingomanatee: i'll consider that if the way i'm doing things here doens't work.. i'm trying to do an external function again but i can't figure out how it would work still due to the async'ness [16:57] plutoniix has joined the channel [16:57] ryanfitz has joined the channel [16:58] __tosh has joined the channel [16:58] dingomanatee: Also keep in mind you can always store whole trees in a single record. [16:59] SirFunk: dingomanatee: in this case it would be messy becuase i'll often be updating a single property on the records.. and then it woudl have to update the huge tree record every time [17:00] dingomanatee: you don't have to store all the data in the tree, just ids and children arerays [17:00] SirFunk: hmm [17:01] dingomanatee: var menu_tree = {root: {id: --id--, children: [{id: -- id, chidden: [..]}, {id: --id--, children: [..] } } [17:01] schwab has joined the channel [17:01] SirFunk: true [17:01] hipsterslapfight has joined the channel [17:01] CarterL has joined the channel [17:02] SirFunk: i still need give the data to my frontend as: {item1:{depth:0, parent: null, chilren: [..]},....} i would end up with the same problem i have now no? [17:02] dingomanatee: yep [17:03] dingomanatee: it just centralizes the heir achy data [17:03] dingomanatee: for easy manipulation [17:04] torsd has joined the channel [17:05] seebees has left the channel [17:07] Tehbeard has joined the channel [17:07] subbyyy has joined the channel [17:08] jacobolus has joined the channel [17:09] chrislorenz has joined the channel [17:12] chrislorenz has joined the channel [17:12] `3rdEden has joined the channel [17:13] luxigo has joined the channel [17:14] parkeyparker has joined the channel [17:15] nixer1102 has joined the channel [17:16] Brozilla has joined the channel [17:16] adrianF has joined the channel [17:18] jacobolu_ has joined the channel [17:21] zemanel has joined the channel [17:21] adrianmg has joined the channel [17:22] WarheadsSE: Anyone have a good choice of an IDE for nodejs, now since cloud9's source wont run on newer versions of node? [17:22] kpko-fn: (G)VIM \(°.°)/ [17:22] jondot: quit [17:22] adrianmg has left the channel [17:23] mmalecki: vim [17:23] WarheadsSE: vim as an ide? [17:24] luxigo_ has joined the channel [17:24] mmalecki: yes [17:24] konobi: ed [17:24] mmalecki: butterflies [17:24] TheJH: mmalecki++ [17:24] catb0t: mmalecki now has 1 beer [17:24] kpko-fn: lol@butterflies [17:24] Lingerance: ACTION uses vim when on Linux, cloud9 when on Windows [17:24] TheJH: butterflies :) http://xkcd.com/378/ [17:24] kpko-fn: Which features do you need in an IDE? [17:25] WarheadsSE: I was running a local git clone of c9 on my ARM box [17:25] WarheadsSE: debugging, syntax highlighting [17:25] WarheadsSE: technically I dont need any of them [17:25] WarheadsSE: I like them a lot over say, nano/notepad [17:25] TheJH: WarheadsSE, for debugging, I'd use node-inspector [17:25] WarheadsSE: I'm spoiled a bit by activestate Komodo I use for my perl/bash [17:25] kpko-fn: You have syntax highlighting, code completion, indention etc when you use VIM [17:26] Bonuspunk: editing SublimeText2 debugging node-inspector [17:26] konobi: WarheadsSE: komodo's supposed to have pretty good nodejs support now though [17:26] WarheadsSE: I should point out that the mainstay of my editing is from a windows pc, and running code is on the arm box on which it resides [17:26] WarheadsSE: I am looking into it now actually [17:26] kpko-fn: gVim works perfectly on windows [17:27] WarheadsSE: looks like node support is mainly in the komodo 7 alpha [17:27] openpercept has joined the channel [17:28] konobi: now in beta [17:29] jtsnow has joined the channel [17:32] phzbOx: Hey, say I have a regex expression and I want to convert it into a string expression.. What is the best way? [17:32] phzbOx: I.e. /a\/b/ -> "a/b" [17:32] ekryski has joined the channel [17:33] Squeese has joined the channel [17:33] chirag has joined the channel [17:33] brianseeders has joined the channel [17:34] pquerna has joined the channel [17:35] CarterL has joined the channel [17:36] WarheadsSE: konobi, jumping the beta bandwagon [17:37] mandric has joined the channel [17:38] konobi: meh, i stick with vim =0) [17:38] kriskowal has joined the channel [17:39] Squeese has joined the channel [17:40] jbpros has joined the channel [17:40] aesptux has joined the channel [17:40] pct has joined the channel [17:40] hij1nx has joined the channel [17:41] jaequery has joined the channel [17:45] luke` has joined the channel [17:49] EuroNerd: I'm 23 minutes late to the party, but I just wanted to state for the record: SublimeText2 is awesome! :) [17:49] parkeyparker: I'm still using TextMate at the moment... Heard lots of people recommending SublimeText2... Guess it's time I gave it a shot :P [17:51] chirag: @parkeyparker try Emacs [17:51] RedSofa has joined the channel [17:52] EuroNerd: You know, I don't even care that much about its many useful functions - all I really need is color-coding. But Sublime is simply awesome in purely aesthetical terms. I actually like coding more, just to be with Sublime. :) [17:52] diogogmt has joined the channel [17:53] chirag: Emacs has color coding too..:) [17:53] dingomanatee: WebStorm is amazing - it gives you great hintting about bad references, including those in require(…) [17:53] EuroNerd: chirag, as I said, color coding is not a selling point, every text editor for programmers has it. I was speaking of the whole aesthetical experience of Sublime. [17:54] k1ttty has joined the channel [17:54] chirag: Ok..I have worked on Sublime. I really like the search which is superfast. But i still prefer emacs for productivity..:) [17:54] dthompso99 has joined the channel [17:55] Wizek has joined the channel [17:58] harthur has joined the channel [17:58] SargoDarya has left the channel [17:59] cognominal_ has joined the channel [18:00] patcito has joined the channel [18:01] mikeal has joined the channel [18:01] _eddyb_ has joined the channel [18:01] _eddyb_: hi [18:01] _eddyb_: I get { [Error: connect UNKNOWN] code: 'UNKNOWN', errno: 'UNKNOWN', syscall: 'connect' } [18:01] liar has joined the channel [18:01] _eddyb_: when I try to use console.error as an error handler [18:01] _eddyb_: shouldn't it be more specific? [18:01] _eddyb_: or it's my node old? [18:02] TheJH: _eddyb_, what's your node version? [18:02] _eddyb_: I think 5 [18:02] TheJH: _eddyb_, please run "node -v" [18:02] perezd has joined the channel [18:02] _eddyb_: v0.5.9 [18:04] TheJH: _eddyb_, polease update to 0.6.3 [18:04] TheJH: *please [18:04] _eddyb_: well, I had to make my own repo [18:04] _eddyb_: to get 0.5 [18:04] jrogers has joined the channel [18:05] sam___ has joined the channel [18:07] _eddyb_: YES [18:07] _eddyb_: now there's an official version [18:07] _eddyb_: I can remove my OBS repo [18:08] SirFunk: dingomanatee: you still around? i'm still having trouble wrapping my head around how to deal with this async'ness [18:08] dingomanatee: okay [18:08] romanb_ has joined the channel [18:08] towski has joined the channel [18:08] dingomanatee: One of the problems is you are in a "gate scenario" wherein you are going to call a series of async functions and handle the result when all the async is done. [18:09] Squeese has joined the channel [18:09] piscisaureus_ has joined the channel [18:09] dingomanatee: I solve this with a "watcher" class that triggers a callback when all the working async functions are done working. [18:09] _eddyb_: that's easy [18:09] SirFunk: dingomanatee: oops! i hink i just got it :-P haha, let me paste my code [18:09] dingomanatee: k [18:10] _eddyb_: done it for an image loader, when I made a very simple 2D platformer [18:10] _eddyb_: mine was k-- :P [18:10] hlobil has joined the channel [18:10] SirFunk: dingomanatee: does this make sense: https://gist.github.com/1397919 [18:10] _eddyb_: just decrement a counter, call callback if it's 0 [18:10] ntr0py has joined the channel [18:10] r04r: How to check nodejs version from a script? [18:10] TheJH: r04r, process.version [18:11] TheJH: !admin eval process.version [18:11] jhbot: v0.4.11 [18:11] SirFunk: dingomanatee: the actual function is like 54 [18:11] TheJH: r04r, ^ [18:11] r04r: Oh, thanks :D [18:12] dingomanatee: on line 62 you are still returning results from a callbackk. [18:13] SirFunk: dingomanatee: the callback doesn't return anything [18:14] SirFunk: the word 'return' could just not be there (it's compiled from coffeescript, which always returns at the end of a block [18:14] dingomanatee: right. [18:15] russfrank: dingomanatee: no i mean I want to make a readline based program [18:15] russfrank: like gdb's interface [18:15] dingomanatee: russfrank == sirfunk? [18:15] jtrudeau has joined the channel [18:15] SirFunk: dingomanatee: no idea what russfrank is [18:15] SirFunk: so... false :-P [18:15] mike has joined the channel [18:15] dingomanatee: okay russ hold on a sec [18:16] dingomanatee: SirFunk - I'm not going to solve this but I am going to give you my first stab at this. hold on. [18:16] ntr0py has joined the channel [18:16] mdel has joined the channel [18:16] SirFunk: dingomanatee: ok... this actually seems to work... just wanted to make sure it made sense [18:17] russfrank: dingomanatee: no, I'm responding to your response to my question from like a half hour ago. [18:17] boaz has left the channel [18:17] dingomanatee: oh hold on. [18:17] russfrank: I just wrote a little object that does what I want, was just curious if anyone knew of somethign that existed already before I put it on github ;P [18:17] kkszysiu has joined the channel [18:17] ecin has joined the channel [18:19] ntr0py: How would i create .npmrc for a local setup after i installed npm from chris lea's ppa for ubuntu natty? [18:20] Juan77 has joined the channel [18:20] dingomanatee: SurFunk - test this with very deep trees - the fact that you call your callback from inside a nested call makes me deeply nervous. [18:20] MatthewS has joined the channel [18:21] SirFunk: dingomanatee: me too :-P i can't think of another way to do it though [18:21] piscisaureus_ has joined the channel [18:22] Squeese has joined the channel [18:22] objectiveous has joined the channel [18:24] mandric has joined the channel [18:25] mikeal has joined the channel [18:27] WarheadsSE: konobi, lol, Komodo doesnt seem to like debugging node js correctly :p [18:29] mdennebaum has joined the channel [18:29] sorin has joined the channel [18:30] jimt has joined the channel [18:30] romanb_ has joined the channel [18:32] harthur has joined the channel [18:33] _eddyb_: Y [18:33] _eddyb_: Y is there no uPnP module? [18:33] herbySk has joined the channel [18:33] _eddyb_: https://gist.github.com/604979 << this is the only code I found so far [18:33] romanb_ has left the channel [18:34] cha0s has joined the channel [18:35] churp has joined the channel [18:35] robi42_ has joined the channel [18:36] blup has joined the channel [18:37] Jay has joined the channel [18:41] schwab has joined the channel [18:41] dingomanatee: SirFunk - this https://gist.github.com/1397919#comments should do it. [18:41] piscisaureus_ has joined the channel [18:42] chirag has joined the channel [18:42] Morkel has joined the channel [18:42] simenbrekken has joined the channel [18:42] Advant has joined the channel [18:42] Advant has joined the channel [18:43] SirFunk: dingomanatee: why is the first call to the callback null? [18:43] davidascher has joined the channel [18:43] dingomanatee: its traditional for node callbacks - the first property is an error if one is thrown [18:43] SirFunk: first argument rather [18:43] Overshee has joined the channel [18:43] SirFunk: ahh [18:43] dingomanatee: not required I suppose but most code I see uses this convention. [18:43] SirFunk: let me give that a try [18:44] sdwrage has joined the channel [18:44] joshkehn has joined the channel [18:44] joshkehn has left the channel [18:45] swaj: so I'm using connect sessions, through express, and I'd like my mongoose model to be able to read the current user's session data in a pre-save event. Is there a way to get the current session from connect without having access to a "req" (request) object? [18:46] crassus has joined the channel [18:46] jimt has joined the channel [18:46] phiggins has joined the channel [18:48] bradleyg has joined the channel [18:49] Heisenmink has joined the channel [18:50] cgray has joined the channel [18:53] coderzach has joined the channel [18:53] _eddyb_: how can I list processes and their network resources? [18:53] _eddyb_: it seems 1900 is already in use [18:53] shinuza has joined the channel [18:57] SirFunk: dingomanatee: it seems to just reutrn 0 and if i put any console.log's in there it seems to turn into an infinte loop (which makes no sense) [18:57] isaacs has joined the channel [18:57] tv has joined the channel [18:57] dingomanatee: its not infinite .. just give it more time :D [18:57] dingomanatee: kidding [18:58] jbrokc_ has joined the channel [18:58] SirFunk: lol, i let it run for like 30s [18:58] dingomanatee: its not impossible that you have an infinite loop because you have a circular parent chain [18:58] SirFunk: oh, that could be messy.. but i don't :-P [18:59] dingomanatee: echo out the id of the next_parent and the next_parent.parent value inside _find_parent [18:59] dingomanatee: see if next_parent's id changes. [18:59] SirFunk: it's odd that it returns almost immediately as is (with depth always being 0) but when i put console.logs anywhere in there it spews tons of things [18:59] tv: hi - i've got a problem with streams: i https.createServer(options, listener) and in listener() the first thing i do is req.pause(), then setup some stuff (create directories etc.) and req.resume()... but while setting up stuff i receive data and end events [18:59] SirFunk: yeah it's changing [18:59] tv: i.e. the stream isn't paused [19:00] SirFunk: (between like 3 differnet things) [19:00] tv: node version is 0.6.2 [19:00] SirFunk: ohhh.. it's returning the 0's then looping [19:00] Illusioneer has joined the channel [19:00] enmand has joined the channel [19:01] marcello3d has joined the channel [19:01] tv: (this appens sometimes when POSTing data w/ chrome) [19:01] SirFunk: dingomanatee: i fixed it by not setting next_parent and just passing the object to _find_parent [19:02] dingomanatee: there you go [19:02] uchuff has joined the channel [19:02] pimetrai has joined the channel [19:03] githogori has joined the channel [19:03] fg3 has joined the channel [19:04] sdwrage has joined the channel [19:08] salva has joined the channel [19:10] Illusioneer has left the channel [19:11] xeodox has joined the channel [19:11] marcello3d: opinions? http://www.subbu.org/blog/2011/11/websocket-fallbacks [19:12] KBM has joined the channel [19:13] KBM has left the channel [19:13] saesh_ has joined the channel [19:13] mynyml has joined the channel [19:14] chrislorenz has joined the channel [19:14] Xano has joined the channel [19:15] garrensm_ has joined the channel [19:20] MrNko has joined the channel [19:25] MatthewS has joined the channel [19:26] coderzach: marcello3d: I disagree, especially if what you're working on has real-time user interaction as a requirement [19:26] coderzach: I don't want every IE user to have to use a gracefully broken site [19:26] marcello3d: right [19:27] stride: I do [19:27] stride: :> [19:27] jbpros has joined the channel [19:27] coderzach: degrading from realtime to non-realtime can make a HUGE impact on user experience [19:27] chirag has joined the channel [19:28] perezd: what BSD environments are people preferring with nodeJS? [19:28] coderzach: mac :-D [19:28] swaj: OSX :P [19:28] perezd: for production [19:28] perezd: lets say [19:28] swaj: FreeBSD [19:28] vkandy has joined the channel [19:28] marcello3d: I wonder what the client/server overhead of the non-websocket/non-flash based transports is like [19:28] jldbasa has joined the channel [19:29] swaj: and honestly, you could throw up a mac mini running lion server :P http://macminicolo.net [19:29] johnnywengluu: isaacs: no plan to support package.yml ? [19:29] isaacs: johnnywengluu: no. javascript uses json. [19:29] chrislorenz has joined the channel [19:29] marcello3d: why yml? [19:29] isaacs: johnnywengluu: check out the courier package for an example of something that uses a different language and converts to package.json, though [19:29] swaj: ACTION doesn't understand the obsession with YAML [19:29] coderzach: marcello3d: I think the most overhead would come from the http polling fallback [19:30] marcello3d: yeah [19:30] perezd: anyone using netBSD? [19:30] coderzach: the other fallbacks don't eat up a lot of resources [19:30] johnnywengluu: isaacs marcello3d : more coffeescript oriented, and you get rid of all the {} and , "" [19:30] isaacs: yaml is json designed by xml lovers. [19:30] johnnywengluu: isaacs: nah [19:30] isaacs: johnnywengluu: use courier. you can write a package.coffee [19:30] plutoniiix has joined the channel [19:30] johnnywengluu: isaacs: okay [19:30] isaacs: johnnywengluu: yaml has some bad features, imo [19:30] coderzach: xml :-( [19:30] johnnywengluu: isaacs: what is courier? =) [19:31] swaj: what's wrong with JSON? seems aboslutely redic. to write it in another format. [19:31] johnnywengluu: ah a package! [19:31] isaacs: whereas json is the intersection of every language's object models, yaml is the union [19:31] isaacs: johnnywengluu: yeah [19:31] marcello3d: json doesn't support dates D: [19:31] isaacs: marcello3d: sure it does. [19:31] dingomanatee: dates are cultural. [19:31] isaacs: .. JSON.stringify({ d: new Date() }) [19:31] catb0t: "{"d":"2011-11-27T19:31:50.492Z"}" [19:32] isaacs: dingomanatee: the internet culture is ISO dates [19:32] marcello3d: .. JSON.parse("{"d":"2011-11-27T19:31:50.492Z"}") [19:32] catb0t: Exception: SyntaxError: Unexpected identifier [19:32] isaacs: i mean, to turn that INTO a date, you need a transformer function. [19:32] marcello3d: .. JSON.parse('{"d":"2011-11-27T19:31:50.492Z"}') [19:32] catb0t: { d: "2011-11-27T19:31:50.492Z" } [19:32] Margle has joined the channel [19:32] dingomanatee: Yes but attaching cultural measurements to a scientific format is cultural empiricism. [19:32] marcello3d: my point stands [19:33] marcello3d: dingomanatee: it has limited number support, I wouldn't call it a scientific format [19:33] johnnywengluu: isaacs: oh it converts it .. then i prefer to write in json =) [19:34] swaj: marcello3d: when's the last time you put a date in your package.json? [19:34] marcello3d: .. Date.parse("2011-11-27T19:31:50.492Z") [19:34] catb0t: 1322422310492 [19:34] marcello3d: .. new Date(Date.parse("2011-11-27T19:31:50.492Z")) [19:34] catb0t: Sun Nov 27 2011 14:31:50 GMT-0500 (EST) [19:34] dingomanatee: if you want dates, there's always BSON [19:34] marcello3d: god no [19:34] marcello3d: don't use BSON [19:34] swaj: marcello3d: there's no reason (to me at least) that you should write a package.json in any other format (especially YAML.. why?) [19:34] marcello3d: swaj: agreed [19:35] coderzach: because {} D: [19:35] joaquin_win has joined the channel [19:35] marcello3d: if you're afraid of {} you should find another profession ;D [19:35] dingomanatee: I prefer to store time in Seconds Since Creation (January 1, 4000BC) [19:36] coderzach: I want to write package.lisp :-D [19:36] isaacs: .. JSON.parse(JSON.stringify({d: new Date()}), function (key, val) { if (typeof val === "string" && val.match(/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]{3})?Z$/)) { return new Date(val) } return val }) [19:36] catb0t: { d: Sun Nov 27 2011 14:36:15 GMT-0500 (EST) } [19:36] isaacs: marcello3d: ^ [19:36] marcello3d: isaacs: :) [19:36] pquerna has joined the channel [19:36] mjr_ has joined the channel [19:37] marcello3d: does the transformer method work on objects too? [19:37] isaacs: if you know yo'uer going to get dates in places, you could be less strict with the regexp, and just check fi Date.parse() is truthy [19:37] isaacs: yeah [19:37] tv has left the channel [19:37] isaacs: it gets called for the root, then for every member [19:37] marcello3d: so I could say if (val.$ == 'date') or whatever [19:37] marcello3d: and make custom types [19:38] marcello3d: wonder what the performance is like [19:38] isaacs: sure [19:38] isaacs: or you could just add a Date.isDate function that checks Object.prototype.toString.call(obj) === "[object Date]" [19:38] marcello3d: naw [19:38] marcello3d: I meant to designate in the json special types [19:39] crassus has joined the channel [19:39] marcello3d: like new Date -> {"$":"date","value":date.toString()} [19:39] isaacs: oh, i see [19:39] isaacs: sure, if you're writing the replacer and the reviver, then you can do all kidns of trucks [19:40] isaacs: *tricks [19:40] isaacs: ACTION still getting used to Lion's auto-spell-correction [19:40] swaj: ACTION uses irssi inside a tmux window on his VPS for IRC :P [19:40] marcello3d: it replaced tricks with trucks but not kidns with kinds? [19:40] robertj: any suggestions for keeping objects in sync across multiple node processes? [19:40] isaacs: well, it replaced something with trucks [19:41] isaacs: i think it was trciks or something [19:41] isaacs: didn't see, too fast. [19:41] marcello3d: hmm, I don't think limechat does autoreplacement [19:41] marcello3d: it underlines, but doesn't swap stuff [19:41] isaacs: i just turned it off though. i like my typos. they're an important part of my online persona :) [19:41] robertj: like if i've got an object and i add a new property to it would be nice if the whole object didn't have to get reserialized and sent and unserialized... [19:42] mjr_: We are going for the https cluster concurrency record for node today. 90K HTTPS long poll connections and climbing. [19:42] swaj: is the object so big that it actually matters, robertj ? [19:42] pquerna has joined the channel [19:42] robertj: swaj, could be I think [19:42] marcello3d: isaacs: the autocorrection learns, fwiw [19:42] isaacs: mjr_: awesome! [19:43] isaacs: marcello3d: oh, really? that's nice. [19:43] isaacs: but still i need to be aware of it. if i just write the typos, then i don't [19:43] coderzach: robertj: create some sort of message passing semantics like .on("update", function(name, value) { obj[name] = value }) [19:43] marcello3d: robertj: that might be a premature optimization, no? any reason not to use a database? [19:44] coderzach: because a database doesn't push changes to every process [19:44] mmalecki: coderzach: it can [19:44] mmalecki: coderzach: check out couchdb _changes feed and hook.io-couch [19:44] robertj: marcello3d, not a good fit for this, there is a similar app in twisted + django that suffers performance issues due to it's db thrashing [19:45] kriskowal has joined the channel [19:45] marcello3d: what db? [19:45] mjr_: isaacs: I was hoping to get moved over to Joyent before we got too big to do so, and then all of the sudden we got popular. [19:45] mmalecki: but I may be wrong, I didn't bother reading the conversation [19:45] robertj: postgres and sqlite [19:45] marcello3d: ah [19:45] marcello3d: you probably want a db with pubsub [19:45] marcello3d: assuming the data is small enough to cache on each node [19:45] isaacs: mjr_: yeah, i saw it blow up on twitter [19:46] isaacs: mjr_: that's kind of awesome [19:46] heavysixer has joined the channel [19:46] marcello3d: mjr_: what's the site? [19:46] mjr_: voxer [19:46] robertj: marcello3d, it is, was thinking about proxying to memcached as an option as well [19:46] marcello3d: .com? [19:46] mjr_: Should be really good for node. We are handling a TON of traffic, and the node stuff is scaling just fine. [19:46] mjr_: marcello3d: yes, it's a smartphone app. [19:47] mjr_: Our main scaling issues are just with databases. [19:47] marcello3d: desktop site loading really slow... [19:47] stantona has joined the channel [19:47] motill has joined the channel [19:47] mjr_: hmm, yeah, website is really hosed. [19:49] robertj: your web site not doing any form of caching or is the server just hammered? [19:49] mjr_: I think the uplink on on our hosting provider is hammered. [19:49] mjr_: Our website gets nearly no traffic. [19:49] marcello3d: what's the website running on? [19:49] mjr_: apache [19:49] TheFuzzball has joined the channel [19:49] robertj: ACTION hearts linode [19:49] marcello3d: ah [19:49] mjr_: But it's bare metal hardware [19:50] phiggins has joined the channel [19:50] marcello3d: I've heard people just using amazon s3 to host static sites, interesting approach [19:50] marcello3d: no server required [19:50] marcello3d: plus you can use cloudfront for even more speed [19:50] aioue has joined the channel [19:52] JumpMast3r has joined the channel [19:52] aconbere has joined the channel [19:54] nmtmason has joined the channel [19:55] mjr_: Yeah, I love hosting static content on cloudfront. Huge win. [19:55] devongovett has joined the channel [19:58] aioue has joined the channel [20:00] aaronmcadam has joined the channel [20:02] _eddyb_: noob question: [20:02] _eddyb_: can I forward an express app thru apache somehow? [20:03] hipsterslapfight has joined the channel [20:03] swaj: I use nginx, but yes [20:03] swaj: you just need to set up a reverse proxy [20:03] TheJH: _eddyb_, yes, unless you need websockets or so [20:03] swaj: run the node/express app on an obscure port (127.0.0.1:12345) or something [20:03] TooTallNate has joined the channel [20:03] _eddyb_: so for node.domain.tld, I should get sockets forwarded from 80 to 8080 [20:03] TheJH: _eddyb_, but I think it'll have a small performance impact [20:03] swaj: and have apache reverse proxy it. [20:04] _eddyb_: swaj: thanks [20:04] _eddyb_: that's quick [20:04] _eddyb_: I thought there could be an easy solution to it [20:04] _eddyb_: oh, wait [20:04] swaj: aye, I do it for my production node apps [20:04] _eddyb_: it's proxied? [20:04] _eddyb_: damn [20:04] _eddyb_: can I do it the other way around? [20:04] swaj: yes, apache consumes port 80 and then looks at host headers and forwards traffic to the right backend [20:04] _eddyb_: even better, can I run PHP from express? [20:05] tekny has joined the channel [20:05] TheJH: _eddyb_, AAAAH [20:05] _eddyb_: I need PHP for drupal [20:05] swaj: I'd recommend having apache or nginx in front of everything, they're much better suited for that stuff :P [20:05] _eddyb_: I'm already using php5-cgi [20:05] _eddyb_: meh... but I want socket.io [20:05] enmand has joined the channel [20:05] swaj: php5-fpm would be better [20:06] _eddyb_: fpm? [20:06] swaj: it's the preferred way to run php now. even better than mod_php and a ton faster than php5-cgi [20:06] pandeiro has joined the channel [20:06] swaj: it's PHP over FastCGI [20:06] matin has joined the channel [20:06] matin has left the channel [20:07] swaj: it's part of PHP core since 5.3.3 (used to be a patch) [20:07] matin has joined the channel [20:07] _eddyb_: http://php-fpm.org/ [20:07] _eddyb_: any idea if it's in debian (that's what I use on my slice) [20:07] stagas has joined the channel [20:07] swaj: it's packaged by dotdeb [20:08] swaj: http://dotdeb.org/ [20:08] _eddyb_: that's what I use :) [20:09] lemonad has joined the channel [20:09] Skoo has joined the channel [20:09] _eddyb_: ok, socket.io will be on port 8080 [20:09] mdennebaum has left the channel [20:09] htoothrot has joined the channel [20:09] swaj: yeah, it's worth noting that you *could* do it the other way [20:10] _eddyb_: if it's blocked, it can fallback to polling [20:10] _eddyb_: swaj: is it better the other way? [20:10] CodeRarity has joined the channel [20:10] aioue has joined the channel [20:10] swaj: really a matter of preference [20:10] swaj: node is quite a capable http server, obviously [20:10] MatthewS has joined the channel [20:10] _eddyb_: also, nginx... lighter than the "feather" (apache)? [20:11] magnetik has joined the channel [20:11] swaj: well, nginx follows the same pattern as node -- evented IO, very low ram usage because it's single-threaded and creates a cluster of workers [20:11] _eddyb_: I have a 256MB RAM slice [20:11] swaj: however, apache has mpm_event I think [20:11] swaj: that does the same thing [20:11] swaj: though it's still considered "experimental" [20:12] _eddyb_: and I'm trying to use it as efficiently as possible [20:12] _eddyb_: until I can afford to upgrade [20:12] CodeRarity: so, I'm going through this Hook.io For Dummies tutorial (http://ejeklint.github.com/2011/10/11/hook.io-for-dummies-part-2-getting-started/) after watching some of those really fast paced video tutorials, with Hook.io version 0.8.2-1, and after I run hookio the second time, it actually starts a new server Hook [20:12] swaj: I prefer nginx because it's CPU/RAM usage is basically zero. The only downside to nginx is that it does not support HTTP/1.1 to backend proxied hosts. [20:12] swaj: it does to the client [20:12] CodeRarity: instead of connecting to the other server Hook like it should [20:12] swaj: but for proxied stuff it doesn't [20:12] Dulak: I have over 300 websites running on nginx and it takes about 8 megs of ram. [20:12] swaj: apache does HTTP/1.1 on all fronts [20:12] swaj: and with mpm_event it can be quite efficient. [20:13] _eddyb_: Dulak: no kidding? [20:13] _eddyb_: swaj: what does that mean? [20:13] _eddyb_: you don't get to know hostna... yeah, I get it... [20:13] _eddyb_: I need that [20:13] matin has left the channel [20:13] swaj: for node apps that need HTTP/1.1 (i.e. chunked encoding) you probably don't want to use nginx. [20:13] _eddyb_: so, mpm_event it is, then [20:14] swaj: yeah even though it's "experimental" it's quite stable from what I've seen [20:14] Dulak: _eddyb_: it's a 512m vps, and I have sieged it at 10k requests/second for over an hour with no problems. Ram usage went up a bit, but otherwise it just hummed along. [20:14] Lingerance: _eddyb_: I do hostname-based stuff with nginx proxying. [20:14] swaj: I'd recommend apache in front of everything, one event worker per CPU core, php-fpm for your PHP stuff (with mod_fastcgi or something) [20:14] swaj: and then reverse proxy your node site [20:15] swaj: there's also pound and varnish, too :P [20:15] Lingerance: ACTION does that with nginx [20:15] swaj: but they're pure proxies [20:15] swaj: I do too, Lingerance, but I don't need HTTP/1.1 for my apps [20:15] pksunkara: CodeRarity: ask the question in #nodejitsu channel [20:15] swaj: if I needed HTTP/1.1, I'd be using apache :) [20:15] stantona has joined the channel [20:17] _eddyb_: thanks guys, I'll make the upgrades [20:17] Kunda has joined the channel [20:17] swaj: I think you'll be happy with apache as a proxy with mpm_event and php5-fpm [20:17] swaj: RAM usage should be relatively low [20:17] stantona_ has joined the channel [20:18] tschundeee has joined the channel [20:19] crassus has joined the channel [20:19] stantona has joined the channel [20:19] r04r has joined the channel [20:19] deedubs has joined the channel [20:20] stalled has joined the channel [20:20] _ntr0py_ has joined the channel [20:21] tlynn has joined the channel [20:22] aioue has joined the channel [20:23] crassus has left the channel [20:26] sdwrage has joined the channel [20:26] aioue has joined the channel [20:28] Neil_ has joined the channel [20:29] ttpva has joined the channel [20:29] kriskowal has joined the channel [20:30] magnetik has joined the channel [20:30] _eddyb_: http://search.npmjs.org/ << search smtp... npm registry needs some real cleanup [20:30] vkandy has joined the channel [20:31] mange has joined the channel [20:31] aioue has joined the channel [20:34] Lingerance: 277 things depend on coffee-script D: [20:35] Renegade001 has joined the channel [20:35] martin_sunset has joined the channel [20:36] aioue has joined the channel [20:39] lxsameer has joined the channel [20:39] petrjanda has joined the channel [20:40] lxsameer: what do you guys think about this http://teddziuba.com/2011/10/node-js-is-cancer.html [20:40] coderzach: Lingerance: because it's awesome [20:41] Lingerance: lxsameer: The guy fails performance testing hard. [20:41] qmx: lxsameer: FUD [20:41] lxsameer: qmx: FUD? [20:41] jrogers has joined the channel [20:42] qmx: lxsameer: well, let's take a obvious crappy benchmark, and start bashing node.js just because [20:42] qmx: lxsameer: do you know what fud means? [20:42] lxsameer: Lingerance: do you have any performance benchmark [20:42] lxsameer: qmx: no [20:43] qmx: lxsameer: fear, uncertainity and doubts, strategy commonly used by microsoft against linux [20:43] lxsameer: qmx: aha [20:43] Lingerance: lxsameer: Anything useful would test network-io throughput, which is a bitch to benchmark. [20:44] GrizzLyCRO has joined the channel [20:44] Lingerance: (and no) [20:45] jbrokc_ has joined the channel [20:45] Lingerance: http://zgadzaj.com/benchmarking-nodejs-basic-performance-tests-against-apache-php <-- there's that though [20:46] ph^ has joined the channel [20:47] chrixian has joined the channel [20:49] coderzach: lxsameer: I think he's right, don't do recursive fibonacci sequence in node, because javascript doesn't have tail call optimizations and it blocks stuff because it's compuationally intensive [20:49] d_low has joined the channel [20:49] coderzach: :-D [20:50] aioue has joined the channel [20:52] RedSofa has joined the channel [20:52] fly-away has joined the channel [20:53] aioue has joined the channel [20:53] CIA-109: node: 03Tim Oxley 07v0.6 * rfc0a4c2 10/ (doc/favicon.ico doc/logos/node-favicon.png): docs: fix favicon - http://git.io/WJXiew [20:55] fangel has joined the channel [20:58] shipit has joined the channel [20:59] aioue has joined the channel [20:59] tlynn has joined the channel [21:00] TheJH: jbrokc, to kill dead connections, use "ghost", not "release" [21:01] hotch has joined the channel [21:03] jonaslund: qmx: actually that Ted has another issue with node [21:03] jonaslund: he kind of has a point [21:03] jonaslund: for some purposes [21:04] jonaslund: it's the usual "use the right tool for the job" [21:04] jbrokc: TheJH: oh, okay [21:04] jbrokc: TheJH: thanks again [21:07] chrislorenz has joined the channel [21:08] kpko-fn has joined the channel [21:09] p1d has joined the channel [21:09] CIA-109: node: 03isaacs 07v0.6 * re85a95d 10/ (218 files in 6 dirs): Remove npm's .gitignore, add generated docs - http://git.io/Fw3h0A [21:10] Brozilla has joined the channel [21:11] phzbOx has joined the channel [21:11] jomoho2 has joined the channel [21:11] lxsameer: Lingerance: i just tested that hello world application , between node.js and python/gevent [21:12] lxsameer: Lingerance: node.js is not that much fast [21:13] RedSofa has joined the channel [21:13] ryanfitz has joined the channel [21:14] Aria has joined the channel [21:15] aioue has joined the channel [21:16] cjm has joined the channel [21:16] _eddyb_: crap [21:16] Vertice has joined the channel [21:17] _eddyb_: is there no debian node6 package? [21:17] EvRide has joined the channel [21:17] tbranyen: heh debian [21:17] tbranyen: up-to-date [21:18] tbranyen: you picked the wrong distro [21:18] davv3_: try sid? [21:18] lxsameer: _eddyb_: node6? nodejs v0.6 ? [21:19] Vertice: i kinda like nvm [21:19] Vertice: instead of relying on distros to package it [21:19] _eddyb_: I would've chosen opensuse (you can have official-grade-like repositories that update in minutes after a realease) [21:20] _eddyb_: but it's slicehost and they don't have opensuse [21:20] Brozilla: is nvm the rvm for node.js? [21:20] _eddyb_: davv3_: I have sid [21:20] subbyyy has joined the channel [21:20] Sorella has joined the channel [21:20] stonebranch has joined the channel [21:21] Overshee has left the channel [21:22] johnnywengluu: Brozilla: no [21:22] johnnywengluu: Brozilla: nvm is equivalent to gem .. it's a package manager you install packages with [21:23] TheJH: johnnywengluu, WRONG [21:23] mmalecki: Brozilla: yes [21:23] johnnywengluu: oh =) what have i missed [21:23] TheJH: johnnywengluu, nvm isn't npm [21:23] Brozilla: ah, nice [21:23] johnnywengluu: TheJH: ahh .. i read wrong .. thought he was asking npm === rvm [21:24] TheJH: johnnywengluu, yes, I first read it that way, too :D [21:24] isaacs: Brozilla: i like nave, but folks do use nvm. [21:24] johnnywengluu: Brozilla: what is wrong with you :P [21:24] isaacs: Brozilla: they're both just shell scripts [21:25] _eddyb_ has joined the channel [21:25] johnnywengluu: TheJH: I meant npm but I typed nvm ... hahaha [21:25] bosphorus has joined the channel [21:25] mmalecki: I like nvm because it doesn't mess with my shell [21:25] _eddyb_: http://en.opensuse.org/12.1 << Go as part of the release? [21:25] mmalecki: but I've used nave as well, because I needed it to mess with my shell [21:26] mmalecki: both are nice, just a bit different approach [21:26] RyanW has left the channel [21:26] isaacs: mmalecki: the 'source' requireemnt scares me [21:26] mmalecki: isaacs: understandable [21:26] crescendo_ has joined the channel [21:26] isaacs: i don't like programs using the same process as my shell :) [21:26] isaacs: not confident they'll clean up properly [21:26] crescendo_: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:27] mmalecki: lol [21:27] mmalecki: yeah, I'm definitely making a bot for that [21:27] mmalecki: lemme... [21:27] rskuja: is there a bug in latest npm? seems like its failing to build from git [21:27] TheJH: crescendo_, "git checkout v0.6.3" [21:27] lxsameer: does node.js handle the number of processes and threads itself? [21:27] crescendo_: danke. [21:27] bnoordhuis: i think i'll change the message... [21:27] TheJH: bnoordhuis, :D [21:27] mmalecki: bnoordhuis: wait for my bot [21:27] __ntr0py__ has joined the channel [21:28] bnoordhuis: mmalecki: okay [21:28] crescendo_: so much sexier. wow. [21:28] crescendo_: :) [21:28] TheJH: mmalecki, I already have such stuff for some npm error messages :D [21:28] Slipyx has joined the channel [21:28] _bat has joined the channel [21:29] _eddyb_: SAX3 [21:29] _eddyb_: When Xorg evolved beyond xorg.conf, to the new xorg.conf.d structure, our beloved X configuration tool, SAX2, went away as well. Thanks to the efforts of Manu Gupta during Google's Summer of Code, openSUSE again has an elegant GUI for customizing your X configuration: SAX3. [21:29] _eddyb_: I LOVE THIS DISTRO [21:29] Slipyx has left the channel [21:29] p1d_ has joined the channel [21:30] mmalecki: what's the char limit in IRC name? [21:30] rskuja: lxsameer: no not by itself [21:30] aaaaaaaaaaaaaaaa: aww [21:30] aaaaaaaaaaaaaaaa: thats pretty lame [21:31] johnnywengluu: do a lot of people in here use nvm to install node.js? [21:31] TheJH: mmalecki, warning: I think that every char in your nick is one char less you can use per message, but I'm not entirely sure [21:32] TheJH: mmalecki, at least it's this way for channel names [21:32] secoif has joined the channel [21:32] moogoo: hm [21:32] moogoo: interesting [21:32] TheJH: mmalecki, or if someone PMs you [21:32] rskuja: johnnywengluu: no need for me, i rollback my node pkg from catche [21:32] isaacs: whoa, anyone else seeing c9.io going to a microsoft page? [21:32] johnnywengluu: rskuja: what is catche? [21:32] TheJH: the message length restriction refers to the whole sent line, not just to the contents [21:33] isaacs: http://c9.io [21:33] rskuja: *cache [21:33] TheJH: isaacs, no [21:33] isaacs: weird... [21:33] TheJH: maybe they messed up some location-based dns entries? [21:33] marcello3d: isaacs: no [21:33] moogoo: what if you have a ridiculously long hostname [21:34] mmalecki: isaacs: nope [21:34] isaacs: just got it fixed. [21:34] isaacs: comcast's dns servers are beyond screwey [21:34] isaacs: pointed at googles. [21:34] _eddyb_: "the util-linux tool version 2.20 introduces the first major changes to the dmesg logging tool in 18 years, bringing a number of options to bring human readable prefixes and timestamps to the output or clean it up, only showing important messages or messages coming from either kernel or userspace." [21:34] _eddyb_: wtf [21:34] TheJH: moogoo, not sure... I think that actually the sender nick doesn't matter, just the receiving nick in a PM, and only client-side messages are restricted... but I'm just guessing right now [21:34] makeInstallBot has joined the channel [21:34] mmalecki: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:34] makeInstallBot: mmalecki: `make install` is not supported on current node.js `master` due to build system refactor. Please use latest stable tag (v0.6.x). [21:35] mmalecki: is it ok? [21:35] mmalecki: bnoordhuis: ^ ? [21:35] johnnywengluu: what does the starting dot in : . ~/.nvm/nvm.sh do? [21:35] bnoordhuis: mmalecki: looks good, thanks :) [21:35] mmalecki: johnnywengluu: loads it into current shell [21:35] TheJH: mmalecki, own bot just for that? LOL [21:35] mmalecki: bnoordhuis: ok, lemme put it on a server [21:35] johnnywengluu: mmalecki: aight [21:35] mmalecki: TheJH: why not? [21:35] marcello3d: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:35] TheJH: mmalecki, when you have 10 bots or so, you'll hit the per-IP-limit :D [21:36] marcello3d: it's not working! [21:36] marcello3d: you know what'd be hilarious [21:36] TheJH: marcello3d, " bnoordhuis: ok, lemme put it on a server" "* makeInstallBot hat die Verbindung getrennt (Remote host closed the connection)" [21:36] marcello3d: have one bot wake up the other bot just to say that message then leave again [21:36] shinuza has joined the channel [21:36] marcello3d: TheJH: I know =P [21:36] mmalecki: bnoordhuis: https://gist.github.com/1398187 [21:37] marcello3d: wow, irc module looks nice :) [21:37] bnoordhuis: mmalecki: minimalistic, i like that [21:38] TheJH: mmalecki, rather than "==", use "~indexOf" [21:39] ntr0py has joined the channel [21:40] diogogmt has joined the channel [21:41] ntr0py: isaacs: Is there a standard way to create a local ~/.npmrc or global /etc/npmrc after npm is installed (i installed it via Chris Lea's ubuntu ppa)? [21:41] isaacs: ntr0py: yeah, npm config command, or do you mean to set up your user acct? [21:41] isaacs: ntr0py: npm adduser [21:42] mmalecki has joined the channel [21:42] TheJH: mmalecki, rather than "==", use "~indexOf" [21:42] makeInstallBot has joined the channel [21:42] kriszyp3 has joined the channel [21:43] pekim has joined the channel [21:43] mmalecki: TheJH: ok [21:43] ntr0py: isaacs: no i just want to setup the defaults (locations etc), no npm registry user and such to use npm with my standard shell user localy (i have no file with name npmrc in it on my entire system). [21:43] TheJH: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:43] makeInstallBot: TheJH: `make install` is not supported on current node.js `master` due to build system refactor. Please use latest stable tag (v0.6.x). [21:43] TheJH: I haz a problem: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:43] jldbasa has joined the channel [21:43] salva has joined the channel [21:44] makeInstallBot has joined the channel [21:44] mmalecki: I haz a problem: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:44] makeInstallBot: mmalecki: `make install` is not supported on current node.js `master` due to build system refactor. Please use latest stable tag (v0.6.x). [21:44] mmalecki: `make install` is not implemented yet. Bug bnoordhuis about it in #node.js [21:44] makeInstallBot: mmalecki: `make install` is not supported on current node.js `master` due to build system refactor. Please use latest stable tag (v0.6.x). [21:44] mmalecki: whatever I say [21:44] mmalecki: ok. [21:46] robertj: so for sharing state data between forks is the standard go-to answer just put it in nosql? [21:46] xerox: how can I test I have successfully added a retry to a "socket hang up" exception [21:46] ntr0py: isaacs: i am just serching for a default config npmrc to start with [21:46] secoif has joined the channel [21:47] CIA-109: node: 03Ben Noordhuis 07v0.6 * r216019b 10/ src/node.cc : [21:47] CIA-109: node: modules: fix error message for native add-ons without entry points [21:47] CIA-109: node: Trying to load an add-on without "init" or "modname_module" symbols would raise [21:47] CIA-109: node: an "Out of memory" exception. Let's improve that error message. - http://git.io/uuP7hw [21:48] RC1140 has joined the channel [21:50] kpko-fn has left the channel [21:50] MatthewS has joined the channel [21:51] deedubs has joined the channel [21:51] johnnywengluu: nvm is so simple to use! node.js eco system starts to take form [21:54] TheJH: johnnywengluu, starts to take form? we already have a bunch of established libs :D [21:55] aioue has joined the channel [21:55] martin_sunset has joined the channel [21:55] ggoodale has joined the channel [21:56] torm3nt has joined the channel [21:56] dust-- has joined the channel [21:56] sdwrage has joined the channel [21:56] johnnywengluu: TheJH: not really really really established =) [21:56] ChrisPartridge has joined the channel [21:57] maxogden: nobody should use old node versions but instead fork libraries and update them for 0.6 :D [21:57] secoif has joined the channel [21:57] johnnywengluu: or i mean the established libs are indeed established but we still lack a lot of libs [21:58] TheJH: johnnywengluu, every environment will always lack an infinite amount of libs :D [21:58] RedSofa has joined the channel [21:58] johnnywengluu: TheJH: this will be the first environment to break the tradition [21:58] johnnywengluu: oh shit [21:59] johnnywengluu: the count of members is 666 [21:59] TheJH: johnnywengluu, members of what? [21:59] johnnywengluu: this irc channel [21:59] johnnywengluu: someone needs to unjoin! [21:59] maxogden: quick someone make a node-darklord library [21:59] maxogden: and start it with nodemon [21:59] joshsmith has joined the channel [22:00] maxogden: node-underworld-portal [22:00] maxogden: node-krampus [22:00] johnnywengluu: oh .. who was the jedi saving us all [22:00] johnnywengluu: joshsmith =) [22:01] svnlto has joined the channel [22:01] nils_r has joined the channel [22:01] Sorella has joined the channel [22:01] felixge has joined the channel [22:01] felixge has joined the channel [22:02] Draco_ has joined the channel [22:03] aioue has joined the channel [22:03] Castrovalva has joined the channel [22:03] Castrovalva has left the channel [22:04] Renegade001 has joined the channel [22:06] cjheath has joined the channel [22:07] aioue has joined the channel [22:08] shanebo has joined the channel [22:09] jrogers has joined the channel [22:11] ntr0py: isaacs: As far as i understand "npm config ls -l" and "npm_g config ls -l" I just need empty defaults for the config files to bootstrap npm, right? (E.g mkdir ~/.npm ; touch ~/.npmrc ~/.npmignore ; sudo touch /usr/etc/npmrc /usr/etc/npmignore) [22:12] aioue has joined the channel [22:13] broofa has joined the channel [22:16] bradleyg has joined the channel [22:16] aioue has joined the channel [22:17] skm has joined the channel [22:18] Renegade001 has joined the channel [22:18] shipit has joined the channel [22:19] jimt_ has joined the channel [22:20] Brozilla has joined the channel [22:21] aioue has joined the channel [22:21] jimubao has joined the channel [22:24] jimt has joined the channel [22:25] aioue has joined the channel [22:26] Aria has joined the channel [22:29] simenbrekken has joined the channel [22:29] Marak has joined the channel [22:30] Marak has left the channel [22:30] RedSofa has joined the channel [22:31] plutoniix has joined the channel [22:32] Renegade001 has joined the channel [22:32] RC1140 has left the channel [22:33] marcello3d: I don't get search.npmjs.org's search [22:33] marcello3d: the sorting seems semi alphabetical, but it also seems to leave out results? [22:33] pquerna: ryah: http://www.tomaz.me/2011/11/27/whiskey-now-with-more-goodness-introducing-process-runner.html <- your request feature is done [22:33] marcello3d: for example, I can't search for 'express' [22:34] maxogden: https://github.com/isaacs/npmjs.org/blob/master/www/app.js#L18 [22:34] maxogden: marcello3d: if you wanna read the code ^^ [22:35] maxogden: it sucks cause its in pure mapreduce and is not a full text index [22:36] maxogden: but it would take like 10 minutes to set up the code from http://search.couchdb.org/ to get full text search for node packages [22:36] maxogden: since they are already in a couch and search.couchdb.org uses elasticsearch to index couchdb [22:36] marcello3d: yeah I don't know anything about any of that... [22:36] marcello3d: merely commenting from a user experience perspective :) [22:37] maxogden: theres an issues tracker for that repo [22:37] maxogden: FYI [22:37] Milossh: hello. what's the most common way for localizing node.js based website, possibly via gettext? [22:37] wookiehangover: I think we all know that the npm site is in need of some ♡♡♡ [22:37] CiRlE has joined the channel [22:38] maxogden: wookiehangover: my point is that it might be more constructive to channel our disappointment into positive open source contributions :P [22:38] wookiehangover: maxogden: not gonna argue with that [22:38] maxogden: or we could convince joyent people to contract a new site [22:38] maxogden: since they make all the money around here [22:39] wookiehangover: do utf8 hearts not count as positive open source contributions? [22:39] jgautier has joined the channel [22:39] maxogden: wookiehangover: those were some pretty sweet hearts, not gonna lie [22:40] wookiehangover: tbranyen: having tons of fun piping uploads to s3 from strata [22:40] soapyillusions has joined the channel [22:40] wookiehangover: https://github.com/wookiehangover/cloudy ♡♡♡♡♡ [22:41] maxogden: whats a strata [22:41] ktos has joined the channel [22:41] zedas has joined the channel [22:41] minerale has joined the channel [22:41] mattijs has joined the channel [22:41] dabailey has joined the channel [22:41] CoverSlide has joined the channel [22:41] jesusabd1llah has joined the channel [22:41] balgarath has joined the channel [22:41] markeeto has joined the channel [22:41] mac^_ has joined the channel [22:41] eviltwin_ has joined the channel [22:41] paulbaumgart has joined the channel [22:41] kaarlo has joined the channel [22:41] Epeli has joined the channel [22:41] wookiehangover: https://github.com/mjijackson/strata [22:41] jzacsh has joined the channel [22:41] ianl` has joined the channel [22:41] s0enke has joined the channel [22:41] tekky has joined the channel [22:41] ps_jinx has joined the channel [22:41] fson has joined the channel [22:41] xbddc has joined the channel [22:41] a11235_ has joined the channel [22:41] Dmitrijus has joined the channel [22:41] davv3 has joined the channel [22:41] fson_ has joined the channel [22:41] jzacsh has joined the channel [22:41] DJBouche has joined the channel [22:41] aapelip has joined the channel [22:41] mbruce has joined the channel [22:41] trepan has joined the channel [22:41] purr has joined the channel [22:41] vsync_ has joined the channel [22:41] DennisRasmussen has joined the channel [22:41] qFox has joined the channel [22:41] innociv_ has joined the channel [22:41] __main__ has joined the channel [22:41] ollie has joined the channel [22:41] topaxi_ has joined the channel [22:41] booyaa has joined the channel [22:41] jsvana_ has joined the channel [22:41] forzan_ has joined the channel [22:41] qmx has joined the channel [22:41] bbommarito has joined the channel [22:41] azend has joined the channel [22:41] maxogden has joined the channel [22:41] zilch_ has joined the channel [22:41] odyniec has joined the channel [22:41] Leonidas_ has joined the channel [22:41] TheLifelessOne: Sweet baby Jesus... [22:41] serroba_ has joined the channel [22:41] Gazler has joined the channel [22:41] crescendo_ has joined the channel [22:41] ryan[WIN] has joined the channel [22:41] franck34 has joined the channel [22:41] zpao has joined the channel [22:41] dcelix has joined the channel [22:41] trodrigues has joined the channel [22:41] mattp_ has joined the channel [22:41] trodrigues has joined the channel [22:41] fbartho has joined the channel [22:41] sstephenson_ has joined the channel [22:41] mikegerwitz has joined the channel [22:41] mikegerwitz has joined the channel [22:41] dilvie has joined the channel [22:41] Guest18468 has joined the channel [22:41] Tobias| has joined the channel [22:41] teknopaul has joined the channel [22:41] FMJaggy has joined the channel [22:41] benlyng has joined the channel [22:41] xerox_ has joined the channel [22:41] recycle has joined the channel [22:41] markwubben has joined the channel [22:41] jslatts has joined the channel [22:41] mrkurt_ has joined the channel [22:41] DrPizza_ has joined the channel [22:41] dmwuw has joined the channel [22:41] wookiehangover: new frameworky thing, similar to express [22:41] xandy| has joined the channel [22:41] DRMacIver has joined the channel [22:41] Slashbunny has joined the channel [22:41] verdoc has joined the channel [22:41] Pierre_N has joined the channel [22:41] Ezku has joined the channel [22:41] __doc__ has joined the channel [22:41] Skyec has joined the channel [22:41] maxogden: ACTION has seizure [22:41] andrew9183 has joined the channel [22:41] racar has joined the channel [22:41] stutter has joined the channel [22:41] __directory has joined the channel [22:42] tellnes has joined the channel [22:42] koo0 has joined the channel [22:42] FIQ has joined the channel [22:42] russfrank has joined the channel [22:42] robinhoode has joined the channel [22:42] avalanche123 has joined the channel [22:42] SuMarDi has joined the channel [22:42] igl has joined the channel [22:42] koo5 has joined the channel [22:42] er1c_ has joined the channel [22:42] wookiehangover: maxogden: bit a towel! [22:42] Gekz has joined the channel [22:42] Gekz has joined the channel [22:42] pradeepto has joined the channel [22:42] masch has joined the channel [22:42] Lingerance has joined the channel [22:42] Evanlec has joined the channel [22:42] wookiehangover: s/bit/bite [22:42] zenazn has joined the channel [22:42] marcello3d: strata looks huge [22:42] omni5cience has joined the channel [22:42] Sami_ZzZ_ has joined the channel [22:42] lmorchard has joined the channel [22:42] Danielpk has joined the channel [22:42] Will| has joined the channel [22:42] marcello3d: bit monolithic [22:42] wookiehangover: twss [22:42] joeytwiddle has joined the channel [22:42] pandeiro: maxogden: have you ever looked at google closure lib? [22:43] pandeiro: completely OT, apologies [22:43] maxogden: pandeiro: i did a big webapp it in a couple years ago [22:43] wookiehangover: marcello3d: true statement, but new things are fun to play with [22:43] pandeiro: using couch? [22:43] RichardBronosky has joined the channel [22:43] maxogden: pandeiro: nope [22:44] sstreza has joined the channel [22:44] MrNibbles has joined the channel [22:44] maxogden: pandeiro: it was a rails app that originally used jqueryui on the frontend but i switched jqueryui out for closure [22:44] maxogden: but i dont like either of them [22:44] pandeiro: why? [22:44] ntr0py: Is there somewhere a bootstrap guide for npm? [22:44] pandeiro: (curious your opinion on closure specifically) [22:45] maxogden: pandeiro: closure was too classical for my taste [22:45] wookiehangover: ntr0py: https://github.com/isaacs/npm [22:45] matt_c has joined the channel [22:45] pandeiro: ah ok, figured... definitely is [22:45] wookiehangover: also, tons of manpages [22:45] maxogden: and while it is technically 'open source' is isnt really open source [22:45] JKarsrud has joined the channel [22:45] pandeiro: yeah there is that [22:45] maxogden: its more like google dumps code every once in a while and does 0 community interaction stuff [22:46] pandeiro: yeah, no IRC is a bummer for instance [22:46] maxogden: for instance there is an internal dev wiki that they wont make public [22:46] maxogden: but refer to in the documentation [22:46] sriley has joined the channel [22:46] pandeiro: really, that sucks [22:46] wookiehangover: lol [22:46] schwab has joined the channel [22:46] tahu has joined the channel [22:46] Kai` has joined the channel [22:46] maxogden: and there are parts of the library which implement old patterns and then other parts that implement new patterns... its a big hodgepodge [22:46] pandeiro: thing is, i'm digging into clojurescript, it's fairly coupled to closure... so i am writing basic couchdb lib for it [22:47] hotspants has joined the channel [22:47] isaacs: maxogden: yeah, if the committers don't talk to the users, i'ts not open source in any meaningful sense [22:47] maxogden: well theres the closure library and then theres the closure compiler [22:47] cheek_ has joined the channel [22:47] isaacs: if the average user doesn't recognize them from irc, it's not open [22:47] wookiehangover: isaacs: that's a good quote [22:48] lmatteis has joined the channel [22:48] ntr0py: do I really need to run npm as root for global configs? [22:48] isaacs: ntr0py: yes. [22:48] pandeiro: one thing i think it has going for it is a much more sophisticated event management model [22:48] maxogden: isaacs: growing up on the oregon coast you categorize crab meat into two categories: real crab (with a c) and imitation krab (with a k) [22:48] maxogden: so crab with a k == imitation [22:48] isaacs: ntr0py: or you can install it somewhere where you don't need root perms :) [22:48] maxogden: so basically google is good at 'open source' with a k [22:48] realguess has joined the channel [22:48] grekko has joined the channel [22:48] isaacs: open sourke? [22:48] maxogden: haha [22:48] isaacs: open sorta>? [22:48] wookiehangover: open sauce [22:49] beawesomeinstead has joined the channel [22:49] maxogden: "a processed seafood made of finely pulverized white fish flesh (surimi), shaped and cured to resemble crab leg meat" [22:49] isaacs: watching yui go from one guy's utility script at a corporation into a proper open-as-in-open project was really interesting. [22:49] konobi: bnoordhuis: so got node compiled and running on sheevaplug last night [22:49] isaacs: yahoo does not know how to do open source properly, despite the best intentions, and yui really managed to get out from under that, i think [22:49] heatxsink has joined the channel [22:49] garann has joined the channel [22:49] pandeiro: is YUI on the same scale as Closure in terms of coverage and loc? [22:50] marcello3d: maxogden: https://github.com/isaacs/npmjs.org/issues/42 https://github.com/isaacs/npmjs.org/issues/43 [22:50] pandeiro: i am not familiar with it at all [22:50] bnoordhuis: konobi: i saw your note on that issue [22:50] majek has joined the channel [22:50] isaacs: pandeiro: yui has a ton of users. [22:50] maxogden: pandeiro: yui is more comprehensive i think too [22:50] bnoordhuis: konobi: any idea why you need -ftree-sink? [22:50] maxogden: marcello3d: nice! [22:50] pandeiro: interesting [22:50] siculars has joined the channel [22:51] konobi: bnoordhuis: no idea... i just tried it and it worked =0) [22:51] isaacs: pandeiro: it's a pretty decent front-end framework. integrates nicely with node, too, and you can use it on the server-side. but it's kind of like one of these dojo or sproutcore type things, where it really shines when you use it for *everything* [22:51] stbuehler has joined the channel [22:51] isaacs: there's definitely less lock-in than with those, though [22:51] nym has joined the channel [22:51] isaacs: but it's not quite as a la carte as jquery, i found. [22:51] churp has joined the channel [22:51] dnyy has joined the channel [22:51] bnoordhuis: konobi: but without -ftree-sink the build fails? or does the binary crash? [22:51] wookiehangover: ya you definitely have to buy the whole cow [22:51] pandeiro: isaacs: you follow clojure at all? i remember your riff on compile-to-JS-ism... [22:52] isaacs: pandeiro: yeah, but clojure is a compile-js-to-js, right? [22:52] konobi: bnoordhuis: the v8 option armsabi=soft definitely helps... but -f-no-tree-sink seems to help with the snapshot [22:52] isaacs: pandeiro: it's more like a very smart and aggressive optimizer. [22:52] bnoordhuis: konobi: hmm, i wonder why [22:52] bnoordhuis: isaacs: that's clojurescript [22:52] isaacs: oh, or the clojure compiler? [22:52] konobi: that and the fatal error about calling a pure virtual method [22:52] isaacs: i'm so lost on all those things [22:53] maxogden: clojure with a j is rich hickey doing lisp on the jvm [22:53] pandeiro: exactly, sorry for the confusion [22:53] maxogden: closure with an s is google doing both a YUI style library and also the closure compiler with is what inspired uglify.js [22:53] coderzach: there is a clojure script compiler tho! [22:53] pandeiro: clojure meaning clojurescript meaning lisp targeting JS basically [22:53] maxogden: oh jesus [22:53] coderzach: clojure to javascript [22:53] pitlimit has joined the channel [22:53] wookiehangover: ACTION head explodes [22:53] caolanm has joined the channel [22:53] marcello3d: poor naming [22:53] marcello3d: clojure == another language [22:53] marcello3d: closure == javascript stuff [22:54] pitlimit: when using callbacks, is the callback ALWAYS the last parameter to a function? [22:54] isaacs: ohhh kay [22:54] isaacs: yeah, i'm thinking of the closure compiler [22:54] pitlimit: and how does node.js know it is a callback? Is callback the keyword? [22:54] TheDeveloper has joined the channel [22:54] isaacs: clojure is the lispy thing that runs on teh jvm? [22:54] maxogden: ya [22:54] pandeiro: yeah [22:54] augustl: pitlimit: a callback is a reference to a function [22:54] isaacs: pitlimit: yes, it is the last arg, and it's a function [22:54] pandeiro: slightly different beast than coffeescript [22:54] bnoordhuis: isaacs: oh heh, didn't realize you were talking about google closure [22:54] maushu has joined the channel [22:54] augustl: pitlimit: there's no rule about which argument it is, but it's usually the last [22:54] isaacs: pitlimit: but you can pass any function, doesn't have to be named magically [22:54] augustl: pitlimit: some APIs take two functions though [22:55] pitlimit: if so augustl how does node.js know which one is the callback? [22:55] augustl: or more [22:55] maxogden: "ClojureScript seeks to address the weak link in the client/embedded application development story by replacing JavaScript with Clojure, a robust, concise and powerful programming language. In its implementation, ClojureScript adopts the strategy of the Google Closure library and compiler" [22:55] isaacs: pitlimit: because it's the last arg, and it's a function [22:55] augustl: pitlimit: node.js doesn't. The method does. [22:55] maxogden: THEY CROSSED BEAMS [22:55] tschundeee has joined the channel [22:55] benvie has joined the channel [22:55] pitlimit: Hm... a bit confused. Perhaps I can provide an example [22:55] augustl: pitlimit: sure [22:56] marcello3d: are there any pubsub libraries on top of socket.io? [22:56] augustl: pitlimit: anyway, in itself a callback is nothing special. It's a reference to a function passed to a method, and usually the method signature takes the function/callback as the last argument [22:56] merlin83 has joined the channel [22:56] coderzach: is socket.io not itself pub sub [22:57] augustl: marcello3d: isn't socket.io itself pubsub? [22:57] wookiehangover: coderzach: no, but you can use it to implement pub/sub [22:57] Aria: socket.io is transport. [22:57] marcello3d: coderzach: sort of, but I'm thinking client subscribing to an individual channel on the server with validation [22:57] augustl: http://socket.io/#how-to-use says "mySock.on("event", func) [22:57] marcello3d: imagine IRC over socket.io [22:57] Aria: But event emitters are pretty much pubsub. [22:57] marcello3d: I guess it has the join/leave stuff [22:57] pandeiro: i dunno between dart, the new ecmascript with 'let' and destructuring, coffeescript, and clojurescript... are people still going to be writing javascript 5 years from now? [22:57] marcello3d: I'll go look at that again [22:57] salazr_ has joined the channel [22:57] maxogden: quick all the pubsub hubbub [22:57] pitlimit: if I have fn1 = function (callback) {..... fn2(a, b, fn3, callback); } fn2 = function(param1, param2, callback2, callback) {stuff.... callback(param1, param2, callback2);} fn3 = function(param1, param2, callback) {stuff.... callback(param1);} is that ok? [22:57] maxogden: quit* [22:57] maxogden: joke fail [22:58] wookiehangover: maxogden: but an A+ for effort [22:58] `3rdEden: marcello3d not that i'm aware of [22:58] maxogden: pitlimit: let me introduce you to http://gist.github.com/ [22:58] Hosh has joined the channel [22:58] augustl: pitlimit: wow that was abstract [22:58] coderzach: maybe https://github.com/LearnBoost/socket.io namespace [22:58] pitlimit: :) i will git hub it - sorry thought it was more clear than it actually is :) [22:59] augustl: pitlimit: not with callback2, callback, param1, param2 :P indentation helps to wrap brain around [22:59] fishy has joined the channel [22:59] pitlimit: :) [22:59] `3rdEden: marcello3d if you want validation you can use different namespaces, but they cannot be generated dynamically :) [22:59] marcello3d: why not? [22:59] `3rdEden: https://github.com/LearnBoost/socket.io/wiki/Authorizing [22:59] augustl: pandeiro: sure, I have no problems writing code in JavaScript [23:00] coderzach: they can too be generated dynamically! [23:00] augustl: pandeiro: for some people, not typing semicolins is terribly important, but that doesn't apply to everyone [23:00] `3rdEden: coderzach thats not what they are designed for [23:00] `3rdEden: and you will probably be leaking memory if you do [23:00] marcello3d: ok [23:00] `3rdEden: as they do not get cleaned up [23:00] augustl: pandeiro: that said, clojurescript yields actual long term advantages, so it's interesting to see what'll happen [23:00] pandeiro: augustl: neither do i, first lang i learned, but i find the complexity accelerates beyond my ability to control it [23:00] maxogden: if not typing semicolons is 'terribly important' you need to turn off your computer and go outside right now [23:01] `3rdEden: if you want to have dynamic namespaces, you should use the join/leave api [23:01] coderzach: `3rdEden: oh :-( that's lame [23:01] pandeiro: i dont know if that's just me being a subpar programmer (which i am) or something inherent in the browser env/JS [23:01] augustl: maxogden: to each their own ;) [23:01] `3rdEden: coderzach its by design [23:01] marcello3d: `3rdEden: can the joins be gated by the server? [23:01] `3rdEden: marcello3d they can only be done at the server [23:01] ntr0py: isaacs: is it save to set the cache dir to /tmp/npm-cache e.g. it wont survive reboots or will that result in inconsistent state? [23:01] coderzach: leaks memory by design :-( [23:01] pitlimit: Okay, this is clearly a fake case so I can understand: https://gist.github.com/7e47a5d287b854760602 [23:02] augustl: pitlimit: so what's the question? [23:02] pitlimit: What I want to understand is how does node.js know which is the correct callback ? [23:02] `3rdEden: coderzach it's because namespaces are designed for multiplexing the connection [23:02] pitlimit: on line 9, I have two callbacks [23:02] augustl: pitlimit: fn3 takes two arguments a and b that isn't used [23:02] `3rdEden: so they are actual end points of sockets [23:02] joshthecoder has joined the channel [23:02] pitlimit: augustl, again, this is a test case [23:02] daleharvey has joined the channel [23:02] pitlimit: Just to ask questions and understand [23:02] augustl: pitlimit: and param1 and paran2 is not defined in fn3 either so it'll fail [23:02] pitlimit: oops [23:02] pitlimit: :) [23:02] pitlimit: one sec [23:02] augustl: pitlimit: with invalid code it's kind of hard to tell what matters and not [23:02] augustl: ah [23:02] pitlimit: I tried to make it easier to read :) [23:03] `3rdEden: coderzach also leaking might not be the propper wording for it. It just allocates more memory then rooms which it will not release ;) [23:03] pitlimit: augustl, : https://gist.github.com/7e47a5d287b854760602 [23:03] wookiehangover: pitlimit: http://nodeguide.com/style.html [23:03] marcello3d: are there api docs for socket.io? [23:03] `3rdEden: marcello3d nop-ish [23:03] augustl: pitlimit: fn3 is useless [23:04] augustl: pitlimit: it's equivalent to simply calling callback(a, b) directly [23:04] pitlimit: I know augustl my goal is to make fn2 use setTimer [23:04] coderzach: so you can't "close" a namespace? [23:04] `3rdEden: the only API docs i got are generated from the JSDocs [23:04] marcello3d: `3rdEden: is join/leave documented anywhere? [23:04] pitlimit: but I need to make sure I understand waht is happening here first [23:04] `3rdEden: marcello3d it's on the site and in the wiki [23:04] robotmay has joined the channel [23:04] augustl: pitlimit: you're passing function references and calling them [23:04] `3rdEden: https://github.com/LearnBoost/socket.io search for rooms :) [23:04] pitlimit: augustl, does node.js expect that the LAST parameter is ALWAYS the callback [23:04] augustl: pitlimit: no [23:04] augustl: pitlimit: you're just passing references to functions [23:05] augustl: pitlimit: it can be any argument, the argument doesn't have to be named "callback", etc [23:05] pksunkara has joined the channel [23:05] marcello3d: no way to search the wiki :( [23:05] pitlimit: :( augustl I'm trying to use fn2 to do a setTimer shindig [23:05] augustl: pitlimit: btw, passing a reference to a function is the same as using callbacks [23:06] pitlimit: I need to make sure augustl that fn3 is NOT called until a variable meets a requirement... fn2 will serve the purpose of checking in and NOT calling fn3 until the value is correct [23:06] crescendo has joined the channel [23:06] pitlimit: I will use setTime to do establish that end [23:06] pitlimit: setTimer [23:06] pitlimit: does that make sense [23:06] liar has joined the channel [23:06] marcello3d: `3rdEden: found it, I get it :) [23:07] augustl: pitlimit: so http://pastie.org/2930604 ? [23:07] pitlimit: hm [23:07] pitlimit: more like this: [23:07] CodeRarity has joined the channel [23:07] johnnywengluu has joined the channel [23:08] pitlimit: augustl, : https://gist.github.com/afa7cc81bfb65fb2f5a9 [23:08] pitlimit: My original function cannot return until the requirement is met [23:08] marcello3d: so I would just need to do something like socket.on('subscribe', function(path, fn) { if (canSubscribe(socket,path)) { socket.join(path); fn() } else { fn('error') } }) [23:08] marcello3d: (on the server) [23:08] augustl: pitlimit: functions return immediately [23:09] coderzach: pitlimit: your original function has to return [23:09] augustl: pitlimit: you can't make something return in the future [23:09] pitlimit: it has to wait augustl [23:09] coderzach: pass the return value into the callback [23:09] augustl: pitlimit: then you need to usea callback, not return values [23:09] augustl: what coderzach siad [23:09] augustl: said* [23:09] pitlimit: right augustl [23:09] pitlimit: that's what I am trying to do with my original post [23:09] pitlimit: :( [23:09] augustl: your gist is completely synchronous [23:09] marcostoledo has joined the channel [23:10] pitlimit: oh man i thought this would be easy to do i've spent like two days on this [23:10] TheLifelessOne: can anyone tell me why the request module fails to properly parse a URL? [23:10] pitlimit: granted i'm learning javascript simultaneously [23:10] coderzach: pitlimit: can you post some real code? [23:10] pitlimit: augustl, can you tell me what I need to do [23:10] pitlimit: ok [23:10] pitlimit: well [23:10] pitlimit: no [23:10] augustl: pitlimit: post real code, and real question [23:10] augustl: doesn't have to be actual production code [23:10] pitlimit: I am first building a test case [23:10] augustl: just a real code snippet with async stuff and what not [23:10] pitlimit: I thought it would be better that way [23:11] augustl: that's good [23:11] coderzach: post the test case then [23:11] augustl: but your test case doesn't seem to demonstrate your problem [23:11] pitlimit: well I'm building the test case :) [23:11] augustl: it doesn't return anything etc [23:11] pitlimit: that was my first go :) [23:11] niftylettuce has joined the channel [23:11] pitlimit: okay I will try to build something [23:11] pitlimit: be back in a few [23:11] benvie: javascript can be a hard mistress at first. A bitch goddess, giving with one hand and taking with the other [23:12] jesusabdullah: I think it's less bitch goddess and more damaged goods [23:12] augustl: pitlimit: in your gist, fn3 is never called [23:12] benvie: eh [23:12] coderzach: benvie: I think she was abused as a child [23:12] jesusabdullah: like, when you get that new girlfriend and on one hand she totally digs star trek and making food but is also battling depression or something [23:12] pitlimit: yes it is, augustl [23:12] benvie: I mean yes but I believe she's also reformed [23:12] augustl: pitlimit: you'll get fn1(function (a, b, c) {}); where a is "tree", b is "tree2" and c is fn3 [23:13] augustl: pitlimit: nope [23:13] pitlimit: oh :( [23:13] jesusabdullah: THAT's javascript [23:13] augustl: in fn2 you call the 4th argument, which is the original "callback" passed to fn1 [23:13] benvie: haha rofl [23:13] augustl: pitlimit: which is called with a and b, which is the same as param1 and param2, and then fn3 is passed to the original callback without ever being called [23:14] pitlimit: gr ok [23:14] augustl: callback2 is fn3, and is never called in fn2 [23:14] pitlimit: i miss C. [23:14] pitlimit: :( [23:14] benvie: the girl reference, i get that one. But it's not fair to javascript because girls like that have caused me way more problems than javascript ever has. And eventually you come to hold a cold, distant respect for the meta-game javascript was playing with your head from day onw [23:14] benvie: where the girl is just fucked up [23:14] augustl: pitlimit: function pointers are almost identical to function references in JavaScript [23:14] pitlimit: nothing wrong with girls ;) [23:14] augustl: pitlimit: there's a clear difference between aFunc (a "pointer") and aFunc(); [23:14] pitlimit: we really don'te bite :) [23:14] pitlimit: don't [23:15] augustl: pitlimit: and since fn3 is never called with ().. well, fn3 is never called. [23:15] pitlimit: alright I'll give it a go [23:15] augustl: you can do this to call fn3, though: fn1(function (a, b, c) { c();}); [23:15] augustl: pitlimit: this will of course cause errors since you're calling c - fn3 - without any arguments [23:15] benvie: some girls bite [23:15] coderzach: javascripts previous boyfriend was the DOM [23:16] benvie: but that's not the problem [23:16] augustl: inside fn3, "callback" will be undefined and you'll get something like "undefined is not a function" [23:16] pitlimit: man whatever happened to signals! [23:16] benvie: hah that's fucking great [23:16] benvie: the DOM indeed [23:16] benvie: a fucked up wreck of a man [23:16] augustl: pitlimit: what are signals? [23:17] pitlimit: do you have a recommendation to what I might want to use augustl in order to have my function simply wait for the right value for x ms, run check value, if right value proceed else loop again waiting? [23:17] pitlimit: I don't want to waste cpu cycles in a while loop [23:17] pitlimit: and certainly my three-tiered function scheme clearly sucks [23:17] augustl: pitlimit: you can't do that [23:17] augustl: ..other than wasting cycles in a while loop [23:17] benvie: you might use settimeout and asynchronously poll your data source [23:17] benvie: but there's likely a better solution [23:18] augustl: the solution is to do it asynchronously, and pass the "return" value to a function instead of returning it directly [23:18] benvie: you want to push that kind of thing out of javascript entirely [23:18] IrishGringo has joined the channel [23:18] benvie: the goal is to use callbacks that wake up the original caller when ready [23:18] pitlimit: augustl, that is why I was trying to do what I was doing :) [23:18] benvie: so you bypass both polling and blocking [23:18] augustl: pitlimit: I assume you want "var foo = myFunction()", where "foo" is the value of some asynchronous call such as via setTimeout [23:18] enmand has joined the channel [23:18] pitlimit: will something like this work? : http://jsfiddle.net/6AssE/ [23:19] benvie: do you have a more concrete example of what you're trying to accomplish? [23:19] benvie: oh there [23:19] augustl: pitlimit: sure [23:19] pitlimit: so I thought I could incorporate all that into my 3-tiered callback scheme [23:19] benvie: ok so this is polling the value of an input element essentially [23:19] augustl: pitlimit: you're not calling "callback" until "result" is WOO [23:19] Slipyx has joined the channel [23:19] augustl: pitlimit: you can tier it as much as you want to [23:19] pitlimit: but is it necessary, augustl ? [23:19] augustl: pitlimit: you have a function reference and it's entirely up to you when to call that functon reference [23:20] benvie: so in this case you can set up event listeners, as the DOM and especially input elements will emit events when user input happens [23:20] augustl: pitlimit: necessary to accomplish what? [23:20] kwmiebach has joined the channel [23:20] pitlimit: I mean... do I really need three tiers? [23:20] augustl: pitlimit: you want to get notified when "value" of an input field changes? [23:20] benvie: document.getElementById("input").addEventListener('change', function(event){console.log(event)}) [23:20] augustl: pitlimit: myElement.addEventListener("keyup", function () {}); [23:20] augustl: what benvie said [23:20] pitlimit: value of a function return value [23:20] pitlimit: not an input value [23:21] pitlimit: so in my 3-tiered scheme, watch was tier 2 [23:21] benvie: change isn't entirely trustable, but combining it with keyup, blur (losing focus), etc. gets it close enoufh [23:21] pitlimit: tier 1 was going to call watch [23:21] coderzach: do you want to call the function multiple times? [23:21] augustl: pitlimit: I can't answer wether or not you have to perform polling in your case [23:21] Slipyx has left the channel [23:21] pitlimit: and tier 3 was going to be the callback [23:21] augustl: since I don't know what you want to achieve [23:21] benvie: or you use jquery or the like that abstracts those niggling issues [23:21] augustl: that's a different question though [23:21] pitlimit: Okay, I'll build my test case [23:21] pitlimit: brb [23:21] benvie: but javascript is entirely based around callbacks and events, not polling or synchronous IO [23:21] robertj: any tips on getting metics installed on .6? [23:21] robertj: metrics? [23:21] sdwrage has joined the channel [23:22] robertj: can't install node_redis without it [23:22] benvie: polling is the exception, because all the support APIs for javascript have been built around its strengths [23:22] benvie: which is callback/event [23:22] mmalecki: isaacs: hey, you there? [23:23] soapyillusions: using jsDom is it possible to parse out HTML comments? [23:23] coderzach: robertj: fork it and upgrade package.json to .6 [23:25] JaKWaC has joined the channel [23:25] robertj: coderzach, npm install doesn't look it does anything when i do that [23:26] coderzach: I think you can do npm install [23:27] coderzach: wait no [23:27] coderzach: yes [23:27] coderzach: sorry [23:27] coderzach: http://npmjs.org/doc/install.html option g [23:28] coderzach: a git remote url, which can be your fork [23:28] coderzach: for now, untill they accept your pull request [23:30] pitlimit: how about something like this: [23:30] pitlimit: https://gist.github.com/9ae303ae6c27f89b32b9 [23:30] pitlimit: does that work [23:31] robertj: coderzach, why doesnt npm install . work then? [23:33] paul___ has joined the channel [23:33] paul___: anyone know if it's possible to do a streaming file upload via dnode/socket.io? [23:33] augustl: pitlimit: seems like it would [23:33] pitlimit: :) [23:33] pitlimit: yay [23:34] augustl: pitlimit: haven't investigated the details of the flow, but at first glance it looks sensible [23:34] pitlimit: okay, that's all i need [23:34] coderzach: pitlimit: that looks good [23:34] pitlimit: if there's a bug I can find it [23:34] pitlimit: :) yay [23:34] augustl: doesn't matter how many times you pass a function reference [23:34] pitlimit: I just want to make sure I'm not in the land of wth still [23:34] pitlimit: :) [23:34] augustl: this guy approves http://i.imgur.com/7whdR.jpg [23:35] pitlimit: lol [23:35] pitlimit: what is that [23:35] coderzach: robertj: are you trying to install it globally? [23:35] SubStack: paul___: streaming the file contents or streaming the upload status? [23:35] augustl: just a brazilian cop [23:35] pitlimit: :) [23:35] robertj: coderzach, just in my modules directory would be fine [23:35] mmalecki: cop with a mothafuckin' M16? [23:35] SubStack: paul___: if you just want the streaming upload status check out https://github.com/tanepiper/dnode-upload-example [23:36] paul___: SubStack: interested in submitting a form that will upload via a dnode function call the file pointed to by a file input form element [23:36] SubStack: paul___: web browsers will only let you upload via HTTP [23:36] schwab: who likes my kitty [23:36] schwab: http://i.imgur.com/ghCTt.png [23:36] coderzach: robertj: so you forked metrics, upgraded the package.json and now you're doing "npm install ' ? [23:36] mmalecki: schwab: it's sweet [23:37] robertj: i just cloned it, edited it and tried npm install . [23:37] augustl: schwab: don't do anything you'll regret, or god will kill it [23:37] schwab: thx [23:37] schwab: it was homeless [23:37] schwab: we saved it [23:37] augustl: god is a killer of kittens [23:37] robertj: i think i got it [23:37] coderzach: npm install . would install it locally [23:37] mmalecki: schwab: you're a good human being! [23:37] paul___: SubStack: ah that's what i'm looking for, thanks! [23:38] schwab: ty! [23:39] hotch has joined the channel [23:39] towski has joined the channel [23:40] realguess has joined the channel [23:40] koo0 has joined the channel [23:40] matin has joined the channel [23:41] matin: hey guys [23:41] socketio\test\28 has joined the channel [23:42] augustl: perhaps socketio\test\28\ should use a different IRC server, or at least a different channel :P [23:45] matin: does any1 know where to begin in creating a node.js ssh client [23:45] paul___: SubStack: I'm a bit unfamiliar with the pub/sub method, but it looks like there's nothing tying the connect /upload use with a specific dnode client. does this example just broadcast progress to every client connected? [23:46] Aria: matin: Learn how to write and read TCP sockets, learn how to use crypto primitives, learn the SSH2 protocol. [23:46] matin: ... [23:46] matin: ok so forget ssh [23:46] matin: do you by any chance know how to execute command [23:46] matin: commands [23:46] Aria: the child_process module. [23:46] matin: yeah i got that far [23:47] matin: and i kinda have an interface [23:47] matin: but i can't put the two together [23:47] hipsters_ has joined the channel [23:47] matin: like how do i get the value of the form [23:47] matin: from the index.html [23:48] matin: then pass that through the exec command [23:50] paul____ has joined the channel [23:50] zomg: Sounds like a "rm -fr /" just waiting to happen! [23:50] zomg: =) [23:50] AAA_awright has joined the channel [23:52] MrNibbles: Hmm, on osx it seems the ctime property in the data returned from readFile doesn't match so the OS's created time [23:52] MrNibbles: it mirrors the utime [23:53] isaacs: MrNibbles: ctime isn't "created time" [23:53] isaacs: i know, i was confused by this, as well. [23:54] isaacs: ctime is "changed time", and it refers to the last time that the data about the file was changed. (mode, mtime, etc.) [23:54] isaacs: but, if you modify the file, that updates the atime, and *doesn't* update the ctime. [23:54] mmalecki: isaacs: hey, have you seen http://travis-ci.org/#!/flatiron/union/builds/348519 before? [23:54] isaacs: yay posix [23:55] brianseeders has joined the channel [23:55] MrNibbles: isaacs: ah, that makes more sense [23:55] liar has joined the channel [23:55] isaacs: mmalecki: yeah, a few people have reported that. haven't dug into iet yet [23:55] MrNibbles: isaacs: is there a way to get the filesystem's created time? [23:55] isaacs: MrNibbles: actually, even just reading the file updates the atime [23:55] isaacs: (so, a read is a write) [23:55] MrNibbles: -_- [23:55] mmalecki: isaacs: ok. do you maybe know how can we stop node from installing npm? [23:56] isaacs: MrNibbles: not reliably, across platforms, via a posix api, no. [23:56] isaacs: MrNibbles: some platforms implement a created_time metadata in some way [23:56] isaacs: extended attributes, etc. depends on os and filesystem [23:56] JakeyChan has joined the channel [23:57] MrNibbles: isaacs: ok, i will have a dig. Thanks for clearing that misunderstanding up [23:58] isaacs: MrNibbles: it doesn't help that *lots* of unix tutorials refer to ctime as "created time" [23:58] AAA_awright has joined the channel [23:58] MrNibbles: isaacs: hence my confusion ;) [23:58] isaacs: mmalecki: do you have a way to reliably reproduce that? [23:58] isaacs: (like, on my machine, not on travisci?) [23:59] aioue has joined the channel [23:59] benvie: atime = accessed, ctime = changed, mtime =