[00:00] isaacs: sstephenson: because it's how npm install is going to be [00:00] isaacs: sstephenson: npm install is going to install into ./node_modules [00:00] sstephenson: oh interesting [00:01] blaines has joined the channel [00:01] bingomanatee has joined the channel [00:02] blaines has joined the channel [00:03] blaines has joined the channel [00:05] blaines has joined the channel [00:06] utunga has joined the channel [00:07] blaines has joined the channel [00:09] Fullmoon has joined the channel [00:09] blaines has joined the channel [00:09] MikhX has joined the channel [00:11] mikeal has joined the channel [00:12] utunga: hi folks.. uhm i have a question about 'nice url' proxying for couchapp.. can i ask it here? [00:13] lgl has joined the channel [00:13] utunga: (trying to get this to have 'nice' urls basically.. http://chchneeds.info/tmpdb/_design/chchneeds/index.html#/ ) its for the christchurch earthquake [00:15] utunga: any help much appreciated folks ;_) [00:15] jimt_ has joined the channel [00:16] blaines has joined the channel [00:17] isaacs: utunga: you might get better responses in #couchdb [00:18] utunga: ok sure.. will do [00:22] Sebmaster: tjholowaychuk: you there? [00:22] tjholowaychuk: kinda yup [00:22] Sebmaster: is it possible, to specify a port for the connections in socket.io? [00:23] tjholowaychuk: not sure [00:23] tjholowaychuk: ask rauchg_ he's da man [00:23] isaacs has joined the channel [00:23] utunga has joined the channel [00:23] Sebmaster: omg [00:23] Sebmaster: im so dumb [00:23] Sebmaster: got the bug [00:24] utunga has left the channel [00:24] rauchg_: Sebmaster [00:24] rauchg_: hi [00:25] Sebmaster: rauchg_: Its all good, i had my this.port variable but set 80 in the options, so didnt use this.port at all :S [00:26] springmeyer has left the channel [00:26] Sebmaster: rauchg_: is io.setPath really going to get removed? [00:27] jesusabdullah: Found out my version of node on this computer was immeasurably old >_< [00:27] jesusabdullah: v. 0.2 D: [00:27] jesusabdullah: First time trying out 0.4.x now [00:27] Sebmaster: rauchg_: Can't the SWF_LOCATION variable at least be in the io namespace? [00:27] rauchg_: Sebmaster [00:28] rauchg_: i'm even considering removing flash socket unless it somehow gets faster [00:28] rauchg_: has awful latency problems [00:29] Sebmaster: why awful? [00:29] siculars has joined the channel [00:29] rauchg_: Sebmaster the flash -> javascript communication is really slow [00:30] Sebmaster: ohh, okay [00:30] rauchg_: it's not the AS Socket itself [00:30] Sebmaster: didnt think of that [00:30] rauchg_: but it might be something i can fix [00:30] rauchg_: i'll look into it later [00:31] Sebmaster: still awesome piece of software you got there. thanks for releasing it [00:31] rauchg_: np [00:31] rauchg_: it's gonna get a ton better soon [00:32] jesusabdullah: orly? [00:32] Sebmaster: huh? [00:32] jesusabdullah: Hints, rauchg_? [00:32] Sebmaster: theres even more? [00:32] dthompson1 has joined the channel [00:32] rauchg_: there's WAY more awesomeness coming :) [00:33] tjholowaychuk: MOAR [00:33] ako has joined the channel [00:34] Sebmaster: more transports? :p [00:34] jesusabdullah: DNode will now get 0mq "for free" [00:34] sprout has joined the channel [00:35] disqk has joined the channel [00:35] Sebmaster: :D [00:36] PyroPete1 has joined the channel [00:37] mattijs has joined the channel [00:38] PyroPeter has joined the channel [00:38] nuba_ has joined the channel [00:38] DTrejo has joined the channel [00:39] tanepiper has joined the channel [00:42] fr0stbyte has joined the channel [00:42] eee_c has joined the channel [00:44] daveluke has joined the channel [00:44] nuba has joined the channel [00:48] mlncn has joined the channel [00:49] CIA-39: node: 03Ryan Dahl 07v0.4 * rf918e57 10/ wscript : Support dtrace for debug build - http://bit.ly/h0e0lN [00:49] CIA-39: node: 03Ryan Dahl 07master * rea9f5b1 10/ (lib/http.js test/simple/test-http-abort-client.js): [00:49] CIA-39: node: Add 'close' and 'aborted' events to Agent responses [00:49] CIA-39: node: Closes GH-722. - http://bit.ly/f9Ujyk [00:49] CIA-39: node: 03Ryan Dahl 07master * r8838e14 10/ (156 files in 21 dirs): Merge branch 'v0.4' - http://bit.ly/hsu140 [00:49] CIA-39: node: 03Russell Haering 07master * r7276ff9 10/ (lib/http.js test/simple/test-pipe-file-to-http.js): http: fix missing 'drain' events - http://bit.ly/hxLOtu [00:49] CIA-39: node: 03Ryan Dahl 07master * rf918e57 10/ wscript : Support dtrace for debug build - http://bit.ly/h0e0lN [00:50] konobi: who's bloom.no.de? [00:50] PyroPeter has joined the channel [00:51] superdug_ has joined the channel [00:51] vilhonen has joined the channel [00:52] muk_mb has joined the channel [00:53] jimt has joined the channel [00:53] inarru has joined the channel [00:56] PyroPete1 has joined the channel [00:56] panda has joined the channel [00:58] ajnasz has joined the channel [00:59] softdrink has joined the channel [00:59] randallagordon has joined the channel [01:00] hornairs has joined the channel [01:01] boaz has joined the channel [01:02] Siedrix: Hi, does anyone know how to save a file, that i read as binary, upload with web sockets and then use fs.writeFile, file are broken and have more size [01:02] mdoan has joined the channel [01:02] sveisvei has joined the channel [01:03] jimt has joined the channel [01:04] sconover has joined the channel [01:05] doubletap has joined the channel [01:06] sconover: I have a quick question for this group - people who are used to "async" thinking. More like a sanity check, I think I know the answer... [01:06] sconover: I'm working on a relational algebra library for js: https://github.com/sconover/knit-js [01:06] DTrejo: Hi Siedrix, i'm not totally sure what you mean [01:07] sconover: thinking through how I might work in async support. but then I hit a wall when I imagine joining rows from two datasources firing events asyncronously [01:07] sconover: imagine implementing sql join, in code [01:08] DTrejo: Siedrix: client uploads file as binary, server recieves chunks via websocket and then concatenates the chunks and then writes the file? [01:08] sconover: where you're joining resultsets from two different dbs [01:08] DTrejo: sconover: https://github.com/caolan/async#parallel [01:08] DTrejo: I like that lib [01:08] sconover: each db is firing at its own rate... [01:08] DTrejo: so I'm biased [01:08] sconover: it's impossible to coordinate that, isn't it? [01:08] DTrejo: scoates: if you used async.parallel, it would fire both, wait for both to return, and then let you do stuff [01:09] Siedrix: DTrejo: I try that, and also as one big chunk... works well with .txt but not with images or mp3 [01:10] sconover: thinking... (this kind of problem makes my head hurt) [01:10] DTrejo: Siedrix: yes, like you said this is probably because of the binary. are you able to send files as binary from the client? I think you need to be using a browser that supports it? [01:10] sconover: lemme look at that again,was just looking at the code in that project the other day... [01:11] Siedrix: Dtrejo letme check if the browser is able to send binaries, or if it changes it to string [01:12] sconover: ok so lets say I had two different sqlite dbs. I open a connection to each. [01:12] fly-away has joined the channel [01:13] DTrejo: ACTION is listening [01:13] sconover: in async mode I'm going to do dbOne.query("select * from person", function(row){ /* */ }) and then I say dbTwo.query("select * from house", function(row){ /* */ }) [01:14] sconover: those callbacks need to report back to the join [01:14] sconover: each may fire at a different time [01:14] sconover: I don't see why even async.parallel can do anything about controlling when those callbacks fire [01:15] sconover: each db connection is just running that query and firing away as each row becomes available right? [01:15] DTrejo: oh it is row by row? [01:15] sconover: yep [01:15] DTrejo: oh that makes it different [01:15] DTrejo: it's more like an event emitter [01:15] konobi: tim_smart: ping [01:15] DTrejo: rather than one operation that returns a single thing [01:15] sconover: yeah exactly [01:16] sconover: yeah so sorry... [01:16] unomi has joined the channel [01:16] unomi has joined the channel [01:16] sconover: one of my background assumptions is I'm not allowed to hold everything in ram at once [01:16] DTrejo: does anyone know of a good "how to write an event emitter" tutorial? [01:16] DTrejo: ah [01:16] sconover: I need to join incrementally, and assume that each rowset could be 100GB [01:17] sconover: SO [01:17] sconover: I think async and this join problem just don't mix [01:17] sconover: what I want is two streams [01:17] DTrejo: sconover: here's an example of something that emits events and then asks you to call next() before it continues: https://github.com/indexzero/http-agent/blob/master/lib/http-agent.js [01:18] sconover: (like, two iterators) [01:18] DTrejo: sconover: I should really find a less complicated example, hmm [01:18] sconover: so it's more of synchronous stream problem...and thinking async is just inappropriate. [01:18] Siedrix: DTrejo: have you check this one http://www.nczonline.net/blog/2010/03/09/custom-events-in-javascript/ [01:18] sconover: (looking) [01:19] DTrejo: sconover: http://nodejs.org/docs/v0.4.0/api/all.html#events.EventEmitter is easier reading [01:20] wasabist has joined the channel [01:21] ziro` has joined the channel [01:21] wasabist has joined the channel [01:23] sconover: I wish I could put this more articulately...I have two event sources but it's important that I be able make one "wait". But that's just incoherent. It's the emitters that are in the driver's seat and I have nothing to say about it. [01:23] sconover: http://nodejs.org/docs/v0.4.0/api/all.html#readable_Stream [01:23] sconover: #pause might be what I want [01:24] joshholt_ has joined the channel [01:24] sconover: ...if I'm understanding this stuff correctly... [01:24] technoweenie has joined the channel [01:25] sconover: if the db driver returned a Readable Stream [01:26] davidc_ has joined the channel [01:26] sconover: I suppose I could coordinate joining by marching forward one side of the join, then pausing it, then marching the other side forward, etc etc [01:26] sholmes: What are some interesting ways to send information from the server down to the javascript in the client. With PHP I just had to echo the information inside script tags (meh). What are some new ways to do this in Node? [01:26] blueadept has joined the channel [01:27] DTrejo: sconover: that sounds bad / slow [01:28] sconover: well i would guess that if i cracked the unix join utility open that's what I'd find [01:28] jimt has joined the channel [01:28] sconover: that thing is joining potentially massive files together [01:29] DTrejo: sconover: i guess if you didnt do it that way, you'd risk getting a bunch of data from one db and not enough from the other db to get rid of it [01:29] sconover: if you imagine two iterators, (where each side of the join is sorted appropriately), it's not that hard of a problem... [01:29] Siedrix: Dtrejo: its not a binary at the moment that its send, its a string... any idea what to do now? [01:29] sconover: yes [01:29] sconover: reading 100GB into ram at once is not allowed... [01:30] sconover: http://www.gnu.org/software/coreutils/manual/html_node/join-invocation.html [01:30] DTrejo: Siedrix: dunno if this helps at all http://stackoverflow.com/questions/3146483/html5-file-api-read-as-text-and-binary [01:31] sconover: i'd love to get to the point where I can do something like join heterogeneous data sources...a db with a massive file, for instance... [01:31] DTrejo: sconover: yeah I don't think I'm going to be much help for this problem [01:31] sconover: anyway the problem is more general [01:31] sconover: to attempt to generalize... [01:31] MikhX_ has joined the channel [01:31] ajnasz has joined the channel [01:31] sconover: coordinating across two event emitters is hard [01:31] sconover: agree/disagree? [01:32] sconover: unless you have something like #pause... [01:32] ziro` has joined the channel [01:32] DTrejo: sounds kinda like it, maybe that is the solution [01:32] [[zz]] has joined the channel [01:33] Alex3000 has joined the channel [01:33] sconover: (that's more of an assertion. I'm using this join example because I'd love it if someone said "oh that's just like this other canonical async case that's impossible to deal with") [01:33] DTrejo: sconover: read read read from both until one gets too big and reaches the limit, then pause it and process it and then continue on. i guess [01:34] sconover: ("aha, sconover, that's the Two Event Emitter problem, and no you can't do what you would like to do") ;-) [01:34] sconover: yeah something like that [01:35] jennings has joined the channel [01:35] DTrejo: ask ry, he might be listening [01:37] sconover: how do i do that other than hope he looks in here, chat privately? [01:38] tsyd has joined the channel [01:38] DTrejo: if you were to type the result of ['ry', 'ah'].join() his irc client would get a ping him and he'd probably look over [01:39] konobi: never! [01:39] sconover: ryah [01:39] jimt_ has joined the channel [01:39] insin: just don't feed him after midnight [01:39] ryah: sconover: what's up? [01:39] sconover: btw thanks a lot for the pointers/help DTrejo... [01:40] DTrejo: ask your question before he vanishes into the land of code! ;) [01:40] sconover: hi I had a question about an async problem that involves two event sources... [01:40] sconover: two event sources firing around the same time, and coordinating among the "firings" [01:41] ryah: sconover: yes? [01:42] sconover: it's impossible to "sit in the middle" of those two sources and pull data together without some way of controlling the firing [01:42] blaines has joined the channel [01:42] sconover: sorry I'm trying to figure out how to put this in a more coherent manner... [01:43] sconover: if you imagine two db connections [01:43] DTrejo has joined the channel [01:43] sconover: and doing: dbOne.query("select * from person", function(row){ /* */ }) dbTwo.query("select * from house", function(row){ /* */ }) [01:43] sconover: each connection is firing its row callback as rows are ready [01:44] sconover: I'm trying to imagine writing a join implementation that pulls those rows together properly [01:44] blaines has joined the channel [01:45] sconover: but i think it's not possible, without some way of controlling how the callbacks fire... [01:46] sconover: I'm suspecting this sort of problem is what prompts stuff like the #pause method on the Readable Stream interface... [01:47] jesusabdullah: Sup y'all, having issues building node on my laptop. Anyone here knowledgeable in what the errors might mean? [01:47] sconover: sorry I'm just doing a lot of talking and trying to figure out if there's some sort of general problem that I'm hitting on... [01:48] jesusabdullah: https://gist.github.com/844842 [01:48] maushu has joined the channel [01:48] ryah: sconover: nah, you just need to think about it a bit [01:49] montylounge has joined the channel [01:49] jesusabdullah: ryah: You would know why my nodes aren't building! I just linked logs [01:49] ryah: some sort of buffer and/or push back is necessary, obviously [01:49] ryah: jesusabdullah: link? [01:49] jesusabdullah: https://gist.github.com/844842 [01:49] jesusabdullah: ryah: ^^ [01:50] ryah: jesusabdullah: os and gcc version [01:50] jesusabdullah: Fedora 12 [01:51] jesusabdullah: How do I get gcc version? [01:51] ryah: gcc --version [01:51] sconover: ok that makes sense. if i don't control the callers and they are just taking a simple callback function, with no provision for pushback, then that's a problem [01:51] jesusabdullah: ah [01:51] jesusabdullah: 4.4.4 [01:51] jesusabdullah: gcc 4.4.4 [01:52] sconover: anyway thx ryah [01:53] DTrejo: sconover: your code can handle the buffering / pushing back [01:53] MikhX has joined the channel [01:53] sconover: ...but if there's no mechanism for pushing back... [01:54] ratsbane has joined the channel [01:54] sconover: ...if it's just be providing a callback function... [01:54] DTrejo: oh, I suppose that's true in this case [01:54] extra11: this channel has sent over 5000 messages since yesterday [01:54] ryah: sconover: pause pushes back [01:54] extra11: quites included [01:54] sconover: sure the ideal is that db's provide resultsets that are like readable stream... [01:55] fairwinds has joined the channel [01:56] sconover: thanks everyone this has been helpful. [01:58] Siedrix: Dtrejo apparently web sockets only supports asci, i need to base 64 encode, before sending it [01:59] DTrejo: Siedrix: the binary data you get from the filereader is in a string I thought [02:01] DTrejo: Siedrix: http://jsfiddle.net/TnJQe/ [02:01] daveluke has joined the channel [02:02] jimt has joined the channel [02:03] joshholt_ has joined the channel [02:04] forzan has joined the channel [02:05] pyrony has joined the channel [02:05] amerine has joined the channel [02:07] jimt has joined the channel [02:09] iszak has joined the channel [02:09] iszak has joined the channel [02:09] charlenopires has joined the channel [02:09] bentruyman has joined the channel [02:10] davidc_ has joined the channel [02:13] lukegalea: rauchg_: Hey Guillermo. you around? [02:14] Siedrix: Dtrejo: thx, i will check how to upload them [02:14] DTrejo: Siedrix: that demo should work in your browser [02:14] dnolen has joined the channel [02:14] DTrejo: Siedrix: but you'd send it all as one chunk to the server [02:15] Siedrix: DTrejo: the text one or the binary one? [02:16] Siedrix: Dtrejo: should i create a buffer with it? [02:17] zemanel has joined the channel [02:18] okuryu has joined the channel [02:19] DTrejo: Siedrix: well, once you have it on the server you can make a buffer out of it somehow right? [02:19] DTrejo: and then you can fs.write it to the filesystem [02:19] DTrejo: and see if that works [02:19] CrypticSwarm has joined the channel [02:19] dthompson has joined the channel [02:20] rauchg_: lukegalea [02:20] rauchg_: yo [02:20] tim_smart: Alright [02:20] tim_smart: Wrong chat [02:20] lukegalea: rauchg_: Thanks for getting back to me.. but I think I got it. Sorry for bugging you :) [02:20] rauchg_: the next time you bug me i'm just gonna _snap_ [02:20] rauchg_: j/k [02:20] rauchg_: np [02:21] rauchg_: let me know if you run into any other issues [02:21] lukegalea: rauchg_: hehee. Thanks! I appreciate it. In other news... man, it's crazy how many learnboost libraries I'm using. I really owe you a beer ;) [02:21] tanepiper: oh now it's a bit more active i'll ask again - is there any way to supress errors down the stack? For example I have this: https://gist.github.com/1c5ae2febdc17733960e [02:21] DTrejo: rauchg_++ [02:21] v8bot: DTrejo has given a beer to rauchg_. rauchg_ now has 2 beers. [02:21] rauchg_: v8bot++ [02:21] v8bot: rauchg_ has given a beer to v8bot. v8bot now has 16 beers. [02:22] rauchg_: while (true) v8bot--; [02:22] tanepiper: it's using request, i put a handler on my_request.req error to catch it, but the error still throws down the stack in net.js [02:22] DTrejo: v8bot-- [02:22] v8bot: v8bot is getting too many beers. Don't let v8bot get drunk! [02:22] broofa has joined the channel [02:22] doubletap has left the channel [02:22] joshholt_ has joined the channel [02:22] lukegalea: does v8bot keep track of who owes the beers? Or just the count? [02:23] tanepiper: yes, beers.txt [02:24] lukegalea: sweet [02:24] strmpnk has joined the channel [02:26] jimt has joined the channel [02:27] luke`_ has joined the channel [02:28] briznad has joined the channel [02:28] DTrejo: v8bot --help [02:29] tanepiper: ryah: any ideas ^^ ? https://gist.github.com/3a12a07be12082284e94 is my code to the question and as you can see i handle the error for a ECONNREFUSED but it still fires in net.js as well [02:34] sconover has joined the channel [02:35] Yuffster_work has joined the channel [02:39] jimt_ has joined the channel [02:44] c4milo has joined the channel [02:48] jesusabdullah: ryah: Any ideas re: What I'm doing wrong with that compile? I don't mean to be hasslin' [02:48] ryah: jesusabdullah: hm. well, it's a v8 bug [02:48] jesusabdullah: Hmm :S [02:49] ryah: tanepiper: just heading out. can you email the list? [02:49] jesusabdullah: Would it help if I built 4.1.0 instead of from HEAD ? [02:50] ryah: probably not [02:50] jesusabdullah: Okey-doke :( [02:50] vnguyen has joined the channel [02:51] ryah: jesusabdullah: i'll give you a patch [02:51] jesusabdullah: awesome [02:51] drudge: za [02:52] ryah: jesusabdullah: https://gist.github.com/844883 [02:52] alystair has joined the channel [02:52] alystair: hi, I'm getting build errors [02:52] ryah: jesusabdullah: curl https://gist.github.com/raw/844883/7c6785ac43d55b3bd2d483e61e676722ab04fc66/0001-turn-off-strictaliasing-for-v8.patch | git am [02:53] ryah: jesusabdullah: you have to reconfigure [02:53] tanepiper: ryah: yea will tomorrow nearly 3am here [02:53] alystair: Build failed: -> task failed (err #2): {task: libv8.a SConstruct -> libv8.a} [02:53] ryah: ACTION is away now [02:53] alystair: I can no longer make node :S [02:53] alystair: this is from a clean clone from joyent/node.git [02:53] jesusabdullah: Looks familiar [02:54] jesusabdullah: alystair: Maybe try that patch ryah linked me. I had a similar problem. [02:54] jesusabdullah: since he's running out [02:54] jesusabdullah: If it *is* the same problem, it's apparently a bug in v8 [02:55] ziro` has joined the channel [02:55] Me1000 has joined the channel [02:56] alystair: heh [02:56] alystair: wow that's good coincidence :) [02:58] alystair: ok seems to be making away now :) [02:58] alystair: wow that's great [02:58] alystair: oh wow fix from ry himself, fancy [03:01] Ratty_: Noob question: I just installed 'pg' with "npm install pg" but when I fire node up and do "require('pg');" it says: Cannot find module 'pg' [03:01] Ratty_: Did I miss a step? [03:02] DTrejo: Ratty_: their package.json may be broken [03:02] Ratty_: hmm [03:03] Emmanuel_ has joined the channel [03:03] [[zz]] has joined the channel [03:03] lemonhall has joined the channel [03:03] arnorhs has joined the channel [03:04] Ratty_: I dunno, it looks okay to me [03:05] tmzt: v8bot: v8bot? [03:05] v8bot: tmzt: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [03:05] tmzt: v8bot: v commands [03:05] v8bot: tmzt: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [03:06] tmzt: v8bot: `v commands [03:06] v8bot: tmzt: Use v8: to evaluate code or "`v commands" for a list of v8bot commands. [03:06] lemonhall: v8bot, 'v commands [03:07] Ratty_: Could nvm be breaking it? [03:07] redmind has joined the channel [03:09] Ratty_: Hmm require.paths doesn't contain the path to where npm installs stuff [03:09] Ratty_: That's a bit lame [03:11] Ratty_: So, does nvm not support npm? [03:11] alystair: what's nvm [03:11] dguttman_ has joined the channel [03:11] Ratty_: Node Version Manager [03:12] tmzt: how do you get a string containing /'s in express as a parameter? [03:12] tmzt: with a regex? [03:13] Ratty_: If I add "require.paths.push('/Users/Ryan/.npm')" to my init code then it works, but that's a horrible hack just to support npm. [03:15] raidfive has joined the channel [03:17] Eber has joined the channel [03:19] icey has joined the channel [03:20] maushu_ has joined the channel [03:22] sleeplessinc has joined the channel [03:23] hij1nx has joined the channel [03:23] zemanel has joined the channel [03:23] bruse has joined the channel [03:23] bingomanatee has joined the channel [03:24] stonecobra has joined the channel [03:28] nilsson has joined the channel [03:31] sonnym has joined the channel [03:31] mike5w3c_ has joined the channel [03:32] themiddleman has joined the channel [03:33] c4milo has joined the channel [03:35] themiddleman has joined the channel [03:38] Ratty_: Is it possible to install npm system wide rather than in my home directory? [03:38] SubStack: --global [03:38] SubStack: if that patch has landed yet [03:38] Ratty_: Oh [03:39] Ratty_: Why does it tell me to install using 'sudo' but then installs to my home directory anyway. Seems a bit dumb. [03:39] Ratty_: This doesn't work: sudo make install --global [03:39] dominictarr has joined the channel [03:41] strmpnk has joined the channel [03:42] dylang has joined the channel [03:43] Ratty_: meh [03:43] Ratty_: npm is a tricky beast to install [03:46] Ratty_: woot finally. [03:48] sleeplessinc has joined the channel [03:48] unomi has joined the channel [03:48] unomi has joined the channel [03:53] sprout has joined the channel [03:56] bentruyman has joined the channel [03:58] robotarmy has joined the channel [03:59] possibilities has joined the channel [03:59] Astro has joined the channel [03:59] Utkarsh has joined the channel [04:02] Evet has joined the channel [04:03] Viriix has joined the channel [04:03] razvandimescu has joined the channel [04:05] perlmonkey2 has joined the channel [04:18] wilmoore has joined the channel [04:21] ryah: https://gist.github.com/844938 [04:21] ryah: ^-- one request to node [04:22] ryah: in syscalls [04:23] razvandimescu has joined the channel [04:24] mmattozzi: ryah: looks short and sweet [04:25] EyePulp has joined the channel [04:25] AAA_awright: I wonder how Nginx, Apache compares for static files [04:26] mmattozzi: I would imagine a lot goes down in apache before a file is served judging by the million ways you can configure httpd.conf [04:27] zorzar_ has joined the channel [04:29] ChrisPartridge has joined the channel [04:30] tmzt: mmattozzi: it was probably better before 2.0 [04:30] tmzt: when everything was compiled in [04:30] mmattozzi: I'd buy that [04:30] kwik101 has joined the channel [04:30] tmzt: razvandimescu: where's the source? [04:30] tmzt: ryah: [04:31] tmzt: how do you handle all the stuff the linker does first? [04:35] AAA_awright: mmattozzi: Scanning for the .htaccess files alone is at least a half dozen stat()s [04:35] tmpvar has joined the channel [04:35] AAA_awright: Nginx has quite a bit of caching by default I would imagine typically none [04:37] mmattozzi: AAA_awright: I guess it's really apples and oranges compared to node [04:37] ryah: tmzt: hm? [04:37] AAA_awright: mmattozzi: If you're trying to compare different functionalities, maybe -- But a simple "Hello World" I wouldn't say so [04:38] ryan[WIN] has joined the channel [04:39] amerine has joined the channel [04:40] mnot: mjr_: did you see that bug on node_pcap, by any chance? [04:42] ryah: ACTION realizes that ab sends http/1.0 requests without "connection: close" [04:42] ryah: er [04:42] ryah: connection: keep-alive [04:42] ryah: which means i can respond and close [04:42] sholmes has joined the channel [04:45] lemonhall has joined the channel [04:45] alystair: ryah: how many people have come here asking for your babies [04:45] tmpvar: all of them [04:46] SubStack: those node babies will fetch a good price on the black market [04:46] xastey: how can I run node as a service? [04:46] ryah: :P [04:46] alystair: I'm thinking of starting a node.js specific web host since it doesn't seem that market hasn't been expanded into yet [04:46] alystair: eg. ruby has heroku [04:46] SubStack: xastey: like this: node server.js [04:46] alystair: and they seemed to be doing well [04:47] xastey: yeah but that will only keep it running while in shell [04:47] SubStack: alystair: there are actually a ton of those but they're all in beta [04:47] lemonhall: xastey, node server.js & [04:47] xastey: wanted to make it a true service [04:47] alystair: they don't show up on google at all [04:47] alystair: SubStack: can you link me to any? [04:47] xastey: so it start ups on reboots and crap [04:47] SubStack: no.de, nodejitsu, nodester [04:47] lemonhall: xastey, just put it back with & [04:47] xastey: so thats how everyone does it in production [04:47] xastey: odd [04:47] alystair: oh joyent is also doing it :P [04:48] mmattozzi: are any of you guys using any of these node web hosts? [04:48] SubStack: oh and cloud9 has a beta thing too [04:48] mmattozzi: joyent has prime placement on the node.js page, doesn't it [04:48] SubStack: because joyent is paying ryah and isaacs to hack on it [04:48] Aria has joined the channel [04:49] mmattozzi: sounds pretty cool though, you push to it with git apparently [04:49] SubStack: git deploy! It's nice [04:49] alystair: that's what heroku does as well... [04:49] SubStack: doesn't work so well when you've got services running across a dozen servers though :/ [04:50] SubStack: pkrumins is working on that here at browserling [04:50] alystair: substack: I think twitter solved that issue [04:50] SubStack: oh? [04:50] alystair: with murder! [04:50] possibilities has joined the channel [04:50] SubStack: hah [04:50] alystair: http://engineering.twitter.com/2010/07/murder-fast-datacenter-code-deploys.html [04:50] alystair: no jokes :) [04:51] SubStack: neat [04:52] SubStack: although everything is on ec2 so we can just use snapshots and the ec2 api to manage releases [04:53] jesusabdullah: Ah, ec2 :/ [04:58] mmattozzi: oh, murder integrates with capistrano, that's awesome… I guess that makes perfect sense [04:58] DEVX_ has joined the channel [05:02] bentruyman has joined the channel [05:03] tmzt: git deploy == development/ git push origin ; cd ../alpha; git fetch development; git merge development ? [05:03] tmzt: or something else [05:03] tmzt: I just want to push development to alpha [05:03] Ratty_: Meh, node-amf seems to be too buggy for even basic usage [05:06] Ratty_: Unless there's a logical reason why the int 1112 would become 1082456 [05:07] ryah: pquerna: you here? [05:08] jakehow has joined the channel [05:08] ryah: ACTION wonders why https://gist.github.com/844938 top is faster than bottom [05:08] Metapony has joined the channel [05:08] elliottcable has joined the channel [05:08] Ratty_: Boo, will have to use Ruby. Ah well, ruby is cool too [05:08] rednul has joined the channel [05:09] viirya has joined the channel [05:11] Aria: ryah: Context switch timing, perhaps? [05:12] Aria: What OSes? [05:13] neekey has joined the channel [05:13] galaxywatcher_ has joined the channel [05:13] ryan2 has joined the channel [05:13] ryah: linux [05:13] ryah: epoll :) [05:14] ryah: Aria: actually i had that wrong [05:15] ryah: https://gist.github.com/844974 [05:16] ryan2: could someone help me with getting my npm path setup correctly, I keep getting Cannot find module for everything I install with npm [05:16] neekey_ has joined the channel [05:17] tmpvar: oh man, weld 0.2.0 is looking awesome, if i do say so [05:17] neekey_ has left the channel [05:18] redmind: weld? [05:18] tmpvar: http://github.com/hij1nx/weld [05:18] ryan2: People join this channel just to afk? No conversing or helping? [05:18] ljackson_ has joined the channel [05:18] tmpvar: ryah2 have you installed npm before on the same machine? [05:19] SubStack: npm config -s get root [05:19] SubStack: make sure that jives with $NODE_PATH [05:20] ryan2: "/usr/local/lib/node " [05:20] ryan2: Yes [05:20] ryan2: tmpvar: yes, I've had it working just fine, and restarted my terminal, and now none of my modules work. [05:21] tmpvar: hrm, did you happen to install npm in ~/local ? [05:21] SubStack: ryan2: you'll probably need to rebuild some packages [05:21] redmind: wow, weld looks awesome, cant believe i missed that [05:21] Aria: Okay, that's just weird, ryah. [05:21] SubStack: also npm doesn't do shims anymore [05:21] SubStack: so that will break stuff [05:21] SubStack: also npm doesn't use the `modules` field in package.json [05:21] SubStack: so that will break stuff [05:21] tmpvar: redmind, 0.2.0 is slick. no jquery, huge improvements on the debugging end, etc [05:22] tmpvar: more tests, and more win :) [05:22] tmpvar: trying to cut a release tomorrow evening [05:22] SubStack: ryan2: I would mv /usr/local/lib/node{,_} and start fresh [05:22] SubStack: easier than fixing your install [05:22] SubStack: or perhaps npm rebuild [05:22] SubStack: but I haven't had too much luck with that [05:23] ryan2: just "npm rebuild" [05:23] neekey__ has joined the channel [05:23] ryan2: SubStack: Still, Error: Cannot find module ... [05:24] Guest56655 has joined the channel [05:24] SubStack: npm rm modulename@ver; npm install modulename@ver [05:24] tmpvar: ryah, do a `which npm` [05:24] tmpvar: er.. ryah2 ^ [05:25] tmpvar: wow, ryan2 ^ [05:25] ryan2: tmpvar: /usr/local/bin/npm [05:25] redmind: ryan2: are you running on linux? [05:25] sprout has joined the channel [05:26] ryan2: redmind: os x snow leopard [05:26] dylang has joined the channel [05:27] lemonhall: Guest56655, ........ [05:28] ryan2: SubStack: Same issue after removing and installing [05:28] Guest56655: yeah i am argb [05:28] Guest56655: ning meng [05:29] rchavik has joined the channel [05:29] SubStack: ryan2: check the module's package.json [05:29] SubStack: which module by the way? [05:29] softdrink has joined the channel [05:30] borgling has joined the channel [05:30] ryan2: SubStack: socket.io [05:30] SubStack: o_O [05:31] SubStack: quite odd, I have the latest version installed and running fine [05:31] ryan2: What am I looking for in package.json? [05:31] SubStack: ryan2: can you load any other modules? [05:31] ryan2: SubStack: Nope [05:31] SubStack: I already looked, it uses the new style with `main` [05:33] ryan2: Anyone care to help me remotely with TeamViewer? [05:34] eyesUnclouded has joined the channel [05:35] ryan2: SubStack: What did you want me to look for in package.json? [05:35] SubStack: ryan2: I already looked, it's fine [05:35] SubStack: your install is messed up [05:35] ajnasz has joined the channel [05:37] dominictarr has joined the channel [05:38] langworthy has joined the channel [05:39] binarypie has joined the channel [05:40] neekey_ has joined the channel [05:45] dnyy has joined the channel [05:46] andrewfff has joined the channel [05:49] mjr_ has joined the channel [05:54] alystair: http://www.fusionio.com/products/iodriveoctal/ <- I want one of these so bad :D [05:56] kollektiv has joined the channel [05:56] kollektiv has joined the channel [05:57] samcday: alystair: Nom nom nom nom. [05:57] samcday: Bet that thing is like 10k+ per unit [05:57] alystair: 1,180,000 read/write IOPs [05:58] alystair: oh probably more [05:58] devrim has joined the channel [05:58] samcday: I just want an SSD, period [05:59] samcday: Still haven't forked out for one. [05:59] tmpvar: i have a 40g flopping around in my desktop [05:59] tmpvar: I use it for crysis ^_^ [05:59] samcday: tmpvar: Do you use it as os bootable? [06:00] samcday: And swap? [06:00] tmpvar: nope [06:00] tmpvar: no swap [06:00] samcday: It'll wear it out faster, but would be worth it IMO [06:00] tmpvar: yeah, i dunno. i've got 12g of ram in this thing [06:01] samcday: True... Probably worth getting more ram than an SSD... [06:01] tmpvar: at 40 gigs, yeah.. [06:02] tmpvar: i dont boot that often, and generally dont need ubar speed (tm) so its fine for gaming [06:02] samcday: Good point. [06:03] mscdex has joined the channel [06:04] neekey__ has joined the channel [06:06] DTrejo has joined the channel [06:10] w0rse_ has joined the channel [06:12] tbranyen: I can't seem to figure out how to wrap an eventemitter class to pass back in my arguments [06:12] neekey has joined the channel [06:13] tbranyen: http://pastie.org/1608874 [06:13] tbranyen: example code [06:13] tbranyen: that i have [06:13] tbranyen: Assertion failed: (handle_.IsEmpty()), function Wrap, file /usr/local/include/node/node_object_wrap.h, line 39. [06:13] tbranyen: Is the error i get [06:14] Viriix has joined the channel [06:14] jesusabdullah: Guys! Guys! [06:14] jesusabdullah: https://github.com/jesusabdullah/plolt [06:15] jesusabdullah: I can plot things interactively with node.js! [06:15] tbranyen: nice! [06:15] jesusabdullah: In a way I've never before thought possible :D [06:15] jesusabdullah: This is pretty much a toy example, but it's already so awesome :D [06:18] pyrony has joined the channel [06:18] AAA_awright: jesusabdullah: LINKPLEASE [06:19] AAA_awright: Oh I see [06:19] jesusabdullah: :D [06:19] jesusabdullah: Try it out! It's just an express app, basically [06:19] jesusabdullah: well, express/dnode [06:19] jesusabdullah: I think if I spiffy this up some it could be a compelling npm module [06:19] SubStack: jesusabdullah: paste the live demo link too [06:19] jesusabdullah: Oh, I took that one down [06:19] jesusabdullah: You gotta do it intereactively [06:19] jesusabdullah: Actually [06:20] jesusabdullah: sure [06:20] tmpvar: man, i lose against uglify [06:20] SubStack: tmpvar: check out jsmin [06:20] jesusabdullah: http://li225-26.members.linode.com/ This is being updated with a random function [06:20] AAA_awright: jesusabdullah: Can you list the required dependencies, I don't have "dnode" [06:20] AAA_awright: Where do I find that? [06:20] jesusabdullah: umm [06:20] SubStack: it's super easy, if far from optimal [06:20] jesusabdullah: npm install dnode [06:20] tmpvar: SubStack, yeah.. [06:20] SubStack: jesusabdullah: package.json, yo! [06:20] jesusabdullah: dnode, express, jade [06:20] AAA_awright: jesusabdullah: Call me old fashioned but I don't use npm [06:20] jesusabdullah: should take care of them [06:20] jesusabdullah: orly? [06:21] jesusabdullah: You should check it out. It makes things so much easier [06:21] AAA_awright: No. [06:21] tmpvar: SubStack, jsmin sucks :P [06:21] tbranyen: AAA_awright: heh people like you are making my job right now hard [06:21] tbranyen: lol [06:21] SubStack: ACTION calls AAA_awright old fashioned [06:21] jesusabdullah: Why not, AAA_awright ? [06:21] SubStack: tmpvar: but the use-case is nice at least [06:21] tbranyen: i need to override waf install [06:21] AAA_awright: It's a mess of code that what I'm writing doesn't play nicely with. [06:21] tmpvar: SubStack, i'm trying to optimize based on uglify.. which is interesting [06:21] AAA_awright: Seriously I just need the Git clone URLs [06:22] jesusabdullah: github.com/substack/dnode [06:22] jesusabdullah: You'll also need express [06:22] jesusabdullah: github.com/visionmedia/express [06:22] jesusabdullah: and jade [06:22] jesusabdullah: github.com/visionmedia/jade [06:22] AAA_awright: Awww I think I already tried installing Express [06:22] AAA_awright: I know Jade [06:23] joshholt_ has joined the channel [06:23] neekey_ has joined the channel [06:24] AAA_awright: I seriously wish people could move to URI package names that would make life so much easier [06:25] tmpvar: AAA_awright, take it up with CommonJS. I completely agree though [06:25] tmzt: SubStack: the indentation is killing me [06:25] tmpvar: namespacing of packages seems good and bad [06:25] tmzt: I want to make :javascript conditional [06:25] joshholt_ has joined the channel [06:25] tmzt: hmm, lexer is happy now [06:26] AAA_awright: CommonJS is nice for loading libraries, no different than dlopen right? [06:26] AAA_awright: Not in functionality [06:26] AAA_awright: But for resolving what to download [06:27] jakehow has joined the channel [06:29] tmpvar: they havent really defined a client side way for modules/packages to work [06:29] AAA_awright: I think I'll have this over qith quicker if I just write my own managed directory engine [06:30] AAA_awright: Fancy name for package manager I guess :p [06:30] tbranyen: tmpvar: i thought require.js was written to be commonjs compliant? [06:30] dspree has joined the channel [06:30] dspree has joined the channel [06:31] SubStack: node compliant > commonjs compliant [06:31] tmpvar: tbranyen, from what i understand from the ml, they havent reached a consensus yet [06:31] tbranyen: i don't know what that means [06:32] jesusabdullah: SubStack: pushed a package.json, fwiw [06:32] tmpvar: people arguing between patching the source of XHR, module.define, and friends [06:32] SubStack: rawk! [06:32] tmpvar: basically the pain evolves from how scripts are loaded in the browser as apposed to node ;) [06:32] tbranyen: tmpvar: http://requirejs.org/docs/commonjs.html [06:32] tbranyen: ahhh [06:32] SubStack: too much bike shedding [06:32] tmpvar: yeah, join the ml.. those dudes are crazy [06:33] tmpvar: its like.. [06:33] SubStack: but hey lookit: http://github.com/substack/node-browserify [06:33] tmpvar: we cant eval, because the stacks suck. [06:33] tmpvar: we cant assume someone is going to run their scripts through a build process before serving [06:33] tmpvar: we cant make everyone wrap their modules with a function (module.define) [06:34] tmpvar: and i think there is one more, but i forget [06:34] SubStack: haha lame [06:34] jesusabdullah: the commonjs guys feel like professional bikeshedders to me [06:34] jesusabdullah: idk why [06:34] jesusabdullah: I hardly pay attention to them [06:34] jesusabdullah: no offense to commonjs people [06:34] SubStack: yeah I have the same impression [06:34] extra11: 5403 messages in here since earlier today...this place is really active lol [06:34] SubStack: except I don't mind offending them [06:34] SubStack: fuck commonjs! [06:35] tmpvar: they have the best of intentions.. its just REALLY hard to follow along [06:35] cloudhead: it's cause all they have to work with is a spec [06:35] cloudhead: not an implementation [06:35] tmpvar: right [06:35] tmpvar: and the implementation drives it [06:35] tmpvar: unfortunately, the options i mentioned before are what the options are (implementation wise) [06:35] tmpvar: and nobody can agree [06:35] cloudhead: play around with specs for too long, you're gonna become a bikeshedder [06:35] SubStack: if nobody can agree then the organization should split [06:35] jesusabdullah: I like coming up with an idea, trying to implement it, then seeing what sucks and fix it [06:36] SubStack: until everybody can agree [06:36] cloudhead: jesusabdullah: exactly [06:36] jesusabdullah: I don't like trying to guess everything that will suck first [06:36] cloudhead: that's how you know if you were right or wrong [06:36] tmpvar: fail fast! [06:36] AAA_awright: jesusabdullah: Do you have a screenshot or something? :-/ [06:36] jesusabdullah: It's REALLY HARD and you almost never can guess right on everything [06:36] cloudhead: code -> spec [06:36] SubStack: jesusabdullah: what are you doing in engineering then? [06:36] jesusabdullah: AAA_awright: Not yet. I'll write a blog tomorrow. [06:36] tbranyen: oh sweet turns out i don't need to wrap the C++ classes anyways [06:36] tbranyen: passing references is good enough :D [06:36] jesusabdullah: AAA_awright: BUT: http://li225-26.members.linode.com is basically the same code, just updating on its own [06:37] SubStack: those crazy engineers and their protracted plans! [06:37] jesusabdullah: SubStack: Good question! I sat through Senior design listening to all this stuff about "waterfall design" and Iw as like, "wow, what a bunch of bullshit." [06:37] dnolen has joined the channel [06:37] jesusabdullah: I mean, SOMETIMES you have to do it right the first time [06:37] SubStack: haha awesome [06:37] SubStack: rarely [06:37] jesusabdullah: Like, if the cost of failure is really high [06:37] jesusabdullah: Like [06:37] jesusabdullah: if you're making a car [06:37] SubStack: even spacecraft blow up sometimes [06:38] jesusabdullah: Yeah [06:38] jesusabdullah: Actually, that's a good example [06:38] SubStack: you can only do stuff right the first time that you've already done before [06:38] SubStack: which is hardly the first time! [06:38] jesusabdullah: making spacecraft is a very careful and conservative venture because people don't want to screw up [06:38] jesusabdullah: But EVEN SO [06:38] jesusabdullah: Even with the so-called "waterfall" method, nobody's ACTUALLY waterfalling [06:38] jesusabdullah: because they just start with last year's model [06:39] SubStack: I'm glad that people like John Carmack are building dangerous spacecraft now [06:39] jesusabdullah: lol, yeah :D [06:39] SubStack: it's the only way the field will move forward [06:39] tmpvar: ^_^ [06:39] jesusabdullah: My brother was telling me about a mutual acquaintence that's a space case [06:39] tmpvar: carmack is getting old though.. *ducks* [06:39] jesusabdullah: like, definitely going to work for NASA [06:39] neekey_ has joined the channel [06:39] jesusabdullah: Apparently, within like 10, 20 years, things may be different because the old guys are gonna retire and the young guys are itching to get messy/make mistakes [06:39] brianc has joined the channel [06:39] jesusabdullah: which would be cool [06:40] jesusabdullah: but then again, it's NASA [06:40] SubStack: jesusabdullah: hah yeah, waterfall is actually a really protracted iterative cycle [06:40] jesusabdullah: ;) [06:40] jesusabdullah: Yeah, exactly. There's no such thing as a completely non-iterative cycle, unless you don't follow through. It's just a matter of HOW QUICKLY you iterate [06:40] andrewfff has joined the channel [06:40] jesusabdullah: and about how important not fucking up is, versus how important improving quickly is [06:41] SubStack: unless somebody were to start from complete scratch every time [06:41] SubStack: and I mean COMPLETE scratch [06:41] SubStack: they'd have to figure out a system of ethics first [06:41] SubStack: and divise some system of mathematics [06:41] SubStack: hopefully they would stumble upon empiricism [06:41] mjr_: develop cave paintings [06:41] jesusabdullah: In order to bake a cake from scratch, first create the universe? [06:42] SubStack: agriculture somewhere in there too [06:42] SubStack: waterfall! [06:42] SubStack: reinventing the wheel [06:43] SubStack: literally! [06:43] mjr_: heh [06:43] mjr_: Hopefully they'd be allowed to invent the wheel at least once. [06:43] mjr_: And then, totally DRY. [06:43] mjr_: Do NOT EVER REPEAT YOURSELF [06:43] SubStack: but there are stone wheels, wooden wheels, composite wheels [06:43] SubStack: hah [06:44] jesusabdullah: butter wheels [06:44] redmind: cheese wheels [06:44] jesusabdullah: :D [06:44] SubStack: whichever comes first you're stuck with forever! [06:44] SubStack: cheese wheels on carts [06:44] mjr_: Also, inventing your own wheels gives you a deep appreciation and understanding of how wheels work and what makes a good one. [06:44] mjr_: I love reinventing wheels. [06:44] ryah: have people used --trace before? [06:45] ryah: it' so awesome [06:45] SubStack: holy crap! neat [06:45] mjr_: You can't --trace the repl it seems [06:45] SubStack: and it was there ALL ALONG [06:46] mjr_: Oh, but you can --trace the repl if you use node_g [06:46] ryah: some days i really like node [06:46] ryah: :) [06:46] tmpvar: lol [06:46] mjr_: What do you get if you run this: node_g --trace -e '1;' [06:47] mjr_: I get: node_g(35442) malloc: *** error for object 0x101028408: incorrect checksum for freed object - object was probably modified after being freed. [06:47] tbranyen: lol trace is way overkill for what i do [06:47] ryah: % node_g --trace -e "1;" | wc -l [06:47] ryah: 17527 [06:47] ryah: % node --trace -e "1;" | wc -l [06:47] mjr_: Huh. I get 17716. I wonder why the difference. [06:47] ryah: 17504 [06:48] mjr_: But also that curious error at the end. Do you get that? [06:48] ryah: no [06:48] ryah: sounds like a problem [06:49] tmpvar: ah, trace is pretty handy [06:49] tmpvar: segfaults, but handy ;) [06:50] mjr_: so it's not just me [06:50] mjr_: tmpvar, OSX? [06:50] tmpvar: yeah [06:50] jesusabdullah: Holy crap! My housemate left some soup in a thermos for like 2 weeks, and it just EXPLODED all over his room [06:50] mjr_: ryah's favorite [06:50] jesusabdullah: Posting pictures asap, hold on [06:50] tmpvar: jsdom/test$ node --trace runner.js [06:51] abraham has joined the channel [06:51] jesusabdullah: How long as --trace been there? [06:52] mjr_: quite a while [06:52] dustym has joined the channel [06:52] jesusabdullah: That's pretty neat! [06:52] tmpvar: works find on linux [06:52] tmpvar: fine* [06:52] mjr_: There are a bevy of options lurking in v8 [06:52] dominictarr has joined the channel [06:52] jimt has joined the channel [06:52] mjr_: tracing and dumping and reporting on everything you might like [06:53] tmpvar: can you do a valgrind dump? [06:53] jesusabdullah: http://www.flickr.com/photos/jesusabdullah/5477820413/ [06:53] jesusabdullah: I know it's not on-topic, but this is awesome. [06:56] ryah: jesusabdullah: disgusting [06:56] ryah: :) [06:56] SubStack: io is not defined >_< [06:56] ryah: deliciously disgusting [06:57] SubStack: silly socket.io, why you gotta use `this` for scoping like that [06:57] jimt_ has joined the channel [06:58] jesusabdullah: ^___^ [06:59] tmpvar: ryah, would you accept a patch for repl history? [06:59] andrewfff has joined the channel [07:00] ncb000gt has joined the channel [07:01] tmpvar: ryah, meaning: dropping a ~/.node_history for keeping around commands after the repl explodes [07:02] ncb000gt: tmpvar: +1 [07:02] saschagehlich has joined the channel [07:03] therrg has joined the channel [07:04] neekey_ has joined the channel [07:04] NuckingFuts has joined the channel [07:04] abraham has joined the channel [07:05] meso_ has joined the channel [07:06] siong1987 has joined the channel [07:07] dustym has joined the channel [07:08] bmc has joined the channel [07:11] pyrony has joined the channel [07:11] neekey__ has joined the channel [07:13] braddunbar has joined the channel [07:14] argb has joined the channel [07:15] dustym has joined the channel [07:18] jimt has joined the channel [07:20] herbySk has joined the channel [07:24] argb: :) [07:26] argb: when will the nodejs 1.0 come out? [07:26] ncb000gt: I think the aim is probably for around NodeConf...out of suspicion. [07:26] ncb000gt: Probably a few months or so [07:27] neekey has joined the channel [07:28] jimt has joined the channel [07:28] AAA_awright: Has anyone started a Node.js IRC client for day-to-day use? [07:28] AAA_awright: I'm seeing lots of client libraries but no pretty UIs [07:28] ncb000gt: AAA_awright: no idea [07:28] AAA_awright: ncb000gt: Is that idea of interest to you then? [07:29] ncb000gt: AAA_awright: well, i believe the only gui based system that has made significant headway was the ncurses lib [07:29] ncb000gt: there were some gtk bindings but that has pretty much stagnated afaik [07:29] ncb000gt: and there aren't any bindings to QT [07:29] AAA_awright: I'm talking about a web browser client [07:29] AAA_awright: Mostly [07:29] ncb000gt: aha [07:29] ncb000gt: gotcha [07:29] ncb000gt: :) [07:29] AAA_awright: A curses UI would be nice too I guess [07:30] AAA_awright: Or one that I can attach my Quassel client to, it's just a change in protocol [07:31] ncb000gt: yea, i don't know, i assume that some people would be interested in it, but i use irssi and it works fine. [07:31] mscdex: AAA_awright: i kinda started one. it's a node-ncurses example [07:31] redmind: could not one be very easily built on top of https://github.com/joewalker/cockpit ? [07:33] AAA_awright: What I'm thinking of would be a very slick UI that uses Socket.io, the new Desktop notification API, other desktop integrations, etc [07:33] jimt_ has joined the channel [07:33] AAA_awright: Auto /away when you close the broser [07:34] redmind: i think with most people here you will end up with a programmer art UI :P [07:35] stonebranch has joined the channel [07:35] neekey__ has joined the channel [07:37] Ratty_ has left the channel [07:37] jesusabdullah: Are we talkin' node irc client again? [07:37] AAA_awright: Me yeah. [07:37] jesusabdullah: Do it! [07:38] AAA_awright: I really don't have the time though >_> [07:38] jesusabdullah: All the pieces are there, you just have to mash 'em together in a sexy way! [07:38] jesusabdullah: I know, that's the thing! [07:38] AAA_awright: jesusabdullah: You can do it for me! [07:38] jesusabdullah: OOOOHHH NO [07:38] tmpvar: lol [07:38] tmpvar: we need bounties [07:38] jesusabdullah: I got a thesis to take care of [07:38] AAA_awright: It'll be great, you do all the work and I get all the benefit [07:38] jesusabdullah: Oh yeah, that sounds fabulous! [07:38] redmind: lol i almost went "ill do it" then looked at my project list, noop [07:38] AAA_awright: I can pay BitCoins [07:38] tmpvar: neg [07:39] tmpvar: you pay real dollers [07:39] tmpvar: lol [07:40] guillermo has joined the channel [07:40] tmpvar: guillermo, yo [07:40] guillermo: damiant [07:40] clarkfischer has joined the channel [07:40] guillermo: hi [07:40] clarkf has joined the channel [07:40] guillermo: tmpvar [07:40] guillermo: hi [07:40] tmpvar: nice work on mongoose [07:40] guillermo: thanks [07:40] rauchg-: nickserv :/ [07:41] rauchg-: hates me [07:41] tmpvar: i noticed that I had published the older version of mongoose to npm [07:41] tmpvar: node knockout was a crazy time, my bad man [07:41] dominictarr: hey, what does a "EPIPE, Broken pipe" mean? [07:42] dominictarr: i'm trying to PUT something into a couchdb [07:42] joshholt has joined the channel [07:42] jesusabdullah: Sounds like you have frozen pipes, dominictarr! Better get a plumber. [07:42] jesusabdullah: Umm, but, umm [07:43] tmpvar: dominictarr, thats like.. when the connection drops unexpectedly [07:43] dominictarr: ah. I should have POSTed it. that worked. [07:43] dominictarr: thanks. [07:45] joshholt has joined the channel [07:45] rauchg-: tmpvar haha no prob [07:45] rauchg-: it was [07:46] mikeal has joined the channel [07:48] joshholt has joined the channel [07:48] qFox has joined the channel [07:58] unomi has joined the channel [08:04] neekey__ has joined the channel [08:05] tmpvar: alright, i have to roll, but i leave you all with this: http://soundcloud.com/tmpvar/122310-tbts [08:06] mytrile has joined the channel [08:06] ncb000gt: tmpvar: needs way more wobble [08:06] ncb000gt: :) [08:06] tmpvar: :) [08:06] rauchg-: tmpvar [08:06] rauchg-: needs more cowbell [08:06] rauchg-: can you work some into it [08:06] tmpvar: of course [08:07] JimRoepcke has joined the channel [08:08] rauchg-: tmpvar i added a comment [08:09] tmpvar: rauchg-, thanks ;) [08:09] tmpvar: and with that, im out [08:13] MikhX has joined the channel [08:16] neekey has joined the channel [08:17] dustym has joined the channel [08:18] kwik101: rauchg: in mongoose can i remove 2 or more enddebed documents at one time? [08:19] kwik101: i stack on this [08:20] kwik101: i try pullAll but isnt wok [08:21] rogerat has joined the channel [08:21] CrypticSwarm has joined the channel [08:21] SubStack: it's rauchg-! [08:22] SubStack: ACTION is working on getting socket.io to work with browserify [08:23] neekey__ has joined the channel [08:24] SubStack: getting these pesky 'io is not defined' messages [08:24] jesusabdullah: tmpout: Needs from fresh rhymes to go on top of that fresh beat [08:24] tmzt: this is weird [08:24] tmzt: TypeError: undefined is not a function at CALL_NON_FUNCTION (native) [08:25] jesusabdullah: s/from/some/ [08:26] tmzt: but I'm not calling anything that could be undefined [08:26] SubStack: rauchg-: how does this even work in the socket.io browser code? The only definition I see for io is this.io = [08:26] SubStack: and then it does stuff like io.util = [08:26] rauchg-: SubStack ? [08:27] Jourkey has joined the channel [08:28] SubStack: rauchg-: https://github.com/LearnBoost/Socket.IO/blob/master/socket.io.js#L10,L40 [08:28] zomgbie has joined the channel [08:29] rauchg-: SubStack [08:29] rauchg-: this == window [08:29] SubStack: hmmm [08:29] SubStack: but only when you src="/socket.io.js" it [08:30] tmzt: browserfy uses eval? [08:30] SubStack: tmzt: browserify only wraps modules in a function so that require() works browser-side [08:30] tmzt: right, I forgot [08:31] tmzt: how can I trace to figure out what is causing that error? [08:31] venom00ut has joined the channel [08:31] jesusabdullah: node --trace tmzt [08:31] rauchg-: SubStack [08:31] SubStack: bah I hate how window gets special treatment in the scoping rules [08:31] rauchg-: why do you need to edit the client [08:31] rauchg-: from the server [08:31] rauchg-: is it for testing ? [08:32] stuross has joined the channel [08:32] SubStack: rauchg-: it's for packaging modules to make them work with browserify [08:32] SubStack: so you can var io = require('socket.io') on the browser-side [08:32] seivan: hmm [08:32] SubStack: so you don't have to pollute your global namespace [08:32] SubStack: since that gets hard to reason about [08:32] seivan: When writing to a socket, do I need to tell the socket I am finished writing for now? [08:33] seivan: Because my iOS project doesn't get it's "readData" method called but onSocket:didReadPartialDataOfLength:14 tag:2 [08:33] tmzt: not much help [08:34] SubStack: rauchg-: and also with this approach I can require('dnode-protocol') which requires 'traverse' so I'll only have to maintain one version of those for both the browser and the server-side code [08:35] neekey_ has joined the channel [08:36] msucan has joined the channel [08:36] SubStack: rauchg-: how about var io = this.io = { [08:37] SubStack: that would fix everything and I don't think it would break anything too [08:37] SubStack: testing... [08:37] matyr has joined the channel [08:38] seivan: Is there a callback for unfinished data? [08:38] seivan: socket.on "data" is for when data is finished I take it [08:38] SubStack: hah it works :D [08:39] iszak has joined the channel [08:40] SubStack: I can now do var io = require('socket.io/support/socket.io-client/socket.io').io; [08:40] SubStack: on the browser [08:40] SubStack: and it works! [08:41] matyr_ has joined the channel [08:41] redmind: that is one long ass require [08:41] redmind: but awesome [08:41] rauchg-: SubStack [08:41] rauchg-: nice [08:41] rauchg-: will do [08:41] SubStack: sweet! [08:41] SubStack: socket.io/browser.js would be nice too ^_^ [08:42] SubStack: dnode is going to have the same thing with dnode/browser [08:42] SubStack: and with the new way npm and require() work it's just a matter of throwing down a js file in the project root [08:44] GasbaKid has joined the channel [08:45] seivan: Hmm [08:45] seivan: Do you need to tell a socket you have finished writing somehow? [08:45] SubStack: seivan: do you need to flush? no [08:46] seivan: Well [08:46] SubStack: but oftentimes you need to .end() on a stream like with web requests [08:46] seivan: stream? I am just doing this [08:47] seivan: https://gist.github.com/db727bf1eb29c66273ee [08:47] mr_daniel has joined the channel [08:48] Flybyme has joined the channel [08:48] jesusabdullah: Oh, the new api it looks like [08:48] neekey has joined the channel [08:49] SubStack: seivan: when "subscribtion" [08:49] SubStack: subscription, you mean? [08:49] MikhX has joined the channel [08:49] SubStack: could be why it doesn't work [08:50] jesusabdullah: I agree. [08:50] SubStack: ACTION puts it to the floor [08:51] ph^ has joined the channel [08:51] seivan: SubStack: probably teag [08:51] seivan: ¨No [08:51] seivan: Ut does write [08:51] seivan: I mean it works with telnet [08:51] seivan: when I telnet I get the messages [08:51] seivan: but using it in the iOS project, I seem to only get onSocket:didReadPartialDataOfLength:83 tag:2 [08:51] SubStack: seivan: sounds like a problem with the client then [08:52] SubStack: not with the code you pasted [08:52] seivan: Hmm.. [08:52] seivan: Is there a callback inside socket.on "data", (packet) -> [08:52] seivan: for like.. when data is finished [08:52] SubStack: also buffers can come in 'data' events split up arbitrarily [08:52] SubStack: finished? no [08:52] zomgbie has joined the channel [08:52] SubStack: if you want to line-buffer, try this: [08:52] seivan: But how do you mean buffers can come in data events split up [08:53] seivan: Like unfinished buffers [08:53] MrTopf has joined the channel [08:53] SubStack: var Lazy = require('lazy'); Lazy(stream).lines.map(String).forEach(function (line) { /* ... */ }) [08:53] SubStack: npm install lazy first [08:53] seivan: eh ok? [08:53] seivan: why do I need that? [08:54] SubStack: because it looks like you want line-buffering [08:54] seivan: /*** Called when a socket has read in data, but has not yet completed the read. * This would occur if using readToData: or readToLength: methods. * It may be used to for things such as updating progress bars. [08:55] SubStack: not sure what you're citing [08:55] seivan: - (void)onSocket:(AsyncSocket *)sock didReadPartialDataOfLength:(CFIndex)partialLength tag:(long)tag { [08:55] seivan: I only get partials [08:55] tk has joined the channel [08:55] seivan: and only their length not their actual data [08:55] seivan: I should be getting; - (void)onSocket:(AsyncSocket *)sock didReadData:(NSData *)data withTag:(long)tag [08:55] seivan: But it never fires [08:55] SubStack: that doesn't sound like a node problem [08:56] seivan: Are you sure? Maybe node isn't telling it it's done [08:56] SamuraiJack has joined the channel [08:56] SubStack: it works in telnet, you say [08:56] SubStack: so yeah [08:56] SubStack: not a node problem [08:56] seivan: cool [08:56] seivan: That cuts 50% :) [08:56] seivan: Btw.. on what am I supposed to call end and 2) WHat's lazy for? [08:57] SubStack: are the `packet` objects line-buffered? [08:57] seivan: no, just raw text [08:57] SubStack: yes but [08:57] SubStack: how do you split up messages? [08:57] seivan: I just want this to get working first [08:57] seivan: I thought node had two socket callbacks, one for partial data, and one for all data finished [08:57] SubStack: no [08:57] seivan: the partial data builds up the object being sent, and the data finished sends it [08:58] SubStack: you might be thinking of throttling controls like pause() and resume() [08:58] mscdex: there's the 'end' event? [08:58] Kingdutch has joined the channel [08:59] SubStack: yes there's that when the other side closes the connection [08:59] neekey_ has joined the channel [08:59] mscdex: 'close' then? :p [08:59] SubStack: but seivan you shouldn't be doing this: socket.on "data", (packet) -> [09:00] SubStack: because packet may be buffered arbitrarily [09:00] seivan: I know [09:00] seivan: Like data can be split up [09:00] mscdex: ahh coffeescript! [09:00] redmind: hey substack in browserify, is a filter just a function that gets called on the string of code? so just take that as an arg and return the processed data? [09:00] seivan: SubStack: But for now, counting the "length" data I get back, I am using this just for getting the client to work out first [09:00] SubStack: redmind: yes exactly [09:00] redmind: ty [09:01] SubStack: seivan: and the lengths are also fine when you send data from ios? [09:01] seivan: yes [09:01] tmzt: guys too busy to try something for me? [09:02] SubStack: peculiar! Sounds like an ios problem still [09:04] jesusabdullah: maybe not tmzt? [09:04] pau|c has joined the channel [09:05] mraleph has joined the channel [09:07] mraleph: ryah: ping? [09:07] jimt has joined the channel [09:09] rogerat has joined the channel [09:14] dominictarr has joined the channel [09:15] SubStack: bwahahah! [09:15] SubStack: just got dnode v0.6 working with browser-side requires [09:16] neekey has joined the channel [09:17] Jourkey: how do i download a remote img to node.js? [09:17] Jourkey: to the server [09:17] SubStack: Jourkey: you can use http.get [09:17] SubStack: http://nodejs.org/docs/v0.3.8/api/all.html#http.get [09:18] GasbaKid has joined the channel [09:18] jetienne has joined the channel [09:18] Jourkey: thanks substack [09:19] dominictarr has joined the channel [09:19] muk_mb: hey, are any of you involved in the hiring process where you work? [09:19] insin has joined the channel [09:19] Jourkey: do i need to require http if I have express? [09:19] SubStack: Jourkey: yes [09:20] Jourkey: thanks again [09:20] dans has joined the channel [09:20] SubStack: muk_mb: I'm involved in everything where I work. [09:20] SubStack: just signed the paperwork to incorporate today in fact [09:21] muk_mb: are you solo? [09:21] SubStack: myself and my cofounder [09:21] muk_mb: cool [09:21] muk_mb: could you have a look at my resume and give me your thoughts? [09:22] jimt has joined the channel [09:23] SubStack: my thoughts on resumés are probably not shared by many employers [09:23] SubStack: just post a link anyhow thought [09:23] SubStack: s/t$// [09:24] muk_mb: http://goodwinlabs.no.de/resume.html [09:24] muk_mb: yeah I tend to get competing feedback, but at least it gives me stuff to think about [09:24] mickael has joined the channel [09:25] tmzt: jesusabdullah: hmm, not sure what that means [09:25] SubStack: muk_mb: I would roll the technologies used into the project lists [09:26] tmzt: SubStack: how difficult is that? you're in california? [09:26] SubStack: and drop the languages part entirely [09:26] muk_mb: SubStack: oh, and just say for each project "I used xxxx techs"? [09:26] tmzt: I need templates by the way, contribute for credits later [09:26] tmzt: jade+css :) [09:26] SubStack: muk_mb: yeah and then you have more room for the projects, which are the important parts [09:26] mscdex has joined the channel [09:27] neekey has joined the channel [09:27] SubStack: muk_mb: also more vertical whitespace around the items [09:27] dans has joined the channel [09:28] muk_mb: around which items? [09:28] dominictarr has joined the channel [09:28] jimt has joined the channel [09:29] SubStack: muk_mb: your projects should have some vertical whitespace around them [09:29] muk_mb: ah, kk [09:31] jesusabdullah: tmzt: I meant, I can try something for you [09:31] steffkes has joined the channel [09:31] mike5w3c_ has joined the channel [09:31] jesusabdullah: muk_mb: My advice: LaTeX makes beautiful documents, but HR departments like MS Word docs almost exclusively [09:32] tmzt: jesusabdullah: okay, http://a.jobitr.com , signup code node1 [09:32] tmzt: he, he, when i can get a convert to work that will be solved [09:32] jacobolus has joined the channel [09:32] jesusabdullah: Oh, and everything in bold should have another couple of ticks of vertical whitespace [09:33] jesusabdullah: tmzt: So, make an account? [09:33] tmzt: yeah [09:33] tmzt: don't worry about confirming it right now [09:34] jesusabdullah: It have me a broken link [09:34] jesusabdullah: http://a.jobitr.com/3dvmwn/confirm [09:35] tmzt: in email? [09:35] tmzt: it should just log you in [09:35] 45PABUK09 has joined the channel [09:36] mbrochh has joined the channel [09:36] mbrochh has joined the channel [09:36] jesusabdullah: Yeah, next to the "email" thing in the topbar [09:37] tmzt: oh, no [09:37] tmzt: did you get the Let's get started on the home page? [09:37] dominictarr has joined the channel [09:37] jesusabdullah: I saw it, but if I typed anything into it and hit the button, it told me I didn't have a propers code or something [09:37] tmzt: use that one to sign up [09:38] tmzt: right, click the invite code and enter node1 [09:38] jesusabdullah: ah [09:38] jesusabdullah: node1 [09:38] jesusabdullah: herp [09:38] GasbaKid has joined the channel [09:39] jesusabdullah: Now it says, "email exists" [09:39] jimt_ has joined the channel [09:39] tmzt: oops [09:39] svenlito has joined the channel [09:40] tmzt: hmm, you should be able to login [09:41] tmzt: it shouldn't be writing the emails to the db until the signup succeeds, I'll look into that [09:42] jesusabdullah: Trying to login top-right isn't doing anything neither [09:45] Yuffster_work has joined the channel [09:46] Wizek has joined the channel [09:46] tmzt: what does the uper right say? [09:47] mauritslamers: jesusabdullah: about the LaTeX vs Word: it is easy to generate RTF documents from LaTeX source [09:47] neekey_ has joined the channel [09:48] mauritslamers: mote HR departments won't know the difference between RTF and a Word file :) [09:48] mauritslamers: s/mote/more [09:48] tmzt: did you press enter or click login? [09:48] tmzt: mauritslamers: what do you know about producing word from html+css? [09:48] mauritslamers: s/more/most [09:48] jesusabdullah: True, but these same people also pick on boring formats [09:48] nook has joined the channel [09:48] jesusabdullah: tmzt: That I did! [09:48] aklt has joined the channel [09:49] mauritslamers: I would go the same route, using RTF [09:49] mauritslamers: there are quite a few html2rtf options, if I remember correctly [09:49] tmzt: I see the login, you should have the clippings page now [09:49] mauritslamers: either in Linux or in Perl etc... [09:49] jesusabdullah: No, no interesting page tmzt :( [09:50] dans has joined the channel [09:50] tmzt: jesusabdullah: try /private/clippings in the url [09:50] tmzt: it must not be redirecting [09:50] SubStack: going to have browserify check for a "browserify" field in package.json [09:51] jesusabdullah: requires me to log in [09:51] SubStack: if present, it will bundle according to those options \m/ [09:51] muk_mb: SubStack: hit refresh. Something morel ike that? [09:51] muk_mb: *more like [09:51] tmzt: jesusabdullah: what does the upper right say? [09:52] SubStack: muk_mb: yeah looks much better [09:52] jesusabdullah: tmzt: login [09:52] pquerna: ryah: tahoe, south lake. [09:52] tmzt: oh, so it's not working [09:52] jesusabdullah: *nod* [09:52] SubStack: it's so much easier to make a module system as one person [09:53] SubStack: no bikes to shed, just hack some shit up and see if it sticks [09:53] jesusabdullah: muk_mb: Looks better to me [09:54] muk_mb: thanks you two [09:54] SubStack: it took me like 2 minutes to decide how this should work [09:54] SubStack: anyhow! [09:55] muk_mb: also, joyent's node smartmachines = coolest shit ever [09:55] tmzt: muk_mb: if the resume editor was working that might help, it's all css/html :) [09:55] muk_mb: tmzt: oh the thing you're building? [09:57] tilgovi has joined the channel [09:57] redmind: substack: democracy has a way of... getting in the way :P tyrants work faster [09:58] tmzt: hmm, the d server is working [09:58] tmzt: I'll pull the password off it a minute [09:59] tmzt: okay, d.jobitr.com [10:00] SubStack: ACTION carves out a benevolent fiefdom on github [10:00] tmzt: jesusabdullah: your login should work on there, I don't know what's going [10:00] tmzt: on [10:01] tmzt: on a [10:01] jesusabdullah: Same behavior on d.jobitr :( [10:01] msch has joined the channel [10:02] redmind: is anyone using cluster? is it possible to use a different server for each worker, or can it only do duplicates of the master as workers? [10:02] tmzt: okay I removed both of them [10:02] tmzt: both of the accounts [10:02] tmzt: try on d [10:02] jetienne: v8: new String('foo') instanceof Object [10:02] v8bot: jetienne: true [10:03] jetienne: v8: 'foo' instanceof Object [10:03] v8bot: jetienne: false [10:03] mauritslamers: tmzt: it might be that there are quite nice OOXML exporters already [10:03] jetienne: silly js... how do i test if a var is an {} [10:03] redmind: typeof 'object' ? [10:04] jesusabdullah: tmzt: Same behavior [10:04] mauritslamers: jetienne: silly? [10:04] mauritslamers: jetienne: typeof(new String("")); [10:04] mauritslamers: v8: typeof(new String("")); [10:04] v8bot: mauritslamers: "object" [10:04] tmzt: ooxml wouldn't be too bad, it's xml+zip [10:05] jesusabdullah: tmzt: Going to sleep now. sorry I couldn't get all the way there! [10:05] tmzt: I know xsl converters [10:05] tmzt: jesusabdullah: that's cool, thanks anyway [10:05] jetienne: v8: typeof('goo')== typeof(new String("ddd)) [10:05] v8bot: jetienne: SyntaxError: Unexpected token ILLEGAL [10:05] jetienne: v8: typeof('goo')== typeof(new String("ddd")) [10:05] v8bot: jetienne: false [10:05] mauritslamers: tmzt: the only problem you might hit is that M$ has a tendency to never keep themselves to their own standards [10:05] jetienne: mouamoua :) [10:06] tmzt: mauritslamers: I just need to produce ms styles that match my css [10:06] tmzt: it won't work for custom css for easier (or at all) but I'm using a subset defined in json [10:06] mauritslamers: tmzt: I would expect that OOXML would provide some sort of a solution [10:07] dans has joined the channel [10:07] mauritslamers: jetienne: that is to be expected [10:07] mauritslamers: v8: typeof('goo') [10:07] jetienne: mauritslamers: how do i test if a var is an {} [10:07] v8bot: mauritslamers: "string" [10:07] jetienne: so String is not string ? :) yeah lets espect it :) [10:07] mauritslamers: jetienne: what context? [10:08] jetienne: mauritslamers: in javascript [10:08] redmind: using new String isnt the same as var foo = 'bar' [10:08] tmzt: v8: typeof(String) [10:08] v8bot: tmzt: "function" [10:08] tmzt: v8: typeof(new String) [10:08] v8bot: tmzt: "object" [10:08] tmzt: v8: typeof(new String()) [10:08] v8bot: tmzt: "object" [10:08] tmzt: v8: 'test' == new String('test') [10:08] v8bot: tmzt: true [10:08] tmzt: v8: 'test' === new String('test') [10:08] v8bot: tmzt: false [10:08] mauritslamers: jetienne: I mean: what could be expected? is it a function call? [10:09] tmzt: v8: 'test' === new String('test').toString() [10:09] v8bot: tmzt: true [10:09] tmzt: v8: 'test' == new String('test').toString() [10:09] mauritslamers: jetienne: what would be the other optional parameters? [10:09] v8bot: tmzt: true [10:09] jetienne: tmzt: nice [10:09] tmzt: v8: 'test' + new String('test') [10:09] v8bot: tmzt: "testtest" [10:09] tmzt: v8: 'test' + new String('test').toString() [10:09] v8bot: tmzt: "testtest" [10:09] mscdex: v8: 'test' === ''+(new String('test')) [10:09] v8bot: mscdex: true [10:09] mscdex: :p [10:09] jetienne: mauritslamers: i just wan the typ eof the var [10:09] tmzt: typeof(var) [10:10] jetienne: mscdex: js is good! :) [10:10] jetienne: tmzt: unfortunatly no :) [10:10] mscdex: v8: typeof typeof [10:10] v8bot: mscdex: SyntaxError: Unexpected end of input [10:10] mscdex: :D [10:10] redmind: lol [10:10] jetienne: typoeof is keyword not function :) [10:10] mscdex: [05:10] mscdex: "keyword" [10:10] mscdex: :p [10:10] mauritslamers: jetienne: I get the feeling you are trying to write a strong typed program in a non-strong typed language :) [10:11] tmzt: v8: typeof(typeof) [10:11] v8bot: tmzt: SyntaxError: Unexpected token ) [10:11] tmzt: v8: typeof '' [10:11] v8bot: tmzt: "string" [10:11] tmzt: v8: typeof ('') [10:11] v8bot: tmzt: "string" [10:11] mscdex: jetienne: but you can use it like a function [10:11] jetienne: mauritslamers: nope. just i want to check the type of the variable i get to avoid bugs [10:11] mscdex: heh [10:11] jetienne: v8: typeof.foo = bar [10:11] v8bot: jetienne: SyntaxError: Unexpected token . [10:11] jetienne: mscdex: no you cant :) [10:11] redmind: should be easy with typeof unless you are using new everywhere and creating objects instead of strings [10:11] mscdex: v8: typeof('foo') [10:11] v8bot: mscdex: "string" [10:11] jetienne: mscdex: funciton in js is even weirder :) [10:12] mscdex: ^ [10:12] mauritslamers: jetienne: the best way to do that is to use property checkers [10:12] mscdex: i like property chess better! [10:12] mscdex: :D [10:12] jetienne: ok i will keep looking i think i got a crowford post on this [10:12] mauritslamers: jetienne: there must be indeed [10:13] redmind: whats weird about functions in js? [10:13] venom00ut has joined the channel [10:13] jetienne: v8: var f = function(){}; f.foo = 'bar'; console.log(f.foo); [10:13] v8bot: jetienne: CONSOLE: ["bar"], OUTPUT: undefined [10:13] jetienne: redmind: find another language able to do that :) [10:14] redmind: yeah but i see that as a good thing :P [10:14] jetienne: redmind: this is a point of view :) [10:14] mauritslamers: output undefined? that is to be expected, functions return undefined by default [10:15] jetienne: v8: return 42; [10:15] v8bot: jetienne: SyntaxError: Illegal return statement [10:15] neekey_ has joined the channel [10:15] jetienne: i dunno what is the "OUTPUT" of v8bot [10:15] mauritslamers: v8: 42 [10:15] v8bot: mauritslamers: 42 [10:15] mscdex: v8: typeof(return) [10:15] v8bot: mscdex: SyntaxError: Unexpected token return [10:15] dans has joined the channel [10:15] mscdex: v8: use strict [10:15] v8bot: mscdex: SyntaxError: Unexpected identifier [10:16] mscdex: :o [10:16] therrg has joined the channel [10:16] mauritslamers: v8: var f=function(){ }; f.foo = 'bar'; console.log(f.foo); f.foo; [10:16] v8bot: mauritslamers: CONSOLE: ["bar"], OUTPUT: "bar" [10:16] mscdex: jetienne: it's just the value of the last statement [10:16] jetienne: mscdex: ah ok. thgx [10:16] mauritslamers: jetienne: JS is a functional language in many aspects, this is one of it [10:17] jetienne: mauritslamers: js is a crappy language [10:17] mscdex: :O [10:17] mauritslamers: jetienne: disagree [10:17] jetienne: mauritslamers: but it is supported by everybody [10:17] jetienne: mauritslamers: this is ok :) [10:17] mauritslamers: jetienne: JS is a great language, but has some cruft [10:17] jetienne: mauritslamers: note that all the authors of js agree with me :) [10:17] mauritslamers: very dangerous cruft [10:18] jetienne: mauritslamers: there is even books about how crappy it is by crowford [10:18] mauritslamers: but beneat it there is a really nice and powerful language [10:18] mauritslamers: jetienne: I know :) [10:18] nejucomo has joined the channel [10:18] jetienne: mauritslamers: not according to all the authors of js [10:18] redmind: try coffeescript maybe? [10:19] mauritslamers: but that is about the bad parts, which is to be expected if you have to design a language in TWO weeks time [10:19] jetienne: not trying to change it [10:19] tmzt: mocha [10:19] jetienne: js is still my current favorite... but clearly not because it is nice :) [10:19] jetienne: mauritslamers: js is like 15yo now :) [10:20] mauritslamers: I know, but you also know the back story of why it still is as it is? [10:20] jetienne: js is nice because you need to know it anyway due to web. nodejs makes it such you dont need another language in server [10:20] jetienne: and v8 made it fast [10:20] mauritslamers: v8 made it fast, but is rather good at the server side [10:20] jetienne: mauritslamers: 1. bunch of manager who beleive to know tech. 2. standard fighting [10:21] jetienne: im ranting instead of working :) no good :) [10:21] jetienne: not trying to change js [10:21] mauritslamers: jetienne: did you watch the yuiblog.com/crockford videos? [10:21] q_no has joined the channel [10:21] jetienne: mauritslamers: i guess when they came out [10:21] jetienne: mauritslamers: in anycase this guy agree with me on js is crap [10:22] jetienne: just the best crap we got :) [10:22] mauritslamers: jetienne: I am not asserting that, I only disagree with that JS is a crappy language. I agree there is cruft in the language, but there are a few very cool things about the language, one of which is that it is functional [10:22] mauritslamers: which makes it possible to do weird and great things [10:23] nejucomo1 has joined the channel [10:23] jetienne: mauritslamers: i understand. you dont believe js is crap. i understand that crowford and me believe otherwise :) [10:24] neekey has joined the channel [10:24] jetienne: ok ok i stop and go back on working [10:24] pdelgallego has joined the channel [10:24] jetienne has left the channel [10:25] redmind: crockford: "I don’t think you’ve heard me say it sucks, because that’s not my position, except occasionally when I’m echoing the sentiment of the market." [10:28] tmzt: hmm, I don't know what the issue actually was but d.jobitr.com signups should be working now [10:30] seivan: Hmm [10:30] seivan: Are you supposed to flush a socket or something to make sure the client know it has gotten all the data? [10:31] seivan: my iOS client (using AsyncSocket) only gets didReadPartialDataOfLength: called and not didReadData: when doing a request to google [10:35] seivan: has anyone here dealt with node.js and AsyncSocket (iOS)? [10:35] neekey__ has joined the channel [10:36] dipser has joined the channel [10:40] nejucomo has joined the channel [10:42] ayo has joined the channel [10:44] shimondoodkin has joined the channel [10:44] seivan: I added "\r\n" with every message and now it WORKS.. OH MY GOD I AM SO FURIOUS [10:48] daveluke has joined the channel [10:48] neekey has joined the channel [10:52] piscisaureus has joined the channel [10:53] nejucomo has joined the channel [10:55] piscisaureus: ryah: here? [10:58] xla has joined the channel [10:59] neekey_ has joined the channel [11:06] cnu has joined the channel [11:15] neekey_ has joined the channel [11:15] xla has joined the channel [11:17] superjudge has joined the channel [11:18] pdelgallego has joined the channel [11:18] seivan: Hmmm if I got a redis client subscribing, can I use that redis client to do other stuff as well? [11:18] liquidproof has joined the channel [11:19] seivan: Also can I save the socket on a persistant store and use it elsewhere ? [11:19] seivan: or is that just weird? [11:21] herbySk has joined the channel [11:22] d0k has joined the channel [11:23] mlncn has joined the channel [11:26] yumike has joined the channel [11:27] neekey has joined the channel [11:30] gozala1 has joined the channel [11:33] arkx has joined the channel [11:33] niklasfi has joined the channel [11:34] niklasfi: how do i set multiple cookies at once with node? [11:35] neekey_ has joined the channel [11:38] gozala has joined the channel [11:38] __tosh has joined the channel [11:39] neyric has joined the channel [11:41] freakyfractal has joined the channel [11:45] markwubben has joined the channel [11:48] neekey has joined the channel [11:52] yumike has joined the channel [11:53] venom00ut has joined the channel [11:57] francescop has joined the channel [11:57] jbpros has joined the channel [11:59] neekey__ has joined the channel [12:02] chapel: hmm [12:05] floby has joined the channel [12:06] Sebmaster has joined the channel [12:15] confoocious has joined the channel [12:15] neekey_ has joined the channel [12:19] Gruni has joined the channel [12:20] liar has joined the channel [12:25] mbrochh has joined the channel [12:25] mbrochh has joined the channel [12:27] dans has joined the channel [12:30] niklasfi has left the channel [12:39] novakiin has joined the channel [12:42] novakiin: num = 1234; [(num >> 8), num - (4 << 8)]; // [ 4, 210 ] [12:42] novakiin: Binary data: Is there a nicer way to get the bytes in JS / node than this pattern? [12:42] novakiin: (0x04 << 8) + 210; // 1234 [12:42] novakiin: Which then of course becomes this [12:43] Fullmoon has joined the channel [12:44] kristsk has joined the channel [12:44] shimondoodkin: maybe youre asking about Buffer? [12:44] daveluke has joined the channel [12:45] yumatov has joined the channel [12:45] novakiin: I use this with a buffer, yes... I think I am looking for an pack / unpack [12:48] Sebmaster: novakiin: Maybe this is something you need: https://github.com/rmustacc/node-ctype [12:49] novakiin: Sebmaster: This looks promising, thanks. [12:52] SubStack: bytes! [12:52] SubStack: novakiin: also http://github.com/substack/node-binary and https://github.com/substack/node-put [12:52] SubStack: if you like chaining [12:52] shimondoodkin: there was a nodejs pack module somewhere [12:54] novakiin: I am not that keen on chaining, but this two look interesting too, thanks [12:55] mscdex: https://github.com/pgriess/node-jspack [12:56] spetrea-home has joined the channel [12:57] Sorella has joined the channel [12:57] jetienne has joined the channel [12:57] jetienne: node_module makes my .git repos larger :) [13:02] redmind: make a .gitignore file and put node_modules in it [13:03] Sebmaster: jetienne: submodules? [13:04] tmzt: what's the standard way to do a class/function in a module as a prototype list? [13:04] tmzt: I'm missing something [13:04] jetienne: Sebmaster: submodules ? what is this ? [13:04] tmzt: oh, git submodules are confusing but very useful [13:04] jetienne: ah ok :)à [13:04] Sebmaster: jetienne: You can reference another repository in yours [13:04] tmzt: git submodule init [13:05] tmzt: git submodule add git:// lib/whatever [13:05] jetienne: hmm good point. maybe i could handle node_modules as git submodules [13:05] tmzt: git add lib/whatever with no / at the end [13:05] jetienne: Sebmaster: thanks [13:05] tmzt: then it puts the hashes in .gitmodules [13:05] jetienne: tmzt: try to remove one now :) [13:05] tmzt: I just delete them from the file and reinit [13:05] mscdex: i still wish github would pull in submodules during zip/tarball [13:05] mscdex: :( [13:05] tmzt: and then git remove lib/whatever [13:06] jetienne: tmzt: you need to edit .gitmodules and .git/config by hand [13:06] tmzt: jetienne: yeah, seems easiest [13:06] tmzt: can somebody help me with this syntax? [13:07] tmzt: var obj = function() { method1: function(), method2: function() } or however I do that [13:08] mscdex: tmzt: var obj = function() { /* constructor */ }; obj.prototype.method1 = function() {}; obj.prototype.method2 = function() {}; [13:08] tmzt: okay, so there's no {} shortcut [13:08] tmzt: got it [13:08] tmzt: what about fields? [13:08] mscdex: well you can if you want [13:08] tmzt: I'll just rewrite it [13:08] mscdex: obj.prototype = { method1: function(){}, method2: function(){} }; [13:09] tmzt: wonder why that didn't work [13:09] fairwinds has joined the channel [13:09] tmzt: obj = function() {} first? [13:09] mscdex: yeah [13:10] tmzt: got it [13:10] tmzt: I'm making a client for kissmetrics in node [13:11] tmzt: since they have php, python, etc. [13:11] pastak has joined the channel [13:14] jeromegn has joined the channel [13:15] DevX101 has joined the channel [13:16] Sebmaster: does anyone know, which path i have to provide to socket.io for the flash file, if using the socket.io-node module? [13:17] Sebmaster: tjholowaychuk: ping, ^ [13:18] ziro` has joined the channel [13:19] masahiroh has joined the channel [13:20] floby1 has joined the channel [13:21] Sebmaster: nvm, got it [13:22] dspree has joined the channel [13:22] dspree has joined the channel [13:26] Evet_ has joined the channel [13:26] Evet has joined the channel [13:30] vyvea has joined the channel [13:35] tahu has joined the channel [13:36] GasbaKid has joined the channel [13:37] heavysixer has joined the channel [13:40] everton has joined the channel [13:40] xandrews has joined the channel [13:44] fly-away has joined the channel [13:45] xandrews has joined the channel [13:45] fly-away has joined the channel [13:46] SubStack: huzzah, now browserify looks at the package.json much more closely [13:46] SubStack: and it looks for a special browserify field [13:46] scott2449 has joined the channel [13:46] Remoun has joined the channel [13:47] SubStack: to make require('dnode') work browser-side [13:48] tmzt: SubStack: do you have http.client working client side? [13:48] tmzt: or http.request [13:48] SubStack: not yet [13:48] SubStack: you need them for something? [13:48] tmzt: maybe, I'm trying to make a client for kissmetrics [13:49] tmzt: I want to use the same one on the client and server [13:49] tmzt: but I can just use theirs on the client so it's not huge [13:50] SubStack: want to hack one up and send me a pull request? [13:50] SubStack: just throw it in builtins/http.js with the rest of the compatability layers [13:51] tmzt: readyStage is the same? [13:51] tmzt: er [13:51] tmzt: let me clone it and take a look [13:52] hij1nx has joined the channel [13:53] SubStack: hah you don't even need to change any code in index.js since it just does fs.readdirSync(__dirname + '/builtins') [13:53] SubStack: forgot I put that part in [13:54] neynenmo has joined the channel [13:58] tmzt: how would you suggest handling the readyState changes to call the callback? [13:59] tmzt: I can take a quick look at jquery or another wrapper [13:59] tmzt: but I think you are using EventEmitters [14:00] SubStack: xmlhttp has readyState of its own [14:00] SubStack: can probably map that to what node has [14:00] tmzt: I see that, but I need to poll/setTimeout to wait and call the callback when data is ready [14:01] xandrews has joined the channel [14:01] SubStack: async xmlhttp has callbacks for that I thought? [14:02] tmzt: onreadystatechange, yeah [14:03] tmzt: so I make this an eventemitter? [14:04] SubStack: however the node version works [14:05] SubStack: you can just var EventEmitter = require('events').EventEmitter just like in node [14:06] tmzt: okay [14:06] tmzt: now wehe did that repo move? [14:07] arpegius has joined the channel [14:07] tmzt: so basically swap out socket for xhr [14:08] LarsSmit has joined the channel [14:08] SubStack: sure [14:09] shimondoodkin has left the channel [14:09] shimondoodkin has joined the channel [14:12] Sorella_ has joined the channel [14:16] mike5w3c has joined the channel [14:18] seivan: So is it possible to save a socket and use it again or is that just stupid? [14:19] ruxpin has joined the channel [14:23] herbySk has joined the channel [14:25] endian7000 has joined the channel [14:28] flow3r has joined the channel [14:32] binarypie has joined the channel [14:33] endian7000: does anyone know how to install npm with a custom prefix? [14:33] davidc_ has joined the channel [14:34] zzak: --prefix? [14:34] endian7000: instead of "/usr/local" [14:35] zzak: does --prefix flag not work? [14:35] SubStack: ./configure --prefix=$PREFIX [14:36] endian7000: npm, not node [14:36] neekey has joined the channel [14:36] endian7000: node works with with --prefix [14:37] endian7000: I've tried git clone ...; cd npm; make with PREFIX= and INSTALL_PREFIX= [14:37] endian7000: and --prefix doesn't work [14:37] endian7000: plan A: see if anyone happens to know [14:37] SubStack: set up a ~/.npmrc [14:37] endian7000: plan B: RTF code [14:37] SubStack: the readme talks about it [14:38] SubStack: you can set root, binroot, and manroot in ~/.npmrc [14:38] SubStack: and the node installer will notice [14:39] endian7000: thanks! [14:39] dans has joined the channel [14:39] endian7000: (the readme doesn't, but other doc files do) [14:39] SubStack: eh? I just checked the npm/README.md [14:40] SubStack: it was in there [14:40] tmzt: it's all mixed together in http.js [14:40] tmzt: I was trying to just write a wrapper for http.request but I can't seem to get the events right [14:40] SubStack: now if only there was a way I could stop event propagation [14:41] tmzt: how do you keep an eventemitter to use for .emit if you aren't one? [14:41] SubStack: hacking into http.Server's _events property so I can host up /dnode.js [14:41] tmzt: why? [14:41] tmzt: so it works without express? [14:41] SubStack: I can just server._events.request.unshift(myHandler) [14:42] SubStack: but then if my route matches I want to bury the rest of the events... [14:42] SubStack: tmzt: yeah pretty much [14:42] svenlito has joined the channel [14:43] tmzt: I don't really have browserfy or any big frameworks/modules in jobitr [14:43] tmzt: except express [14:43] tmzt: and jade [14:43] tmzt: and now my tmztKM client [14:44] SubStack: browserify is much smaller than jade [14:44] tmzt: sure, and I'll need it to get jade in the client [14:44] tmzt: just haven't figured out how templating is going to work in the editor [14:45] SubStack: oh neat! [14:45] tmzt: trying to avoid overengineering [14:45] SubStack: jade is in the tests so it should work [14:45] tmzt: d.jobitr.com make an account and play with builder :) [14:45] tmzt: I'm not bothering with the staging server right now [14:45] tmzt: it's not behaving [14:46] tmzt: but anyway, what I'm trying to do is create a template for the whole document or for parts of the documents and encode that into a json [14:46] SubStack: hahaha that unshift thing just works [14:46] tmzt: but I also want to be able to take data out of the jjson [14:46] tmzt: wow, so what is express for again? [14:46] tmzt: just do middleware like that :) [14:47] rhizo has joined the channel [14:47] mlncn has joined the channel [14:47] tmzt: I think your going to end up cutting down all the frameworks to nothing [14:47] tmzt: which is really what node is in the first place [14:47] SubStack: try that with browserify and you'll come crawling back! [14:48] SubStack: that is a properly hard problem [14:48] tmzt: try what? [14:48] SubStack: cutting down requiring node modules in the browser [14:48] tmzt: hmm [14:49] yawn has joined the channel [14:49] SubStack: actually brequire is pretty small [14:49] SubStack: but less node-compatable [14:50] tmzt: I'm going to test the http.request wrapper standalone [14:50] tmzt: just to get KM working [14:50] tmzt: if I get that I'll see if I can get events included [14:50] tmzt: right now it's just onreadystatechange, switch, 4: callback() [14:51] ceej has joined the channel [14:51] xandrews has joined the channel [14:55] dans has joined the channel [14:55] daveluke has joined the channel [14:57] Sebmaster has joined the channel [14:58] ratsbane has joined the channel [14:58] Viriix has joined the channel [14:58] PyroPeter has joined the channel [14:59] Alex3000 has joined the channel [14:59] JojoTheBoss has joined the channel [14:59] mAritz has joined the channel [15:01] erwe: how would you develope a multilanguage site with node? [15:01] erwe: would you save datas on a file or on a db? [15:02] shimondoodkin has joined the channel [15:02] arpegius has joined the channel [15:02] apoc has joined the channel [15:03] jetienne has joined the channel [15:05] unomi has joined the channel [15:07] dans has joined the channel [15:13] tmzt: erwe: accpet based middleware? [15:14] nobody_ has joined the channel [15:15] mynyml_ has joined the channel [15:15] mynyml has joined the channel [15:15] nobody_: hello. i need help with the cookies module. is it impossible to set two cookies at once? my browser only shows one [15:16] Astro has joined the channel [15:16] nobody_: here is soem sample code: https://gist.github.com/845287 the cookies are set in lines 48 and 49 [15:21] seivan: where can I read more about socket datatypes? [15:21] seivan: Like sessionid or is it sessionId? [15:21] seivan: I mean attributes* not datatypes [15:21] lukus has joined the channel [15:22] Jonasbn_ has joined the channel [15:23] tmzt: session? [15:24] seivan: Yeah? [15:24] seivan: or what it is called [15:24] dingomanatee has joined the channel [15:24] tmzt: you talking about socket.io [15:24] tmzt: not socket [15:24] seivan: What does the socket have for id then? [15:24] seivan: not socket.io, but node itself [15:24] tmzt: you have middleware for connect that handles cookies [15:24] seivan: Cookies? [15:25] seivan: Dude, I just want a unique identifier for a session, surely there is one? [15:25] tmzt: no [15:25] SubStack: sesame [15:25] tmzt: http is sessionless [15:25] seivan: NOT HTTP [15:25] tmzt: node is modular, I'm not sure what your asking [15:26] seivan: I am looking for a unique identifier for a socket [15:26] tmzt: you have to layer something on top [15:26] seivan: that is all [15:26] seivan: socket.sessionId <= that is it [15:26] seivan: Seriously are you? [15:27] bubbafat has joined the channel [15:27] tmzt: http://howtonode.org/heat-tracer [15:27] tmzt: Feb 21, 2011 ... interval_id_by_session_id[socket.sessionId] = setInterval(function () { var aggdata = {}; ... var dtp = dtp_by_session_id[socket.sessionId]; .. [15:27] seivan: No shit? I just told you [15:27] tmzt: okay, but session can mean a lot of differnt things [15:28] ChrisPartridge has joined the channel [15:28] tmzt: nevermind [15:29] Wizek: Hi! Is there significant differences between Node version 0.3.2 and 0.4.0 ? I'm planning on upgrading, but I want to know how much of my code do I need to rewrite... [15:30] shimondoodkin: the http is upgraded [15:31] tmzt: SubStack: what was I working on?? last I remember I was trying to report some basic metrics server side [15:31] SubStack: something to do with wrapping http so you can reuse some code [15:31] tmzt: hah that's the thing [15:31] tmzt: I got very districacted [15:32] tmzt: I was just trying to report a signup from the server [15:32] tmzt: then had to port a module to node [15:32] tmzt: then wanted to share code with the browser [15:32] tmzt: then asked you, then started on http stuff [15:32] endian7000: Wizek: https://github.com/joyent/node/blob/master/ChangeLog [15:34] Wizek: thanks shimondoodkin, SubStack and endian7000+ [15:34] Wizek: ! [15:37] askhader has left the channel [15:38] zomgbie has joined the channel [15:39] bentruyman has joined the channel [15:43] FireFly|n900 has joined the channel [15:45] krazyjakee has joined the channel [15:46] seivan: Hmm [15:46] seivan: is mranney redis client broken? [15:46] seivan: db.incr("user_id");db.get("user_id") [15:46] seivan: Gives me undefined [15:46] seivan: I have required redis, and I created a client for db [15:47] redmind: can you use typed arrays in node? [15:47] perlmonkey2 has joined the channel [15:49] redmind: hmm nope [15:49] seivan: ugh [15:49] seivan: is sessionId not inside node.js by default? [15:50] c4milo1 has joined the channel [15:51] synoptase`off has joined the channel [15:53] aphelion has joined the channel [15:53] aphelion has joined the channel [15:55] endian7000: seivan: you're using callbacks, right? [15:55] seivan: yeah [15:56] endian7000: is the incr reaching redis? [15:56] endian7000: do you know about the MONITOR command? [15:56] endian7000: you can run redis-cli and run the Redis command MONITOR [15:56] arnorhs has joined the channel [15:56] Spion__ has joined the channel [15:57] seivan: endian7000: aye [15:57] seivan: they get incr and getted [15:57] seivan: but I get undefined [15:57] seivan: but the values are there [15:58] seivan: db.incr("user_id") [15:58] seivan: userId = db.get("user_id") [15:58] seivan: Do I need to more then that? [15:58] endian7000: ah [15:58] endian7000: it's async [15:58] disq has joined the channel [15:58] seivan: Well it shouldn't be now :) [15:58] endian7000: db.get("user_id", function(err, reply){...}) [15:58] seivan: Not according to docs [15:58] seivan: https://github.com/mranney/node_redis/ [15:59] seivan: client.set("some key", "some val"); [15:59] endian7000: where in the docs? [15:59] Hello71 has joined the channel [15:59] Hello71 has joined the channel [16:00] endian7000: the whole point of NodeJS is for slow things (like a DB request) to be async [16:01] seivan: I see, so how good is that when you actually need the data before proceeding [16:01] endian7000: you should proceed in the callback [16:02] seivan: I am [16:02] seivan: it's still undefined [16:02] endian7000: reply is undefined? [16:02] seivan: https://gist.github.com/add846369e95bed3959e [16:02] seivan: gonna try something [16:02] endian7000: debugObject isn't indented properly [16:02] endian7000: you're calling it before line 2 gets executed [16:02] seivan: it's supposed to be outside. [16:03] endian7000: there's some confusion in your mind about JavaScript or callbacks or async [16:03] endian7000: it's not [16:03] seivan: https://gist.github.com/60e983040d1aad2692b6 [16:03] krazyjakee: anybody looking for video game projects at the moment? [16:03] seivan: endian7000: neither debugs get the number the redis-cli has [16:04] markstory has joined the channel [16:05] endian7000: L12 should work, L13 can't possibly [16:05] andrewfff has joined the channel [16:05] endian7000: I'd recommend debugging .get (or your model thereof) in a small code fragment that does nothing else [16:05] krazyjakee has left the channel [16:06] endian7000: krazyjakee: is it FOSS? [16:06] seivan: endian7000: https://gist.github.com/a5b173a419f3bc4e3973 [16:06] seivan: Not even that worked [16:06] seivan: It's insane [16:06] seivan: However I can print it inside the block [16:07] stagas: seivan: you can't return from a callback [16:07] endian7000: it's not insane -- your model of what's going on needs improvement [16:07] seivan: db.get("user_id", (err, obj) => [16:07] seivan: @userId = obj.toString(); [16:07] seivan: ) [16:07] seivan: debug @userId [16:07] seivan: Should that not work? [16:07] stagas: no [16:07] endian7000: that should not work [16:08] seivan: @userId is declared before that [16:08] erabuj has joined the channel [16:08] endian7000: the callback is a function which gets called later [16:08] stagas: lol [16:08] seivan: oh damn [16:08] endian7000: here's how your code gets exec'd: [16:08] seivan: Oh [16:08] seivan: Got ya [16:08] endian7000: .get is called [16:08] endian7000: debug @userId [16:08] endian7000: then MUCH later (a few ms later), the callback is invoked [16:08] seivan: is there a way to ensure UserId is set? [16:09] seivan: @userId* [16:09] stagas: continuing inside the callback [16:09] stagas: of a .set or .incr or whatever [16:09] DevX101 has joined the channel [16:09] seivan: what? [16:09] endian7000: do whatever you want inside the callback -- anything executed before that has no access to the DB response [16:09] endian7000: because it hasn't come yet [16:09] seivan: Ok [16:10] seivan: But that does not ensure my stuff is being set before I use it elsewhere [16:10] endian7000: then don't use it elsewhere until after that callback [16:10] seivan: how can I tell that the callback has finisheD? [16:10] endian7000: have your other stuff be invoked from the callback [16:10] seivan: ugh [16:11] seivan: that won't work [16:11] endian7000: check out the async package on NPM [16:11] jimt has joined the channel [16:11] endian7000: it can help with some use cases [16:11] endian7000: good luck getting used to the wonderful world of async [16:11] seivan: ehm thanks.. I guess [16:11] seivan: It's horrible to be honest [16:11] redmind: streamlinejs [16:11] seivan: user = new User(socket) [16:11] seivan: users[user.userId] = user [16:11] redmind: if you cant bear async, i <3 callbacks tho [16:11] seivan: That's how it looks like [16:12] seivan: I need that user id before the second line [16:12] endian7000: then put that second line in a callback [16:12] endian7000: new User socket, (user) -> [16:12] seivan: I can't really get it out of the socket connected connected callback [16:12] SubStack: now just waiting for the 'var io = this.io = ...' update to go live in socket.io before I publish dnode 0.6 [16:12] nook has joined the channel [16:13] seivan: endian7000: will that callback also be async [16:13] seivan: meaning it will be called later? [16:13] themiddleman has joined the channel [16:14] endian7000: unlike Rails (*cringe*), there's no magic to NodeJS / JS [16:14] endian7000: it does exactly what you say [16:14] seivan: eh [16:14] seivan: and what is that? you didn't answer the question [16:14] seivan: will that callback be async as well? [16:14] endian7000: if you're having trouble understanding the implications of your JS, [16:14] endian7000: I highly recommend the book "JavaScript: The Good Parts" [16:14] seivan: ok ok [16:14] seivan: BUT [16:14] stagas: callbacks are not async, i/o is async [16:15] stagas: code is sync [16:15] seivan: user = new User, -> can I dothat ? [16:15] SvenDowideit has joined the channel [16:15] seivan: Also will stuff in that callback have access to a full user or some parts of it? I am reffering to the userId that isn't done yet [16:15] seivan: Will that callback be called when the User callbacks are done? [16:16] herbySk has joined the channel [16:16] seivan: endian7000: still here? [16:16] endian7000: if you're unclear on how exactly JS works, fix that first [16:16] seivan: Fix what? [16:16] redmind: when the callback is called it will have the complete data [16:16] endian7000: that unclarity [16:16] jimt has joined the channel [16:17] seivan: endian7000: egh [16:17] seivan: redmind: Cool thanks man, at least you jumped in [16:17] endian7000: the .get callback will be executed with the response [16:17] endian7000: and you can have it invoke whatever you want [16:17] endian7000: e.g. a callback that was passed to User's constructor [16:17] seivan: I am sorry I don't follow? I am not taljing about the get [16:18] seivan: I am trying to realize where I can get a user that has complete data [16:18] Flybyme has joined the channel [16:18] JoeF__ has joined the channel [16:18] SvenDowideit has joined the channel [16:18] seivan: And in THAT callback (user = new User(..), -> ) will it still be async? [16:19] redmind: cant avoid async once you hit IO, no way around it [16:19] redmind: sync methods will lock up the eventloop [16:20] seivan: https://gist.github.com/89f49c71d1d8ffff2dc3 [16:20] seivan: Is that the right way around it? [16:20] endian7000: side note: you need to do (INCR,EXEC) inside a MULTI/EXEC [16:20] endian7000: *INCR,GET [16:20] seivan: endian7000: why? I thought they were already atomic [16:21] dyer has joined the channel [16:21] seivan: Why would I need transacations for thaT? [16:21] slickplaid: This is for redis? [16:21] endian7000: *facepalm* [16:21] redmind: is 'user' defined somewhere else? [16:21] seivan: endian7000: thanks [16:21] endian7000: each one is atomic [16:21] endian7000: but the pair isnt [16:21] seivan: endian7000: ah you mean both together in multi? [16:21] seivan: yeah got that covered [16:21] endian7000: if two servers did (incr, get) at once [16:21] seivan: redmind: Nah I defined it again [16:21] seivan: new User socket , user -> [16:21] endian7000: Redis could run INCR, INCR, GET, GET [16:22] redmind: you have to wrap callback arguments in () [16:22] redmind: even in CS [16:22] seivan: yeah I know I just wrote that in here [16:22] seivan: :) thanks anyway [16:22] redmind: lol [16:23] seivan: But let me get my head around this [16:23] seivan: the callback for the new user will only run it's code when it's "done" with it's own stuff [16:23] seivan: Could I get the socket out of it; https://gist.github.com/f8e14df71ad679fd6445 [16:24] endian7000: seivan: https://gist.github.com/845361 [16:25] redmind: that third line is outside the callback block and will die with "property userId of undefined does not exist" [16:25] jimt has joined the channel [16:25] endian7000: but I highly recommend reading all of "JavaScript: The Good Parts" and watching a few of Ryan's NodeJS talks [16:25] seivan: endian7000: I will [16:25] seivan: the book anyway [16:25] endian7000: or skimming the 2009 and 2010 slides linked to from nodejs.org [16:25] strmpnk has joined the channel [16:26] seivan: https://gist.github.com/7d7b704dd55cd2e14335 [16:26] seivan: debug "We are in a callback now" does not get called [16:26] lgl has joined the channel [16:27] endian7000: then that depends on how you implemented User [16:27] redmind: im going to assume User doesnt have an arg for the callback function [16:27] scott2449 has joined the channel [16:27] redmind: thats the problem with async, its contagious [16:28] endian7000: gtg -- good luck mastering JS! [16:28] slickplaid: lol [16:28] seivan: thanks man endian7000 [16:28] seivan: endian7000: Your example is missing an argument [16:30] redmind: ya, should be @constructor: (socket, callback) -> [16:31] seivan: https://gist.github.com/2a089b67ff42895e2e8d [16:31] jimt_ has joined the channel [16:31] seivan: https://gist.github.com/6a6f61575634b5d8ae95 [16:32] tim_smart has joined the channel [16:32] redmind: that should work yup [16:32] seivan: nein [16:32] seivan: user.userId is undefined [16:33] seivan: lol [16:33] redmind: absolutely everything that uses the data has to be isnide the callback :( [16:33] seivan: I went async again [16:33] flukes1 has joined the channel [16:33] seivan: I mean looked passed it [16:33] seivan: I added the callback this inside the get callback [16:34] xandrews has joined the channel [16:34] seivan: there we go, just now fix the 500 other problems. But atleast I know how to grasp my head around it [16:34] seivan: thanks redmind and endian7000 [16:34] seivan: food now [16:34] redmind: later [16:34] endian7000: btw, your try/catch in User is a bit crazy [16:34] flukes1: anyone know how to install npm to ~ [16:34] flukes1: instead of / [16:34] endian7000: the catch will never be run [16:34] zomgbie has joined the channel [16:35] endian7000: flukes1: I want to do the same thing [16:35] dans has joined the channel [16:35] endian7000: I gave up partway through [16:35] endian7000: but npm/doc/config.md looks useful [16:35] flukes1: I did it with an old version but I can't remember how [16:35] flukes1: pretty sure I just used the one line installer and removed the "sudo" [16:35] endian7000: {root,binroot,manroot} [16:35] flukes1: they must've broken that [16:36] endian7000: flukes1: can you pmsg me when you get it working? [16:36] flukes1: ya [16:36] endian7000: thanks! [16:37] bentruyman has joined the channel [16:38] daveluke has joined the channel [16:38] jimt has joined the channel [16:39] robotarmy has joined the channel [16:43] flukes1: ah seems to be a bug [16:43] flukes1: it breaks if ~/bin is a symlink (mine is a symlink to ~/local/bin) [16:44] randallagordon_ has joined the channel [16:45] MrTopf has joined the channel [16:46] flukes1: endian7000: remove ~/bin symlink, export PATH=$PATH:~/local/bin, then install npm and it works. dunno if that'll work for you [16:47] flukes1: and don't put the symlink back - npm basically dies in a fire if ~/bin exists and is a symlink. need to report that as a bug [16:51] c4milo1 has joined the channel [16:51] Evet_ has joined the channel [16:54] Jourkey: is there a node module [16:54] Jourkey: that allows for compression of imgs [16:54] Jourkey: using stuff like pngcrush [16:56] DTrejo has joined the channel [16:57] nivoc has joined the channel [16:58] ngs has joined the channel [16:58] aho: optipng + deflopt ;> [16:59] aho: (optipng = faster version of pngcrush, deflopt = general deflate optimizer) [16:59] hornairs has joined the channel [17:03] scott2449 has joined the channel [17:03] Viriix has joined the channel [17:04] matthewford has joined the channel [17:05] matthewford has joined the channel [17:06] stonecobra has joined the channel [17:09] Evet has joined the channel [17:13] scott2449: I'm starting to read up on and play with node, it seems like the client portion of the http api is not documented.. am I crazy? [17:13] Jourkey: cool thx [17:14] endian7000: scott2449: http://nodejs.org/docs/v0.4.1/api/all.html#http.request [17:14] endian7000: flukes1: thanks! [17:14] franck34: hi [17:14] malkomalko has joined the channel [17:15] franck34: got a really strange thing. I'm using sesame for session. When i console.log(req.session), i can see data in the session [17:15] stonecobra: I love make -j - took node building from 3.5minutes to 28 seconds on my MacPro [17:15] endian7000: Jourkey: you could invoke optipng as a subprocess [17:15] franck34: but when i console.log(JSON.stringify(req.session)), it return {} [17:15] franck34: without data [17:15] franck34: ?? [17:15] scott2449: thanks [17:16] boaz has joined the channel [17:16] Flybyme has joined the channel [17:16] nivoc has joined the channel [17:17] franck34: http://pastebin.com/WxF9Eztj [17:17] franck34: weired [17:18] franck34: console.log(req.session); --> show data from the session [17:18] franck34: console.log(JSON.stringify(req.session)); --> show {} rather than data [17:18] Sebmaster: franck34: is req.session a special datatype in sesame? [17:19] franck34: Sebmaster: i didn't check, but sound something like that [17:19] Sebmaster: because json.stringify wont stringify functions [17:19] dingomanatee: Anyone out there looking for node work? [17:19] franck34: dingomanatee: no close to this idea [17:19] dingomanatee: I have no idea what that means [17:20] franck34: i'm "looking" for node work [17:21] dingomanatee: let me know when there are no air quotes around the "looking". [17:21] franck34: k [17:23] bluesnoop has joined the channel [17:27] krazyjakee_ has joined the channel [17:28] krazyjakee_ has left the channel [17:28] mmattozzi: franck34: you might want to try util.inspect() if you want to log a function [17:29] langworthy has joined the channel [17:33] polotek has joined the channel [17:34] rfay has joined the channel [17:35] stonecobra has left the channel [17:35] Evet_ has joined the channel [17:35] stonecobra has joined the channel [17:36] c4milo1 has left the channel [17:36] tmzt: now how are they supposed to track identity in an event based system like node? [17:37] fr0stbyt3 has joined the channel [17:38] tmzt: rfay: you work for dreamhost? [17:38] fr0stbyt3: anyone know why jsdom would encounted an unexpected < character right after a successful callback? simplest. code. ever. https://gist.github.com/845412#comments [17:38] rfay: tmzt, certainly not. Why do you ask? [17:39] neynenmo has joined the channel [17:39] tmzt: rfay: how is node being supposed as a long running daemon now? [17:39] tmzt: I know they were talking about ruby last time I did a site on ther [17:39] tmzt: supported [17:39] rfay: tmzt, no idea. But nothing of that type really ever works out on DH. Better to get a small VPS. [17:39] tmzt: seems to be my experience [17:40] rfay: tmzt, However, if you get *their* VPS, it would be OK. [17:40] tmzt: I've got a vps now and am getting a micro instance aws soon [17:40] tmzt: just wondered [17:41] polotek: fr0stbyt3: try something besides google.com, their markup can be challenging [17:42] tmzt: polotek: how do you think jsdom would handle parsing innerHTML from a div and converting to a json format? [17:42] franck34: mmattozzi: well, in fact i just want to send the content of a session using json. But seem's there is something tricky in sesame so i can't use JSON.stringify directly [17:42] tmzt: assuming I wanted to match the classes to fields in the json [17:42] devrim has joined the channel [17:42] seivan: Hmm [17:43] fr0stbyt3: polotek: I have, same thing [17:43] seivan: What is the best way to make sure you send a message to every socket except the one sending [17:43] seivan: socket != this_socket ? [17:43] Evet has joined the channel [17:45] jetienne has joined the channel [17:45] lakin has joined the channel [17:47] Sorella has joined the channel [17:48] raidfive has joined the channel [17:48] erabuj_ has joined the channel [17:49] dingomanatee: Found a bug in mongoose schema - TJ? [17:50] mackry has joined the channel [17:50] mackry: What's the command to check the node version? [17:50] dingomanatee: node -v [17:51] void_ has joined the channel [17:51] mackry: Thanks dingo [17:51] Aria has joined the channel [17:51] dingomanatee: Where do you go to report bugs on Mongoose? [17:52] polotek: dingomanatee: https://github.com/LearnBoost/mongoose [17:52] endian7000: https://github.com/LearnBoost/mongoose/issues ? [17:52] marcello3d has joined the channel [17:52] [AFK] has joined the channel [17:52] polotek: tmzt: I don't use jsdom much right now. Just offering helpful suggestions [17:53] [AFK] has left the channel [17:55] fr0stbyt3: simple page still fails in jsdom. http://eric.muyser.com/test/ also takes about 10 seconds so it must be hitting a timeout. error line is: Script.runInContext(code, ctx, filename). [17:56] franck34: not sure but ... https://github.com/substack/node-sesame/issues/1 [17:56] Me1000 has joined the channel [17:56] Evet_ has joined the channel [17:57] fr0stbyt3: decent alternative to jsdom that works? [17:58] mjr_ has joined the channel [17:58] polotek: fr0stbyt3: what are you trying to do? [17:58] polotek: there are other html parsers for node [17:59] polotek: jsdom is the only thing that is providing a more full-featured "browser on the server" environment though [17:59] mackry: fr0stbyt3: perhaps: http://documentcloud.github.com/underscore/ [17:59] Aria: Ooh. Which parser are you using, fr0stbyt3? [18:00] xastey has joined the channel [18:00] Aria: (I'm the author of the HTML5 parser) [18:00] mackry: Anyone ever experience an npm install taking more than 5+ min and using half your processor [18:00] fr0stbyt3: Aria: code examples above, jQueryify https://gist.github.com/845412#comments [18:00] Aria: Ah, I just came in. [18:01] herbySk has joined the channel [18:01] MrTopf has joined the channel [18:01] polotek: mackry: Ha, no. Sounds like a problem [18:01] fr0stbyt3: maybe this usage is outdated.. second [18:01] Aria: Hm. Sounds like you're using one of the less robust parsers. [18:02] mackry: polotek: I get this, node cli.js install npm info it worked if it ends with ok npm info using npm@0.3.9 npm info using node@v0.5.0-pre [18:02] mackry: And it just hangs there [18:03] fr0stbyt3: Aria: looks like you're right, switched to "env" instead of jQueryify and it isnt choking on the simplest test ever anymore [18:03] Aria: Ah, cool. Poke me with code if it breaks. I'm roughly familiar with the guts of jsdom, and much with my parser of course. [18:04] fr0stbyt3: Aria: I'm not familiar with jsdom having separate parsers, do you have a repo? [18:05] Hello71 has joined the channel [18:05] Hello71 has joined the channel [18:05] Aria: https://github.com/aredridel/html5/ [18:05] perlmonkey2 has joined the channel [18:06] Aria: jsdom doesn't actually include any parser, but it uses a simplistic, fast and dirty one by default. [18:06] softdrink has joined the channel [18:06] redmind has joined the channel [18:06] Aria: The html5 parser is a bit slower (Thanks, V8 string creation speed!), but in theory, should never bomb on any input. [18:06] Aria: (The HTML5 parser spec is AWESOME, handles every edge case.) [18:06] Viriix has left the channel [18:06] fr0stbyt3: Aria: great, thank you [18:07] Aria: Sure thing. [18:08] SamuraiJack has joined the channel [18:09] jetienne: they had years of experience :) [18:12] davidwalsh has joined the channel [18:12] flukes1 has left the channel [18:13] marcello3d: curious, how many node.js'ers in nyc? any hackdays or meetups worth checking out? [18:13] astropirate has joined the channel [18:13] Imperion has joined the channel [18:13] Imperion: gremlin, I say [18:14] Imperion: why [18:14] Imperion: why should Connect's compiler module suddenly start throwing up? [18:14] marcello3d: Aria: is html5 a superset? [18:14] Imperion: my Less code works [18:14] Imperion: everything should be fine [18:14] marcello3d: oh. [18:14] Imperion: but all I get is "undefined" [18:15] Aria has joined the channel [18:15] tim_smart: ryah: Is the https.Server usable yet? [18:15] Imperion: and [18:15] Aria: marcello3d: A superset of .../ [18:15] Aria: ? [18:15] Imperion: /usr/lib/node/.npm/connect/0.5.10/package/lib/connect/middleware/errorHandler.js:84 [18:15] tim_smart: About to do some API implementation [18:15] Imperion: .split('\n').slice(1) [18:15] Imperion: ^ [18:15] Imperion: TypeError: Cannot call method 'split' of undefined [18:15] Imperion: at /usr/lib/node/.npm/connect/0.5.10/package/lib/connect/middleware/errorHandler.js:84:30 [18:15] Imperion: at fs:84:13 [18:15] Imperion: at node.js:773:9 [18:15] zemanel_ has joined the channel [18:16] fr0stbyt3: Aria: is my jsdom just pure fail? html5 example simply runs with no output. https://gist.github.com/845453 [18:16] astropirate: Could someone tell me why this modual inheritance isn't working? I have modual Mew (http://pastie.org/1610421) inheriting from modual Moo (http://pastie.org/1610423). It gives me a runtime error: "TypeError: Object function Moo() { console.log('Moo Constructor reached'); } has no method 'arg'" [18:17] stonecobra: tim_smart: I am using it in development, https seems great, no issues on Mac OS X that I have seen [18:17] stonecobra: 14564444 [18:17] stonecobra: 30. [18:18] marcello3d: would this be my bug or socket.io's? [18:18] marcello3d: (node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit. Trace: [18:18] marcello3d: at Socket. (events.js:101:17) [18:18] marcello3d: at [object Object]. (/usr/local/lib/node/.npm/socket.io/0.6.10/package/lib/socket.io/client.js:83:20) [18:18] tim_smart: stonecobra: Brilliant. [18:18] Aria: Let me see if the API's changed, fr0stbyt3. I've neglected the example. [18:18] marcello3d: Aria: superset of prior "htmls" [18:19] fr0stbyt3: why are people not using a pastebin or something, wth [18:19] Aria: marcello3d: Not a strict superset, and certainly not SGML like prior HTML versions. It codifies all the tricks that browsers use to parse the markup soup people actually write, though. [18:19] marcello3d: fr0stbyt3: for 3 lines of log? [18:19] marcello3d: aria: does it have the notion of "strict" like before? [18:19] Aria: 3 lines is considered the maximum for 'polite' IRC. [18:19] venom00ut has joined the channel [18:20] marcello3d: agreed [18:20] Aria: marcello3d: Kinda. Not really. All input yields a valid DOM. Whether it's the DOM you want is another matter. It'll emit a TON of warnings, some even for very good code, and there's no 'hard fail' like XML dialects of HTML. [18:20] Aria: fr0stbyt3: The example script should give you

