[00:00] mraleph has joined the channel [00:00] tmzt: dojo :) [00:00] bingomanatee: Yep - express really does most of the work for you; however if as pHcF claims you are simply not code friendly, Drupal really is a problem solver. [00:00] tmzt: which project? the only one I see talks about zend [00:01] bingomanatee: one second. [00:01] tmzt: awesome I was about to write one of these :) [00:02] tmzt: what I'm looking for is somethign that associates data on one of these ajax pages with an account, but anybody can make a new page with just markdown [00:02] bingomanatee: https://github.com/bignomanatee/deformer is my form module. [00:02] tmzt: or something like that [00:02] bingomanatee: It is pretty alpha but it has been consistently performant. [00:02] tmzt: still don't see it [00:02] tmzt: oh [00:02] bingomanatee: If you guys want to give me a second I'll push my latest version into the repos. [00:03] tmzt: I had the wrong username :) [00:03] tmzt: your tranposed friend is doing something with zend [00:03] blueadept has joined the channel [00:04] bingomanatee: I worked with Zend Framework on Zupal, a project much like pHcF [00:04] Druid_ has joined the channel [00:04] bingomanatee: it mutated into a mongo ORM that is quite nice for PHP / Mongo interaction. [00:05] bingomanatee: I think the Zupal on git is wildly out of date - mylatest work is on google code. [00:05] bingomanatee: I should kill Zupal on git to avoid confusing peiople [00:05] robotarmy has joined the channel [00:06] tmzt: this is what I meant https://github.com/bingomanatee/wonderland-labs [00:06] bingomanatee: Yeah that is me too. [00:06] martin_ has joined the channel [00:07] tmzt: what does the client side of that look like? [00:07] bingomanatee: ugly as s**t [00:07] tmzt: I'm looking to got dojo json to orm with the name of the ajax page as an additional tag [00:07] bingomanatee: I think most people who use Dojo eventually regret not using jQuery instead. Its very strucuturally robust but a bit of a pill [00:08] tmzt: I wish I had the url support [00:08] bingomanatee: I used it for a long time ittermittently [00:08] mbrochh has joined the channel [00:08] tmzt: I just happened to learn dojo for the last project, I might look at jquery I'm not sure, there's little ui for this project [00:09] bingomanatee: Its just more "mature" - it has a lot more usage and development. [00:09] bingomanatee: I mean they have mobile use cases for like seven different mobile platforms. [00:09] bingomanatee: And their AJAX coverage is quite good. [00:10] rauchg_ has joined the channel [00:10] bingomanatee: Also have you investigated the capacity of web sockets? [00:13] ossareh has joined the channel [00:13] sivy has joined the channel [00:14] ezmobius has joined the channel [00:15] ossareh_ has joined the channel [00:17] ossareh__ has joined the channel [00:19] ossareh has joined the channel [00:19] bubbles has joined the channel [00:20] bingomanatee: tmzt: I added a use case to deformer's README - hope it heops [00:23] ossareh_ has joined the channel [00:23] [[zzz]] has joined the channel [00:25] ossareh__ has joined the channel [00:26] ossareh has joined the channel [00:28] blueadept has joined the channel [00:28] ossareh_ has joined the channel [00:32] tmzt: bingomanatee_: so it's basically generating a
from a list of fields? [00:32] tmzt: but those are supplied in source [00:34] amerine has joined the channel [00:34] ossareh_ has joined the channel [00:42] Hello71 has joined the channel [00:46] bingomanate_thin has joined the channel [00:47] ossareh_ has joined the channel [00:49] ossareh__ has joined the channel [00:50] Hello71 has joined the channel [00:50] Hello71 has joined the channel [00:51] lightcatcher has joined the channel [00:52] lightcatcher: I'm new to node. Which couchdb client is recommended? [00:52] amerine has joined the channel [00:53] dnolen has joined the channel [00:54] sudoer has joined the channel [00:55] lightcatcher: no couchdb client recommendations? [00:57] bingomanate_thin: one sec - there was a bit on couch in the last node conference. Let me see if I can find a reference to it. [00:58] lightcatcher: thanks a ton [00:58] lightcatcher: on github, node-couchdb has the most followers, but it is no longer maintained [01:01] Hello71 has joined the channel [01:01] Hello71 has joined the channel [01:02] lightcatcher: bingomanate_thin: is this it? http://jsconf.eu/2010/speaker/nodejs_couchdb_crazy_delicious.html [01:02] bingomanate_thin: Heah I found a reference to node-couchdb on line - I think for the most part we used REST with node in the node camp. [01:04] AAA_awright has joined the channel [01:04] bingomanate_thin: This guy, http://www.mikealrogers.com/, spoke at node.js camp on couch db; I'd suggest hunting him down with your questions. [01:04] bingomanate_thin: lightcatcher: ^^ [01:04] lightcatcher: thanks, i linked his video [01:04] lightcatcher: http://jsconf.eu/2010/speaker/nodejs_couchdb_crazy_delicious.html [01:04] lightcatcher: currently watching [01:06] sivy has joined the channel [01:06] bingomanate_thin: Just out of curiosity does anyone have any feedback as to the spread of sql and nosql repo systems that are being used through node at this point? [01:08] maushu: mongodb [01:11] jashkenas-work_: Is there a way to get fs.watchFile to pick up new files that are added to a directory? [01:11] maushu: pool it. [01:12] traceback0 has joined the channel [01:12] Hello71 has joined the channel [01:13] maushu: I would count the number of files and the mtime. That could work. [01:13] traceback0 has joined the channel [01:16] sudoer has joined the channel [01:16] iFire has joined the channel [01:16] bingomanatee has joined the channel [01:16] jashkenas-work_: maushu: repeatedly stat the directory? [01:16] maushu: Pretty much. [01:16] maushu: I believe that is watch does. [01:16] losing has joined the channel [01:17] jashkenas-work_: I thought that's what the native watchFile support was supposed to prevent. [01:22] Hello71 has joined the channel [01:22] Hello71 has joined the channel [01:24] [[zz]] has joined the channel [01:25] pydroid has joined the channel [01:27] Jezek has joined the channel [01:27] Jezek: i can't send any messages using socket.io. anyone else have this problem? [01:29] Jezek: i should get messages in console when a client connects right? [01:29] cafesofie has joined the channel [01:32] Hello71 has joined the channel [01:32] Hello71 has joined the channel [01:33] vmthehut has joined the channel [01:33] mikew3c has joined the channel [01:36] Jezek: http://pastebin.com/QTUHMxNF [01:37] jakehow has joined the channel [01:44] bingomanatee: This isn't "informed help" as such, but I would save your function arguments to an object and dump it to console. [01:45] bingomanatee: That way you can dell whether the problem is parameter mismatches, or that the callbacks aren't getting called at all... [01:48] baoist has joined the channel [01:50] Hello71 has joined the channel [01:50] Hello71 has joined the channel [01:52] Jonasbn__ has joined the channel [02:01] Hello71 has joined the channel [02:01] Hello71 has joined the channel [02:11] blueadept has joined the channel [02:11] whyme has joined the channel [02:11] opengeard has joined the channel [02:18] cainus has joined the channel [02:19] robotarmy has joined the channel [02:24] blueadept2 has joined the channel [02:26] blueadept2 has left the channel [02:27] blueadept has joined the channel [02:27] EyePulp has joined the channel [02:27] Hello71 has joined the channel [02:27] Hello71 has joined the channel [02:36] mjr_ has joined the channel [02:37] pdelgallego has joined the channel [02:38] Aredridel has joined the channel [02:39] saikat has joined the channel [02:40] geraldalewis has joined the channel [02:50] Jezek has joined the channel [03:01] Jezek: anyone have an example with node.js where there are multiple chat room channels [03:04] Sembiance: nope, sorry. [03:06] Aria: No, but it's not hard. Tag each message with a channel, separate as needed. [03:06] Jezek: oh [03:07] Jezek: makes sense [03:07] Jezek: should i use mysql to check what channel the client is connected to? [03:08] mjr_: Do you have more than one node server handling chat? [03:08] Jezek: no [03:08] mjr_: Then just keep it all in node. [03:08] mjr_: Way easier [03:09] Aria: Yeah. Only go out of process if you need to. [03:09] Jezek: can i store additional client data besides the session id? [03:09] pHcF: guys, how can i create an object with a custom name, like an object using a string name? [03:09] mjr_: Jezek: sure, nearly all objects in JavaScript are mutable. [03:10] Jezek: mutable? [03:10] mjr_: Jezek: you can generally just make up new properties wherever you like. [03:10] Jezek: ok [03:10] Jezek: where does node.js store the client data? [03:11] mjr_: Like say node hands you an HTTP request and response object, you can just say request.myprop = myval; and that's cool. [03:11] Jezek: ah [03:11] mjr_: pHcF: what do you mean by "custom" name? [03:11] Aria: Node doesn't stop between requests, Jezek. So wherever you store it, it stays. [03:12] pHcF: mjr_: like var "myobject_with_a_string" = 0; [03:12] pHcF: mjr_: creating a var with a string name [03:12] pHcF: so that i can access this object by the string name [03:12] pHcF: im developing a simple javascript api [03:12] pHcF: and there will be an object that the user will choose the name [03:12] Jezek: what does that have to do with node? [03:12] Jezek: ##javascript [03:13] mjr_: pHcF: you can use the [] syntax to access a property of something. [03:13] pHcF: Jezek: sorry [03:13] mjr_: var propname = "height"; somevar[propname] = 12; [03:13] softdrink has joined the channel [03:13] mjr_: It like somevar.propname = 12; [03:14] mjr_: er, somevar.height = 12; [03:14] pHcF: gotcha [03:20] Jezek: how do i find out the client id of the currently connected user [03:25] rchavik has joined the channel [03:31] cagdas has joined the channel [03:35] geraldalewis has left the channel [03:47] xSmurf: hey'all, anyone ever seen OTR bidings for nodejs? would be awesome [03:48] Sembiance: well... int he past 2 days my Node.js production server has handled 4,290,157 requests [03:48] Sembiance: not a single exception, crash or problem :) [03:48] Sembiance: woot :) [03:49] Sembiance: In the same amount of time my redis database has handled 53,377,546 requests, all coming from node.js, all without any real problems [03:49] Jezek: how do i get a list of all connected clients? [03:50] Sembiance: Jezek: connected to what? [03:52] xSmurf: wow there are python bindings for OTR... [03:53] Jezek: the node server [03:54] opengeard has joined the channel [03:54] Sembiance: Jezek: depends on what node server your running I guess :) [03:54] Jezek: http [03:54] Jezek: oh i'm using socket.io too [03:55] TheEmpath has joined the channel [03:55] Sembiance: ahh.. socket.io :) [03:55] TheEmpath: hail nodites [03:55] Sembiance: TheEmpath: greetings TheEmpath [04:00] Jezek: i want to try this out [04:00] Jezek: http://cubiq.org/device-motion-websockets-node-js-tech-demo [04:01] TheEmpath: ACTION is learning Mongoose. [04:04] bingomanatee has joined the channel [04:04] bingomanatee: <-- off the plane after 10 HOURS of sitting in LAX and 1 hr flight [04:05] KUHRT has joined the channel [04:08] c4milo1 has joined the channel [04:10] Jezek: lol [04:10] Jezek: been there [04:11] jacoblyles has joined the channel [04:11] nonnikcam has joined the channel [04:11] zentoooo has joined the channel [04:12] Jezek: i found this but i can't seem to find out how to access the "clients" object [04:12] Jezek: https://github.com/LearnBoost/Socket.IO-node [04:12] Aria: "clients" object? [04:13] beawesomeinstead has joined the channel [04:13] beawesomeinstead has joined the channel [04:13] Aria: The property of the listener? [04:13] Jezek: yes [04:14] Jezek: i have done var socket = io.listen(server); [04:14] Thump: Jezek, there are plenty of examples of Node chat servers with multiple rooms [04:15] c4milo2 has joined the channel [04:15] Thump: multi-room chat: https://github.com/scottgonzalez/node-chat [04:16] Thump: multi-room chat: https://github.com/isaacsu/twich [04:16] Aria: server.clients then, Jezek ? [04:17] c4milo2 has left the channel [04:18] iinsight has joined the channel [04:18] traceback0 has joined the channel [04:19] Jezek: http://pastebin.com/nt2ezaRE [04:19] Jezek: but i get error TypeError: Cannot read property 'length' of undefined [04:20] Aria: Where? [04:20] Aria: Line 13? [04:20] Jezek: line 13 [04:20] Aria: Uh... that's not your listener. [04:20] bingomanatee: I would do console.log on the function arguments [04:20] Aria: That's your HTTP server. [04:21] Aria: "socket" is your listener. [04:21] Aria: "server" is your http server. [04:21] Jezek: oh right [04:21] Jezek: so socket.clients? [04:21] Aria: Probably. Try it. [04:22] Jezek: oh sweet console.log is awesome [04:22] Aria: Yep. [04:24] Jezek: just like firebug [04:24] rchavik has joined the channel [04:26] Aria: Yep. [04:27] hsarvell has joined the channel [04:28] ysynopsis has joined the channel [04:28] Jezek: oh crap i broke something [04:28] Aria: Version control! [04:32] traceback0 has joined the channel [04:35] masahiroh has joined the channel [04:35] bingomanatee: one of the nice things about NetBeans is that it lets you "locally undo" every saved version of a given file regardless of the presence or absence of a VCS. [04:37] AAA_awright_ has joined the channel [04:39] Jezek: any built in v8 function get the size of an object? [04:41] andrewfff has joined the channel [04:42] xSmurf: this is so weird O.o [04:43] xSmurf: is console.log/sys.debug blocking ? [04:44] xSmurf: when I start my app from upstart, from event looks like it's fired before some blocking things have finished processing [04:44] ezmobius_ has joined the channel [04:44] xSmurf: when I run it in foreground everything appears in the right order [04:45] ezmobius has joined the channel [04:51] xSmurf: very very odd [05:06] ibolmo has joined the channel [05:11] TheEmpath: howdy [05:11] TheEmpath: the instructions on http://labs.learnboost.com/mongoose/ and http://blog.learnboost.com/blog/mongoose/ are varying examples on how to use models in mongoose. halp! [05:13] Jezek: i would help if i knew what mongoose even was [05:14] TheEmpath: i'll use githubs info [05:14] TheEmpath: mongoose is a great ORM wrapper for Mongo DB [05:14] TheEmpath: its approach to models are brilliant [05:14] TheEmpath: simple and easy [05:15] Jezek: ah [05:15] TheEmpath: mongo can be a mouthful at times [05:15] TheEmpath: and asych calls to mongo can be even worse [05:16] TheEmpath: mongoose centralizes the whole affair and makes it way easier to manage [05:17] TheEmpath: one of the only important features its missing is DBRef support [05:27] tmzt: can't even get it to compile, scons thinks libpcre is not installed [05:28] mikeal has joined the channel [05:30] ryanfitz has joined the channel [05:30] spetrea_ has joined the channel [05:33] TheEmpath: anyone familiar with mongoose? [05:42] HAITI has joined the channel [05:48] zentoooo has joined the channel [05:55] HAITI has joined the channel [05:56] ryan[WIN] has joined the channel [05:56] Aria has joined the channel [05:59] tekky has joined the channel [06:01] traceback0 has joined the channel [06:09] ezmobius has joined the channel [06:11] bingomanatee: I have been to a few mongoose sessions - are you using v. 1.0, or the .2x version [06:12] bingomanatee: I have a simple Mongo ORM bridge that I use in anticipation of the 1.0 release. [06:12] gf3 has joined the channel [06:15] TheEmpath: ah [06:15] TheEmpath: im experimenting with models [06:15] TheEmpath: im uding embedded documents mostly [06:15] TheEmpath: so that means things like model.parentProperty.childProperty [06:16] TheEmpath: and im confused with how casting works with embedded documents [06:17] zentoooo has joined the channel [06:17] ezmobius has joined the channel [06:20] TheEmpath: i understand how they work for the getter/setter overloads, but the cast doesn't seem to fire [06:20] TheEmpath: so stay i have document.profile.email = 7 [06:20] TheEmpath: say* [06:20] TheEmpath: and my cast is { profile: {email: String} } [06:20] TheEmpath: it should set the value to '7' [06:22] mikeal has joined the channel [06:26] jashkenas-work_ has left the channel [06:28] TheEmpath: nm figured it out [06:29] TheEmpath: getter/setters and cast handling are inconsistant syntax for embedded docs :( [06:35] tmzt: how would you recommend keeping a submodule I want to use in two different sites but also want to develop on? [06:35] tmzt: just symlink it or check it out in both locations? [06:39] pandark_ has joined the channel [06:41] pydroid_ has joined the channel [07:23] amerine has joined the channel [07:27] steffkes has joined the channel [07:36] iszak has joined the channel [07:38] fangel has joined the channel [07:41] simme has joined the channel [07:53] daglees has joined the channel [07:53] daglees has joined the channel [07:59] romeo_ordos has joined the channel [07:59] romeo_ordos has left the channel [08:03] matjas has joined the channel [08:05] Jezek has joined the channel [08:06] Jezek: has anyone used socket.io with sending messages to only some users? [08:08] ezmobius has joined the channel [08:08] dandaman has joined the channel [08:08] markwubben has joined the channel [08:09] SamuraiJack has joined the channel [08:10] wilmoore has joined the channel [08:11] Jezek: is there any alternatives to socket.io? [08:17] T-Co: Jezek, Care to elaborate? Why wouldn't you be able to send messages only to some users? [08:18] faust45 has joined the channel [08:20] thinkingpotato has joined the channel [08:21] qFox has joined the channel [08:21] markwubben has joined the channel [08:22] Noya has joined the channel [08:23] Jezek: well im using the code: http://pastebin.com/RKciSQSg [08:23] Jezek: like the person pasted here: http://stackoverflow.com/questions/4445883/node-websocket-server-possible-to-have-multiple-separate-broadcasts-for-a-sin [08:23] Jezek: but it throws an error: "has no method send" [08:26] Druid_ has joined the channel [08:27] mape: Jezek: if you inspect the object what does it contain? [08:27] Jezek: clients? [08:28] mape: And those clients? [08:28] Jezek: what [08:28] Jezek: are you talking about the clients object [08:28] mape: Yes [08:28] mape: The one you say doesn't have a send method [08:29] mape: Have you made sure it is in fact an client object? [08:29] Jezek: hrm [08:30] Jezek: clients is a super long object [08:32] mape: console.log(Object.keys(clientsObject)) [08:33] tob1 has joined the channel [08:33] Jezek: [ [08:33] Jezek: [ '0' ] [08:34] mape: then clientsObject[0].send(JSON.stringify({})) ? [08:34] Jezek: oh it's an array [08:35] Gruni has joined the channel [08:36] Jezek: = super long object [08:40] amerine has joined the channel [08:40] aklt has joined the channel [08:46] dspree: anyone know of hosted redis providers on ec2? [08:47] opengeard: dspress: engineyard? [08:48] KUHRT has joined the channel [08:48] opengeard: dspree: rackspace claims to have an offering as well. [08:48] augustl has joined the channel [08:48] dspree: k thanks [08:49] Jezek: o [08:49] TheEmpath: how would one access a static function in a model definition from a method function in Mongoose?\ [08:50] Jezek: still working the mongoose eh [08:50] TheEmpath: always learning! [08:50] Jezek: heh [08:54] TheEmpath: in fact, i see no examples of how to access static fucntiosn in mongoose models at all anywhere :X [08:55] Jezek: :/ [08:56] Gruni has joined the channel [08:58] Jezek: sweet my code works [08:58] Jezek: at last [08:58] Jezek: now to cleanup this mess [08:59] Jezek: tomorrow.. [08:59] Jezek: night guys [08:59] TheEmpath: pz [09:00] zentoooo has joined the channel [09:04] mikew3c has joined the channel [09:10] wilmoore has joined the channel [09:13] TheEmpath: if mongoose returns results asychronously [09:14] TheEmpath: and i want to build a login system using data in a collection [09:14] TheEmpath: basically, how do i make a non-blocking authentication system? i'd need to emit events, wouldn't i? [09:16] dnyy has left the channel [09:20] Jonasbn_ has joined the channel [09:23] dnyy has joined the channel [09:30] felixge_ has joined the channel [09:30] felixge_ has joined the channel [09:35] skm has joined the channel [09:42] jimt_ has joined the channel [09:43] rjack has joined the channel [09:43] pgte has joined the channel [09:45] jetienne has joined the channel [09:46] jetienne has joined the channel [09:46] muhqu has joined the channel [09:51] dthompson has joined the channel [09:53] mpradeep has joined the channel [09:55] mpradeep: Hi I am trying to read a file that is in the previous directory by calling fs.readFileSync(filename, "binary"); [09:55] mpradeep: and the filename contains [09:55] mpradeep: "../../xyz.txt" [09:55] mpradeep: but I am not able to read the xyz.txt [09:55] mpradeep: can anyone help me in this [09:55] pgte: prefix the file with __dirname [09:56] pgte: __dirname + '/../../xyz.txt' [09:56] mpradeep: oh ok .. I will try the same [09:56] pgte: because like you have it's relative to the process current working dir [09:56] pgte: not the file dir [09:57] pgte: could be that [09:57] mpradeep: hmm ok . Let me try with __dirname [09:58] jimt has joined the channel [09:59] teemow has joined the channel [09:59] mpradeep: pgte: thank you so much. [10:00] mpradeep: it worked :) [10:00] pgte: kewl [10:02] tmzt: is npm failing? I just pulled from git and tried to reinstall and that didn't work either [10:02] virtuo_ has joined the channel [10:03] iszak: tmzt, you can't expect the git copy to be entirely stable. [10:04] Dreamer3 has joined the channel [10:04] tmzt: right ok, but it just stopped working installed on my computer, I think it was installed with the curl script before [10:04] tmzt: it seems the new metadata broke it [10:05] Dreamer3 has joined the channel [10:05] saschagehlich has joined the channel [10:06] Dreamer3 has joined the channel [10:07] Dreamer3 has joined the channel [10:07] Dreamer3 has joined the channel [10:07] tmzt: iszak: is there a tag I can downgrade to or something else you recommend? [10:08] iszak: i don't use npm, sorry. [10:08] tmzt: oh ok [10:09] tmzt: I'm moving most stuff to submodule now anyway [10:09] Dreamer3 has joined the channel [10:10] Dreamer3 has joined the channel [10:10] Dreamer3 has joined the channel [10:11] Dreamer3 has joined the channel [10:13] Dreamer3 has joined the channel [10:14] Dreamer3 has joined the channel [10:14] Dreamer3 has joined the channel [10:15] Dreamer3 has joined the channel [10:15] Dreamer3 has joined the channel [10:18] tmzt: iszak: my /tmp was full :) the error isn't very helpful [10:18] tmzt: but trying to build somethign else from source told my it was full [10:19] iszak: /tmp has a file size limit? [10:19] tmzt: it's tmpfs [10:19] iszak: oh right, gotcha [10:20] tmzt: ah so node builds v8 from source [10:20] tmzt: cool [10:20] stride: morning guys [10:20] iszak: thats' cool. [10:20] iszak: tmzt, how big is your tmp btw? [10:20] tmzt: 133M, but it had qemu image I was building in it [10:20] tmzt: and this is a 256M vps instance [10:21] iszak: oh right. [10:21] tmzt: getting rather confused with haml and express so I was trying to try jade [10:21] ewdafa has joined the channel [10:21] iszak: link? [10:22] tmzt: mostly I don't get why it wants layout.haml and how to tell it to use the contents of the view I actually want (since this is getting pulled into a div with ajax) [10:22] tmzt: to? [10:22] iszak: jade [10:22] tmzt: https://github.com/visionmedia/jade [10:23] iszak: thanks [10:23] iszak: I'm hanging out for a monolithic framework [10:23] tmzt: I'm just experiementing with this stuff right now, it could be really cool if there was something that supported # urls but could also rebuild the full page if needed [10:25] tmzt: what are you looking for? [10:26] iszak: something with everything I'll ever need. [10:26] iszak: none of this pulling from npm crap [10:26] tmzt: yeah [10:26] tmzt: submodules with caching would be really nice [10:27] iszak: caching.. [10:27] iszak: tmzt, what do you mean? [10:28] tmzt: yeah, basically installing from a git tag [10:28] tmzt: but doing it on demand and caching the results as a git submodule [10:28] iszak: sounds.. nonstandard [10:29] tmzt: how is that? [10:29] iszak: maybe I don't understand what you're saying. [10:29] tmzt: maybe i don't [10:30] tmzt: essentially if every project has a github url you would just use that [10:30] iszak: I would assume you would want stability. [10:30] tmzt: then it would fetch the package.json from master (or whatever head you wanted) [10:30] iszak: so you wouldn't pull from the repo all the time. [10:30] tmzt: sure, you keep the commit sha1 [10:30] iszak: sure, but still then it's basically forcing everyone to use git. [10:30] iszak: git or GTFO [10:31] tmzt: I've got my sites under git so it's not a problem for me [10:31] tmzt: I'm learning a new way of working [10:33] saschagehlich has joined the channel [10:35] guybrush: http://wmv.27c3.fem-net.de/saal1 27c3 intro started right now [10:37] Dreamer3 has joined the channel [10:38] Dreamer3 has joined the channel [10:38] iszak: guybrush, what is this? [10:38] Dreamer3 has joined the channel [10:38] guybrush: the 27th chaos computer congress in berlin [10:39] guybrush: http://events.ccc.de/congress/2010/Fahrplan/day_2010-12-27.en.html [10:39] iszak: never heard of it [10:39] guybrush: there is even a nodejs talk tomorrow (by felixge) http://events.ccc.de/congress/2010/Fahrplan/events/4142.en.html [10:44] _Silks has joined the channel [10:44] iszak: guybrush, ohhh okay, buffered video is buffery [10:49] mraleph has joined the channel [10:51] iszak: anyone remember that YUI video about "spaghetti code" and node.js? [10:51] Sbioko has joined the channel [10:51] Sbioko: Hi [10:51] saschagehlich has joined the channel [10:52] iszak: Hey Sbioko. [10:52] Silks has joined the channel [10:52] Sbioko: how to make socket.io work in localhost in Opera 10? [10:52] Sbioko: it says that it does not have access on file:///... [10:52] Sbioko: Security violation [10:52] Sbioko: how to allow it [10:52] iszak: i don't think you can get it to allow it. [10:52] Sbioko: in Chrome & Firefox all is ok [10:52] Sbioko: damn [10:53] iszak: can't you use it relative to your localhost path? [10:53] webr3: have you tried about@cpmfog pr gppg;e [10:53] webr3: wow :| [10:53] iszak: nice. [10:53] webr3: about:config or google [10:53] Sbioko: yeah) [10:53] iszak: webr3++ [10:53] v8bot: iszak has given a beer to webr3. webr3 now has 1 beers. [10:53] Sbioko: will try now [10:53] webr3: ACTION thinks his fingers are still on vacation [10:55] Sbioko: webr3: its all good, but what do I need to change [10:55] Sbioko: thousand of options [10:55] Sbioko: in Security sections nothing seems like will help me [10:55] Sbioko: wait [10:55] Sbioko: I think I found it [10:56] Sbioko: ok [10:56] Sbioko: I fixed it [10:56] guybrush: iszak: http://developer.yahoo.com/yui/theater/video.php?v=dahl-node i think this is the spaghetti-code-yui-video [10:56] Sbioko: thanks a lot!!! [10:56] Sbioko: bye [10:56] pgte: http://www.yuiblog.com/blog/2010/12/06/video-yuiconf2010-croucher/ [10:56] Sbioko has left the channel [10:57] iszak: guybrush, hmm don't think so [10:57] iszak: will check it out [10:57] iszak: Yeah, I think the guy had more of a beard. [11:03] naneau has joined the channel [11:04] dandaman1 has joined the channel [11:06] naneau has joined the channel [11:11] okuryu has joined the channel [11:12] stephank has joined the channel [11:13] adambeynon has joined the channel [11:19] mr_daniel has joined the channel [11:23] augustl: how good is node at talking to mysql, postgres, etc? [11:23] _alex has joined the channel [11:23] iszak: augustl, as good as any other languages I'd say. [11:24] tekky has joined the channel [11:24] augustl: looking to use node for the server part of iOS push notification [11:25] iszak: i'm sure it's more than capable. [11:25] augustl: hmm, https://github.com/commandprompt/postgres-js doesn't even have unit tests [11:26] augustl: https://github.com/brianc/node-postgres looks more sane [11:27] iszak: yeah, well you've got to keep in mind node is still maturing. [11:28] pdelgallego has joined the channel [11:29] Dreamer3 has joined the channel [11:29] Dreamer3 has joined the channel [11:29] felixge_: augustl: http://github.com/felixge/node-mysql [11:29] augustl: felixge_: thanks :) [11:30] mif86- has joined the channel [11:30] iszak: haha when making npm "npm ERR! This will get better in the future, I promise." [11:31] augustl: as long as I don't need to write C and implement against libsomethings, and unit tests are present, I'm fine :) [11:32] felixge_: augustl: this driver has lots of tests and there is no C involved ;) [11:32] felixge_: augustl: in fact, it pretty much has 100% coverage :) [11:33] augustl: felixge_: woot, you communicate with mysql through a socket or something then? [11:33] augustl: I should write a db adapter once, to understand better how you talk to databases under the hood ;) [11:33] felixge_: augustl: yeah, I implemented a protocol parser [11:33] felixge_: augustl: https://github.com/felixge/node-mysql/blob/master/lib/mysql/parser.js [11:33] felixge_: augustl: It's not very difficult. At least the parts where there is documentation for the protocol that is not misleading : ) [11:36] zentoooo has joined the channel [11:37] eee_c has joined the channel [11:38] iszak: Sigh, why is time always limited. [11:39] felixge_: iszak: physics would disagree, there will be plenty of time for a while :) [11:39] iszak: time doesn't really exist. [11:40] iszak: but w/e. [11:42] _mql has joined the channel [11:43] d0k has joined the channel [11:43] skm has joined the channel [11:47] herbySk has joined the channel [11:48] augustl: note to self: set up irssi + screen [11:51] jetienne has joined the channel [11:53] Sbioko has joined the channel [11:55] fly-away has joined the channel [11:57] opengeard has joined the channel [12:04] ido_ has joined the channel [12:07] ido_: any idea why I'd get the following error when using fs.readFile: [12:07] ido_: Error: ENOENT, No such file or directory 'node' [12:07] ido_: at node.js:773:9 [12:08] ido_: i get when trying to use coffeekup (http://pastebin.com/dLvhmdth) [12:08] ido_: *get it [12:11] qFxo has joined the channel [12:14] markwubben has joined the channel [12:14] felixge_: ido_: looks like the package is bad? [12:15] ido_: i downloaded 0.2.5 directly from nodejs.org [12:15] ido_: it's not a pre-compiled package [12:18] coffeecup: hi.. uhm how can i escape a backslash within a string? a="\" gives nothing, a="\\" gives 1 backslash, and a="\\test" gives \\test.. [12:20] coffeecup: shouldn't "\\test" result in \test only instead of \\test ? [12:22] coffeecup: nevermind.. got it.. [12:22] SamuraiJack_ has joined the channel [12:31] chrischris has joined the channel [12:34] ido_ has left the channel [12:35] Sembiance: happy snowy monday morning :) [12:42] cgutierrez has joined the channel [12:53] juye has joined the channel [12:59] pietern has joined the channel [13:00] papandreou has joined the channel [13:01] wdperson has joined the channel [13:06] ianward has joined the channel [13:10] unomi has joined the channel [13:12] Yuffster has joined the channel [13:13] c4milo1 has joined the channel [13:14] femtoo has joined the channel [13:16] dandaman has joined the channel [13:17] jetienne: ido: install node as executable [13:18] markwubben has joined the channel [13:26] augustl has joined the channel [13:27] zentoooo has joined the channel [13:27] masahiroh has joined the channel [13:27] baoist has joined the channel [13:27] tmzt has joined the channel [13:27] stagas has joined the channel [13:27] SwiftLayer has joined the channel [13:27] walkah has joined the channel [13:27] matt_c has joined the channel [13:27] dantaliz1ng has joined the channel [13:27] chrisdickinson has joined the channel [13:27] nail_ has joined the channel [13:27] Draggor has joined the channel [13:27] Sami_ZzZ has joined the channel [13:27] tswicegood has joined the channel [13:28] mikew3c_ has joined the channel [13:30] saschagehlich_ has joined the channel [13:35] mpradeep has joined the channel [13:37] markwubben has joined the channel [13:38] daglees__ has joined the channel [13:39] herbySk has joined the channel [13:40] c4milo2 has joined the channel [13:47] mpradeep has joined the channel [13:48] MattJ has joined the channel [13:49] rsms has joined the channel [13:51] Gruni has joined the channel [13:52] pgte has left the channel [13:53] Gruni has joined the channel [13:54] herbySk has joined the channel [13:57] jimt_ has joined the channel [13:57] _richardJ has joined the channel [13:59] qFxo has joined the channel [14:01] pgte has joined the channel [14:03] jimt has joined the channel [14:03] cheney has joined the channel [14:04] boaz_ has joined the channel [14:10] mpradeep has joined the channel [14:11] zentoooo has joined the channel [14:12] ceej has joined the channel [14:12] markwubben has joined the channel [14:17] hunterloftis has joined the channel [14:18] wdperson has joined the channel [14:27] vborja has joined the channel [14:30] mpradeep has joined the channel [14:33] pyrotechnick has joined the channel [14:33] pyrotechnick: hi lads [14:33] pyrotechnick: has anyone written any bindings in here? [14:33] augustl has joined the channel [14:33] pyrotechnick: i'm writing bindings for Bullet Physics [14:33] pyrotechnick: and i just need a few pointers (no pun intended) [14:34] unomi has joined the channel [14:37] ewdafa has joined the channel [14:40] codemanki has joined the channel [14:43] krikulis has joined the channel [14:43] krikulis: hello [14:44] krikulis: how do one uses 'once' event binding ? [14:45] RichardJ: krikulis: 'once' as in execute only once? [14:46] krikulis: RichardJ: yes [14:46] krikulis: I want to execute callback for event only once [14:46] krikulis: :) [14:46] RichardJ: just unbind the event handler as soon as it's called :) [14:46] RichardJ: that's the more straightforward solution [14:47] hunterloftis: pyrotechnick: Awesome (bindings for bullet physics), wish I could help, but I'm interested in the answer as well [14:48] tjholowaychuk has joined the channel [14:48] pyrotechnick: hunterloftis: yeah we're using it in an MMO [14:48] pyrotechnick: i'm kind of halfway there but i have a feeling i've done it the wrong way [14:50] eee_c1 has joined the channel [14:50] hunterloftis: pyrotechnick: I'd love to see what you guys are doing & how you're doing it. What's the best way for me to keep in the loop? [14:50] pyrotechnick: github.com/feisty [14:51] pyrotechnick: if u wanna help dev atm it probably requires 5 or 10 minutes on skype but we're trying to make that process easier [14:51] broofa: ACTION returns from git branch/rebase/merge/reflog/cherry-pick hell :P [14:54] bencc has joined the channel [14:58] paulrobinson has joined the channel [15:00] codemanki has joined the channel [15:02] sudoer has joined the channel [15:04] cnu has joined the channel [15:08] pyrotechnick: are there any plans to support libffi? [15:09] mpradeep has joined the channel [15:10] davglass has joined the channel [15:11] herbySk has joined the channel [15:22] cafesofie has joined the channel [15:24] arpegius has joined the channel [15:26] steffkes has joined the channel [15:35] opengeard has joined the channel [15:35] losing has joined the channel [15:39] Yuffster_ has joined the channel [15:42] monokrome: Any decent ORM for Node yet? [15:42] booths has joined the channel [15:43] gf3 has joined the channel [15:43] booths: Anyone have any good recommendations for some reading on multiple instances of node? I'm trying to break apart a larger program into many smaller parts, but they all depend on each other so I'd need to be able to communicate between them. [15:43] gf3 has joined the channel [15:43] monokrome: booths: Look at ZeroMQ [15:44] booths: Alright, thanks [15:44] pgte: @booths or a webworker API https://github.com/cramforce/node-worker [15:44] c4milo1 has joined the channel [15:45] monokrome: for communicating between multiple processes? [15:45] cnu has joined the channel [15:45] pgte: for spawning multiple processes and pass messages between them [15:45] monokrome: Aren't web workers threads? [15:46] pgte: I use it sometimes to divide work [15:46] monokrome: or are they separate processes? [15:46] simme has joined the channel [15:46] pgte: separate processes [15:46] stephank has joined the channel [15:46] monokrome: Interesting [15:47] pgte: just a way to spawn another node.js process and pass messages to and from [15:47] krikulis: what to specify in mode to fs.mkdir ? [15:48] pgte: monokrome: ORM for any specific databasE? [15:49] bronb_ has joined the channel [15:50] femtoo has joined the channel [15:51] pengwynn has joined the channel [15:52] monokrome: pgte: Preferably a generic driver-based one [15:52] monokrome: but if not, PostgreSQL [15:54] softdrink has joined the channel [15:55] monokrome: zeromq bindings don't seem to work too well, however :/ [15:55] c4milo2 has joined the channel [15:56] aheckmann has joined the channel [15:57] mauritslamers has joined the channel [16:00] leepa has joined the channel [16:02] DrLou has joined the channel [16:02] DrLou: Can anyone help with a build on OpenIndiana (OpenSolaris?) [16:04] wink_: monokrome: whats wrong with the 0mq bindings? [16:04] monokrome: wink_: Even small examples don't work [16:05] DrLou: Can anyone help with this? Build failed: -> task failed (err #2): [16:05] DrLou: {task: libv8.a SConstruct -> libv8.a} [16:06] DrLou: and this, from configure?: [16:06] DrLou: Checking for header sys/inotify.h : not found [16:06] DrLou: Checking for header sys/epoll.h : not found [16:07] hunterloftis: hey guys anybody using a really nice console.log replacement? Like something where you can tag a log as in: logme("message", "tag") so I can add logs without adding a bunch of shit to the other guys on my team's console? [16:07] wink_: monokrome: do they just silently fail or is there some diagnostics? [16:07] monokrome: wink_: No errors. Just no messages being sent. [16:08] tjholowaychuk: hunterloftis: there is this v [16:08] tjholowaychuk: https://github.com/visionmedia/log.js [16:08] tjholowaychuk: you can log to arbitrary streams [16:08] dguttman has joined the channel [16:08] tjholowaychuk: streaming reader as well [16:08] hunterloftis: tj, thanks, that looks good [16:09] monokrome: wink_: http://paste.pocoo.org/show/310386/ [16:09] tjholowaychuk: hunterloftis: once I get around to 3.x stuff I will make pretty colors for err/warn etc when isatty [16:09] monokrome: Tried this with a sub/pub also [16:09] monokrome: I think that I might just be missing a call somewhere. [16:10] dnolen has joined the channel [16:11] monokrome: wink_: Also, an error handler on requester never gets called - either. [16:11] wink_: weird [16:11] wink_: i've been hoping to play with that binding, haven't had a chance yet... [16:11] monokrome: I've probably tried a dozen different examples now [16:11] monokrome: I've yet to make one work [16:14] monokrome: Yet the same code rewritten in C works. [16:16] Hello71 has joined the channel [16:29] ryanfitz has joined the channel [16:31] bingomanatee__ has joined the channel [16:35] softdrink: *daily java rant* [16:35] simme has joined the channel [16:35] monokrome: ? [16:41] dmcquay has joined the channel [16:46] bingomanatee__: good morning node [16:46] mw has joined the channel [16:46] softdrink: it is indeed morning [16:47] chapel: normally this would be my evening [16:47] chapel: but it is my morning as well for a change [16:48] pietern has joined the channel [16:48] pietern_ has joined the channel [16:52] nonnikcam has joined the channel [16:54] c4milo1 has joined the channel [16:55] wilmoore has joined the channel [16:56] mscdex has joined the channel [16:56] c4milo1 has joined the channel [16:59] bsstoner has joined the channel [16:59] bingomanatee__: even chapel gets a merry christmas! [17:00] bingomanatee__: careful - you start sleeping at night it can get pretty addictive. [17:00] cwo has joined the channel [17:00] c4milo1 has joined the channel [17:03] sudoer has joined the channel [17:04] dguttman has joined the channel [17:04] eee_c has joined the channel [17:05] c4milo2 has joined the channel [17:07] traceback0 has joined the channel [17:07] markwubben has joined the channel [17:08] c4milo1 has joined the channel [17:10] felixge has joined the channel [17:10] felixge has joined the channel [17:11] cafesofie has joined the channel [17:12] jchris has joined the channel [17:17] booths has joined the channel [17:17] DrLou: HAs anyone build node on OpenSolaris? [17:17] markwubben has joined the channel [17:18] mscdex: i gave up trying to use it, but i think ryah does some testing on it [17:18] mape has joined the channel [17:19] c4milo1 has joined the channel [17:20] vborja has joined the channel [17:22] slloyd has joined the channel [17:23] papandreou: Does anyone know a module for extracting the image dimensions from the first chunk of an image? [17:24] markwubben has joined the channel [17:30] c4milo2 has joined the channel [17:33] c4milo1 has joined the channel [17:33] ewdafa has joined the channel [17:33] markwubben has joined the channel [17:36] tjholowaychuk: inspect() has such a terrible interface lol sys.inspect(tree, false, 10, true) [17:36] tjholowaychuk: awesome [17:37] bingomanatee__: thats what happens when you break Bingomanatee's "Golden Rules of Programming". :D [17:37] tjholowaychuk: global settings would be nice, even if its just util.inspectDepth = 10; or something [17:38] bingomanatee__: (any function with more than 3 arguments should be a parameterized hash :D [17:38] bingomanatee__: ) [17:38] tjholowaychuk: the signature reminds me a lot of drupal/php stuff lol [17:39] tjholowaychuk: false false false true 10 false [17:39] slloyd has left the channel [17:39] slloyd has joined the channel [17:39] SubStack: hashes can be just as bad sometimes [17:39] bingomanatee__: Seems like it would be simpler to preencode the arguments in binary [17:39] bingomanatee__: At least a hash is self-documenting. [17:40] SubStack: usually at that point the problem should be spread out among several functions [17:40] bingomanatee__: Yes... [17:41] SubStack: something like inspect(tree).depth(10)() might be groovy [17:41] dguttman_ has joined the channel [17:41] chrischris has joined the channel [17:41] bsstoner has joined the channel [17:42] SubStack: perhaps .toString() at the end instead of () [17:42] SubStack: I don't like how those parens stack up so much [17:45] bingomanatee__: Well you can always publish a set of coding standards and have everyone call you a Java-headed fascist :D [17:46] Gruni has joined the channel [17:47] Gruni has joined the channel [17:47] SubStack: oh there is eyes checking that out [17:51] rsms has left the channel [17:51] pyrotechnick has joined the channel [17:51] pyrotechnick: has anyone used FFI in node.js? [17:51] Me1000 has joined the channel [17:53] tekky has joined the channel [17:54] robotarmy has joined the channel [17:55] tjholowaychuk: pyrotechnick: pretty sure there is module [17:56] benburkert has joined the channel [17:58] pengwynn has joined the channel [18:01] pyrotechnick: tjholowaychuk: hi. yeah i found it. going to take a stab at it now. i was making bindings to c++ bullet physics but i think there's a c API i can use with node-ffi [18:01] bingomanatee__: BTW: http://www.favicon.cc/ nice favicon generator -- [18:02] skampler has joined the channel [18:02] bsstoner has left the channel [18:03] markwubben has joined the channel [18:03] guillermo has joined the channel [18:04] rauchg_: woot [18:06] markwubben has joined the channel [18:08] Max-Might has joined the channel [18:11] jchris has joined the channel [18:12] drudge: tj [18:12] CrypticSwarm has joined the channel [18:13] tjholowaychuk: drudge: yo [18:13] zorzar has joined the channel [18:13] drudge: tell rauch im around now :) [18:14] tjholowaychuk: rauchg_: ping ping ping [18:14] tjholowaychuk: haha :) [18:14] drudge: i dont see him here [18:14] kawaz_home has joined the channel [18:14] Insanity5902 has joined the channel [18:15] Insanity5902 has joined the channel [18:15] CrypticSwarm has joined the channel [18:17] markwubben has joined the channel [18:21] Dreamer3 has joined the channel [18:22] tswicegood has joined the channel [18:23] flowlo has joined the channel [18:23] Dreamer3 has joined the channel [18:25] walkah has joined the channel [18:25] walkah has joined the channel [18:26] Dreamer3 has joined the channel [18:26] saschagehlich has joined the channel [18:26] flowlo: hello, i'm new to node.js and have a simple question, explained here: http://pastebin.com/c3bFbzDN [18:27] flowlo: basically, i want to access this, from within a callback ... is there any trick to do that? [18:27] pietern_: flowlo: var self = this; outside your callback ;) [18:27] Thump: anyone know of a good way to get access to php session vars from node.js ? [18:28] flowlo: pietern_: haha, thank you :) [18:28] Dreamer3 has joined the channel [18:33] Dreamer3 has joined the channel [18:33] saschagehlich has joined the channel [18:34] dguttman has joined the channel [18:34] Rixius has joined the channel [18:37] Dreamer3 has joined the channel [18:38] hunterloftis has joined the channel [18:42] Dreamer3 has joined the channel [18:42] tswicegood has joined the channel [18:43] Aria has joined the channel [18:44] Dreamer3 has joined the channel [18:45] cnu has joined the channel [18:46] naneau has joined the channel [18:46] Dreamer3 has joined the channel [18:46] flowlo has left the channel [18:47] Insanity5902 has joined the channel [18:47] SwiftLayer has joined the channel [18:47] matjas has joined the channel [18:48] Dreamer3 has joined the channel [18:48] stagas has joined the channel [18:49] chrisdickinson has joined the channel [18:49] RichardJ has joined the channel [18:50] gf3 has joined the channel [18:51] nail_ has joined the channel [18:51] dantalizing has joined the channel [18:51] tmzt has joined the channel [18:52] booths has joined the channel [18:52] matt_c has joined the channel [18:53] Dreamer3 has joined the channel [18:53] Sami_ZzZ has joined the channel [18:53] dipser has joined the channel [18:53] dandaman1 has joined the channel [18:53] masahiroh has joined the channel [18:54] daglees has joined the channel [18:55] baoist has joined the channel [18:55] Dreamer3 has joined the channel [18:55] JAAulde has joined the channel [18:56] JAAulde has left the channel [18:57] traceback0 has joined the channel [18:57] maushu has joined the channel [18:57] stagas has joined the channel [18:58] daglees has joined the channel [18:58] brainproxy has joined the channel [18:58] elijah-mbp has joined the channel [18:59] faust45 has joined the channel [19:00] elijah-mbp has joined the channel [19:00] amerine has joined the channel [19:02] daglees has joined the channel [19:02] MattJ has joined the channel [19:02] saschagehlich has joined the channel [19:05] ajpiano has joined the channel [19:09] Dreamer3 has joined the channel [19:10] dandaman1 has left the channel [19:15] Max-Might has joined the channel [19:16] heavysixer has joined the channel [19:17] heavysixer has joined the channel [19:17] c4milo2 has joined the channel [19:18] c4milo1 has joined the channel [19:18] booths: So, is there a way to load a .json file as a JSON object rather than calling JSON.parse on the fs.readFile? Just want to make sure I'm not doing something wrong. [19:19] saikat has joined the channel [19:19] Aria: Nope, that's it. [19:19] mikeal: JSON.parse only understands strings [19:19] mikeal: so you've gotta get it off the filesystem and in to a string [19:19] booths: yeah, I was just wondering if there was a way to have it return the JSON already parsed, like when I AJAX pull a .json file in a browser [19:20] booths: to where I can just result.whatever [19:20] SubStack: JSON.parse(fs.readFileSync(file).toString()) [19:20] booths: Is that better than readFile and parsing the callback? [19:20] SubStack: it's more convenient for setup and tear-down code [19:21] bingomanatee__: booths: sounds like you are trying to find a serialization system in node/javascript [19:21] jpick has joined the channel [19:21] bingomanatee__: to my limited knowledge there is none. [19:21] halfhalo: ACTION wrote something similar to what he needs [19:21] booths: not a huge deal, just wanted to make sure I wasn't doing something wrong [19:22] SubStack: eh? JSON is pretty much good enough [19:22] SubStack: unless you want to serialize functions or context states [19:22] halfhalo: except mine is psuedo json with functions [19:22] bingomanatee__: yep... thats kind of the point; JSON doesn't serialize much better. [19:22] bingomanatee__: Mongo is in a sense what he is asking about - a binary storage system for JSON. [19:23] Sembiance: hehe [19:23] bingomanatee__: I really like Mongo - check out mongoose for an Mongo ORM for node. [19:23] Sembiance: CouchDB also uses JSON, it's very similar to MongoDB [19:23] yrashk has joined the channel [19:23] Sembiance: although I recently converted my production server to use node.js + redis [19:23] bingomanatee__: Yep, Couch is nice too. And it has transactions. [19:24] mikeal: that's not entirely accurate [19:25] bingomanatee__: I'm not trying to knock redis, but to my mind a purely memory resident repos is not a complete system. I mean unless you have more RAM than storage space, you are better off persisting redis/memcache somewhere else. [19:25] mikeal: so, every individual operation can be transactional, as it it's durable [19:25] mikeal: but you can't open a transaction and hold the state of the database for some indefinite amount of time [19:25] faust45: guy's need help! i got JSON(with utf-8 strings) from node server and when start compare string fields on client side it's not working, may be some problem with encoding, but when i output to Firbug console it's ok [19:25] mikeal: Redis is great at being Redis [19:25] mikeal: if you need that, you'll know [19:25] mikeal: you can't make Redis be more like some other thing that you might want [19:26] fly__ has joined the channel [19:26] bingomanatee__: 3crowd swears by it. Its a great system. I am just not comfortable when people talk about a memory resident cache as if they have a repository when they have a repository enhancer. [19:27] mikeal: ok, i'm really confused [19:27] mikeal: we've moved the damn stdio bindings all over the damn place [19:27] mikeal: how do I listen for stdout message [19:27] mikeal: process.stdout is only writable [19:27] mikeal: it doesn't emit data events from what i can tell [19:27] bingomanatee__: you are listening for input on an outpur port? [19:27] bingomanatee__: ^^ output [19:28] mikeal: i don't want to listen to stdin [19:28] mikeal: i want to listen to data my process writes to stdout [19:28] mikeal: basically, console.log() message [19:28] mikeal: messages [19:28] bingomanatee__: sounds like you want a buffer of some sort hooked up to stdout. [19:28] mikeal: it used to be an open call to stdio binding [19:28] mikeal: but now it's gone [19:28] bingomanatee__: Does that make sense? [19:28] tilgovi has joined the channel [19:29] mikeal: no, i need a readable stream for stdout [19:29] mikeal: it'll emit buffers as the subject of data events [19:29] mikeal: it exists somewhere [19:29] mikeal: i'm sure of it [19:29] bingomanatee__: what version of node are you using? [19:30] arrty has joined the channel [19:30] mikeal: master [19:30] mikeal: ok, this is crazy [19:30] bingomanatee__: 0.2.5 [19:30] mikeal: for child processses [19:30] mikeal: you just create the child and add a listener to stdout [19:31] Thump: anyone know of a good way to get access to php session vars from node.js ? [19:31] SubStack: Thump: you could have php send them with a socket or some such [19:31] SubStack: or perhaps a web request witha json string [19:32] softdrink: does anyone have a good prng in js? stupid Math.random() can't be seeded. [19:32] Thump: substack, yeah, was just hoping someone wrote something already [19:32] SubStack: lots of ways [19:32] bingomanatee__: mikeal: process itself is an events emitter - did you try to hook someothing to process.on('data')? [19:32] Thump: well, im looking to verify a phpsessionid cookie then lookup up the phpsession vars [19:32] SubStack: process emits 'data'? [19:32] mikeal: yeah, nothing is coming out [19:33] mikeal: oh no wait [19:33] mikeal: process.on('data' ?????? [19:33] mikeal: that is retarded [19:33] SubStack: i know right? [19:33] mikeal: angry email to nodejs-dev@ coming in a few [19:33] ajpiano has joined the channel [19:34] bingomanatee__: oh wait a bit. process.stdout is a stream in the 0.2.5 docs - you have I take it tried to attach watchers to that? [19:35] stagas has joined the channel [19:35] mikeal: that doesn't work either [19:35] mikeal: yes [19:35] mikeal: process.stdout and process both aren't emitting data events for writes [19:36] mikeal: process.stdout.readable is false [19:36] mikeal: process.readable is undefined [19:36] mikeal: which in master means it's probably not a stream [19:36] Draggor has joined the channel [19:36] mikew3c has joined the channel [19:37] Sami_ZzZ has joined the channel [19:39] davidwalsh has joined the channel [19:41] thinkingpotato has joined the channel [19:42] c4milo2 has joined the channel [19:43] teemow has joined the channel [19:44] bingomanatee__: Mikeal: I think you might have something - I created a simple test at https://gist.github.com/756462 and the 'data' event might not be firing from the outward stream. [19:44] mikeal: it's so much worse than i thought [19:44] mikeal: stderr is gone entirely [19:45] mikeal: all the stdio streams on child processes are marked as readable === false [19:45] mikeal: even tho they emit data events [19:46] jsilver has joined the channel [19:47] sudoer has joined the channel [19:47] fugoki has joined the channel [19:53] c4milo1 has joined the channel [19:56] c4milo3 has joined the channel [19:57] tanepiper: ACTION is going stir crazy [19:57] ajpi has joined the channel [19:57] SubStack: ACTION stir-fries tanepiper  [19:58] tanepiper: i've updated cradle to support couchdb _list i've got the list output and i can see it in the console [19:58] tanepiper: but when i send it to the express response, it doesn't output the array - BUT it does output the length of the array [19:58] mjr_ has joined the channel [19:59] MikhX has joined the channel [19:59] hunterloftis: Is there a standard way to make a random long ID in node or JS? Or should I just pick a random number between 1 and a billion? [20:00] tanepiper: personally i use this: https://gist.github.com/51fbd9451a7b1e03f21e [20:00] SubStack: I like to do Math.floor(Math.random() * Math.pow(2,32)).toString(16) [20:01] tanepiper: so i can do require('uuid') then uuid.uuid() [20:01] SubStack: there are some uuid modules on npm too [20:01] tanepiper: yea, but they are a pain, you need libbsd i think to install it [20:01] SubStack: there's a pure one too [20:01] muhqu has joined the channel [20:02] tanepiper: probably the one i'm using but packaged for npm [20:02] eee_c1 has joined the channel [20:03] SubStack: uuid-pure [20:03] SubStack: looks like it [20:04] technoweenie has joined the channel [20:05] amerine has joined the channel [20:06] hunterloftis: thanks guys [20:06] hunterloftis: uuid seems like the way to go [20:06] muhqu_ has joined the channel [20:10] oal has joined the channel [20:11] technoweenie: there seems to be a bug with Util.pump or fs.ReadStream if you pass start/end options to fs.createReadStream [20:11] opengeard has joined the channel [20:12] mikeal: what kind of problems? [20:12] technoweenie: its not closing the writer stream [20:12] technoweenie: well its not finishing up the web response [20:12] mikeal: hrm... [20:12] mikeal: are you on 0.3.x? [20:12] technoweenie: 0.3.2 yea [20:12] technoweenie: well let me try a real simple example, hold on [20:13] mikeal: try using readStream.pipe(response) [20:13] mikeal: instead of util.pump [20:13] technoweenie: oh hm [20:13] mikeal: util.pump is legacy [20:13] mikeal: if that doesn't work [20:13] mikeal: listen for an "end" event on the reader and see if it's not firing [20:13] tanepiper: at line 95: https://gist.github.com/9dec46e23352cc9c0b00 [20:14] technoweenie: yea end and close are firing, it looks like its definitely calling writer.end() [20:14] tanepiper: i have no idea what is going on here - in my res.send, the total_rows value is 2 (which is correct) [20:14] tanepiper: but when i try to rows: list, list is null [20:14] tanepiper: i've put it inside an array to check, and i get rows:[null] [20:14] technoweenie: read streams seem to be a better place for the Util.pump logic, i like it [20:14] mikeal: so it's calling writer.end() but the http response isn't finishing? [20:15] mikeal: do me a favor, check the http capture and see if it's setting content-length or if it's chunk encoded [20:16] mikeal: i don't know what code you're using, but someone might have gotten cute and assumed that file reads should content-length the size of the file, and now you're doing some kind of range request and ending before the content-length is fullfilled [20:16] technoweenie: oh i bet thats it [20:17] mikeal: are you supporing the range header or something? [20:17] technoweenie: i wasnt sure if content-length should match the full content or the content i'm sending back. probably the content i'm sending back... [20:17] mikeal: has to match the bits you send in the response [20:17] mikeal: unless it's a HEAD reuest [20:17] mikeal: er request [20:18] technoweenie: thanks dude [20:18] mikeal: then content-length should be the size the body WOULD have been [20:18] mikeal: if it was a GET [20:18] technoweenie: right, thats where i got confused, i assumed you'd want the original content-length on a range request too [20:18] mikeal: and HEAD requests can't have their own entity-body [20:18] mikeal: nope [20:19] mikeal: this is where HTTP features get confusing [20:19] mikeal: headers relate mostly to parsing HTTP itself, except when they don't :) [20:19] technoweenie: im adding range parsing to this static file middleware for creationix's stack thing [20:20] technoweenie: range requests, rather [20:20] mikeal: yeah [20:21] mikeal: i'm releasing something pretty big next week [20:21] mikeal: and i'm about to do the work to support range headers [20:21] tjholowaychuk: technoweenie: the thing that does nothing? [20:22] technoweenie: cool [20:22] devinus: i'm consistently surprised that so many developers choose windows to develop non-.net software on [20:22] mikeal: it would be cool if the static file range support also worked with the cache [20:22] mikeal: so it could pull the offsets out of the buffer if it needed to [20:22] mikeal: also, if the cache is based only on the URL, this range support is gonna break it [20:22] technoweenie: devinus: eston at github uses windows [20:23] technoweenie: but a) he designs and 2) he runs dev shit through a linux vm [20:23] d0k has joined the channel [20:23] bingomanatee__: okay, mikeal, I documented the output of https://gist.github.com/756462 [20:23] sh1mmer has joined the channel [20:23] emilepetrone has joined the channel [20:24] bingomanatee__: I do agree it does seem like the stdout is not being predictable [20:24] devinus: technoweenie: vm's are a-ok [20:24] devinus: i'm talking about the dudes who you always see on mailing lists [20:24] mfernest: DrLou: I built node on OpenSolaris. Ugly workaround, though. [20:24] mikeal: so wait, you're getting data events on stdout? [20:24] c4milo1 has joined the channel [20:24] mikeal: i'm not in master [20:24] emilepetrone: This won't render in Express/Jade… thoughts? Trying to pull location from browser..https://gist.github.com/756484 [20:24] bingomanatee__: No I am not. .... [20:25] mikeal: oh ok, just makign sure [20:25] mikeal: trying to figure out which file was which [20:25] bingomanatee__: I do think you have a legitimate issue. [20:25] mikeal: you wanna reply to the thread on nodejs-dev with this [20:25] ajpiano has joined the channel [20:25] tanepiper: ok, seriously - anyone seen something like this: https://gist.github.com/ebd80e4b9c60cdc49ecc [20:26] bingomanatee__: I would expect to see in outlog.txt "new call / this is going out/new call / this is going out"... [20:26] tanepiper: why would if i console.log(list) or arguments do I see the array but when i do anything with it, it's null? [20:26] mfernest: devinus: to paraphrase Dennis Ritchie from a long time ago, developing net software on Windows is fun for the same reason three-legged races are fun [20:26] technoweenie: tanepiper: try arguments['0'] [20:26] bingomanatee__: nodejs-dev - what is that, a mailing list? [20:26] mikeal: no [20:26] mikeal: don't try argument.anything [20:27] mikeal: slice arguments in to a real array [20:27] mikeal: or else it's never gonna be predictable [20:27] bingomanatee__: so argument is "magic"? [20:27] bingomanatee__: arguments? [20:27] mikeal: var args = Array.prototype.slice.call(arguments);  [20:27] DrLou: mfernest: Tks for reply. I'd be interested to hear the magic! [20:27] mikeal: arguments is "magic" is "magic" == "retarded" [20:27] mikeal: s/is/if [20:28] c4milo2 has joined the channel [20:28] bingomanatee__: be nice! [20:28] mikeal: if you wanna do anything with it other than pass it to another function apply you have to slice it in to a real array [20:28] mikeal: it does stuff like change your local named variables if you alter it [20:29] SubStack: I like [].slice.call(arguments) [20:29] SubStack: less typing [20:29] technoweenie: its so shitty, i stay away from it [20:29] tanepiper: yea, it's just for testing - this is the actual code: https://gist.github.com/ebd80e4b9c60cdc49ecc [20:29] tanepiper: as you can see, the parameter list is an array, but except for console.log, which outputs it, it's null [20:29] mikeal: [] creates a new array that you throw out, Array is a pointer to a constant [20:29] emilepetrone: Any Jade experts out there? [20:29] SamuraiJack_ has joined the channel [20:29] SubStack: mikeal: but it's shorter [20:30] mikeal: shorter and slower :) [20:30] tjholowaychuk: emilepetrone: do you get errors? [20:30] bingomanatee__: <-- finds that one letter fields make his SQL tables more performant [20:30] tjholowaychuk: emilepetrone: try taking some things out, see if that renders, etc, problem solving :p [20:30] SubStack: ACTION values terseness above performance [20:30] emilepetrone: tjholowaychuk: nope just doesn't render [20:30] bingomanatee__: y [20:30] SubStack: and actually [20:30] SubStack: this calls for an experiment [20:31] bingomanatee__: SubStack: Who do you think you are, GOD? [20:31] emilepetrone: tjholowaychuk: scratch that.. [20:31] SubStack: MAYBE [20:31] mikeal: SubStack: you should test it, it's possible that v8 has some crazy thing that optimizes that away [20:31] hunterloftis: tjholowaychuk: Is there a way to have jade prettyprint output for dev? [20:31] halfhalo: ACTION thinks he is [20:31] bingomanatee__: there are some things that the development community JUST AREN"T SUPPOSED TO KNOW. [20:31] SubStack: yeah I don't trust myself to know what will be faster ahead of time [20:31] SubStack: v8 is some kooky magic voodoo [20:32] tjholowaychuk: hunterloftis: not right now nope [20:32] hunterloftis: tjholowaychuk: ok thanks [20:32] mikeal: i love how v8 optmizes big string concats [20:32] mikeal: i depend on that [20:32] herbySk has joined the channel [20:32] mikeal: i write all kinds of long multi-line strings with + all over the place because i know v8 is gonna optimize it away :) [20:33] SubStack: v8: var t = Date.now(); for (var i = 0; i < 1000000; i++) { (function () { [].slice.call(arguments)})(1,2,3,4,5) }; Date.now() - t [20:33] v8bot: SubStack: 2343 [20:33] traceback0_ has joined the channel [20:33] SubStack: v8: var t = Date.now(); for (var i = 0; i < 1000000; i++) { (function () { Array.prototype.slice.call(arguments)})(1,2,3,4,5) }; Date.now() - t [20:33] v8bot: SubStack: 2001 [20:33] hunterloftis: rbytes gives me build errors on OSX; any previous known issues? [20:33] tjholowaychuk: emilepetrone: got it? [20:33] tanepiper: officially going crazy now :( [20:34] mikeal: that difference is small enough that it basically doesn't matter :) [20:34] SubStack: ACTION <3 experiments [20:34] halfhalo: thats what she said [20:34] SubStack: yeah so terseness prevails! [20:34] SubStack: :p [20:34] chrisdickinson: v8: var s = [].prototype.slice, t = Date.now(); for (var i = 0; i < 1000000; i++) { (function () { s.call(arguments)})(1,2,3,4,5) }; Date.now() - t [20:34] v8bot: chrisdickinson: TypeError: Cannot read property 'slice' of undefined [20:34] emilepetrone: tjholowaychuk: $ is not defined ..hmm ..trying to work through it now [20:34] SubStack: this time.... this time.... [20:35] chrisdickinson: cripes. [20:35] tjholowaychuk: emilepetrone: whats the gist again? [20:35] chrisdickinson: v8: var s = [].slice, t = Date.now(); for (var i = 0; i < 1000000; i++) { (function () { s.call(arguments)})(1,2,3,4,5) }; Date.now() - t [20:35] v8bot: chrisdickinson: 1988 [20:35] tanepiper: https://gist.github.com/ebd80e4b9c60cdc49ecc - 'list' is DEFINETLY an array, but won't convert to a JSON string, nor will it output to express response [20:35] emilepetrone: tjholowaychuk: https://gist.github.com/756484 [20:35] chrisdickinson: woo cached lookup [20:35] mikeal: tanepiper: is there an error? [20:35] chrisdickinson: v8: var s = Array.prototype.slice, t = Date.now(); for (var i = 0; i < 1000000; i++) { (function () { s.call(arguments)})(1,2,3,4,5) }; Date.now() - t [20:35] v8bot: chrisdickinson: 1803 [20:35] tanepiper: no, as you can see at the last item there, i get the success and length of the array, but no error at all [20:35] chrisdickinson: weird that that would be different. [20:36] tanepiper: and JSON.stringify just produces undefined [20:36] tjholowaychuk: tanepiper: weird, Express just does a regular JSON.stringify [20:36] SubStack: chrisdickinson: probably the time it takes to do the record lookups matters at that number of iterations [20:36] mikeal: what is res.send? [20:36] tanepiper: if I put rows: [list] I get [20:36] tanepiper: rows: [null] [20:36] tanepiper: but it's not null, because it has a length [20:37] tjholowaychuk: emilepetrone: looks fine, but if all else fails you could just use a script(src: '') [20:37] tjholowaychuk: that is to much code IMO to inline anyway [20:37] chrisdickinson: SubStack: makes sense. [20:37] tjholowaychuk: mikeal: its a little helper [20:37] mikeal: it takes literals and turns them in to JSON? [20:37] emilepetrone: tjholowaychuk: yeah its a bit thick.. i'll keep at it…thanks for checking [20:38] tjholowaychuk: res.send(html), res.send(obj), res.send(404), res.send(str, { 'Content-Type: 'text/plain' }) etc [20:38] mikeal: also, shouldn't you serve JSON as application/json? [20:38] tanepiper: mikeal: yes, but firefox makes me download it :) [20:38] mikeal: get the JSON viewer plugin [20:38] tanepiper: the output from couchdb is JSON [20:38] mikeal: also, text/plain [20:38] tanepiper: http://tanepiper.couchone.com/client-4castrisk/_design/Asset/_list/grid-list/grid-list?include_docs=true [20:38] mikeal: don't serve non-html as text/html [20:38] tjholowaychuk: what are you talking about [20:39] tjholowaychuk: im lost [20:39] tjholowaychuk: haha [20:39] tjholowaychuk: not sure who is talking to who [20:39] tanepiper: mikeal: in this case, doesn't matter because i have a view that i debug that way that works fine [20:39] halfhalo: REAL meln serve it as binary [20:39] tanepiper: the main issue is when i try output the array I get null, but when i output the array length I get 2 [20:39] mikeal: tanepiper: did you try res.send(JSON.stringify(literal)) [20:39] tanepiper: yes [20:40] tanepiper: JSON.stringify gives undefined [20:40] mikeal: weird..... [20:40] tjholowaychuk: tanepiper: start stripping stuff out [20:40] mikeal: why are id and rev not _id and _rev? [20:41] mikeal: also, you're recreating a response from couchdb, why don't you just write the string that came back from couchdb? [20:41] tanepiper: mikeal: internal for the app using it [20:41] chrisdickinson: tanepiper: does list have overridden `valueOf`, `toString`, or `toJSON` properties? [20:41] tanepiper: chrisdickinson: toJSON [20:42] tjholowaychuk: that would do it [20:42] tanepiper: https://gist.github.com/fcba3b32016faa8d1241 [20:42] mikeal: Array.prototype.slice.call(list) [20:42] mikeal: what does that return? [20:42] tanepiper: that's my cradle views + list setup [20:43] mikeal: awesome, you're using that crazy emit(key, {_id:asdf}) include_docs hack [20:44] mikeal: tanepiper: replace that sum reduce function with just "_sum" [20:44] mikeal: builting erlang reduce [20:44] mikeal: it's like 100x [20:44] chrisdickinson: v8: JSON.stringify({toJSON:(function(){})}) === undefined [20:44] v8bot: chrisdickinson: true [20:44] tanepiper: mikeal: https://gist.github.com/6e0dd9b9b77bf91ea46b [20:45] tanepiper: bottom is the console output [20:45] mikeal: JSON.stringify(Array.prototype.slice.call(list)) [20:45] sh1mmer has joined the channel [20:46] mikeal: that should strip any crazy .toJSON function [20:46] mikeal: that might be messing it up [20:46] tanepiper: https://gist.github.com/6e0dd9b9b77bf91ea46b [20:46] V1 has joined the channel [20:47] mikeal: w00t! [20:47] mikeal: somebody, maybe cradle, is adding a broken toJSON function [20:48] mikeal: so just run that through the Array slice to strip it out and you're good [20:48] mikeal: this is why I don't put a lot of code between me and CouchDB, people try to be too clever :) [20:48] emilepetrone: tjholowaychuk: jquery wasn't loaded at the point it was being called..doh [20:48] tanepiper: mikeal: yea, basically it's to make up for using ExtJS :) [20:48] mikeal: hahaha [20:49] devinus: is it just me, or does anybody find jquery plugins horrendous spaghetti code [20:49] tanepiper: nodejs is really just sitting in the middle, taking a few application parameters + couchdb parameters to return stuff [20:49] tjholowaychuk: emilepetrone: hm :p [20:49] emilepetrone: tjholowaychuk: they don't call me a n00b for nothin! [20:49] mikeal: devinus: soley extending using the event model and object additions has it's limits [20:49] tjholowaychuk: devinus: jQuery is horrendous spaghetti code [20:49] devinus: every jquery plugin ive ever worked with has been fucking spaghetti [20:50] mikeal: jQuery core is fine [20:50] tanepiper: never use my jMaps plugin, it's horrible :p [20:50] davidwalsh has joined the channel [20:50] devinus: yeah jq core is ok [20:50] devinus: jquery ui and jquery mobile.... [20:50] devinus: my skin crawls [20:50] mikeal: jquery ui is insane [20:50] mikeal: they add thousands of new events [20:50] mikeal: it's crazy [20:50] tanepiper: also mikeal not sure what you mean replace with _sum? [20:51] mikeal: tanepiper: so, that function is a javascript function that sums the results [20:51] mikeal: couchdb has a builtin for that [20:51] mikeal: you don't need a js function, you can just use "_sum" [20:51] mikeal: this cradle object *should* map directly to a design document [20:51] mikeal: which means it just calls .toString() on these functions [20:52] tanepiper: oh, reduce: '_sum' [20:52] mikeal: just add a string of "_sum" [20:52] tanepiper: instead of just _sum [20:52] mikeal: yup [20:52] mikeal: hopefully cradle doesn't break on assuming it's a function in this object def [20:52] mikeal: but yeah, it's like 100 times faster [20:52] hdon has joined the channel [20:52] tswicegood has joined the channel [20:53] mikeal: doesn't have to hit JSON serialization, doesn't have to send anything to the view server on rereduce [20:53] mikeal: it's quite nice [20:54] tanepiper: yea, works fine [20:54] tanepiper: so I need to work out why this toJSON stuff is getting broken :( [20:55] mikeal: probably something in cradle [20:55] tanepiper: as passing res.send a string double stringifys it, so i have to JSON.parse(JSON.stringify the array stuff [20:55] mikeal: no [20:55] tanepiper: yea, i just added the list support myself, i'll go through and check the response stuff [20:55] mikeal: just pass the attribute as the sliced array [20:56] naneau has joined the channel [20:56] mikeal: res.send({rows: Array…… [20:56] tanepiper: oh, yes :) [20:56] tanepiper: heh it's nearly 9pm i've been coding straight since 10am [20:57] Sembiance: heh [20:57] maushu has joined the channel [20:57] Sembiance: tanepiper: each hour you spend coding after this point will take you 1 to 2 hours tomorrow to debug ;) [20:57] hdon has joined the channel [20:57] dmcquay has joined the channel [20:58] matjas_ has joined the channel [20:58] femtoo has joined the channel [20:58] tanepiper: probably [21:00] ezmobius has joined the channel [21:01] tanepiper: but mikeal yea, i'm wondering if I should just go to using straight up requests with couchdb [21:01] mikeal: that's what I do [21:01] mikeal: i just use request [21:01] naneau has joined the channel [21:01] bingomanatee__: what is the "file exists" test funtion in node? [21:01] tanepiper: cradle is nice, but i've managed to cut down a lot of code recently [21:01] bingomanatee__: or do you just use stat? [21:01] mikeal: bingomanatee: stat [21:01] bingomanatee__: k thx [21:02] benburkert has joined the channel [21:02] mikeal: tanepiper: everything i said here is pretty much still true http://nodeknockout.posterous.com/countdown-to-knockout-post-14-using-couchdb-w [21:02] mikeal: i'm a weird use case, because i know the HTTP API incredibly well already [21:02] mikeal: so an abstraction is just going to get in my way [21:02] c4milo1 has joined the channel [21:02] mikeal: but the HTTP API is well defined, we just did new docs [21:02] mikeal: http://docs.couchone.com/couchdb-api/index.html [21:03] tanepiper: yea, i used it when i found out node-couchdb wasn't being activily developed anymore, but i can't remember why i ended up picking cradle in the end [21:03] mikeal: well, this design doc abstraction seems nice [21:03] frodenius: lol [21:04] mikeal: i use node.couchapp.js to write my ddocs [21:04] masahiroh has joined the channel [21:04] tanepiper: i think that was it - but i could probably just rip that bit out of cradle for myself [21:04] eee_c has joined the channel [21:04] tanepiper: i prefer to write design docs as actual JS rather than strings [21:09] c4milo2 has joined the channel [21:10] c4milo1 has joined the channel [21:10] bencc has left the channel [21:11] dnyy has joined the channel [21:11] mikeal: tanepiper: agreed [21:12] c4milo3 has joined the channel [21:13] DrLou: mfernest: Are you still there. [21:14] c4milo1 has joined the channel [21:16] sh1m has joined the channel [21:16] losing has joined the channel [21:20] rphillips has joined the channel [21:20] c4milo2 has joined the channel [21:22] bingomanatee__: My code is so clean I don [21:22] bingomanatee__: t [21:22] bingomanatee__: need docs [21:24] bingomanatee__: PHP and Java simply reflect and abstract documentation from their classes - an embedded doc syntax would be nice but I'm not sure its possible in the mixin world. [21:24] technoweenie: bingomanatee__: there is a Path.exists method, but i dont know of any benefits over Fs.stat [21:26] bingomanatee__: well it does seem more prudant to use a binary method if you don't really want any stats. For isntance I actaully want to use it to prevent my code from overwriting files, so I'm acting on the NONexistence of a file. [21:27] c4milo1 has joined the channel [21:28] c4milo2 has joined the channel [21:30] c4milo1 has joined the channel [21:31] bingomanatee__: so the path.exists is perfect for me. [21:31] bingomanatee__: Is there reflection in node/commonJS? [21:32] c4milo1 has joined the channel [21:33] rpflo has joined the channel [21:35] bubbles has joined the channel [21:37] c4milo2 has joined the channel [21:38] namelessnotion has left the channel [21:40] namelessnotion has joined the channel [21:41] c4milo1 has joined the channel [21:42] c4milo2 has joined the channel [21:45] gf3 has joined the channel [21:45] mikeal has joined the channel [21:46] sh1mmer has joined the channel [21:46] Yuffster has joined the channel [21:49] Me1000 has joined the channel [21:53] ryanfitz_ has joined the channel [21:54] c4milo1 has joined the channel [21:56] ibolmo has joined the channel [21:56] ibolmo has left the channel [21:56] Ond has joined the channel [22:01] Aria has joined the channel [22:01] thinkingpotato has joined the channel [22:02] dthompson has joined the channel [22:08] devinus: what's the hip new JS only build tool? [22:08] bingomanatee: Shaft? [22:09] devinus: bingomanatee: where's that? [22:09] augustl has joined the channel [22:10] bingomanatee_ has joined the channel [22:11] jakehow has joined the channel [22:11] amerine has joined the channel [22:12] arlolra has joined the channel [22:14] mumphster has joined the channel [22:16] mumphster: How do I get the content-type out of a http header using node [22:16] mumphster: it keeps saying type is not defined [22:17] tjholowaychuk: mumphster req.headers['content-type'] if is there [22:17] c4milo1 has joined the channel [22:17] mumphster: oh [22:17] mumphster: well [22:17] mumphster: hm [22:18] mfernest: DrLou: I'm back [22:18] mumphster: how come I can pull everything else out of the headers using response.headers.* but not content-type [22:18] mumphster: im new to this whole thing so im probaly being dumb [22:20] mumphster: oh ya i was dumb [22:22] McDES has joined the channel [22:22] Aria: needed req.headers instead ? [22:23] c4milo2 has joined the channel [22:24] c4milo1 has joined the channel [22:24] Gruni has joined the channel [22:25] dnolen has joined the channel [22:26] dnolen: is there any notion in node.js of a script running as "main" ? [22:26] Aria: "as main"? [22:26] Aria: The script you run kinda is a main thing, but ... not sure what you're asking. [22:26] gkatsev: not python [22:26] gkatsev: or java [22:27] Aria: I mean, you can always do public static int main(int argv, char[][]argv) if you want, but .... ;-) [22:27] dnolen: Aria: in python sometimes you want to use a python file as library and sometimes as a executable. [22:27] c4milo1 has joined the channel [22:28] mumphster: Aria: nah content-type didnt want to work they way I was using it [22:28] mumphster: but when i stuck it in a [] it worked fine [22:28] Aria: Ah, yeah. "content minus type" [22:28] mumphster: yup [22:28] skm has joined the channel [22:28] tjholowaychuk: haha :) [22:28] zomgbie has joined the channel [22:29] Aria: dnolen: You can look at __file and choose to run a function based on that. [22:29] Aria: (ruby style) [22:29] mumphster: do I have to create a client for each request I do? [22:29] mumphster: I just want to feed a url to an image and determine its type and thats sort of cumbersome [22:30] Aria: You need a new client for each connection to an http server you make. [22:30] c4milo2 has joined the channel [22:30] mumphster: so theres nothing like urllib for node? [22:31] ryanfitz has joined the channel [22:31] mumphster: I guess i can make this work with some regex [22:31] evanmeagher has joined the channel [22:31] dnolen: Aria: do you mean __filename? How I can use that. it emits the same thing whether I run "node file.js" or require that file from node-repl [22:32] c4milo1 has joined the channel [22:32] Aria: Oh, yeah. __filename. [22:32] Aria: Compare that to process.argv[1] [22:32] Aria: mumphster: urllib? What is that? [22:32] tjholowaychuk: mumphster: require('url').parse(str) [22:32] mumphster: Aria: python [22:32] tjholowaychuk: what you are looking for? [22:33] mumphster: is there a way to simplify the example int he api docs? thats what im basing this off of right now [22:34] Aria: Ah, no idea about python [22:34] mumphster: http://pastebin.com/3EtKbu7m like this. id like to just make a request straight to the image and read off its headers [22:34] mumphster: totaly new to js so i mght be being dumb again [22:36] sh1m has joined the channel [22:36] markwubben has joined the channel [22:38] sepehr1 has joined the channel [22:40] dnolen: Aria: sweet, thx [22:40] MattJ has joined the channel [22:42] sveimac has joined the channel [22:43] bingomanatee_ has joined the channel [22:43] themiddleman has joined the channel [22:44] booths has joined the channel [22:44] ajpiano has joined the channel [22:45] mikedeboer has joined the channel [22:45] opengeard has joined the channel [22:46] rwaldron has joined the channel [22:47] rwaldron_ has joined the channel [22:50] jpld has joined the channel [22:50] tmzt: tjholowaychuk: if I wanted express to return a partial intended for a div with xhr, I would use a custom layout.jade just for those requests? [22:51] tmzt: essentially I'm looking for a way to both build a full page or just update the existing page with ajax using the same templates [22:51] tjholowaychuk: tmzt: or { layout: false } [22:51] tmzt: ok [22:52] tjholowaychuk: tmzt: res.partial() also exists, its the same one you call when you do partial() in a template [22:52] tmzt: okay, what I want is for site/account/new and site#account/new to do the same thing [22:52] tmzt: obviously I have to handle the second one on the client [22:53] tekky has joined the channel [22:53] sepehr has joined the channel [22:56] jchris has joined the channel [22:57] aristidesfl has joined the channel [23:01] naneau has joined the channel [23:01] eazyigz has joined the channel [23:02] eazyigz: how can I get "Привет" instead of '\u041f\u0440\u0438\u0432\u0435\u0442', when I do: node> decodeURIComponent(encodeURIComponent("Привет")) [23:02] Aria: Isn't that the same thing? [23:02] eazyigz: not to the naked eye [23:02] Aria: Node's REPL is just encoding the string down to ASCII [23:02] eazyigz: in webkit it prints "Привет" [23:02] Aria: Same representation in memory. [23:03] Aria: Bet you'd need to tweak the REPL or the inspect function [23:03] Aria: (and detecting utf-8 support reliably in a terminal is, I hear, hard.) [23:03] eazyigz: oh... [23:04] eazyigz: maybe it has to do with the curses module in linux [23:04] eazyigz: to display these characters in the terminal [23:04] Aria: node's repl doesn't use curses ;-) [23:04] tmzt: does fbcon even suport unicode? [23:05] Aria: Yes, limited repertoire though [23:05] tmzt: you might need to use ufbcon or whatever debian isntaller uses [23:05] Aria: (512 characters, I think) [23:05] tmzt: or uxterm, etc. [23:05] Aria: Yeah. It varies a lot. [23:05] tmzt: what is REPL by the way? [23:05] tmzt: I haven't seen a good explanation of that [23:05] Aria: Read-Evaluate-Print-Loop. [23:05] Aria: It's a LISP term. [23:06] tmzt: ah [23:06] tmzt: so interactive [23:06] Aria: Exactly. [23:06] emilepetrone: tjholowaychuk: know of any good db tutorials for node? [23:06] sh1mmer has joined the channel [23:06] Aria: From the folks who brought you "car" and "cdr" meaning "first" and "rest" ;-) [23:06] tjholowaychuk: emilepetrone: dunno [23:07] emilepetrone: k thx [23:07] tmzt: Aria: prefer logo [23:07] Aria: Hehe. I'll trade you postscript for logo. [23:07] tmzt: nah, logo has bf, bl [23:07] bingomanatee_: When I was in school there was a woman who wrote PostScript by hand and fed it into laserwriters. [23:07] Aria: postscript has pop and the stack. [23:08] tmzt: and :func :p1 :p2 [23:08] tmzt: er something [23:08] bingomanatee_: Always wonder what happened to her. [23:08] Aria: Hee. That was me at one point. [23:08] tmzt: I have a book on postscript [23:08] tmzt: and implemented a basic one for the ti calculator in basic [23:13] DrLou: mfernest: Sorry if I missed you. I was on a call. [23:13] DrLou: was hoping to pick your brain about how you built on OpenSolaris. [23:14] dmshann0n has joined the channel [23:14] dmshann0n has left the channel [23:14] bengl has joined the channel [23:14] dmshann0n has joined the channel [23:15] [[zz]] has joined the channel [23:16] JCS0 has joined the channel [23:17] siong1987_ has joined the channel [23:17] huh has joined the channel [23:18] dthompson has joined the channel [23:18] mikeal has joined the channel [23:19] zhesto has joined the channel [23:20] pHcF has joined the channel [23:20] softdrink: hooray for LFSRs [23:20] mgc has joined the channel [23:21] Kai` has joined the channel [23:22] sh1mmer has joined the channel [23:22] joeshaw___ has joined the channel [23:22] blueadept has joined the channel [23:24] johnnywengluu has joined the channel [23:26] ryanfitz has joined the channel [23:26] tanepiper has joined the channel [23:27] omni5cience: softdrink: Shift registers? [23:28] tjholowaychuk has joined the channel [23:28] xSmurf: omni5cience: I2C/SPI libraries for Node? Awesome! ;) [23:29] softdrink: omni5cience: yeah [23:29] omni5cience: lolwut?! oh boy! [23:30] xSmurf: http://en.wikipedia.org/wiki/Shift_register [23:30] tmzt: add binfmtmisc support and you can just replace your system with js [23:30] softdrink: i needed repeatable random numbers, so i hacked together a galois lfsr [23:31] omni5cience: ACTION could have phrased that better, in short Awesome indeed [23:32] mikeal: cloudhead isn't here [23:32] mikeal: damn [23:34] bartmax has joined the channel [23:34] bartmax has joined the channel [23:35] mscdex has joined the channel [23:35] omni5cience: oh boy, how did I miss node on gumstix?! lol [23:36] softdrink: dowhatnow? node on gumstix? [23:37] softdrink: ACTION ports node to AVR [23:40] bubbles: on the nodejs site node-v0.3.2 is called unstable, so I'm using 0.2.5 atm, are many people using 0.3.2 on public facing sites yet? [23:40] gkatsev: any odd minor release is considered unstable and any even minor release is considered stable [23:41] xSmurf: softdrink: YES [23:41] gkatsev: but 0.3 is fairly stable or so people say [23:41] xSmurf: I mean, there's a JavaVM after all! [23:41] softdrink: ewwwwww java [23:41] xSmurf: I know right!! [23:41] tmzt: javavm? [23:42] xSmurf: softdrink: 8bit or 32bits? [23:42] gkatsev: tmzt: i'm guessing jvm. [23:42] tmzt: yeah I mean why does that matter [23:42] softdrink: pffff… i wish i had the skills to do that xSmurf. [23:42] tmzt: since node doesn't need that [23:43] xSmurf: tmzt: because if there is an 8bit jvm, I sure hope there are alternative [23:43] xSmurf: actually I think I've seen a python interpreter too [23:43] xSmurf: but it might have just preprocessed it into C [23:44] tmzt: there's a jvm for 8 bit avr? [23:44] Aria: gumstix are ARM, not AVR. . A fair bit more potent. [23:44] omni5cience: the gumstix platform has been around for several years now, so it's not suprising [23:44] tmzt: you don't mean the compiler like arduino uses? [23:44] Aria: They use an OMAP [23:44] xSmurf: Aria: there are 32Bit AVR which are very close to the ARM achitecture [23:44] tmzt: yeah, overo is omap3 now [23:44] Aria: True that. [23:44] xSmurf: tmzt: there is, I know, go gfigure [23:45] xSmurf: http://www.harbaum.org/till/nanovm/index.shtml [23:45] Aria: Where 'very close' is a lot like 'pretty different but if all you want is a microcontroller at 40mhz, go for it' [23:45] xSmurf: 8bit JVM for AVR [23:45] omni5cience: there has been a lot of work on embedded java, god knows why [23:45] Aria: Phones. [23:45] omni5cience: true [23:45] Aria: Cell phone manufacturers are nuts, that's why. [23:46] Aria: Only thing more crazy is cell carriers. [23:46] xSmurf: aight kids gotta head out, back in 30 mins or so [23:46] xSmurf: hopefully this MCU conversation is still going by then [23:46] xSmurf: o/ [23:46] omni5cience: so long [23:47] omni5cience: Aria: I don't want to think about the kind of legacy code they must have in production [23:47] Aria: Yeah, ow. [23:48] softdrink: at universities, they teach way too much java, and far too little C. [23:49] bingomanatee_: Is there any good tutorials on using ejs in node? I want to use it to create .js files . [23:52] omni5cience: softdrink: that's one of the problem with CS programs these days [23:53] opengeard has joined the channel [23:56] mauritslamers has joined the channel [23:56] mauritslamers has joined the channel [23:59] aklt has joined the channel