Hello, World!Hi!

[18:20] Aria: [18:21] marcello3d: hmmm, why warnings on good code? [18:21] mape: Hmm jsdom doesn't seem to feel well [18:21] Aria: marcello3d: Because authors do funny things. [18:21] mackry: hmm? npm ERR! Error: EEXIST, File exists './.npm/npm/0.3.9/package/bin/npm.js' [18:21] Aria: Or similar, depending on your path to jquery -- but do a git submodule update --init in there, fr0stbyt3. [18:21] Aria: (If you got it by git) [18:21] fr0stbyt3: Aria: well you can see in my gist, the path to jquery is just your example. so, something wrong with jsdom on my env? [18:22] fr0stbyt3: wait [18:22] Aria: fr0stbyt3: No, you just need to complete the checkout. git submodule update --init [18:22] Aria: Stupid git submodules aren't as automatic as one would want. [18:22] fr0stbyt3: this opens something in a browser? [18:22] Aria: Nope. No browser. [18:22] marcello3d: odd, I had to run npm update multiple times before it actually said everything was up to date [18:23] fr0stbyt3: it unfocuses my terminal, and switches to coda (where i have .htm/html set). sec [18:23] fr0stbyt3: when i run the example [18:23] Aria: Now that's bizarre. I don't even know how that would happen. [18:24] Aria: marcello3d: npm 0.3 is a rough transition, since it requires package.json to be REAL json now. Some modules don't update right because of that. [18:24] pauls has joined the channel [18:24] marcello3d: ah, is that why I'm seeing "Error: undefined log message" stack traces [18:24] fr0stbyt3: nvm, sorry, no change. git submodule update & node example.js do nothing [18:24] marcello3d: for a couple modules [18:25] mack has joined the channel [18:25] possibil_ has joined the channel [18:26] Aria: fr0stbyt3: was that --init, or just git submodule update ? [18:26] pauls: Asynchronous iteration patterns in Node.js: http://metaduck.com/post/2675027550/asynchronous-iteration-patterns-in-node-js [18:26] fr0stbyt3: Aria: oops, sorry, updating now [18:26] Aria: (Man, I need to throw a real error there. Guess I know what I'm doing this afternoon for the html5 code!) [18:26] fr0stbyt3: wonder why it wouldnt throw an error [18:27] fr0stbyt3: oh, hey, btw, cant find the 2nd parameter [18:27] fr0stbyt3: :P [18:27] Aria: Parameter? [18:28] Aria: Hm. Looks like the errors would need to come via jsdom, since it's that that loads jquery. [18:28] fr0stbyt3: in example.js it passes the jQuery path as 2nd param [18:28] fr0stbyt3: but that file doesnt exist AFAIK [18:28] Aria: Yeah. [18:28] fr0stbyt3: theres no dist folder in deps/jquery [18:28] fr0stbyt3: you'd think it would throw an error when html5 tried to pull it [18:28] lgl has joined the channel [18:28] fr0stbyt3: ill test with a copy [18:28] Aria: Yeah, but html5 doesn't do that pulling, actually. It's jsdom. [18:29] Aria: Yeah. Just get a copy of jsdom and put it where you want it. [18:29] fr0stbyt3: jsdom <_< [18:29] Aria: er. jquery. [18:29] fr0stbyt3: but [18:29] Aria: Man, I need to stop tangling the two names up. [18:29] fr0stbyt3: you're confusing me and i dont know where i am [18:29] fr0stbyt3: joking :) [18:30] astropirate: Could someone tell me why this module inheritance isn't working? I have module Mew (http://pastie.org/1610421) inheriting from module Moo (http://pastie.org/1610423). It gives me a runtime error: "TypeError: Object function Moo() { console.log('Moo Constructor reached'); } has no method 'arg'" [18:30] Aria: Hehe. I'm confusing me too. Stupid similarly named projects and my not having had enough coffee yet. [18:30] marcello3d: did chrome drop support for websockets or something? socket.io seems to be using jsonp now [18:30] mack: don't think so [18:30] Aria: I think they did turn down websockets in some builds. [18:31] fr0stbyt3: Aria: is jquery1.5.min no good? throws 2 errors [18:31] mack: Anyone have experience with installing npm? I'm having quite a few toubles [18:31] marcello3d: hmm, no, this site seems to indicate it works: http://websocketstest.com/ [18:31] fr0stbyt3: ReferenceError: jQuery is not defined. TypeError: Cannot read property '1' of null [18:31] Aria: Hm. I've not tried 1.5, I don't think. [18:32] NuckingFuts has joined the channel [18:33] mack: npm ERR! linking /Users/me/local/node/bin/.npm/npm/0.3.9/package/bin/npm.js to /Users/me/local/node/bin/npm@0.3.9 [18:33] mack: npm ERR! failed to link bins [18:33] mack: npm ERR! install failed Error: EEXIST, File exists './.npm/npm/0.3.9/package/bin/npm.js' [18:33] fr0stbyt3: Aria: nvm. 1.2.6 doesnt work either. seriously! [18:34] Aria: try 1.4.4. That one seems to work. [18:34] svenlito has joined the channel [18:34] fr0stbyt3: wait [18:34] Aria: I'm going to bang on 1.5 support, see whose error it is, jsdom or mine. [18:34] fr0stbyt3: im dumb. it works [18:34] fr0stbyt3: its just 1.5 that doesnt work [18:34] Aria: Hehe. [18:34] apoc: found this weird js code, is this valid commonjs? delete macroXML.@metal::['define-macro']; [18:34] Aria: apoc: That's E4X, not supported by V8. [18:35] fr0stbyt3: woot, finally! thanks for the help. ill be watching for 1.5 :) [18:35] Aria: apoc: Not a commonjs vs not thing at all. [18:35] Ecu-Truin has joined the channel [18:35] Aria: Okey. I'll make 1.5 work today hopefully. [18:35] apoc: Aria: ahh okay thanks [18:35] Ecu-Truin: Does anyone have a recommendation for hosting node.js for someone who has.. pretty much zero experience with linux? [18:35] c4milo has joined the channel [18:35] spaceinvader: http://no.de/ [18:35] spaceinvader: they do it for you [18:35] Aria: What spaceinvader said. [18:35] spaceinvader: git push your code, magically hosted node.js [18:36] fr0stbyt3: now I'd like to see how it works remotely. jsdom was taking 15 seconds to grab a 1 line webpage. 'http://eric.muyser.com/test/' [18:36] marcello3d: spaceinvader: but you can't get an account with them? [18:36] spaceinvader: https://no.de/signup [18:36] spaceinvader: ? [18:36] marcello3d: I signed up a few weeks ago [18:36] marcello3d: still haven't heard anything [18:36] jetienne: spaceinvader: did you get a coupon ? [18:36] spaceinvader: i haven't actually tried, but it works for other people [18:36] slickplaid: i would say no.de takes a little bit of linux know-how with ssh keys and all that to access it... if they're familiar with git, i suppose it wouldn't be too bad [18:37] Aria: Have you contacted their support, marcello3d? [18:37] marcello3d: no [18:37] fr0stbyt3: who hosts no.de's cloud servers anyway? [18:37] Aria: Well then. [18:37] spaceinvader: if you can use github you can use joyent [18:37] slickplaid: I got my coupon a couple weeks ago [18:37] Aria: fr0stbyt3: joyent. [18:37] Ecu-Truin: Signing up for no.de requires a SSH key.. which I do not have. [18:37] jetienne: spaceinvader: ? how [18:37] slickplaid: fr0stbyt3: joyent [18:37] Aria: Ecu-Truin: That's easy to make. [18:37] slickplaid: Ecu-Truin: You can make your own. [18:37] Aria: Ecu-Truin: Open a terminal, or use putty's tool if you're on Windows. [18:37] jetienne: slickplaid: how did you get a coupon ? [18:37] fr0stbyt3: i would have assumed they abstracted rackspace or something [18:37] marcello3d: weird [18:37] slickplaid: jetienne: Signed up, a week or two later, I got accepted. [18:38] marcello3d: now it won't let me log back into no.de [18:38] Aria: Nope. Joyent /is/ a cloud OS vendor, so they run their own stuff. [18:38] jetienne: slickplaid: hmm ok i guess im not worthy. i wait for much longer than that [18:38] slickplaid: jetienne: Helps to use their API and become familiar with it. [18:38] marcello3d: ah, wrong password [18:38] Aria: I think they're positioned well in the market, too. [18:38] stonecobra: /join #joyent [18:38] spaceinvader: https://api.no.de/#POST-/♥ [18:38] jetienne: slickplaid: without a coupon i cant use any api [18:38] stonecobra: doh [18:39] spaceinvader: jetienne: you can use the api to get a coupon ^^ [18:39] jetienne: spaceinvader: unfrotunatly no :) hence my question :) [18:39] Yuffster has joined the channel [18:39] slickplaid: jetienne: You can set ssh keys and check on the status of your account/coupon, I believe. [18:39] marcello3d: well, when I try to get a coupon it used to say I already had requested one [18:39] marcello3d: but now it's like "API currently in read-only mode. please try again later." [18:39] jetienne: marcello3d: "htanks, you are in the queue" i got this one too :) [18:39] marcello3d: yea, basically [18:40] marcello3d: not the best experience [18:40] slickplaid: marcello3d: they were doing updates yesterday, I think. [18:40] Metapony has joined the channel [18:40] lgl has joined the channel [18:40] marcello3d: so yea [18:40] marcello3d: I also tried nodejitsu and some other one [18:41] franck34: SubStack: ping [18:41] mack: What ssh key do you add for no.de? [18:41] slickplaid: Easiest way still is just to set up a local server if you want to play with node, IMO [18:41] Aria: mack: The public portion of whichever key you want to use to log in to push changes. [18:41] marcello3d: slickplaid: yep, that's what I'm doing [18:42] slickplaid: VM it or install it on a local machine... like me I have it on one of my development servers here locally [18:42] mack: Aria: Ah thanks [18:42] slickplaid: mack: ~/.ssh/id_rsa.pub [18:43] nejucomo has joined the channel [18:43] possibilities has joined the channel [18:43] tahu has joined the channel [18:44] mack: guess they stopped handing out coupons? "API currently in read-only mode. please try again later." [18:45] dustinwhittle_ has joined the channel [18:45] Aria: Could be. [18:45] Aria: Or doing maintenance. [18:45] slickplaid: mack: they might be doing some work on the API. There was an email saying they were doing work. [18:45] mack: Ah, kk [18:46] mack: Anyone know why I would be getting these errors on an npm install: npm ERR! failed to link bins [18:46] mack: npm ERR! install failed Error: EEXIST, File exists './.npm/npm/0.3.9/package/bin/npm.js' [18:46] pauls: is there a best practice in node.js for getting the filetype of a file in the fs and finding its corresponding content-type? [18:46] jeromegn: anyone know of a good technique (I guess "best pratice") to route websocket requests? [18:46] pauls: ^_^ [18:47] Aria: pauls: If you're integrating on a unix system, perhaps look in /etc for a mapping table to look up types from filename endings; but that's just one way. Most people just build a small table for their own use. [18:47] Aria: pauls: {"js": "text/javascript", "html": "text/html"} etc. [18:48] pauls: Aria thanks man [18:49] erabuj has joined the channel [18:50] fr0stbyt3: does a simple HTTP request take 10 seconds for anyone else? 3 lines.. google.com takes even longer.. 30 seconds? https://gist.github.com/845492 [18:50] mape: Oh, they moved ry/node to joyent/node? [18:51] Aria: Yep. [18:51] fr0stbyt3: mape: about 3 days ago [18:51] Aria: Ry announced that a few days ago. [18:51] mape: k [18:51] Aria: fr0stbyt3: No, it's very quick for me -- sounds like a DNS timeout. Try looking at your /etc/resolv.conf and make sure that all the nameservers work. [18:51] polotek has joined the channel [18:51] mack has joined the channel [18:52] marcello3d: wow, firefox is running my code way faster than chrome [18:52] marcello3d: what's up with that:) [18:52] fr0stbyt3: Aria: good point. thanks. strange, ff/chrome/etc no issues.. [18:52] seivan: Would it be wrong of me to prototype the socket in order to add a unique identifier [18:52] Aria: marcello3d: Old chrome? Or just code that FF optimizes better? [18:53] marcello3d: naw, 10.x beta [18:53] Aria: Hm [18:53] marcello3d: I think something's wrong with chrome though [18:53] marcello3d: gonna restart it [18:53] marcello3d: cause safari is also running faster [18:54] marcello3d: seems fine now [18:54] boaz has joined the channel [18:54] GasbaKid has joined the channel [18:56] fr0stbyt3: Aria: worked a treat. much appreciated. changed it to google dns. i had problems with my router's DNS on latest Ubuntu, I guess that problem persists to some low-level even on OS X (with brew) [18:57] marcello3d: weird, 3rd parameter on addEventListener is required on FF [18:58] tktiddle has joined the channel [18:59] Aria: fr0stbyt3: Yeah. node uses its own DNS resolution, not the system's gethostbyname() call, so it can see different bugs than other things. [18:59] Aria: fr0stbyt3: and most routers suck at DNS. [19:00] fr0stbyt3: Aria: learn something new every day [19:00] mackry has joined the channel [19:00] Aria: Hehe. Indeed. [19:00] Aria: It's a bad day when you don't ;-) [19:01] marcello3d: or a great day, depending on the situation ;D [19:01] Flybyme has joined the channel [19:01] seivan: Would it be wrong of me to prototype the socket in order to add a unique identifier [19:02] Aria: No, but you could see if you can get the FD number. [19:03] langworthy has joined the channel [19:03] langworthy has joined the channel [19:04] franck34: does somebody know how to destroy a sesame dession ? [19:04] maushu has joined the channel [19:04] franck34: simply delete req.session ? [19:05] mynyml has joined the channel [19:05] dustinwhittle has joined the channel [19:07] boaz has joined the channel [19:08] franck34: found [19:09] Imperion has left the channel [19:10] Flybyme has joined the channel [19:11] dustinwhittle has joined the channel [19:15] bentruyman has joined the channel [19:17] mackry_ has joined the channel [19:18] armspace has joined the channel [19:18] saschagehlich has joined the channel [19:18] Wizek has joined the channel [19:21] mynyml_ has joined the channel [19:24] seivan: Any guides on proper load balancing on Node, with more then 1 server (and it's cores) think we covered that yesterday [19:26] sivy has joined the channel [19:26] marcello3d: this is kinda neat [19:26] marcello3d: v8: 5.1234 % 1 [19:26] v8bot: marcello3d: 0.12340000000000018 [19:27] Aria: Look at cluster, seivan [19:27] seivan: Aria: Yeah we wen't through that [19:27] marcello3d: is that the preferred way to get the decimal value? [19:27] seivan: cluster does not help between multiple servers Aria:) [19:27] utunga has joined the channel [19:27] marcello3d: v8: var x = 5.1234; x - parseInt(x) [19:27] v8bot: marcello3d: 0.12340000000000018 [19:29] seivan: does v8 handle coffee ? [19:29] seivan: v8 users = []; for x in users; x [19:29] seivan: v8: users = []; for x in users; x [19:29] v8bot: seivan: SyntaxError: Unexpected identifier [19:29] jetienne: seivan: no it handles js. and coffee is translated in js [19:29] stephank has joined the channel [19:30] jetienne: seivan: cofee is just a compiler into javascript [19:30] seivan: I know.. [19:31] nmtmason has joined the channel [19:31] ziro`: anyone thinking of starting a web service or anything? [19:32] mraleph: marcello3d: don't use parseInt to truncate integers. this is bad practice. [19:32] mraleph: *to round doubles to integers [19:33] jetienne: Math.floor() instead ? [19:33] nmtmason has joined the channel [19:33] marcello3d: how would you suggest getting the decimal part of a double, then? [19:33] spaceinvader: this: [19:33] spaceinvader: (to get the integer part) [19:33] spaceinvader: v8: var x = 5.12345; x.toFixed() [19:33] v8bot: spaceinvader: "5" [19:34] jetienne: v8: var x = 5.1234; x - Math.floor(x) [19:34] spaceinvader: to get the decimal part % 1 seems ok [19:34] v8bot: jetienne: 0.12340000000000018 [19:34] marcello3d: v8: var x = -5.1234; x - Math.floor(x) [19:34] v8bot: marcello3d: 0.8765999999999998 [19:34] jetienne: not that it fix the float issue :) [19:34] patcito has joined the channel [19:34] perezd has joined the channel [19:34] marcello3d: v8: var x = -5.1234; x%1 [19:34] v8bot: marcello3d: -0.12340000000000018 [19:34] marcello3d: hmmm [19:35] marcello3d: not sure which I want [19:35] jetienne: modulo on negative... i cant understand them [19:35] spaceinvader: Thinking of the math object, one of my lecturers the other day pronounced Math.sqrt as "math squirt" [19:35] kolbyjack has left the channel [19:35] spaceinvader: it made me die inside [19:35] jetienne: spaceinvader: :) [19:35] marcello3d: spaceinvader: that is the technical name for it, though [19:36] marcello3d: ;) [19:36] spaceinvader: really :/ [19:36] spaceinvader: i mean, SQL as sequel is kinda acceptable [19:36] marcello3d: I call it squeal [19:36] spaceinvader: but squirt!? wouldn't "square root" or "s q r t" be better [19:37] mraleph: spaceinvader: x - Math.floor(x) will not work for negative numbers. [19:37] spaceinvader: hey, i didn't suggest that one ;p [19:37] jetienne: v8: Math.floor(-3.5) [19:37] v8bot: jetienne: -4 [19:38] stonecobra: I just call it root, but that is just me [19:38] jesusabdullah: I usually say, "the square root of" [19:38] jesusabdullah: in conversation [19:38] jetienne: i like Math.floor :) Math.floor(Math.random()*9999).toString(36) is like rnd() in basic :) [19:39] mraleph: I guess the best way is x - (x|0) [19:39] lgl has joined the channel [19:39] marcello3d: you sure you want 9999 and not 10000? :) [19:39] jetienne: mraleph: not for readability tho [19:39] jetienne: marcello3d: i did complex computation to reach this magic number :) [19:40] mraleph: jetienne: I can read that :-) [19:40] jetienne: mraleph: but you did pearl in kinder garden ? :) [19:40] jetienne: perl [19:40] mraleph: hate it [19:41] jetienne: i succeed to never learn perl! :) [19:41] JoeF__ has joined the channel [19:41] nivoc has joined the channel [19:42] Steven___ has joined the channel [19:42] sveisvei has joined the channel [19:42] Aria has joined the channel [19:42] sveimac has joined the channel [19:42] jetienne: i like node_modules btw [19:42] jetienne: it is clean simple, regular [19:42] jetienne: just make my .git larger :) [19:43] jesusabdullah: I plan to eventually learn some perl. [19:43] jetienne: jesusabdullah: let me convince you to never do it ? :) [19:43] mackry: I hate npm [19:43] jesusabdullah: Why would I let you do that? [19:43] muk_mb has joined the channel [19:43] JoeF__ has left the channel [19:44] jetienne: jesusabdullah: ok this was a joke :) [19:44] jetienne: jesusabdullah: learn it if you want [19:44] nmtmason has joined the channel [19:44] jesusabdullah: Perl might lend itself to text messes, but it has a rich history of good ideas and sweet modules [19:44] jesusabdullah: Hah [19:44] jetienne: mackry: im interested. can you explain why [19:44] jesusabdullah: jetienne: Not trying to be a party pooper. :P [19:44] jesusabdullah: ACTION & [19:44] daveluke has joined the channel [19:44] mackry: jetienne: I can't get it installed! :( [19:45] jetienne: mackry: this is one point. which os do you run ? [19:45] mackry has joined the channel [19:46] nmtmason has joined the channel [19:48] jetienne: maybe a proper package.json and node_modules in .gitignores could fix it [19:48] tmzt: perl is better than awk+sed [19:48] tmzt: that's what it was meant to do [19:49] jakehow has joined the channel [19:50] jetienne: i dream of a pure git package installer [19:50] jetienne: which node module is not store in a git repo ? [19:50] jetienne: very few is my bet [19:51] endian7000: many packages are on github but don't have the proper link in their package.jsons [19:51] endian7000: so the github link doesn't show up on npm.mape.me [19:51] softdrink has joined the channel [19:51] mape: hmm [19:51] mape: oh yeah [19:51] jetienne: there are package.json info for repo [19:52] endian7000: there could be a script-assisted effort to get maintainers to add that line [19:52] jetienne: i dunno how used they are tho... true... some numbers are needed [19:52] emacsen has joined the channel [19:52] jetienne: endian7000: with github api to send the issue... it may be done i think [19:52] emacsen: Is there a good document on writing asyncronous functions? [19:52] jetienne: emacsen: hmm learnboost on closure ? [19:53] endian7000: emacsen: what? [19:53] jetienne: emacsen: this is a quite broad question. hard to answer [19:53] mape: endian7000: http://npm-gen.mape.me/ [19:53] emacsen: okay, sorry, let me rephrase [19:53] davidascher has joined the channel [19:53] jetienne: mape: you generate them from the .git ? [19:53] emacsen: I am trying to write a web server that opens connections, and sits on them. Then when an event occurs, it responds to some clients withs some data [19:54] mape: jetienne: Don't even remember to be honest :P Think I used the github api [19:54] jetienne: emacsen: websocket ? or normal http ? [19:54] jetienne: mape: hehe :) [19:54] emacsen: jetienne, normal http [19:54] jetienne: mape: im playing with npm/nodepackage.json recently this is why i ask [19:54] emacsen: jetienne, but the technique should be the same, I think? [19:54] endian7000: mape: cool! but I meant a script to go through the registry and find packages that are on github but are missing the proper repo link in their package.json [19:55] mape: endian7000: oh yeah [19:55] stagas: mape: haha cool! [19:55] jetienne: emacsen: and what is stopping you ? which issue do you hit ? [19:55] emacsen: jetienne, I can open connections, but how do I then respond to the correction connections with a reply [19:55] emacsen: jetienne, I'm basically trying to write a dumbed down notify.io server [19:55] void_ has joined the channel [19:56] jetienne: emacsen: ok i think i understand.... not sure how to answer tho [19:56] jetienne: emacsen: queue all the http client request/response, until you get something to send [19:56] jetienne: emacsen: then you answer them normally once you get something to send [19:56] muk_mb: is no.de down? [19:56] emacsen: well, I answer. I don't necessarily close the connection, but yes [19:57] jetienne: emacsen: i think you should code/try a lot. this is the way to go :) [19:57] endian7000: muk_mb: the site? not for me [19:57] emacsen: I figured node.js's event queue might be my friend? [19:57] jetienne: emacsen: request.end() will ensure the cnx is closed [19:57] emacsen: jetienne, I don't want it to end :) [19:57] emacsen: but ok [19:57] brapse has joined the channel [19:58] muk_mb: endian7000: my site's down and I can't ssh in [19:58] Evet has joined the channel [19:58] jetienne: emacsen: you want what ? long poolliong ? [19:58] jetienne: emacsen: if so i would advice to handle socket.io stuff [19:58] emacsen: jetienne, that's not something to worry about now, essentially it's long poll w/o the closing afterwards [19:58] jetienne: emacsen: they handle all the async/multi browser stuff for you [19:58] jetienne: emacsen: socket.io will do websocket when available [19:58] jetienne: emacsen: socket.io will even work from your mobile pĥone [19:59] emacsen: okay. not that I care about any of that, but ok [19:59] mackry: Anyone know why my node_path always resets when I switch to a new terminal? [19:59] jetienne: emacsen: ok :) i misunderstood the question then [20:00] jetienne: mackry: node_path may be a shell env variable and so local to a given terminal [20:00] jetienne: node_modules+++ :) [20:00] mackry: o.O [20:01] emacsen: jetienne, yeah what this is for isn't what I care about at all, basically [20:01] emacsen: other than it's http :) [20:01] jetienne: emacsen: why doing it over http is so big for you ? [20:02] jetienne: emacsen: with socket.io you can force long polling btw [20:02] emacsen: jetienne, I'm writing a server that is a dumbed down version of an existing protocol [20:02] MikhX has joined the channel [20:02] jetienne: ah ok backward compatbility [20:02] jetienne: emacsen: so you need long polling + multi mime stuff [20:02] jetienne: muti part stuff my bad [20:03] emacsen: jetienne, no... stop and listen to the problem, I'll try to be more clear [20:03] jetienne: emacsen: so either you tune socket.io to follow your need... but may not fit old proto [20:03] jetienne: ok [20:03] jetienne: listening [20:04] emacsen: jetienne, I have clients sitting, waiting for an event. I have an event. but what's not clear is how to get the right connections to send out the reply. It's basically a queue. Have you used aqmp? [20:04] scott2449 has joined the channel [20:04] jetienne: emacsen: i havent use aqmp [20:05] emacsen: jetienne, have you used any message passing bus? [20:05] jetienne: emacsen: do you have an existing protocol that you need to follow ? [20:05] jetienne: emacsen: yes [20:05] jetienne: emacsen: i run a service for that :) http://easywebsocket.org [20:05] emacsen: jetienne, not internally. Internally I can do what I want. externally, the client/server communication is already a "standard" [20:05] jetienne: emacsen: i dont get the "internally"/externatlly here [20:06] emacsen: the web client to my web server protocol is set in stone [20:06] jetienne: you code a server. is this server required to follow a protocol ? [20:06] jetienne: ok this is now clear [20:06] emacsen: my internal implementation... that's my domain. I don't care how it happens [20:06] jetienne: emacsen: give more data on the stoned protocol [20:07] Bioxyde has joined the channel [20:07] jetienne: emacsen: is that http ? tcp ? other data [20:07] emacsen: jetienne, http://notify.io [20:07] emacsen: jetienne, but the protocol isn't a problem. that's the easy part. I have no problem there [20:07] cjm has joined the channel [20:07] emacsen: it's the internals I'm struggling with [20:07] jetienne: emacsen: ok lets focus. what is the problem [20:07] ph^ has joined the channel [20:07] springmeyer has joined the channel [20:07] svenlito has joined the channel [20:08] qFox has joined the channel [20:08] emacsen: jetienne, we're clearly not communicating. I'm essentially asking about how to broker the requests amongst the various "green threads" [20:08] Imperion has joined the channel [20:08] cjm: Sorry for being new, can someone reccomend some good video resources for getting into node.js? [20:08] Remoun has joined the channel [20:08] springmeyer has left the channel [20:08] Imperion: um, is ~0.4 compatible with 0.2? [20:08] emacsen: cjm, there aren't really good video resources. What do you want to do? [20:08] jetienne: emacsen: ah ok. no thread in js. [20:09] Imperion: or will I die a horribly painful death? [20:09] jetienne: Imperion: not really. [20:09] Imperion: jetienne: the former or the latter? [20:09] jetienne: Imperion: not die but suffer [20:09] Imperion: actually, a better question would be whether express worked with 0.4? [20:09] cjm: emacsen, Im a front end javascript developer, just looking for a good place to start getting more into node [20:09] Imperion: s/\?// [20:09] jetienne: Imperion: tj would tell you. i dunno this [20:10] emacsen: cjm, so you want to do what? write a web server? [20:10] cjm: yea [20:10] jetienne: Imperion: tj is express author. he is here on pacific time, week day [20:11] Imperion: jetienne: I know who tj is [20:11] Imperion: jetienne: are you running 0.4? [20:11] emacsen: cjm hold on [20:11] cjm: ok, thanks emacsen [20:11] jetienne: Imperion: yes 0.4.1 [20:12] Imperion: jetienne: could you try it out for me? [20:12] Imperion: it'll take forever to build Node here [20:12] emacsen: cjm, did you see the google talk on node.js as an intro? [20:12] bentruyman has joined the channel [20:12] nmtmason has joined the channel [20:13] cjm: no i havent [20:13] emacsen: cjm, http://www.youtube.com/watch?v=F6k8lTrAE2g [20:13] emacsen: cjm, and I really like http://howtonode.org - the author comes on the channel quite a bit too [20:14] Imperion: jetienne: ping [20:14] cjm: awesome, thanks so much emacsen [20:14] emacsen: cjm, any time [20:14] mr_daniel has joined the channel [20:14] devrim has joined the channel [20:15] grncdr has joined the channel [20:15] jetienne: Imperion: why not. what do you want me to try [20:15] jetienne: emacsen: we communicate better with others :;) [20:16] Imperion: jetienne: just try something like `express foo && cd foo && node app.js` [20:18] jetienne: Imperion: "express foo" already failed with [20:18] jetienne: /home/jerome/.node_libraries/.npm/express/1.0.7/package/bin/express:355 [20:18] jetienne: if (err && err.errno !== process.ENOENT) throw err; [20:18] jetienne: Imperion: after a npm install express [20:18] Imperion: mmkay [20:18] jetienne: Imperion: you got the same ? [20:18] Imperion: I don't have 0.4 [20:18] jetienne: node 0.4.1 here [20:19] Imperion: 0.2.6 here [20:19] Bioxyde has joined the channel [20:19] jetienne: Imperion: "express ." doesnt crash tho [20:19] Imperion: I'm wondering whether to switch to 0.4 [20:19] Imperion: apparently I shouldn't yet [20:20] jetienne: Imperion: express dstdir => dstdir MUST exist bfofre [20:21] Aria has joined the channel [20:21] jetienne: Imperion: mkdir foo && express foo&& cd foo && node app.js <- this one work on node 0.4.1 [20:24] grncdr: I am trying to implement a connection pool, and would appreciate advice on how to co-ordinate having an event listener for when a client disconnects with searching for open connections when a new client connects [20:24] grncdr: s/with/and [20:24] jetienne: after my failed emacsen communication, im not sure i will get this one :;) [20:25] grncdr: e.g. a when a client disconnects, their backend connection emits an 'available' signal, which the pool then picks up and uses to connect a queued up client (if there is one) [20:26] grncdr: but when a new client connects, the pool checks each backend for available connections and attempts to connect the client immediately if one is available [20:27] boaz_ has joined the channel [20:27] grncdr: so I think I have a race condition if a client disconnects and another one connects simultaneously [20:27] emacsen: grncdr, that can't happen [20:27] grncdr: (and there is a queued client) [20:27] seivan: redmind: http://metaduck.com/post/2675027550/asynchronous-iteration-patterns-in-node-js [20:28] auujjelllqq has joined the channel [20:28] emacsen: grncdr, node.js is single threaded, so two things can't happen simultaneously [20:28] grncdr: emacsen: fair enough, but what I wonder is where/when node will respond to events [20:28] grncdr: is it only when something waits? [20:29] emacsen: grncdr, good question. I asked something similar recently and got no answer :) [20:29] grncdr: or could my procedural code potentially be interrupted halfway through a block? [20:29] grncdr: ah [20:29] grncdr: yeah, that's where I see a potential problem [20:29] grncdr: actually, even without that I have a problem [20:30] Sebmaster: grncdr: no. node always executes a single function all the way through [20:30] prof-freud has joined the channel [20:30] grncdr: Sebmaster: ok, that's what I assumed [20:30] Wizek has joined the channel [20:30] jetienne: grncdr: you wont be interupted thruy a block [20:30] Sebmaster: there cant be another function running at the same time [20:30] aredridel has joined the channel [20:31] grncdr: how does ordering of events work? [20:31] grncdr: especially chained events? [20:31] Sebmaster: thorugh the event-queue [20:31] jetienne: grncdr: first come, first served [20:31] Sebmaster: if something has received data, it gets written into the event queue [20:33] grncdr: so if client1 connects, and a listener for that event triggers another event (say e2), will the listeners for e2 be handled before node checks to see if a different client has disconnected? [20:34] lgl has joined the channel [20:35] Sebmaster: grncdr: not, if the client disconnected before [20:36] Hello71 has joined the channel [20:36] Hello71 has joined the channel [20:37] grncdr: ok, so anytime I go through an event, it is handled in a (FIFO?) queue and other events may have been placed there first [20:37] maushu_ has joined the channel [20:37] grncdr: that seems straightforward, just want to make sure I'm not totally out to lunch on this one ;) [20:38] mjr_ has joined the channel [20:39] Sebmaster: grncdr: That's right [20:44] scott__ has joined the channel [20:44] muk_mb has joined the channel [20:44] krazyjakee has joined the channel [20:45] krazyjakee: anyone know pyroteknich on here? [20:45] MikhX has joined the channel [20:47] saikat has joined the channel [20:49] krazyjakee has left the channel [20:50] mackry has joined the channel [20:50] viewsrc has joined the channel [20:53] dguttman has joined the channel [20:54] eyesUnclouded has joined the channel [20:59] bentruyman has joined the channel [21:04] krazyjakee has joined the channel [21:08] tktiddle has joined the channel [21:09] tmzt: dingomanatee: do you know of an orm that works like Zend/Magento for node or should I consider using zend for the part of my backend running on mysql (pretty sure it's going to be needed because I have a lot of front end filtering) [21:10] Sebmaster: zend ORM? huh? [21:10] Sebmaster: you mean Zend_Db? [21:10] cloudhead has joined the channel [21:10] tmzt: I'm more familiar with magento than zend itself [21:11] tmzt: I mean the part that implements models over top of an sql database [21:11] tmzt: handles joins, etc. [21:11] Sebmaster: there are a few around [21:11] phed__ has left the channel [21:12] Sebmaster: which DB are you using? [21:12] Sebmaster: you bound to mysql? [21:12] tmzt: considering my options here, I want to sort some posts from different websites by various rules [21:12] tmzt: currently mongo [21:12] Astro has joined the channel [21:13] tmzt: I'm trying to figure out if profiles and all the data they contain should be part of the User model/object in mongo if I stick with it [21:13] tmzt: or just move some of this stuff over to sql [21:13] tmzt: mostly to save ram which is going to be crucial [21:14] jetienne_ has joined the channel [21:15] FireyFly|n900 has joined the channel [21:15] malkomalko has joined the channel [21:16] Sebmaster_ has joined the channel [21:17] Sebmaster_: sorry, browser crashed [21:18] tmzt: I'm trying to figure out if profiles and all the data they contain should be part of the User model/object in mongo if I stick with it [21:18] tmzt: or just move some of this stuff over to sql [21:18] tmzt: mostly to save ram which is going to be crucial [21:18] rjack: Hello, I can't connect to a redistogo instance using node_redis but it doesn't work. I can connect to my instance using redis-cli, so I think I'm doing something wrong with the node_redis auth process. [21:19] Sebmaster_: tmzt: Oh, i cant help with that decision [21:20] tmzt: ah, ok [21:20] tmzt: but on the zend side [21:20] tmzt: what is Zend_DB? [21:20] Sebmaster: the database abstraction layer of the zend framework [21:20] Sebmaster: which also contains the ORM [21:20] rjack: This is the code I use: http://pastebin.com/hXLy1d1e The error is "Error: Ready check failed: Error: Error: ERR operation not permitted". [21:21] scott__ has joined the channel [21:22] tmzt: yeah that's it [21:23] Sebmaster: i just created a single project with the zend framework [21:23] Sebmaster: experimented a lot tho [21:23] Sebmaster: but then came node :p [21:24] tmzt: I just don't want to write sql by hand [21:24] tmzt: if I can avoid it [21:24] tmzt: subquries are also useful [21:24] Bioxyde has joined the channel [21:24] tmzt: though, since part of the goal is to be able to filter on the client, having a filter that works in js might be better [21:25] Sebmaster: im sooo looking forward to jqueryui-tables [21:25] Sebmaster: if they realize, what they promise, it will be awesome [21:25] daveluke has joined the channel [21:25] tmzt: I just want drag and drop without all the extra [21:25] tmzt: no themes or anything else [21:26] gf3 has joined the channel [21:28] liar has joined the channel [21:29] robotarmy has joined the channel [21:29] boaz has joined the channel [21:30] riven has joined the channel [21:31] tanepiper has joined the channel [21:34] skohorn has joined the channel [21:36] borgling has joined the channel [21:38] bluesnoop has joined the channel [21:42] joeshaw: anyone know if the v8 included in node is stock, or does it have patches? [21:42] tmpvar: stock [21:42] joeshaw: hmm, ok, thanks [21:46] zoke has joined the channel [21:46] warz has joined the channel [21:49] Sebmaster has joined the channel [21:52] tilgovi has joined the channel [21:56] Q2 has joined the channel [22:00] Wizek has joined the channel [22:00] sivy has joined the channel [22:03] perezd_ has joined the channel [22:04] lyetz has joined the channel [22:05] saikat has joined the channel [22:06] davidascher has joined the channel [22:07] tk has joined the channel [22:10] fairwinds has joined the channel [22:11] viewsrc_ has joined the channel [22:11] viewsrc_ has joined the channel [22:15] Plouj has left the channel [22:16] scott2449 has joined the channel [22:16] technoweenie has joined the channel [22:21] daveluke: http://socialscorer.com/index.php/mental/auth [22:21] armspace: Using the latest build of express and having problems setting cookies using the built-in Cookie() function. anyone also experience this? [22:22] tktiddle has joined the channel [22:22] themiddleman has joined the channel [22:25] MnyCollections has joined the channel [22:25] MnyCollections: Hello, this is Manhattan Collections. [22:26] MnyCollections: Is Ted available? [22:27] Gregor: Hm, can you set an environment variable or a cmd line option to restrict v8's GC's heap size? [22:30] Evet_ has joined the channel [22:30] scott__ has joined the channel [22:32] brianmario has joined the channel [22:38] daveluke has joined the channel [22:38] Bioxyde has joined the channel [22:39] xandrews has joined the channel [22:40] langworthy has joined the channel [22:41] _joshholt has joined the channel [22:42] mraleph: Gregor: —max-old-space-size [22:42] mraleph: Gregor: but why do you what to restrict it? [22:45] lgl has joined the channel [22:48] Bioxyde has left the channel [22:53] scott2449 has joined the channel [22:58] krazyjakee has left the channel [22:59] zomgbie has joined the channel [22:59] unomi has joined the channel [23:02] Wizek has joined the channel [23:03] tanepiper: in jsdom how to i access the child elements of lists? the list has a class userActivity [23:03] tktiddle has joined the channel [23:04] Remoun_ has joined the channel [23:05] blueadept has joined the channel [23:07] PyroPeter has joined the channel [23:08] _joshholt has left the channel [23:09] nornagon_ has joined the channel [23:10] nornagon_: Can I write to a file and receive notification of completion using ws = fs.createWriteStream(); ws.write(); ws.on('close', cb) ? [23:11] mjsx has joined the channel [23:12] mjsx: on what object are "global" functions attached to? (i.e. node's equivalent of the browser's "window" variable?) [23:12] kristsk: nornagon_: wasnt there a 'drain' action for this? [23:13] nornagon_: is that what 'drain' does? [23:13] kristsk: iirc, yes [23:13] nornagon_: er, rather, I meant fs.create(); ws.end(some_buffer); ws.on('close') [23:13] Sebmaster: nornagon_: shouldnt matter in this case [23:14] jesusabdullah: I had an idea: wrap the tuio C++ libs to use with node, and then write something to make it work with sencha's touch lib [23:14] nornagon_: Sebmaster: but i want the fd to be closed :P [23:14] Sebmaster: nornagon_: Thats what end() does? [23:14] nornagon_: i hope so! [23:15] perlmonkey2 has joined the channel [23:15] Sebmaster: ohh, [23:15] Sebmaster: end() doesnt exist in fs [23:15] nornagon_: fs.WriteStream [23:15] Sebmaster: oh yea [23:15] Sebmaster: then theres no problem afaik [23:16] nornagon_ has left the channel [23:16] nornagon_ has joined the channel [23:17] nornagon_: but wait... doesn't 'drain' get emitted when the *kernel* buffer is empty? [23:17] nornagon_: what if my message is longer than the kernel buffer? [23:17] nornagon_: won't 'drain' be emitted multiple times? [23:19] mjsx: hrm in REPL "this" seems to be equivalent to "window", but in a module, it's equivalent to "exports" [23:20] nornagon_: oh, hm [23:20] nornagon_: fs.WriteStream.end takes a callback [23:20] nornagon_: which ... isn't documented [23:20] kristsk: nornagon_, um, it might be i have got somthing wrong [23:21] nornagon_: and breaks if you try to use it as documented [23:21] kristsk: hook 'drain' before .end() ? [23:23] kristsk: ok, nighty time for me. [23:23] nornagon_: nah, looks like the correct sequence is ws.write(); ws.end(cb) [23:24] nornagon_: just would be nice if that were documented somewhere :/ [23:24] Hello71 has joined the channel [23:24] Hello71 has joined the channel [23:25] ChrisPartridge has joined the channel [23:25] nornagon_ has joined the channel [23:25] emacsen has joined the channel [23:32] Evet has joined the channel [23:33] mackry has joined the channel [23:34] dthompson has joined the channel [23:36] jesusabdullah: Anybody here know much about the sencha touch libs? [23:37] saikat has joined the channel [23:39] twomashi has joined the channel [23:39] twomashi has left the channel [23:42] malkomalko has joined the channel [23:45] aredridel has joined the channel [23:45] scott2449 has joined the channel [23:46] tanepiper: jesusabdullah: not the touch, but extjs 3 [23:46] chapel: http://news.ycombinator.com/item?id=2266852 [23:46] tanepiper: not had time to properly sit down with 4 [23:48] Evet has joined the channel [23:49] francescop has joined the channel [23:49] francescop has left the channel [23:51] ryah: w"If you can't handle callbacks or events, then maybe you should go back to using whatever you are more comfortable with, or write your own abstractions." [23:51] ryah: chapel: yes! [23:51] chapel: :) [23:51] jesusabdullah: tanepiper: What I'd like to know is how sencha touch receives touch events, and how to extend it to receive *other* touch events [23:51] grncdr: is it considered better style to have an events property or make your objects event emitters? [23:51] jesusabdullah: Who said that, ryah? [23:51] tanepiper: grncdr - coffeescript [23:51] ryah: jesusabdullah: chapel did [23:51] jesusabdullah: Ah [23:52] chapel: http://news.ycombinator.com/item?id=2266852 << my comment [23:52] tanepiper: class Foo extends events.EventEmitter [23:52] chapel: people in that thread were complaining about the way node.js handles callbacks and events [23:52] chapel: saying we should adopt a more synchronous style of code [23:52] tanepiper: chapel: i find it's worse with coffeescript [23:52] jesusabdullah: I agree, chapel [23:53] chapel: what do you mean tanepiper ? [23:53] jesusabdullah: ryah: chapel: http://c0016417.cdn2.cloudfiles.rackspacecloud.com/Dqe.jpg if you haven't seen it [23:53] tanepiper: sometimes i want to do sync, but none of the structue libs really work in coffeescript [23:53] jesusabdullah: SubStack made it I'm pretty sure [23:53] nivoc has joined the channel [23:53] zomgbie has joined the channel [23:53] tanepiper: async, seq, step [23:53] chapel: ah tanepiper [23:53] chapel: well maybe you and I should work on one [23:53] chapel: :) [23:54] ircretary has joined the channel [23:55] jesusabdullah: Does sencha have an irc channel? [23:55] jesusabdullah: Maybe I could ask them [23:55] jesusabdullah: oshit, I said I'd blog about my thing last night [23:55] SubStack: tanepiper: oh I thought up a way to have seq work in coffee-script [23:55] tanepiper: possibly implement some type of queue system that can be called, and within that interupt levels. jobs are added to the queue and then a sequence run, but you can opt to catch a callback with a higher priotity [23:55] chapel: simpler is better :) [23:55] chapel: and SubStack :) [23:55] chapel: bleh afk [23:56] SubStack: can have {seq,par,catch,...}_ functions that set `this` as the first arg [23:56] tanepiper: why not use the power of javascript and use arrays as proper queues :) [23:56] jesusabdullah: I think one of my goals for the future is going to be to build another touchscreen for personal use [23:57] SubStack: tanepiper: also I got all the stuff done for dnode v0.6, just waiting for guillermo to patch socket.io with var io = this.io = ... so it works with browserify [23:57] gf3 has joined the channel [23:57] SubStack: Pesky this === window context. I hate how window sits at the bottom of the scope resolution chain in the browser [23:57] tanepiper: do you have a branch that can be pulled and installed locally? [23:57] losing has joined the channel [23:58] SubStack: me? [23:58] tanepiper: yes [23:58] arnorhs has joined the channel [23:58] SubStack: https://github.com/substack/dnode/tree/v0.6 [23:58] tanepiper: did you pull and create the patch to socket.io? [23:58] SubStack: need to update the readme still, but check out the examples/web-* [23:58] SubStack: oh I can do that, one sec [23:59] muk_mb: is anyone having trouble with their smartmachine on no.de? [23:59] jesusabdullah: Ah, apparently sencha touch only works for mobile stuff. [23:59] tanepiper: does it work with https yet?