[00:00] streblo has left the channel [00:00] bradleymeck: fs=require('fs');fs.writeFileSync('overload2.node',fs.readFileSync('overload.node','utf8'),'utf8');...fails on my .node file /cry [00:01] dnolen_ has joined the channel [00:01] isaacs: bradleymeck: what happens if you take off the 'utf8' args? does it work then? [00:01] bradleymeck: nope [00:01] isaacs: yeah... that sounds like a bug. [00:02] Wandrewvious has joined the channel [00:05] mikeal has joined the channel [00:06] Tobsn: <- linkinus [00:06] bradleymeck: well plain js bundling seems ok for now, but cant really say its gtg til i know whats up w/ that [00:06] Tobsn: way better actually [00:06] mscdex: bradleymeck: why would you be copying a binary file as utf8? [00:07] bradleymeck: binary encoding is deprecated , its the closest i got [00:07] Tobsn: i dont see any other mouse coursers. [00:07] bradleymeck: well, technically utf8 should be the same from a byte standpoint [00:07] Tobsn: mscdex, base64 :P [00:08] mscdex: bradleymeck: stuffing binary into javascript strings is deprecated, but if you leave off the encoding it uses buffers [00:08] bradleymeck: it throws errors [00:09] mscdex: what error is that? [00:09] mikeal: is EventSource merged yet? [00:10] bradleymeck: TypeError: Bad argument. at Object.writeFileSync (fs:399:17) [00:12] cloudhead: is there a way to make Cache-Control behave correctly when you have 2 identical URLs with different content-types? [00:12] cloudhead: right now the browser treats them as one [00:12] DoNaLd` has joined the channel [00:13] bradleymeck: etags? [00:13] cloudhead: bradleymeck: but chrome won't even talk to the server [00:13] hassox: any vows nutz in here? [00:13] cloudhead: hassox: yea [00:13] hassox: ACTION is wondering if there's a setup and teardown phase available [00:14] bradleymeck: guess it assumes content-type wont change if you want it cached [00:14] cloudhead: hassox: people keep asking for teardown, it's on my todo [00:14] hassox: oh it's yours :D [00:14] cloudhead: you can do setup in `topic` [00:14] hassox: cloudhead: congrats mate... it's very nice :D [00:14] cloudhead: hassox: thanks [00:14] hassox: how do I do setup in topic? [00:15] hassox: I didn't see an exampel on the site [00:15] cloudhead: bradleymeck: yea but my 2nd request is with Accept: application/json [00:15] hassox: it may have got lost in the awesome though [00:15] cloudhead: hassox: well, nothing special, I guess it depends what you call 'setup' [00:15] cloudhead: hehe [00:15] hassox: ah ok [00:15] hassox: gotcha [00:15] cloudhead: you can define vars on `this` [00:15] cloudhead: and they'll be available in sub contexts [00:16] hassox: kk sweet [00:16] cloudhead: or yea, just do whatever you want before calling `this.callback`, or returning [00:17] JimBastard: mailing list lulz [00:19] _announcer: Twitter: "sherpa, the node.js router has been released on npm #nodejs #sherpa" -- Daniel Neighman. http://twitter.com/hassox/status/20179388968 [00:22] creationix: hey [00:22] creationix: do browsers have native base64 decoding? [00:22] creationix: via js [00:22] SubStack: my sources say no [00:22] creationix: I want to send 8-bit binary data over websocket [00:22] creationix: I guess hex it is [00:22] SubStack: creationix: don't we all! [00:23] creationix: SubStack: yeah, what have you tried [00:23] SubStack: well in my case base64 was what we needed on the client side [00:23] creationix: isn't it slow implemented in js? [00:23] SubStack: there were some client-side libs floating around though [00:23] franksalim: if anyone has specific arguments for why WebSocket should be bytestream based, please communicate it to me group [00:23] franksalim: *to me [00:24] SubStack: browser javascript needs Buffers [00:24] creationix: yeah, that would rock [00:24] franksalim: TypedArray will happen [00:24] franksalim: at that time, do we really want to be stuck with frames? [00:24] creationix: but still how do you send typed arrays over websocket? [00:25] Aria has joined the channel [00:25] franksalim: at the moment you cannot [00:25] franksalim: websocket can still change, though [00:26] creationix: actually I think I'll just do something custom with my current problem [00:26] creationix: my binary values are always < 46 [00:26] creationix: 0-45 for each byte [00:26] creationix: I can compact that pretty good by hand [00:27] creationix: JSON doesn't have a 90 character range of good characters does it? [00:27] cromney has joined the channel [00:27] creationix: err, 45 [00:27] creationix: yep [00:27] ryah: <3 web [00:30] Tobsn: you know that you have too many domains if you think you found an awesome domain and you nslookup the ip to find out who owns it and you can ssh into it and youre main servers password works... and youre not even happy that you already own it. [00:30] aheckmann has joined the channel [00:31] ryan_gahl has joined the channel [00:31] bradleyprice has joined the channel [00:31] franksalim: ryah, how much better would websockets be if they were raw tcp after the handshake [00:31] franksalim: from your perspective [00:32] isaacs: creationix: technically almost any utf8 chars are valid json [00:33] isaacs: creationix: in practice, most implementations do the \uHHHH encoding for anything outside of normal alphanums [00:33] creationix: well, I mean won't get expanded to 6 characters [00:33] nsyee has joined the channel [00:33] isaacs: not alphanums, sorry, but normal ascii [00:34] omarkj has joined the channel [00:35] cromney: is it anti-idiomatic to want to build up http response chunks into a giant string for persistence in a db? [00:35] _announcer: Twitter: "@ Finscn "intends to use the company's daily node.js system rewrite. The most troublesome is the permission system should be rewritten," whether to consider the use ralasafe. This is our team doing open source project." [zh-CN] -- Kinbao Wang. http://twitter.com/Ralasafe/status/20180419131 [00:35] mikeal: cromney: that's fairly normal [00:36] cromney: @mikeal, so is there a higher-level stream wrapper like a buffered stream reader I should be able to find via google? I've not found such so far, but I'm hours new to node. :) [00:36] JimBastard: is it just me or is this terrible, http://phpjs.org/functions/usleep:574 [00:36] zapnap has joined the channel [00:36] mape: looks neat [00:37] JimBastard: for real? [00:37] mape: no [00:37] mikeal: cromney: my request library does it for you [00:37] JimBastard: isnt that like one of the worst thing you can do [00:37] isaacs: JimBastard: OH NO!! [00:37] isaacs: php.js is nothing but wtfs [00:37] creationix: hmm, is 2kb/sec on overheat per player on a real-time game? [00:37] bradleymeck has joined the channel [00:37] creationix: *overhead [00:37] mape: not sure why it returns true though [00:37] JimBastard: yeah isaacs someone brought it up on the mailing list [00:37] JimBastard: i couldnt resist [00:38] isaacs: it starts at the beginning: wtf are you doing porting php to JS!!!?!??? [00:38] cromney: mikeal: neat! on github? thx for the replies, btw [00:38] maushu: franksalim, huh, aren't they raw tcp after the handshake? [00:38] mikeal: http://github.com/mikeal/node-utils/tree/master/request/ [00:38] cromney: mikeal: thanks much, will dive in [00:38] Tobsn: JimBastard, well all it needs is a callback ;) [00:38] franksalim: maushu, no, there is a framing protocol. each message event corresponds to a frame in the protocol [00:38] maushu: isaacs, exactly. They are trying to summon cthulhu. [00:38] maushu: franksalim, huh, weird. [00:38] mape: isaacs: actually useful for some stuff, like if you quickly need to fetch a function you know is in php, like levenshtein [00:38] JimBastard: Tobsn: can you spin around for a while and look busy, ill brb [00:39] Tobsn: ;) [00:39] JimBastard: while(true) [00:39] JimBastard: BUT ONLY FOR A LITTLE BIT [00:39] JimBastard: fugging phpers [00:39] isaacs: JimBastard: it's handy if you are chilly. [00:39] maushu: JimBastard, can I run that in nodejitsu? xD [00:39] WALoeIII has joined the channel [00:39] JimBastard: maushu: yep [00:39] _announcer: Twitter: "ECMA-compliant V8'm functionally javascript1.6 262 You mean I? ? I do not use it node.js 1.7 Se comb function of Na .. https: / / developer.mozilla.org/ja/New_in_JavaScript_1.7" [ja] -- koko1000ban. http://twitter.com/koko1000ban/status/20180706922 [00:39] isaacs: JimBastard: do usleep(Infinity) and snuggle up with your laptop on those cold winter nights [00:40] JimBastard: i still gotta work out the resource jailing, but a nodejitsu user should be able to while(true) all they want [00:40] maushu: They shouldn't be able! [00:40] JimBastard: why not? [00:40] mape: It is against the laws of physics [00:40] Tobsn: well sleep has in php no use at all [00:40] maushu: ^ [00:41] Tobsn: the only use you have of it is if you do shell stuff [00:41] mape: Tobsn: long pull? [00:41] maushu: Graphnode tells the user that the node is blocked. [00:41] Tobsn: and if you are, like me, to lazy to use bash [00:41] cromney: mikeal: awesome that's just what i was looking for! [00:41] Tobsn: mape or that kinda stuff [00:41] Tobsn: but its blocking so its kinda sucky either way [00:41] mape: but yeah, using php+sleep+apache to do longpull is funnies [00:41] mikeal: no problem [00:41] mape: scales like an old lady [00:41] maushu: JimBastard, you are following heroku ideas, right? [00:42] Tobsn: the only way i ever used it, and did a lot, is if i executed stuff on the shell with a php shell script [00:42] Tobsn: but nowhere else [00:42] JimBastard: maushu: minus the whole rails part, and kinda [00:42] Tobsn: btw. how do you implement a callback? [00:42] maushu: Hmm. [00:42] mape: Tobsn: just pass a function? [00:42] JimBastard: setTimeout(function(){},200); [00:43] Tobsn: but how would you code setTimeout? [00:43] JimBastard: using a C binding, durr [00:43] Tobsn: and in js? [00:43] JimBastard: USE THE C BINDING DURR [00:43] isaacs: Tobsn: setTimeout is a js native [00:43] JimBastard: :p [00:43] Tobsn: isaacs, really ;) [00:44] isaacs: Tobsn: well, it's a browser native that node has also implemented. [00:44] Tobsn: just wondering how it programming wise in JS works to execute a callback function [00:44] isaacs: Tobsn: technically it's not a JS native, but a BOM innovation [00:44] JimBastard: Tobsn: you cant troll isaacs, he's too friendly and helpful [00:44] isaacs: Tobsn: just put () after the function reference. [00:44] isaacs: Tobsn: to execute a callback [00:45] Tobsn: function bla( func, time ) { if( something ) { func(); } } [00:45] Tobsn: ?! [00:45] mape: Tobsn: function myThing(value, callback){callback(value);}; myThing('Test', function(txt){console.log(txt);}); [00:45] Tobsn: that wouldnt work [00:45] isaacs: Tobsn: why not? [00:45] Tobsn: variable != function [00:45] Tobsn: well [00:45] Tobsn: nevermind [00:45] isaacs: Tobsn: um... bla(function () { console.log("hello") }) [00:45] isaacs: sure it is [00:45] isaacs: :) [00:45] Tobsn: hmm hmm hmm [00:45] isaacs: Tobsn: functions are first-class objects in JS [00:46] SubStack: tehe [00:46] isaacs: Tobsn: THAT is a js native. [00:46] isaacs: part of the language [00:46] isaacs: section 10 in the ECMAScript spec [00:46] mape: they party with the rest of em [00:46] Tim_Smart has joined the channel [00:46] isaacs: my favorite chapter :) [00:46] SubStack: lispy [00:46] cromney: sorry, one more question. is there any reason to prefer buffer.write over string += ? [00:46] _announcer: Twitter: "First draft for the Node.js experiment follow-up. What do you think? Need more info? Found typos? Anyone? :) http://bit.ly/aYXuoq" -- Jeff Kreeftmeijer. http://twitter.com/jkreeftmeijer/status/20181160983 [00:46] Tobsn: function usleep ( func, microseconds) { var start = new Date().getTime(); while (new Date() < (start + microseconds/1000)) {} do { func(); } return true; } [00:47] Tobsn: well than this fixes jims issue [00:47] Tobsn: :P [00:47] rauchg_ has joined the channel [00:47] jkreeftmeijer: :P [00:47] maushu: isaacs, kinky. [00:47] SubStack: cromney: buffers are for binary data, strings suck at binary [00:47] jkreeftmeijer has left the channel [00:47] isaacs: Tobsn: well, no [00:48] Tobsn: isaacs, im joking :) [00:48] isaacs: Tobsn: oh, ok [00:48] cromney: SubStack: but is the reverse also true? strings are just specialized binary data. what about stuffing string data into a buffer [00:48] Tobsn: but please correct the code [00:48] isaacs: Tobsn: here's the corrected code: [00:48] Tobsn: i still want to know if that would work [00:48] Tobsn: :P [00:48] cromney: and then buffer.toString('utf8') [00:48] isaacs: OMGPHP.JSNEEDSTODIEINAFIRELIKEYESTERDAY [00:48] isaacs: Tobsn: a blocking busy-wait is Doing It Wrong. [00:48] Tobsn: i think he just made a joke [00:48] Tobsn: :P [00:48] isaacs: Tobsn: there's no "good" way to do it [00:49] isaacs: :) [00:49] Tobsn: ;) [00:49] mape: the usleep or the blocking while? [00:49] Tobsn: both [00:49] Tobsn: ;) [00:50] ryan_gahl: i can't wait for perl.js [00:50] mape: well a good implementation of usleep would just be setTimeout [00:50] ryan_gahl: or um, js.js [00:50] mape: does perl have a huge std lib? [00:50] ryan_gahl: who cares [00:50] mape: I just asked [00:50] ryan_gahl: :) [00:50] Tobsn: nah i think you use cpan for all that stuff [00:51] ryan_gahl: i mean, if it's a language, or a platform, or a fruit basket, it should be re-implemented in js [00:51] Tobsn: doesnt perl just fetches like every freakin function from cpan? [00:51] maushu: Php.js? Fire? [00:51] Tobsn: well someone can go and recode cassandra in a language you can actually understand [00:51] ryan_gahl: death [00:52] maushu: ACTION grabs the torches and pitchforks. [00:52] Tobsn: that would be helpful [00:52] isaacs: lolz @ fruitbasket.js [00:52] creationix: rauchg_: ping [00:52] mape: Something that should be treated with some fire is flash, flash on OSX. [00:52] rauchg_: creationix: [00:52] rauchg_: sup [00:52] ryan_gahl: isaacs: glad someone liked that [00:52] mape: How the hell can Chrome spike two cores to watch sd video [00:52] ryan_gahl: must be Chrome [00:52] bradleymeck: its efficient! [00:52] maushu: mape, decoding secret codes. [00:53] Tobsn: because apple just hates adobe [00:53] ryan_gahl: or wait... maybe it's Apple [00:53] maushu: With good reason. [00:53] mape: maushu: 4, 8, 15, 16 ... [00:53] bradleymeck: express is 100% js land right? [00:53] maushu: adobe created photoshop for mac and then when windows was getting famous up they stabbed apple in the back and moved to windows. [00:53] Tobsn: the problem there is no alternative to flash (everybody is quiet and agrees and i kill the person who says thsoe 4 letters and the number five.) [00:54] ryan_gahl: maushu: stabbed? [00:54] mape: xhtml5? [00:54] tpryme has joined the channel [00:54] Tobsn: :% [00:54] creationix: rauchg_: any update on socket.io on iPad [00:54] Tobsn: i thought its working? [00:54] maushu: ryan_gahl, pretty much. They got lots of traction from apple and then moved to windows. [00:54] tpryme: Anyone here use oprofile before with a node.js app? [00:54] mape: the forever iframe and xhr should work on iPad? [00:55] Tobsn: i still dont uderstand why there is no new version of corel for mac [00:55] ryan_gahl: so, they like, made a product version for the larger market segment [00:55] ryan_gahl: damn them [00:55] creationix: mape: xhr sortof works [00:55] Tobsn: ryan_gahl, you always go where the money is [00:55] ryan_gahl: a business trying to make money, hmm [00:55] ryan_gahl: weird [00:55] creationix: mape: but it looses the connection and I can't push events [00:55] maushu: ryan_gahl, I never said it was a stupid idea. Apple just got pissed that after the investement on them and they split like that. [00:56] Tobsn: yeah, isnt it crazy? ;) [00:56] mape: almost slutty! [00:56] mscdex: hmm, polling mostly works on my android 1.6 browser [00:56] mape: creationix: ah k [00:56] mscdex: though that browser has an oddity with not reporting disconnection in some situations iirc [00:56] Tobsn: rauchg_, found out whats with the remembertransport bug and the IE 6 without flash bug? [00:56] ryan_gahl: maushu: Apple gets pissed when you view a webpage you haven't paid them to access... soo [00:56] Tobsn: mscdex, i saw that too [00:56] mape: creationix:any plans to get the rpg thingy running on the iPad? [00:57] creationix: that's the plan [00:57] Tobsn: but if you to a ping every couple sec you can find out [00:57] mape: creationix: wasd? [00:57] mikeal: creationix: hows the distro going? [00:57] creationix: mape: I spent most the day getting it running in firefox at aceptable speed [00:57] creationix: firefox's lack of native websockets is a problem [00:57] mscdex: Tobsn: true, but that's the only browser/platform i know of so far that has that problem with xhr [00:57] creationix: mikeal: that distro? [00:57] mape: beta has it [00:57] creationix: *what distro? [00:57] mikeal: weren't you putting together a distro? [00:57] mscdex: creationix: it's in ff4 [00:58] mape: ivy? [00:58] Tobsn: hmm [00:58] creationix: mscdex: if it's there socket.io doesn't see it. I tried ff4 [00:58] rauchg_: Tobsn: haven't looked into remembertransport, but i tested ie6 with all transports and it worked perfectly [00:58] _announcer: Twitter: "Very impressed with the quality of ExpressJS 1.0RC. Far improved code. Connect growing on me. #nodejs" -- xnoɹǝʃ uɐıɹq. http://twitter.com/brianleroux/status/20181895842 [00:58] mape: creationix: works on wargamez [00:58] mscdex: creationix: i dunno then, it works with grappler [00:58] Tobsn: without having flash installed? [00:58] creationix: hmm, I'll try again then [00:59] rauchg_: Tobsn: yup [00:59] Tobsn: hmpf [00:59] rauchg_: xhr-polling [00:59] Tobsn: weird [00:59] rauchg_: and htmlfile [00:59] Tobsn: well than i'll just ignore the problem for now [00:59] rauchg_: creationix: i haven't looked into ipad yet, but i committed the fix for the loading bar in iphone [00:59] rauchg_: (and probably ipad too) [00:59] Tobsn: loading bar? [00:59] bradleymeck: creationix does ivy have any c++ based addons in it? [00:59] creationix: rauchg_: ok, I'll pull again [00:59] mape: npm? [01:00] rauchg_: yeah, iphone triggers a loading bar that doesn't ever seem to complete [01:00] creationix: bradleymeck: nope, it doesn't even include the headers [01:00] rauchg_: but i found a fix [01:00] Tobsn: ooh [01:00] Tobsn: how? [01:00] creationix: ivy only works for pure-js packages packaged in ruby-gem style [01:00] rauchg_: i'm making sure the xhr is initialized upon onload or if document.readyState == 'complete', then set a timeout [01:00] rauchg_: to trigger the xhr [01:00] isaacs: mape: whut? [01:01] Tobsn: ah so you just trigger a "complete" load before you open another connection [01:01] bradleymeck: creationix, perfect candidate then! ty [01:01] mape: isaacs: just wondered if rauchg_ pushed the socket.io update to npm [01:01] isaacs: oh, ok [01:01] rauchg_: oh [01:01] rauchg_: not yet [01:01] mape: needs to remind the people [01:01] rauchg_: i will push 0.5.5 [01:01] Tobsn: jezz [01:01] rauchg_: we should have a bo t [01:01] rauchg_: an irc bot [01:01] mape: a poke bot [01:01] Tobsn: there is 0.5.5 now? [01:01] rauchg_: that tells me to update my npm [01:01] rauchg_: haha [01:01] powdahound has joined the channel [01:02] Tobsn: you get one in 2 min ;) [01:02] rauchg_: nono, im saying when i have 0.5.5, i'll put it on npm [01:02] mape: that harasses people who have git pushes but haven't updated npm [01:02] rauchg_: exactly [01:02] Tobsn: k [01:02] rauchg_: specially push --tags [01:02] rauchg_: haha [01:02] bradleymeck: we need to have service hooks for npm [01:02] creationix: I'd kill the bot [01:02] mape: hehe [01:02] mape: ACTION gets coding [01:03] creationix: mape: I think you're right, FF 4b2 does seem faster [01:03] creationix: mape: http://creationix.com:1234/#-70/70 [01:03] mape: go hollywood hogan on the non commiters [01:03] creationix: It runs much better in FF now [01:04] mape: creationix: but you are removing wasd in favour for mouse drag? [01:04] mape: And in the end touch for the pad [01:04] creationix: mape: I will [01:04] creationix: mape: though It's arrows now [01:04] mape: k [01:04] creationix: much better than wasd [01:04] mape: ah, smooth [01:04] creationix: yep [01:04] isaacs: bradleymeck: what do you mean, "service hooks"? [01:05] mape: perhaps buffer 1-2 grids outside the viewport? [01:05] mape: to reduce the flickring [01:05] mape: and save 5-6 out [01:05] mape: so it doesn't have to fetch them again, but still cleans up [01:05] isaacs: bradleymeck: oh, like a git hook that pushes to npm whenever it sees a version like vX.Y.Z? [01:05] creationix: they are buffered 1-2 outside already, it's all lag [01:05] creationix: mape: I tried increasing the window of active data and it slowed it down too much [01:06] creationix: maybe I can try again now that it's faster [01:06] mape: sure? I can go back and forth over 1 and it blinks, or is it append that is slow? [01:06] bradleymeck: kinda [01:06] creationix: it's not append, it's a css class change [01:06] creationix: it's the network that's slow [01:06] creationix: over localhost there is no flicker [01:07] creationix: I'll try to spread the loaded buffer a couple. [01:07] mape: creationix: btw up and down don't move the same distance? [01:07] creationix: mape: sure they do [01:07] mape: seems if I do up/down repeated it moves [01:07] creationix: it's all time based [01:07] mape: oh so it doesn't snap to grids when moving? [01:07] creationix: nope [01:08] mape: k makes sence then [01:08] creationix: just moves a number of pixels per second [01:08] mape: *s [01:08] PokeBot has joined the channel [01:08] Tobsn: there ya go. [01:08] mape: sencha messing with my foreign mind [01:08] gwoo has joined the channel [01:09] Tobsn: lets see if that works haha [01:09] joshbuddy has joined the channel [01:11] maushu: How much time does it take for a domain to be released after the "Expires" date? [01:11] Tobsn: 2 weeks? [01:11] Tobsn: i think [01:11] Tobsn: or 3 month [01:11] Tobsn: i go with 3 month [01:11] maushu: ...thats a big difference. [01:11] Tobsn: but that depends on the tld [01:11] Tobsn: well i know if you send a delete its 3 month for sure [01:11] Tobsn: if its an expire [01:11] EyePulp has joined the channel [01:11] Tobsn: maybe 3 month too [01:11] Tobsn: icann.org ;) [01:13] _announcer: Twitter: "@ Ralasafe "Ralasafe is middleware written in Java?" And node.js can seamlessly integrate it?" [zh-CN] -- finscn. http://twitter.com/finscn/status/20182887020 [01:14] tpryme: Anyone have experience profiling their node app on linux? [01:15] mape: tpryme: http://github.com/mape/node-profile [01:15] tpryme: mape: thanks [01:15] _announcer: Twitter: "Recommended by @ aki_xavier yesterday, I've done some research express, I found this really more suitable. And express not hide too many details node.js, so play express rails than the other classes play a better understanding of the framework node.js. also seems that things ExtJS team project. must support!" [zh-CN] -- finscn. http://twitter.com/finscn/status/20183031815 [01:16] mape: the japanese fit so much into a tweet [01:16] isaacs: mape: yeah, 140 chars is a lot [01:16] mikeal: that's why those are so huge [01:17] Tobsn: have fun with your bot rauchg_ [01:17] phiggins has joined the channel [01:17] Tobsn: brb [01:19] steadicat has joined the channel [01:21] _announcer: Twitter: "more #node.js badass-ness -- just in case you were missing some examples... http://lazeroids.com/ http://wargamez.mape.me/" -- ian eyberg. http://twitter.com/feydr/status/20183381494 [01:23] tpryme: mape: Anyone ever have trouble running nodeprofile as sudo? [01:24] mape: tpryme: just released it last night so haven't had a lot of people try it [01:24] mape: what is the issue? [01:24] jspiros has joined the channel [01:24] tpryme: mape: I'm getting a "sudo: noprofile: command not found" despite "sudo whereis nodeprofile" returning "nodeprofile: /usr/local/bin/nodeprofile" [01:25] matt_c has joined the channel [01:25] mape: noprofile !== nodeprofile [01:25] bradleymeck: noprofile != nodeprofile [01:26] tpryme: mape: sorry typo. but yeah getting that error even with nodeprofile (not noprofile) [01:26] mape: what about not sudo? [01:27] tpryme: can't run as non-sudo since /usr/local/bin is root [01:27] tpryme: Don't want to mess with privileges there. [01:27] mape: k.. damit isaacs always escapes when you need him :/ [01:27] creationix: mape: ok, I added a 4 space buffer around the visible window, that should reduce the flicker [01:27] tpryme: I can change it just for nodeprofile but it should still run under sudo [01:27] creationix: my slow connection still gets it, but not as bad [01:28] mape: tpryme: does it work if you just run it from /usr/local/bin/nodeprofile ? [01:28] tpryme: tried that too with sudo [01:28] tpryme: Didn't work [01:28] mape: error? [01:28] bradleymeck: creationix are you using css for cache or for animation w/ classes? [01:28] tpryme: Same as above with sudo [01:28] mape: creationix: jup a lot nicer [01:28] tpryme: mape: Without sudo, I get Permission denied [01:29] mape: tpryme: hmm, how can it say not a command if you are invoking the file? [01:29] tpryme: mape: With sudo, same as if I ran it without specifying the prefix path [01:29] creationix: bradleymeck: the tiles are just plain divs with a sprite image as their background [01:29] creationix: I'm changing their class to swap images [01:29] creationix: well, position in the image [01:29] mape: works really smooth now [01:29] creationix: bradleymeck: http://creationix.com:1234/tiles.css [01:30] creationix: mape: awesome [01:30] creationix: mape: what browser? [01:30] mape: creationix: btw when doing spark, did you have to change permissions on the bin/spark? [01:30] creationix: it still jumpy for me on ff3 with flash sockets [01:30] mape: creationix: chrome [01:30] creationix: mape: shouldn't have to if grabbed from git [01:30] creationix: or tar.gz [01:30] wattz: evening [01:31] tpryme: mape: yeah, weird behavior [01:31] mape: Hmm yeah.. [01:31] mape: tpryme: Yeah, if it can find it with which I don't see why it isn't working, what if you sudo cat the path it gives? [01:31] mape: shows the code? [01:32] tpryme: tpryme: yeah, that works [01:32] tpryme: mape: yeah, that works [01:32] mape: and ./usr/local/bin/nodeprofile ascript.js works? [01:32] mape: *sudo [01:33] tpryme: mape: No, I get verbatim "sudo: /usr/local/bin/nodeprofile: command not found" [01:33] creationix: ok, time to go play with kiddos, hopefully I'll have it working on iPad tomorrow [01:33] creationix: Firefox took longer than expected [01:33] tpryme: mape: with verbatim cmd "sudo /usr/local/bin/nodeprofile app.js" [01:33] mape: that works? [01:34] mape: or that is command not found? [01:34] tpryme: mape: No, I get the command not found [01:34] tpryme: :P [01:34] mape: and if you cat it? [01:34] tpryme: mape: it cats perfectly [01:34] mape: hmm.. [01:34] tpryme: mape: even whereis perfectly like I said earlier [01:35] mape: I'm not the best of *nix people so don't really know what is causing it, npm setups all the aliases and whatnot so should work [01:35] tpryme: mape: It works after I chmod +x'ed it [01:35] mape: hmm k [01:37] tpryme: mape: any tips on profiling a long-running non-returning app like a connect app? [01:37] _announcer: Twitter: "http://tinyurl.com/273gwom node-http-proxy: Reverse proxy for Node.js - The Changelog - Open Source moves fast. Keep up." -- so_white. http://twitter.com/so_white/status/20184443421 [01:37] mape: tpryme: mind uninstalling it and installing it again? [01:37] mape: pushed a new version to npm with +x, to see if that changes anything [01:37] tpryme: mape: sure, 1 sec [01:38] mape: thanks [01:38] tpryme: mape: Hmm, now I'm getting "Error: Cannot find module './../lib/node/.npm/profile/0.0.5/package/bin/nodeprofile'" [01:39] mape: on sudo npm install profile? [01:39] x_or has joined the channel [01:39] mape: tpryme: and for long running things like a connect app you just make sure it listens to it, do nodeprofile connectapp.js and after you have tested around a bit you press ctrl+c and it will generate the log [01:40] mape: *listens to it, ie it listen(port), and not use exports to run it through spark [01:40] tpryme: mape: Installs fine. I get that when I run "sudo nodeprofile app.js" [01:40] tpryme: mape: after installation [01:41] mape: After you uninstalled it? [01:41] tpryme: yeah [01:41] tpryme: mape: sudo npm uninstall profile [01:41] mape: yeah [01:41] mape: should work, works here using npm [01:43] ben_alman has joined the channel [01:44] mape: Sorry but need to get some sleep, work starts in 3h :S [01:44] mape: But I'll ask isaacs about the Cannot find module issue and get back to you [01:45] tpryme: mape: thanks, I'll let you know how things turn out [01:45] mape: appriciate it :) [01:45] mape: *appreciate even [01:48] tpryme: mape: Think it may be a problem with scripts/preinstall.sh [01:48] mape: the the entire npm install would fail [01:48] hassox has joined the channel [01:48] tpryme: mape: "[: 1: /home/briannoguchi/sources/github/node/deps/v8/tools/linux-tick-processor.py: unexpected operator" when invoking npm install profile [01:48] mape: *then [01:49] _announcer: Twitter: "Now browsing: Untan-Networks: Server-side JavaScript in the challenge I http://bit.ly/bhtJmD node.js" [ja] -- ビマルキ. http://twitter.com/bimalki/status/20185207814 [01:49] mape: hmm [01:49] ako has joined the channel [01:50] mape: but yeah, gotta get sleep, will look at it later today [01:50] ryan_gahl: mape: hold one... [01:51] ryan_gahl: just kidding [01:51] ryan_gahl: night [01:51] ryan_gahl: on* [01:55] ben_alman has joined the channel [01:56] _announcer: Twitter: "Playing with the ruby version of faye. Impressed at how well it supports both nodejs and ruby servers." -- Chris Strom. http://twitter.com/eee_c/status/20185697093 [01:58] mattly has joined the channel [01:58] JimBastard has joined the channel [01:59] JimBastard: anyone wanna peep the new http-proxy api? added some sweet syntax sugar [01:59] JimBastard: http://github.com/nodejitsu/node-http-proxy/tree/0.1.4 [01:59] JimBastard: about to merge in, everything passing [02:00] mscdex: only if it's syntax splenda [02:00] JimBastard: low fat cpu and ram plz [02:01] JimBastard: httpProxy.createServer(9000, 'localhost').listen(8000); [02:01] JimBastard: anyone hate that? [02:01] bradleymeck: aaaah, creationix, the use of fs.readDir for middleware in connect to do lazy loading , can that be moved off to a require? it breaks static embedding? [02:01] JimBastard: httpProxy.createServer(function (req, res, proxy){ setTimeout(function(){ proxy.proxyRequest(9000, 'localhost', req, res); }, 200) }).listen(8001); [02:02] JimBastard: mikeal? [02:03] mikeal: yup [02:03] JimBastard: ^^^ good api? bad api? [02:03] Blink7 has joined the channel [02:03] mikeal: why the setTimeout? [02:03] JimBastard: im proxy self-conscious [02:04] JimBastard: to show example for application latency, there is better example is link above [02:04] JimBastard: you can remove that [02:04] JimBastard: there is also, http.createServer(function (req, res){ var proxy = new httpProxy.HttpProxy; proxy.watch(req, res); // Put your custom server logic here proxy.proxyRequest(9000, 'localhost', req, res); }).listen(8001); [02:06] tjgillies has joined the channel [02:08] sh1mmer has joined the channel [02:08] jlilly: cloudhead: ping? Trying to figure out what timezone you're in :-P [02:11] bradleymeck: hes in funkytown, utc-6 [02:11] hassox: JimBastard: is it possible with the node-http-proxy to change the proxied result? [02:11] hassox: so strip out tags or things like that? [02:11] JimBastard: hassox: you have full access to the req and res, just like http [02:12] JimBastard: you can do I/O as well [02:12] JimBastard: check out http://github.com/nodejitsu/node-http-proxy/tree/0.1.4 [02:12] teemow has joined the channel [02:12] hassox: so, you can overwrite the write method on the resp to do parsing? [02:13] hassox: proxy.proxyRequest('9000', 'localhost', req, res); [02:13] hassox: I'm looking at that [02:14] hassox: so would I hijack the res objects write method, and do my thing at that point? [02:16] JimBastard: aye [02:16] JimBastard: :-) [02:16] ditesh|cassini has joined the channel [02:18] mjijackson has joined the channel [02:18] cloudhead: jlilly: Eastern [02:18] hassox: sweet :D [02:18] hassox: thanx [02:19] matt_c has joined the channel [02:19] jlilly: cloudhead: :) I'm having some issues with vows. specifically with custom reporters [02:19] jlilly: (or really any reporters other than dotmatrix) [02:20] cloudhead: ok [02:20] cloudhead: tell me about it [02:20] jlilly: ACTION readies a pastie. [02:20] marshall_law has left the channel [02:20] jlilly: http://pastie.org/1072048 -- running the test with alternate reporters [02:21] cloudhead: it looks like you aren't exporting a test suite [02:21] Tim_Smart has joined the channel [02:23] cloudhead: oh and um [02:23] davidwalsh has joined the channel [02:23] x_or has joined the channel [02:23] cloudhead: running vows without giving it a path will default to test/ or spec/ [02:23] cloudhead: oh nm I see you have a test folder [02:24] jlilly: http://pastie.org/1072058 -- that should cover exporting, yes? [02:24] cloudhead: jlilly: yea, but you're running it at the same time, that's the problem [02:25] cloudhead: you shouldn't need the run() there [02:25] cloudhead: the `vows` command will run them for you [02:25] cloudhead: all you need to do is export [02:26] cloudhead: easiest is to just replace `run()` with `export(module)` [02:26] jlilly: aha! [02:26] cloudhead: it'll take care of exporting it [02:26] jlilly: removing run along with exporting the test suite seemed to have solved the issue. [02:26] cloudhead: great [02:27] cloudhead: I should probably add some helpful warning messages there [02:27] jlilly: on the topic of a custom reporter, I should be able to just replace vows.options.reporter = myreporter, right? [02:27] jlilly: (I ask b/c it doesn't actually work.) [02:27] cloudhead: yea [02:28] cloudhead: or just parse the output of --json [02:28] hassox: cloudhead: can I run my vows with coffeescript? [02:29] cloudhead: hassox: yea, you need the github version though [02:29] cloudhead: also watch out for the implicit return [02:29] hassox: what do you mean? [02:29] cloudhead: cause if you return a value other than `undefined`, it will use that as the topic [02:30] hassox: ah right [02:30] cloudhead: so if you have a `this.callback` in there, it won't work properly [02:30] hassox: ah gotcha [02:30] cloudhead: and it'll default to the returned value [02:30] hassox: so for async stuff I have to return undefined [02:30] cloudhead: cause it has no way of knowing if the callback is going to be called or not [02:31] cloudhead: yea [02:31] cloudhead: return undefined, or return a events.EventEmitter instance [02:31] hassox: gotcha [02:32] cloudhead: btw jlilly you can also specify a reporter in `export()` [02:33] cloudhead: export(module, {reporter: require('my-reporter')}) [02:34] jlilly: cloudhead: where does export come from again? [02:34] cloudhead: jlilly: vows.describe().addBatch().export() [02:34] cloudhead: it's a method on the test suite [02:35] Tobsn has joined the channel [02:35] Tobsn: rauchg_, you like your bot so far? ;) [02:35] mattly has joined the channel [02:36] rauchg_: Tobsn: yup [02:36] rauchg_: it's doing its job [02:36] Tobsn: ;) [02:36] rauchg_: as soon as i finish up my work i'm gonna act on his commandments [02:36] Tobsn: hmm [02:36] Tobsn: :) [02:36] jlilly: cloudhead: http://pastie.org/1072066 -- so something like that should technically work, right? [02:37] cloudhead: jlilly: yea, and you can lose the test_suite var [02:37] Tobsn: wow, i feel so dumb everytime is see code that involves vows. [02:38] jlilly: cloudhead: that code seems to be using the dot matrix reporting still... [02:38] cloudhead: Tobsn: :) it takes getting used to [02:38] Tobsn: definitly [02:38] Tobsn: i still have not figured out for what i could use it... [02:39] cloudhead: jlilly: hmmm, I haven't tested the override tbh, looking at the code, it *should* work [02:39] jlilly: ACTION agrees. [02:40] jlilly: you can check out the code I'm using at http://github.com/justinlilly/imb0t/ [02:40] jlilly: its in the js/test/ subfolder [02:42] astrolin has joined the channel [02:42] x_or has joined the channel [02:42] jesusabdullah: jlilly: Rewrite from python? [02:43] cloudhead: jlilly: but you have a reporter.js ? [02:43] cloudhead: (it's not in the repo) [02:43] derferman has joined the channel [02:43] jlilly: jesusabdullah: it is. [02:44] lachlanhardy has joined the channel [02:44] jlilly: cloudhead: pushed. [02:45] cloudhead: jlilly: I got it working: http://gist.github.com/505741 [02:46] cloudhead: I mean, on one of my projects [02:46] cloudhead: running the tests prints 'blahblahblah' [02:48] jlilly: cloudhead: pushed a seeming dupe of your example which still doesn't work for me. [02:48] cloudhead: hmmm weird [02:48] jlilly: ie: that example adapted to my code. [02:49] jlilly: I don't have a suite, per se.. unless that's what a vows.describe().addBatch() thing is considered. [02:49] cloudhead: yea [02:49] cloudhead: it's a suite [02:50] technoweenie has joined the channel [02:50] jlilly: so are you able to clone the repo and get things to work? or no? [02:50] cloudhead: jlilly: ok I got it [02:50] cloudhead: if you run it with `node` [02:50] cloudhead: it works [02:51] cloudhead: and not with vows [02:51] cloudhead: it's a bug [02:51] jlilly: rokk. :) [02:51] jlilly: ACTION feels helpful. [02:51] cloudhead: try node test/test.js [02:51] jlilly: yea, that dumps blah's :) [02:51] cloudhead: cool [02:51] cloudhead: I'll look into it [02:52] jlilly: fyi, it still doesn't work by overriding vows.options.reporter. [02:52] cloudhead: jlilly: yea that's not really supposed to work actually [02:52] jlilly: which is fine, as I have a workaround, but might also qualify as a bug. [02:54] cloudhead: hmm if this was properly implemented, you could have a different reporter for each suite [02:55] cloudhead: not sure how useful that would be though - lol [02:55] wahnfried has joined the channel [02:55] wahnfried: hi [02:55] jlilly: cloudhead: could only see that as useful if you had suites which did different things. [02:55] wahnfried: I'm starting a new project with expressjs - anyone know if I should use the 1.0 RC, or 0.14.1? [02:56] cloudhead: jlilly: yea [02:56] jlilly: not sure if that actually fits in BDD, but maybe a test suite that renders blue checkmarks for ie passes and orange ones for firefox passes of a given test suite (or w/e) [02:56] cloudhead: jlilly: maybe I could have an option like --reporter=/path/to/reporter [02:56] cloudhead: haha [02:56] cloudhead: yea [02:56] jlilly: I don't think the export method of doing it is bad. [02:56] jlilly: --reporter looks solid too though. [02:57] cloudhead: jlilly: yea, export is ideal, but it's going to need more work to get to work with the `vows` command [02:57] jlilly: fair enough. a small section somewhere on a custom reporter would be helpful. [02:57] cloudhead: yea [02:58] jlilly: I'm probably going to write this up as an article though, so I'll post you the URL when I'm done. [02:58] cloudhead: sweet [02:58] jlilly: do fun things on test completions :) [02:58] cloudhead: hehe [02:58] jlilly: are the reset or print functions of a reporter ever called? [02:58] jlilly: or were those just internal details of the one I looked at? [02:59] jlilly: ACTION assumes the api is only a report function? [02:59] _mythz has joined the channel [02:59] cloudhead: yea it's called at the beginning [02:59] cloudhead: it's mostly if you need state [02:59] cloudhead: in between report() calls [03:00] cloudhead: coupled with continuous integration [03:00] jlilly: I'm not entirely sure that its working as advertised. [03:00] jlilly: I have a reporter that defines print and reset to output a message. My suite has 2 batches and neither of them get called. [03:00] cloudhead: print is mostly for internal use iirc [03:01] cloudhead: and reset is only used in --watch mode I think [03:01] cloudhead: that might be why [03:02] jlilly: fair enough. [03:02] cloudhead: you handle the output yourself [03:02] cloudhead: so sys.print inside report() [03:04] cloudhead: let me know how it goes, and feel free to open issues on the github repo [03:04] cloudhead: I haven't really formalized the reporter api [03:05] cloudhead: so it'll be helpful to get some feedback [03:13] hassox has joined the channel [03:13] bradleymeck: what do you guys think, statically included js files being required to not use fs during load time? is that reasonable, dont see many modules that even use fs while loading [03:14] cloudhead: wahnfried: 1.0RC [03:16] silentrob has joined the channel [03:17] Tobsn: Total: $0.01 [03:17] Tobsn: This e-mail confirms that your latest billing statement is available on the AWS web site. Your account will be charged the following: [03:17] Tobsn: wut? [03:18] bradleymeck: XD [03:18] jwm has joined the channel [03:18] Tobsn: i think i tested out scalr.com [03:18] Tobsn: and started one instance for a fraction of a second [03:18] Tobsn: ... [03:19] wahnfried: cloudhead: does 1.0RC break plugins made for 0.14.1? [03:19] wahnfried: because of API changes or otherwise [03:27] kriszyp_ has joined the channel [03:31] x_or has joined the channel [03:35] isaacs has joined the channel [03:38] devinus has left the channel [03:38] _mythz has left the channel [03:39] mscdex: heh someone jailbroke an iphone 4 in an apple store and took a picture of it [03:40] hassox has joined the channel [03:40] WALoeIII has joined the channel [03:40] wilmoore has joined the channel [03:40] Tobsn: lol [03:41] Tobsn: i think i read something today about jailbreaking over a website instead of an app [03:41] Tobsn: found it [03:42] Tobsn: "comex" [03:42] Tobsn: http://www.jailbreakme.com [03:43] mattly has joined the channel [03:43] mattly_ has joined the channel [03:45] mscdex: Tobsn: http://www.engadget.com/2010/08/02/visualized-iphone-4-jailbreak-makes-itself-at-home/ [03:45] Tobsn: lol [03:45] Tobsn: well, if it works over the website [03:46] Tobsn: i guess you can just go into an apple store and jailbreak every single ipod, ipad and iphone one by one [03:46] Tobsn: someone should organize a flashmob that worldwide runs into apple stores and jailbreaks all the devices hehe [03:47] technoweenie: they did that when the first one came out [03:47] technoweenie: the first jailbreak hack over the web [03:49] Tobsn: really? [03:49] Tobsn: when was that?! [03:49] hassox: cloudhead: still here? [03:49] Tobsn: i mean all my stuff i jailbroken just because you can add more features to it [03:50] mscdex: well apparently it's able to be jailbroken again over the web [03:53] Tobsn: yeah thats what im saying [03:53] Tobsn: ;) [03:55] mattly has joined the channel [03:56] Tobsn: http://imgur.com/2BICQ [03:59] Tobsn: http://i.imgur.com/JFr8A.png [04:03] dnolen_ has joined the channel [04:05] Tobsn: http://i.imgur.com/acggU.jpg [04:05] tk has joined the channel [04:06] indexzero has joined the channel [04:06] indexzero: hey, anyone know how to inspect the raw http requests node sends out? [04:06] aniero: what's the replacement for process.mixin() ? [04:07] aniero: i need something like jquery's $.extend [04:07] indexzero: sys.inherits? [04:07] aniero: ah, is that what that does? [04:07] indexzero: not quite a 'mixin', but it will extend another object [04:07] aniero: i need to combine two objects/dictionaries [04:08] aniero: the inherits function does things with the prototype [04:08] indexzero: http://rentzsch.tumblr.com/post/588755951/using-node-jss-sys-inherits [04:08] indexzero: ah [04:08] bradleyprice has joined the channel [04:08] tpryme: aniero: You could roll your own in a few lines [04:09] aniero: tpryme: yeah, guess so... [04:10] aniero: first i need to figure out why Foo.prototype.foo = function(){}; Foo.prototype.bar = function() { this.foo() }; is failing [04:11] mscdex: aniero: the original mixin is here: http://github.com/ry/node/blob/62d9852c3d6ed32825abfd79645c72a66fb00e6f/src/node.js#L109 [04:11] dannycoates has joined the channel [04:11] aniero: mscdex: thanks! [04:12] atmos: hehe [04:12] _announcer: Twitter: "@Reustle yes, but there's also a couple of similar frameworks like express for node.js that fairly resembles the routing logic of bottle." -- Kenny Shen. http://twitter.com/kenny_shen/status/20194460638 [04:13] aniero: er, new Foo.bar() fails with a TypeError: Object # has no method 'foo' [04:13] softdrink has joined the channel [04:13] aniero: am i misunderstanding what 'this' is? [04:13] atmos: most likely [04:13] atmos: got a gist ? [04:13] aniero: 1m [04:14] _announcer: Twitter: "@Reustle if you need event driven model, async and non-blocking then node.js is definitely a go." -- Kenny Shen. http://twitter.com/kenny_shen/status/20194576447 [04:15] aniero: atmos: nyrr can't reproduce with a simple test case [04:15] _announcer: Twitter: "@kenny_shen I'm working on my my first Bottle project and I love it. I would love to give NodeJs a try. I'll think of some goofy project." -- Shane Reustle. http://twitter.com/Reustle/status/20194640433 [04:17] mscdex: !tweet @Reustle node is not just for goofy projects :-) [04:17] atmos: mscdex: since when ? [04:17] mscdex: since awhile now? [04:17] atmos: ;) [04:17] kreyman: mscdex: ah [04:18] mscdex: i've been using it increasingly at work [04:18] mscdex: over the past several months [04:18] atmos: mscdex: is anyone running it for anything really noteworthy ? [04:18] atmos: we use it for glue here and there but nothing customer facing [04:18] mscdex: well yahoo and github for starters [04:19] mscdex: there might be others i don't know about though [04:19] atmos: got a link to the yahoo stuff? [04:19] atmos: i saw the gh deploys [04:19] mscdex: pgriess could tell you more about the yahoo stuff ;-) [04:20] mscdex: i think it has to do with yahoo email stuff though [04:20] ryah has joined the channel [04:21] atmos: mscdex: i'm not hatin i just know a lot of people put to use for small things, just not many businesses running off a lot of node stuff [04:21] mscdex: well, the other thing is we don't know who uses node unless they tell us [04:21] joshbuddy has joined the channel [04:22] mscdex: like i said, we use it where i work, but then again we're not a major corporation like yahoo [04:22] SubStack: google is probably using it too since they invited ry [04:22] SubStack: or at least, they're using it now [04:22] mscdex: hopefully :> [04:23] atmos: probably does not mean they're using it for anything serious [04:23] kriskowal has joined the channel [04:24] mscdex: i think when we start seeing more addons and modules that provide async access to popular services/servers, it'll pick up even more steam [04:24] _announcer: Twitter: "Time to play with emotion node.js will handle session when the new Rails." [th] -- pphetra. http://twitter.com/pphetra/status/20195207879 [04:25] mscdex: like proper async mysql that isn't simply a wrapper around libmysql [04:25] mscdex: stuff like that [04:25] mscdex: i know felixge is working on that specifically [04:25] mscdex: the async mysql module [04:26] tk: hmm [04:26] tk: wtf... where is my desktop again... [04:27] tk has joined the channel [04:28] tekky: there we go [04:29] mscdex: where's tcl? :p [04:30] ashleydev has joined the channel [04:31] tekky: mscdex: I dunno anyone with those initials :P [04:31] mscdex: hehe [04:32] eisd has joined the channel [04:32] tekky: ACTION needs to find a good project for node still [04:33] JimBastard has joined the channel [04:38] mape: SubStack: ryan mentioned google weren't using it for anything big, or at least nothing interesting. Not that they talked about at anyway. [04:39] SubStack: ah [04:40] _announcer: Twitter: "Still searching for the perfect node.js framework ... #node" -- Toby Hede. http://twitter.com/tobyhede/status/20196174281 [04:44] cloudhead: hassox: yo [04:44] hassox: hey [04:45] hassox: https://gist.github.com/d824187030e266ed317c <-- says assert is not defined :( [04:45] cloudhead: hassox: assert is the standard nodejs module [04:45] hassox: ah right [04:45] cloudhead: you have to require it explicitly [04:45] hassox: so require('assert') [04:45] hassox: ? [04:46] cloudhead: assert = require('assert') [04:46] hassox: ja [04:46] hassox: thanx :D [04:46] cloudhead: np : ) [04:46] cloudhead: let me know how coffee goes [04:46] cloudhead: haven't had much feedback on it [04:47] hassox: worked :D [04:47] hassox: thanx [04:47] cloudhead: cool [04:47] JimBastard: !tweet @tobyhede http.createServer works pretty well for me [04:47] JimBastard: nest web framework evar [04:47] JimBastard: best [04:47] JimBastard: it can do anything! [04:48] jesusabdullah: I played with coffee a little bit. I liked it! Though, I haven't done anything serious with it yet. [04:49] danielzilla has joined the channel [04:50] cloudhead: JimBastard: +1 [04:59] jakehow has joined the channel [04:59] _announcer: Twitter: "Express and Connect seem the most complete and have the momentum, but fab is the coolest. http://expressjs.com/ #node #js #fabjs" -- Toby Hede. http://twitter.com/tobyhede/status/20197237383 [05:01] meso_ has joined the channel [05:04] jspiros_ has joined the channel [05:06] meso_ has joined the channel [05:06] JimBastard: hrmmm what do i have to do first in order to cherry-pick commits from a remote repo? [05:06] JimBastard: do i have to add the repo as a remote first? [05:06] JimBastard: ACTION noobs out [05:07] wahnfried: any opinions on template engines? I'm partial to the django tl, so anything that follows a similar philosophy would be nice (I know there's a DTL port to js but it's inactive) [05:07] wahnfried: mustache seems like it might fit [05:07] jesusabdullah: I was liking the look of mustache myself [05:07] jesusabdullah: thouggh [05:07] jesusabdullah: I was using pystache at one point, and found it buggy/lacking [05:07] wahnfried: ah really [05:08] jesusabdullah: YEah [05:08] wahnfried: I just can't stand haml which seems to be a default choice [05:08] jesusabdullah: though I could've been messing up myself though [05:08] jesusabdullah: I'm using jinja2 now [05:09] jesusabdullah: works good [05:09] jesusabdullah: but again, pythons [05:09] wahnfried: jinja is pretty nice for python yea [05:09] _announcer: Twitter: "@_abi_ we'll meet at common ground--node.js" -- Daniel Jackoway. http://twitter.com/jackowayed/status/20197820661 [05:09] jesusabdullah: There's a javascript version of stache right? [05:09] jesusabdullah: It might be better. [05:10] wahnfried: yea seems to be one or two [05:10] jesusabdullah: Thing is, the standard stache implementation is in ruby [05:10] wahnfried: not sure if they play well with node or not [05:10] wahnfried: ah [05:10] jesusabdullah: everything else is kinda secondary [05:10] jesusabdullah: they probably do [05:12] jesusabdullah: ooc, is there a process supervision framework for node yet? [05:12] danielzilla: JimBastard: Add the remote, ``git fetch``, cherry-pick the SHA. [05:12] jesusabdullah: Sure would be fun to use node for my research [05:12] JimBastard: yeah i got it thanks danielzilla [05:12] JimBastard: :-) [05:13] danielzilla: wahnfried / jesusabdullah: I just used http://github.com/janl/mustache.js for a small project. Works fine. [05:14] Tobsn: http://www.universalclass.com/i/crn/30447.htm [05:14] Tobsn: n8. [05:15] Tobsn: http://i.imgur.com/4IIbY.jpg [05:15] Tobsn: but now... nye [05:15] Tobsn: *bye [05:16] wahnfried: danielzilla: thanks. have you seen Mu? http://github.com/raycmorgan/Mu [05:17] jesusabdullah: danielzilla: Cool! [05:17] danielzilla: wahnfried: Saw it, didn't try it. [05:19] cloudhead: wahnfried: Mu is awesome [05:21] hansek has joined the channel [05:22] JimBastard: hey mape [05:22] mape: howdy [05:22] JimBastard: how hard would it be to use http://github.com/mape/connect-assetmanager/blob/master/lib/assetmanager.js without connect? [05:22] JimBastard: its really easy right? [05:23] mape: yeah [05:23] JimBastard: cloudhead is looking into doing something similiar [05:23] JimBastard: are there any docs for that? [05:23] JimBastard: or a good explanation ? [05:23] JimBastard: its just req res right? [05:24] mape: it is a function that returns a function, the initial function setups everything, the returned function serves the content based on the req yes [05:24] mape: There is som docs on: http://github.com/mape/connect-assetmanager [05:24] mape: Other then that it is a simple connect middleware [05:24] mape: And the example usage should be pretty straight forward [05:25] JimBastard: thanks mape ! [05:25] mape: the only "hard" parts are the pre and post hooks which are just functions returning a string :) [05:25] mape: let me know if you have any issues with it [05:25] _announcer: Twitter: "Cool talk on node.js from last week -- http://www.youtube.com/watch?v=F6k8lTrAE2g" -- Per Jacobsson. http://twitter.com/pjacobsson/status/20198697744 [05:26] nuxusr has joined the channel [05:28] nuxusr: while streaming a png file into hash.update (followed by a hash.digest('base64') i get the wrong result. But if its a test file its fine. any thoughts? [05:28] nuxusr: text* [05:28] nuxusr: i tried encoding : ascii and encoding : binary [05:28] nuxusr: same result [05:28] mape: nuxusr: If I recall correctly there were some issues with binary data and the internal base64 implementation [05:28] mape: not sure if it was fixed though [05:29] mape: I'm using http://github.com/pkrumins/node-base64 [05:29] nuxusr: i'll try it out thanks [05:29] mape: I use that to base64 encode images and inject them into the css and it works fine [05:29] nuxusr: i've almost got this s3 library done.. just the md5 hash for binarys thats stopping me... [05:30] mattly has joined the channel [05:30] cloudhead: mape: how do you deal with [05:35] cloudhead: mape: ok, so they're always concatinated [05:35] mape: where cssVersion is assets.cacheTimestamps.css [05:36] mape: cloudhead: Yes, guess I could move it out so they returns an array instead [05:36] AAA_awright has left the channel [05:36] mape: I've never had any issues debugging concated files as long as they aren't minified so never thought about doing it that way [05:36] cloudhead: mape: and if I understand, you can't stream the file from disk? [05:37] mape: cloudhead: They are generated and cached into buffers [05:37] tilgovi has joined the channel [05:37] cloudhead: yea, you're right, it's not that big of a deal [05:37] mape: Since the pre/post manipulations can be pretty heavy, on one project I use yui compiler and insert images as base64, if that runs each request the performance would be awful [05:38] mape: Hence the need for caching, and with the caching it is so fast that the biggest concern is getting the netwrok fast enough to serve them [05:38] nuxusr: mape: arn't there restrictions in ie[7/8] that are pretty limiting on size for base64 images in css [05:38] mape: *network [05:38] cloudhead: gotcha [05:38] mape: Jup, well ie7 doesn't do it at all [05:38] mape: IE8 is 32KB max [05:39] mape: if (data.size < 32768) { content = content.replace(new RegExp(filePath), 'data:image/png;base64,'+base64_encode(fileData)); [05:39] mape: } [05:40] mape: But you can do user agent sniffing to do larger inserts on ff/safari/chrome, but not sure that is a good idea, makes the rendering of the css slower [05:40] mape: I haven't had any issues with it (tried with images large as 150KB) but assume it isn't a good practise [05:40] eisd has left the channel [05:41] nuxusr: mape: for this s3 library i had to drop into net.stream for my put request so that i could use 100 continues (not sending the body until i got the ok from amazon)... do you think the http library will support this any time soon? [05:42] SamuraiJack has joined the channel [05:42] mape: Hmm, 100 continues? Can't you use a callback? [05:42] amerine has joined the channel [05:42] nuxusr: well by design the headers arn't flushed until you do a write or request.end [05:42] nuxusr: and write('') doesn't flush [05:43] nuxusr: and anything else in the write is considered to be body [05:44] mape: cloudhead: oh btw, implementing "less" into the manager should be pretty easy, either use a preManipulate hook or integrate it into core and set the dataType to 'less' [05:44] mape: nuxusr: Hmm k [05:44] nuxusr: mape: btw i updated to the latest node and the md5 is now passing my unit tests :-) [05:45] nuxusr: so looks like its fixed [05:45] mape: Not really sure I'm following exactly what you are doing, have a snippet? [05:45] mape: Nice [05:47] nuxusr: mape: http://pastebin.com/9Q8dWgF7 [05:47] nuxusr: mape: line 51 [05:48] nuxusr: mape: 51 - 60 i write the headers... wait for the 100-continue from amazon then continue to write the body [05:48] nuxusr: 68-81 is the wait / continue [05:49] tjgillies has joined the channel [05:49] astrolin_ has joined the channel [05:50] mjr_ has joined the channel [05:51] EyePulp has joined the channel [05:51] mape: So the issue is performance with all the checking? [05:52] nuxusr: mape: performance doesn't seem to bad, and implementation in lower level sockets wasn't too bad --> just didn't seem possible with the current http implementation to do the 100-continue [05:53] nuxusr: i've tested with files of about 1 gig [05:54] nuxusr: mape: btw this is my first real node.js project so sorry if i'm 'doing it wrong' :-) [05:54] mjr_: nuxusr: thanks for doing it! [05:55] mape: nuxusr: Don't worry about it, I can't say I'm to familiar with s3 or the node net module so yeah, you are probly doing it better then I would [05:57] mscdex has joined the channel [05:58] admc has joined the channel [06:00] _announcer: Twitter: "remember that sys.puts is async in node.js, using it to trace code execution is a bag of lies!" -- Sean Braithwaite. http://twitter.com/brapse/status/20200442695 [06:00] zomgbie has joined the channel [06:01] JimBastard: sys.puts is async? [06:02] isaacs: JimBastard: yep [06:02] JimBastard: i guess it writes to the console async, but lol [06:02] isaacs: !tweet @brapse console.error is your friend [06:03] danielzilla: Or ``sys.debug``... [06:03] tekky: hmm whats the best way to fetch an XML file from a URL? httpClient? or might there be a better method? [06:04] mjr_: remember though that while puts/log is async, the messages are all in order. [06:04] DTrejo__ has joined the channel [06:06] mscdex: mjr_: yeah i was about to mention that [06:06] mscdex: that's usually what matters more than anything [06:06] x_or has joined the channel [06:06] mscdex: tekky: yeah http.Client [06:07] mscdex: tekky: and if you dare to use it since it's undocumented, there's also a static function: http.cat [06:07] mscdex: :X [06:07] mscdex: which is pretty handy i must say [06:07] tekky: heh [06:08] tekky: that would be handy in this case :P since I'm feeding it to libxml [06:08] mscdex: tekky: http://github.com/ry/node/blob/master/lib/http.js#L1022 [06:08] technoweenie has joined the channel [06:09] brapse has joined the channel [06:09] brapse: isaacs: thanks for the tip, i'll use it when i upgrade my node to the latest ;) [06:09] mscdex: basically: http.cat(url, [encoding], [headers], callback) [06:09] mscdex: and callback takes err and a buffer [06:10] sveimac has joined the channel [06:10] mscdex: or a string instead of a buffer if you specified an encoding of course [06:12] ph^ has joined the channel [06:15] _announcer: Twitter: "oops it's #nodejs :-(" -- Tim Barrett. http://twitter.com/Tim_A_Barrett/status/20201196821 [06:16] Aikar has joined the channel [06:17] adrienf: i want to play a little but really have no idea, anyone has a suggestion of a fun (and useful) thing to code for node ? [06:18] tekky: adrienf: I'm in the process of toying with node to feed GeekTools :P [06:19] adrienf: tekky: I stopped using GeekTools a couple of months ago ^^ [06:20] tekky: adrienf: I go back and forth with it... never really sticks but... I'm bored and have nothing to really do :P [06:20] tekky: figured maybe if I found something useful to use it to display it might stick :P [06:22] jspiros has joined the channel [06:23] _announcer: Twitter: "@tim_a_barrett are you familiar with YUI? Check this gallery: http://bit.ly/ddkZrN and then read this http://bit.ly/cj2kbO #nodejs" -- eelcoh. http://twitter.com/eelcoh/status/20201563106 [06:23] bpot has joined the channel [06:24] Neil_ has joined the channel [06:24] jbrantly1 has joined the channel [06:26] mjr_: It's fantastic that people keep asking if anybody has any interesting idea for things to build with node. [06:26] trodrigues has joined the channel [06:26] mjr_: Node is more awesome than the idea supply. [06:26] careo has joined the channel [06:27] adrienf: mjr_: true [06:28] beanie___ has joined the channel [06:28] tekky: hmm... not getting xml.parseXmlString() to return a doc... [06:28] mjr_: I think you kind of have to find your own way with those ideas though. What seems like an interesting idea to me probably doesn't seem that interesting to you. [06:29] mikeal: this client pool is pretty awesome [06:29] mjr_: I'm eager to use it. [06:29] mikeal: i'm gonna check it in to a git branch pretty soon [06:30] mjr_: There are only a few things left that node needs to do really well for me to use it as a tool for world domination. [06:30] mjr_: next is ssl. [06:34] huyhong has joined the channel [06:35] adrienf: mjr_: and making coffee [06:36] benburkert has joined the channel [06:36] SubStack: fuck yeah asynchronous coffee [06:37] _announcer: Twitter: "Scheduling time for node.js today, blames @yesudeep" -- firdaus_halim. http://twitter.com/firdaus_halim/status/20202206527 [06:37] tekky: hmm now who was it that was talking to me about libxmljs the other night.... [06:38] adrienf: ACTION wonders what synchronous coffee would look like [06:38] jamescarr has joined the channel [06:39] tekky: adrienf: like a keg stand on a 1 cup coffee maker? (no waiting for the cup?) [06:42] mscdex: so yeah string.split's limit param is the suck [06:42] mscdex: :( [06:42] mscdex: it throws away any part of the string after the limit [06:43] mscdex: unlike php's explode :\ [06:47] hellp has joined the channel [06:47] beawesomeinstead has joined the channel [06:49] mikeal: is there a way to dump what the event system is waiting on? [06:49] mikeal: my process isn't exiting when it should be [06:50] x_or: Anyone here using geddy? I want to understand how to install a before filter. [06:51] tekky: mscdex: cat() worked awesome... libxmljs just reminded me why I never played with it more :P [06:53] sooli: Hi, does socket.io is iPad compatible ? [06:54] jtsnow has joined the channel [06:54] mscdex: tekky: what problem are you having with libxmljs? [06:55] mjr_: mikeal: I don't know how to do that, but I've often wished for a way. Seems like a good thing to document somewhere. [06:56] mikeal: fuq yeah [06:56] mikeal: pool works [06:56] mikeal: min and max [06:56] mikeal: and it has a test :) [06:56] mikeal: http://github.com/mikeal/node/tree/pool [06:57] tekky: mscdex: I'm slowly working it out, the parseXmlString() didnt output what appeared to be a document.... but after poking it is... just not something that I can inspect [06:58] mikeal: hehe [06:58] mscdex: tekky: inspect how? [06:58] mikeal: i got Aza to be a judge for the node knockout [06:58] mikeal: and they were like "do you want to send us a bio or just pull someone off of wikipedia" [06:58] mikeal: how baller is that! [06:58] tpryme has joined the channel [07:00] tekky: mscdex: in node-repl - the parseXmlString returned what appeared to be a empty o bject but .toString() on it actually turned up the document... just not showing any internal data with sys.inspect(doc) [07:00] mscdex: tekky: hmmm, try: sys.inspect(doc, true); [07:00] tekky: same results [07:01] tyler_ has joined the channel [07:01] mscdex: maybe the properties aren't enumerable then [07:01] technoweenie: http://techno-weenie.net/2010/8/3/protobuf-for-node/ [07:02] tekky: must be [07:02] tekky: ACTION would kill for a XML -> JSON lib -- I hate xml docs :( [07:03] technoweenie: thats kind of impossible w/o having some equally nasty json i think [07:03] technoweenie: maybe if you're dealing w/ specific xml types it'd be easy [07:03] mscdex: tekky: i wrote two [07:03] mscdex: tekky: sync and async [07:03] tyfighter has joined the channel [07:03] mscdex: it's not json, but it converts to js objects [07:03] tekky: mscdex: terrible names :P [07:04] mscdex: eh? [07:04] mscdex: if you're interested i can look them up [07:04] tekky: mscdex: was joking you said you wrote 2, "sync and async" :P I said terrible names :P [07:04] mscdex: ah [07:04] bvleur has joined the channel [07:04] tekky: and js objects is as good as JSON :P [07:05] tekky: mscdex: I'd be curious to take a look if you can find em [07:08] mscdex: tekky: here's the async version: http://gist.github.com/416021 [07:13] tekky: mscdex: thx will read over it tomorrow going for some sleep now [07:13] mscdex: alright. adios. [07:15] peutetre has joined the channel [07:20] Gruni has joined the channel [07:23] mscdex: anyone know where the Error object that's available globally in v8/node is defined? [07:25] micheil has joined the channel [07:29] felixge has joined the channel [07:29] adrienf: mscdex: i think it's native from v8: v8::Exception::Error [07:30] adrienf: (along with SyntaxError, ReferenceError, RangeError and TypeError) [07:30] bpot has joined the channel [07:31] nuxusr: how do i link to another project on github in support folder? [07:32] SamuraiJack has joined the channel [07:33] sveimac has joined the channel [07:34] mscdex: nuxusr: using submodules, but be aware that downloading a tarball or zip from github's site won't include the submodules [07:38] Egbert9e9 has joined the channel [07:38] jetienne has joined the channel [07:42] Thomas_ has joined the channel [07:42] Thomas_ has left the channel [07:45] nuxusr: s3 library published: http://github.com/nuxusr/Node.js---Amazon-S3 [07:45] nuxusr: supports 100-connects, progress % on upload/download, md5 signing, streamming.. [07:46] jkreeftmeijer_ has joined the channel [07:50] javajunky1 has joined the channel [07:50] teemow has joined the channel [07:52] tyfighter has joined the channel [07:57] jkreeftmeijer_ has left the channel [07:59] jkreeftmeijer_ has joined the channel [08:03] isaacs: w00t! http://github.com/isaacs/npm/issues/issue/7#issue/7/comment/338887 [08:07] markwubben_ has joined the channel [08:08] geojeff has joined the channel [08:08] mape: isaacs: have a sec to check http://gist.github.com/506030 ? [08:09] FransWillem has joined the channel [08:09] isaacs: mape: i'll leave the tab open. but it's 01:09 over here in CA, and my brain is pooped. [08:09] mape: k [08:11] isaacs: mape: btw, rollbacks in 0.1.23, and update! [08:11] mape: When installs break? [08:11] isaacs: yeah [08:11] hassox has joined the channel [08:12] isaacs: and, if you install a new version of something, it'll update the dependencies to point at the new thing, and remove the old versions if possible to do so safely. [08:12] isaacs: so if you occasionally just do "npm update", you'll not have a bunch of old versions hanging around with dependencies so that they can't be removed. [08:12] mape: haven't pushed 0.1.23 to npm? [08:12] isaacs: mape: no, there's still a bit more i wanna squeeze into this version, and some things aren't completely stablel [08:12] mape: Ah k [08:13] isaacs: mape: if you get the code and then make install, you'll get 0.1.23beta [08:14] mape: will try after work [08:15] N` has joined the channel [08:17] rsms has joined the channel [08:19] TomY has joined the channel [08:22] jetienne_ has joined the channel [08:23] jetienne_: q. what is the diff between plain export and module.export M [08:23] jetienne_: ? [08:24] slaskis has joined the channel [08:24] SubStack: jetienne_: you can assign to module.export [08:24] SubStack: module.export = function () {} [08:24] mscdex: man, imap is ridiculous [08:25] mscdex: i wonder why they decided to design it this way [08:25] SamuraiJack_ has joined the channel [08:25] jetienne_: SubStack: hmm ok, i only use export.bla = function(){} ... what is the purpose of module.export = [08:26] mscdex: it's exports isn't it? [08:26] hellp has joined the channel [08:26] SubStack: so you can do var Moo = require('moo'); var m = new Moo [08:26] SubStack: that sort of thing [08:26] shreekavi has joined the channel [08:26] jetienne_: SubStack: got it. thx [08:26] jetienne_: mscdex: yep i keep forgetting the s [08:27] SubStack: oh hah didn't even notice [08:27] virtuo has joined the channel [08:28] FransWillem: SubStack: Saw you started watching IPCNode, what do you think? [08:28] SubStack: FransWillem: some neat features, like circular refs [08:28] FransWillem: SubStack: Yeah, thought those were pretty cool too :p [08:29] FransWillem: SubStack: Came with a price, though, the whole reference-counting became a whole lot more complex because of that ;) [08:30] tek has joined the channel [08:31] marcusl has joined the channel [08:32] sveimac has joined the channel [08:33] mAritz has joined the channel [08:33] Viriix has joined the channel [08:34] shockie has joined the channel [08:37] mizerydearia has joined the channel [08:37] markwubben_ has joined the channel [08:40] BryanWB has joined the channel [08:40] markwubben_ has joined the channel [08:42] markwubben_ has joined the channel [08:43] markwubben__ has joined the channel [08:44] marcusl has left the channel [08:45] jspiros_ has joined the channel [08:47] femto has joined the channel [08:47] saikat has joined the channel [08:59] Gruni has joined the channel [08:59] cataska has joined the channel [09:01] ctp has joined the channel [09:01] xla has joined the channel [09:02] ctp_ has joined the channel [09:07] adrienf: what are the risks of using Script.runInNewContext with untrusted code ? [09:09] FransWillem: Has anyone ported the EventEmitter class to the web? (e.g. compatible with most webbrowsers) [09:10] SubStack: it's been done [09:10] SubStack: I did it once and I've seen another implementation [09:11] FransWillem: Shouldn't be too easy to do, but just don't feel like doing double work ;) [09:11] SubStack: http://github.com/substack/stackvm/raw/dnode/static/js/util/events.js [09:12] SubStack: might not be strictly the same, but probably close enough [09:13] FransWillem: Hmm, isn't splice one of the function unavailable in early IE versions ? [09:13] mscdex: ie 3.01? [09:13] mscdex: :p [09:13] ewdafa has joined the channel [09:15] FransWillem: I think 5 or 6 didn't have it [09:19] FransWillem: Ah, yeah IE 5.5+ apparently [09:21] tpryme: Anyone here working with the latest version of jade? [09:21] maushu has joined the channel [09:34] matclayton has joined the channel [09:38] felixge has joined the channel [09:38] felixge has joined the channel [09:46] felixge_ has joined the channel [09:46] felixge_ has joined the channel [09:46] javajunky1 has joined the channel [09:56] FransWillem: Gaaah [09:56] FransWillem: what's the proper way to create callback functions in a loop that JSLINT won't complain about ? [09:57] javajunky1: (function(x){})(val); or some such probably [09:57] javajunky1: it really depends on why its complaining, but ^^^ will ensure your scope is probably what you expect it to be [09:58] FransWillem: Nope, complains about that too [09:58] proppy has joined the channel [09:58] javajunky1: jslint can be whingy, whats the complaint specificall [09:58] javajunky1: y [10:01] FransWillem: Problem at line 674 character 14: Don't make functions within a loop. [10:01] javajunky1: ah, well yes you're going to be a bit buggerred by that warning [10:02] javajunky1: if you're just trying to make stuff work in jslint, you'll have to call a function that returns a function that you store… unless jslint is a lot smarter than I thought it won't figure that out …. but you've gotta think about a) should you be doing this at all if you're getting warnings about it and b) if so then why re-architect stuff just because a tool tells you too [10:02] javajunky1: s/too/to/ [10:04] FransWillem: Well, in one case the anonymous function was the same for each iteration, so I moved it out of the loop, in the other case, yes, I actually need it to be different for each iteration, and I was already using that scope trick :p [10:05] javajunky1: then I suggest ignoring jslint ;) [10:15] FransWillem: Hmmm, worked around it by having a createCallbackFunction function outside the loop :p [10:18] zemanel has joined the channel [10:21] nobodyfound has joined the channel [10:24] astrolin has joined the channel [10:27] Blink7 has joined the channel [10:28] zemanel has joined the channel [10:30] maushu: dun dun dun [10:32] SamuraiJack__ has joined the channel [10:33] romainhuet has joined the channel [10:40] fermion has joined the channel [10:41] omarkj has joined the channel [10:46] javajunky1: FransWillem: yeah I figured it would, but was it worth it ? ;) [10:48] FransWillem: javajunky1: Meh, not for that particular bit, but it did help me catch a lot of other bad things :p [10:48] FransWillem: javajunky1: And now the code is completely JSLINT-proof, I won't be greeted with a shitload of warnings next time I change something and check again [10:50] FransWillem: Hmm, does anyone have any ideas on making a library available client-side too? e.g. how to cope with dependencies on EventEmitter or other node.js classes. [10:50] FransWillem: Should I [10:50] javajunky1: there's quite a few approaches people are using on this ;) [10:50] FransWillem: Should I pack it with it's own implementation of EventEmitter internally, or have it reference one that can be interchanged for another ? [10:53] javajunky1: not sure on eventemitter tbh. [10:54] omarkj: You want to use something with a similar API as the EventEmitter on the client site (I'm guessing webpage?) [10:54] FransWillem: Yes [10:55] FransWillem: Basically, I've got a class (IPCNode) that implements ReadableStream and WriteableStream, and I want to be able to use that same class on a webpage [10:55] omarkj: Okay. [10:56] omarkj: I just have an object that maps some of the EventEmitter API to (in my case) the dojo event handling system. [10:56] FransWillem: And preferably I'd like to do it in a way that allows it to easily be used side-by-side with other libraries [10:57] FransWillem: Hmm [10:57] FransWillem: I could possible also change the IPCNode class to not implement Stream, but instead take a stream that it spits all its info to... [10:58] omarkj: Maaaybe. [10:59] FransWillem: Hate how there's no consensus on making libraries for both node.js and web use :/ [11:00] omarkj: Heh, maybe. I haven't been able to reuse that much code so I've mostly abstracted some of the API to keep me from making errors.. [11:01] felixge has joined the channel [11:04] FransWillem: How does this look: http://pastebin.com/X2c0dZF3 [11:04] FransWillem: Shouldn't pollute namespace apart from one IPCNode variable [11:04] FransWillem: And should be able to handle both browser and node.js [11:04] BryanWB has joined the channel [11:05] maushu: Hey felixge. [11:05] felixge: maushu: hey, sup? [11:05] maushu: Still coding. As always. xD [11:05] maushu: How is your startup going? [11:06] felixge: maushu: pretty good : ) [11:06] felixge: maushu: launching the new pricing soon [11:12] blaze-x has joined the channel [11:15] omarkj: FransWillem: That should do it. [11:16] proppy has joined the channel [11:18] elliottkember has joined the channel [11:21] davidwalsh has joined the channel [11:22] rsms has joined the channel [11:23] SamuraiJack has joined the channel [11:24] rednul has joined the channel [11:25] SamuraiJack has joined the channel [11:26] elliottkember: hey guys, I'm trying to get out multiple lists using the asynchronous redis library [11:26] tahu has joined the channel [11:26] elliottkember: just wondering whether I'm going about this wrong, or whether there's a synchronous version [11:27] elliottkember: I want to get out { listName : [/* listNamevalues */] , listName2 : [/*listName2Values*/] } [11:29] elliottkember: currently thinking I'm going to have to recurse with names[i++] [11:32] micheil: maybe try in #redis [11:32] micheil: if it exists [11:32] micheil: which is does [11:33] micheil: or... [11:33] FransWillem: elliotkember: Actually, could you elaborate on your problem? Is the problem the asynchronous nature of Node.js, or are you unfamiliar with how to do this in redis? and what did you try already ? [11:35] d0k has joined the channel [11:38] BryanWB has joined the channel [11:46] oberhamsi has joined the channel [11:52] shreekavi has joined the channel [11:53] MattJ has joined the channel [12:00] proppy: Hi, I'm writing simple test cases for a node.js game server, and I have to execute many sql statement in sequence in order to setup the test data in the database. [12:00] proppy: http://playground.mekensleep.com/hg/games/proppy/file/1a8f12961b9b/server/playground_server/test_followpath_linear.js [12:00] proppy: the only way I figured out is pretty nested [12:01] FransWillem: proppy: Did you check out the Do library ? [12:01] proppy: I guess I should take a look a the 'Step' library ? [12:01] proppy: FransWillem: Do > Step ? [12:01] FransWillem: proppy: Actually, I don't know, but I remember seeing the Do library that should be able to do this for you :) [12:02] FransWillem: Step looks pretty good too [12:03] proppy: it seems it is the same author :) [12:03] jetienne has joined the channel [12:04] FransWillem: proppy: Step seems more recent though, would use that [12:04] proppy: FransWillem: he updated his 'Do' article to match node 102 thought [12:04] FransWillem: ? [12:06] proppy: http://twitter.com/creationix/status/19697303801 [12:06] proppy: also http://twitter.com/ericclemmons/status/19874759690 :) [12:07] FransWillem: Hmm, both libraries seem fine, would suggest using the one you feel most comfortable in :p [12:07] proppy: http://twitter.com/creationix/status/19875143022 :) [12:07] proppy: Do is for continuables, Step is for plain callbacks [12:07] proppy: needs to figure out how continuables is != from plain callbacks [12:07] proppy: I still lack async vocabularies :) [12:08] FransWillem: Hmmm, actually, I'd have no idea what the difference is either [12:09] proppy: reading the do artcle it seems pretty self explanary [12:09] proppy: http://howtonode.org/do-it-fast [12:13] jetienne: q. in a foo.js, when it requires a relative path, it is relative to foo.js location ? to the original script nodejs ? or to the current path [12:13] mscdex: !tweet @Reustle yes, from an IRC bot built with node.js on irc.freenode.net #Node.js [12:14] blaines has joined the channel [12:14] jmar777 has joined the channel [12:14] mscdex: !tweet @Reustle we're here waiting for your questions ;-) [12:17] elliottkember: whoops, sorry FransWillem - hid Colloquy and forgot I asked the question! [12:17] elliottkember: I managed to do it with recursion [12:17] mscdex: jetienne: well, to be sure you can use __dirname to represent the path of the script itself [12:18] dnolen_ has joined the channel [12:20] chrischris has joined the channel [12:23] blaines has joined the channel [12:24] blaines has joined the channel [12:27] blaines has joined the channel [12:29] bradleymeck has joined the channel [12:31] tmedema has joined the channel [12:32] voxpelli has joined the channel [12:33] voxpelli: Anyone know if it's possible to close a HTTP Client request? [12:34] voxpelli: There's pause() and there's resume() - but there's no close() - so if the request goes on forever I can't ever close it down? [12:38] ctp has joined the channel [12:39] jmar777: voxpelli: are you referring to the http.ClientRequest? [12:39] jmar777: voxpelli: there's a .end() [12:39] mscdex: voxpelli: you can either use .end() or .destroy(). The former sends the FIN packet and closes, whereas the latter forcefully closes the connection without FIN [12:40] voxpelli: jmar777: the .end() there is used to send the request - I want to close the connection in http.ClientResponse [12:40] jetienne: voxpelli: i use client.connection.destroy() [12:41] jetienne: voxpelli: where client = http client [12:41] voxpelli: jetienne: mscdex: ok - thanks - will try that - but didn't find it in the documentation? [12:41] jetienne: voxpelli: i had to parse the source to get it :) [12:41] mscdex: voxpelli: if you're inside an http.Server's request event you can use: req.connection.destroy() where req is http.ClientRequest [12:41] SamuraiJack_ has joined the channel [12:42] mscdex: voxpelli: http.Client inherits from net.Stream [12:42] mscdex: and http.Server from net.Server [12:42] voxpelli: mscdex: I'm inside a http.Client's ClientResponse [12:42] voxpelli: mscdex: Ah - that's useful to know [12:47] astrolin_ has joined the channel [12:49] pgriess has joined the channel [12:49] tahu has joined the channel [12:55] tisba has joined the channel [12:56] davidsklar has joined the channel [13:04] rnewson has joined the channel [13:05] [[zz]] has joined the channel [13:07] proppy: has anyone tested node inspector ? [13:07] proppy: I get proc exited with code: 127 signal: null [13:07] proppy: when starting it [13:09] kriszyp has joined the channel [13:10] bradleymeck: i have used it, never say that [13:10] bradleymeck: saw* [13:10] proppy: maybe that's because I have debian package of node.js [13:11] ben_alman has joined the channel [13:14] elliottkember: sweet, got my app working [13:14] elliottkember: I've rewritten cpu.elliottkember.com in node.js [13:14] elliottkember: weirdly it's not as fast as I thought [13:15] sr: elliottkember, nice. what are you using to collect the data? [13:15] elliottkember: on the live one I'm using postgres! [13:15] elliottkember: it was a quick Heroku proof of concept [13:15] elliottkember: but in the node version I'm using redis [13:16] sr: elliottkember, i mean the data from the box. the cpu usage [13:16] jtsnow has joined the channel [13:16] MattJ: elliottkember: what are you graphing with? Raw canvas? [13:16] elliottkember: flot, jQuery plugin [13:17] proppy: elliottkember: chocolate is doing nothing :) [13:17] BryanWB has joined the channel [13:17] elliottkember: hehehe, yep! [13:17] elliottkember: that's my VPS [13:17] elliottkember: used to use it for Rails apps before I moved most of them to Heroku [13:17] proppy: elliottkember: are you polling or using websocket ? [13:17] proppy: (socket.io ?) [13:17] elliottkember: that one's just polling [13:18] sr: is it collectd? [13:18] elliottkember: nope, just a little ruby script that does a curl :) [13:19] bradleyprice has joined the channel [13:19] elliottkember: it's fairly ghetto, but it works quite well [13:19] sr: curl against what? i don't understand how yer collecting the usage data :P [13:20] elliottkember: http://pastie.org/private/5ajcned8a3ljeyje8pmyq [13:21] elliottkember: `uptime`.split(' ')[-3] :) [13:21] sr: haaaah i see :) nice [13:21] elliottkember: so yeah, nice and ghetto [13:21] zapnap has joined the channel [13:21] elliottkember: I just can't understand why the node.js version is so slow [13:22] elliottkember: ~23 requests per second :| [13:22] sr: elliottkember, setInterval [13:22] sr: you should be using setTimeout instead [13:23] elliottkember: sr: on the graph page? [13:24] sr: yeah. like a recursive timeout to avoid god piling effect [13:25] elliottkember: ah, I see - a good call [13:25] Draggor has joined the channel [13:25] joshbuddy has joined the channel [13:26] elliottkember: stlll, I would've thought the express.js version would be faster [13:26] jherdman has joined the channel [13:27] elliottkember: the way I'm getting the data out of redis is a bit janky - a keys() call, then a recursive bit to make an array using the next name [13:28] elliottkember: http://pastie.org/private/ri00mrl7jdk1kp1mric49a [13:28] elliottkember: pretty awful :D [13:31] sr: hehe [13:31] amrnt has joined the channel [13:31] amrnt has left the channel [13:33] shreekavi has left the channel [13:33] aheckmann has joined the channel [13:33] javajunky1: elliottcable: is express in production mode ? .. if your server side stuff is cpu heavy you may benefit from running a multi process spark [13:34] sudhirj has joined the channel [13:34] elliottkember: from what I can tell it's Redis that's slowing it down [13:34] elliottkember: javajunky1: I've tried it in production with no difference [13:34] elliottkember: javajunky1: also it's elliottkember not elliottcable [13:35] javajunky1: elliottkember: sorry, tab complete ;) [13:35] javajunky1: elliottkember: you tried using mape's node-inspector ? [13:35] shockie_ has joined the channel [13:36] elliottkember: javajunky1: nope, will try that - thanks :) [13:37] elliottkember: node-profile or node-inspector? [13:40] mscdex: node.js rules! [13:42] kuya: hehe [13:44] jetienne: is there a way to do sys.puts("my prefix string " + sys.inspect(myvar)); in firebug console ?. [13:45] jetienne: console.log doesnt support %ol [13:45] jetienne: console.log doesnt support %o [13:45] javajunky1: elliottkember: sorry node-profile [13:46] dylang has joined the channel [13:46] kuya: dont think so jetienne [13:47] kuya: just have to do console.log('my prefix'); console.dir(myvar)); [13:48] kuya: tho console.log('myprefix', myvar) will usually let you right click and inspect the object [13:48] jetienne: kuya: it does now :) [13:48] kuya: ACTION raises eyebrow [13:48] jetienne: kuya: console.log("aaa %j", {a:3}); [13:48] jetienne: this already work [13:48] dnolen_ has joined the channel [13:48] kuya: orly [13:49] jetienne: and console.* is the only part i patched in nodejs [13:49] kuya: they have a lot of undoc'd stuff - i aleady told them a few [13:49] kuya: >>> console.log('hello %j', {a:1}) [13:49] kuya: hello Object { a=1} [13:49] kuya: >>> console.log('hello', {a:1}) [13:49] kuya: hello Object { a=1} [13:50] kuya: identical [13:50] kuya: i always use the second form [13:51] gf3 has joined the channel [13:51] bradleymeck has joined the channel [13:52] kuya: i thought you wanted more something like console.log('hello', console.dir(myvar)) ( which obv doesnt work ) [13:53] rwaldron has joined the channel [13:53] rwaldron has joined the channel [13:54] kuya: ACTION hates that sys.puts puts newlines between each argument  [13:54] elliottkember: argh, 25.99 requests per second in node.js! [13:54] elliottkember: that's Rails territory [13:55] jetienne: http://gist.github.com/506408 <- kuya [13:55] BryanWB has joined the channel [13:55] kuya: nice [13:56] FransWillem: elliotkember: What kind of requests? redis ? [13:56] hdon_ has joined the channel [13:57] ajpiano has joined the channel [13:57] elliottkember: FransWillem: yeah, redis / node.js [13:57] elliottkember: I've been trying to debug this [13:57] jetienne: kuya: nope this is buggy :) [13:58] jetienne: ok i will add console.log('hello', {a:1}) too [13:59] kuya: and args not converted via %-formatting should be joined by ' ' and appended :) [13:59] kuya: *any [13:59] kuya: thats the law [14:00] daniellindsley has joined the channel [14:00] wattz: man, I want to build a heroku but hyper specific to node [14:00] wattz: i could even use node to handle the balancing [14:01] elliottkember: okay if I take it down to db.lrange(name, 0, 10 instead of db.lrange(name, 0, 300 it's much faster! [14:04] jetienne: node> console.log("a %o", {a: 3}, 5) [14:04] jetienne: a {"a":3}5 [14:05] aheckmann has left the channel [14:05] aheckmann_ has joined the channel [14:06] elliottkember: huh - I think it was my redis settings [14:06] elliottkember: it may have been swapping everything [14:06] elliottkember: up to 400 requests a second pulling 300 items :) [14:08] [[zz]] has joined the channel [14:09] zaach has joined the channel [14:10] aheckmann has joined the channel [14:12] elliottkember: I'm going to chalk it down to data throguhput and leave this bad boy [14:13] elliottkember: it's still much faster than the Rails version, so I guess that's a win! [14:14] romainhuet_ has joined the channel [14:16] dylang has joined the channel [14:17] rsms has joined the channel [14:19] javajunky1: elliottkember: yay [14:19] loincloth has joined the channel [14:20] javajunky1: elliottkember: I imagine you could probably get some serious cache benefits as well with that kinda data pull [14:20] elliottkember: javajunky1: oh yeah, for sure - I could even just keep the data in node.js and append to it [14:20] elliottkember: I just figured redis would be fast enough for that [14:21] romainhuet_ has joined the channel [14:21] elliottkember: mind you, my redis configuration probably isn't hte best [14:21] ph^ has joined the channel [14:22] mape: elliottkember: can't you cache the output for a while? [14:22] elliottkember: mape: probably, yeah [14:23] mape: guess it depends on how fresh it is [14:23] elliottkember: well, `uptime` only actually changes every 5 seconds or so [14:23] jetienne: man console has to be fixed [14:23] jetienne: the keyboard handling is real bad [14:24] romainhuet_ has joined the channel [14:26] samdk has joined the channel [14:27] jetienne: + (i == args.length ? '' : ' ') + args.slice(i).map(function(x){return typeof(x) == "string" ? x : JSON.stringify(x);}).join(' '); <- this is ugly [14:27] kevwil has joined the channel [14:31] jetienne: http://pastebin.com/h54MBjte or http://pastebin.com/HgRnBL9b ? both are doing the same [14:31] jspiros has joined the channel [14:31] bradleyprice has joined the channel [14:31] jetienne: just a matter of style [14:31] jetienne: ryah: if you are around, this is for a patch, so your opinion is key :) [14:33] hdon_ has joined the channel [14:37] steadicat has joined the channel [14:39] bradleymeck: sweet module dir to file packer working... breaks on submodules / modules that use fs to load... [14:39] FransWillem: ? [14:39] pengwynn has joined the channel [14:40] bradleymeck: takes a dir and joins it into a single js file (to be used for static compiling is the use case) [14:40] SamuraiJack__ has joined the channel [14:41] grahamalot has joined the channel [14:42] donspaulding has joined the channel [14:44] rsms has joined the channel [14:45] BryanWB has joined the channel [14:46] JimBastard has joined the channel [14:50] jetienne: q. how to get the stacktrace in nodejs ? [14:51] ceej has joined the channel [14:53] deepthawtz has joined the channel [14:58] rsms has joined the channel [14:59] jakehow has joined the channel [15:01] temp01 has joined the channel [15:02] bradleymeck: jetienne easiest way is (new Error()).stack [15:02] jetienne: bradleymeck: thanks [15:02] jetienne: bradleymeck: even if i found out in between :) [15:02] bradleymeck: hehe [15:06] BryanWB has joined the channel [15:09] jamescarr: :( [15:10] jamescarr: Node KO is less than a month away and I am still out of ideas for what to make at it :( [15:10] powdahound has left the channel [15:10] quirkey has joined the channel [15:12] jetienne: http://gist.github.com/506529 for console.trace [15:13] jetienne: http://gist.github.com/506408 for console.log with %o and unparsed args appended [15:15] jkreeftmeijer_: I just published the follow-up article on my Node experiment from last week -> http://jeffkreeftmeijer.com/2010/things-i-learned-from-my-node.js-experiment/ :) [15:15] jkreeftmeijer_: What do you think? :) [15:18] bradleymeck: ACTION trods over to read [15:20] FransWillem: jkreeftmeijer_: Good read :) [15:20] mscdex: node.js rules! [15:21] jkreeftmeijer_: FransWillem: great to hear :) [15:21] FransWillem: btw, dutchy ? [15:21] jkreeftmeijer_: Klopt :) [15:21] FransWillem: :p [15:21] FransWillem: jkreeftmeijer: Did you try enabling other methods in Socket.IO, like long-polling ? [15:22] FransWillem: jkreeftmeijer: I'm planning to write a card-game with Node.js, for the general public (so I'm not expecting a lot of websocket compatible clients), wondering how well long-polling will hold up. [15:23] jetienne: jkreeftmeijer_: i was curious about the background of the blog. you update it often. how do you pick the pictures [15:23] bradleymeck: if its written right, long polling should only be fail in terms of memory use, and i do mean fail if you do a lot [15:24] jkreeftmeijer_: jetienne: http://www.mobypicture.com/user/jkreeftmeijer [15:24] jkreeftmeijer_: every time I tweet a picture, the background image gets updated [15:24] jetienne: jkreeftmeijer_: ok [15:24] jkreeftmeijer_: jetienne: explanation: http://jeffkreeftmeijer.com/2010/dude-whats-up-with-this-background-image/ :) [15:25] proppy: FransWillem: you should check out pokersource project (not written in node.js thought), which feature a javascript poker client long polling a twisted server. [15:25] proppy: http://pokersource.info/ [15:26] aurynn has joined the channel [15:28] aurynn has joined the channel [15:29] EyePulp has joined the channel [15:31] kuya: ACTION thinks he has the same tshirt as jkreeftmeijer_  [15:35] Viriix: the nodejs api doc says that the Script methods "return the result", i've been playing around with them, and it seems like they return nothing [15:38] steadicat has joined the channel [15:40] amrnt has joined the channel [15:41] sudoer has joined the channel [15:44] jkreeftmeijer_: kuya: what shirt? :P [15:44] bpot has joined the channel [15:44] kuya: in the bg of that post [15:45] jkreeftmeijer_: that's not me :P [15:45] kuya: ah! [15:45] kuya: lol [15:45] kuya: well i have the same as that person then ;) [15:45] kuya: hang on... have you been taking pictures of me?! [15:45] hansek has joined the channel [15:47] jetienne: night prowler :) [15:47] rnewson has joined the channel [15:51] paul_irish has joined the channel [15:53] jkreeftmeijer_: kuya: have you been pair programming with me? :P [15:53] benburkert has joined the channel [15:54] JimBastard has joined the channel [15:54] cardona507 has joined the channel [15:54] hansek has joined the channel [15:55] jakehow has joined the channel [15:56] mattly has joined the channel [15:59] technoweenie has joined the channel [15:59] feroz_ has joined the channel [16:01] shockie: quick question, how do i require a file that sits in a parent folder? [16:01] jesusabdullah: shockie: require('../file'); ? [16:01] kuya: require('../blah.js') [16:01] FransWillem: require("../something"); [16:01] jesusabdullah: Hah! [16:01] shockie: lol [16:01] jesusabdullah: We're so cool. [16:01] jesusabdullah: HIGH FIVES ALL AROUND [16:01] kuya: i got it wrong :( [16:02] bradleymeck: not if its blah.js.js? [16:02] kuya: ;) [16:02] kuya: of course thats what i meant... [16:02] jesusabdullah: Well YEAH [16:03] shockie: haha lol, i alreadt trie ../, but it was another folder up:D [16:03] technoweenie: ../../ [16:03] shockie: hate path checking [16:04] bradleymeck: technoweenie was it you that wanted a means to staticly include files in node binary? [16:04] technoweenie: yea [16:04] technoweenie: for distributing enterprise apps [16:05] bradleymeck: i got a bundler working going to test it, just wanted to see who can test after me [16:05] slaskis_ has joined the channel [16:06] technoweenie: i'll test it [16:07] zomgbie has joined the channel [16:07] bradleymeck: going to be tomorrow prolly when i got time [16:09] silentrob has joined the channel [16:10] dmcquay has joined the channel [16:11] jesusabdullah: Can any of you recommend a really simple process supervisor? Something like daemontools, but less irritating to get going [16:11] jesusabdullah: Kind of a long shot, but *shrug* [16:12] bradleymeck: monit? [16:12] jesusabdullah: Maybe [16:12] jesusabdullah: The thing is, they aren't really long-running processes so much as they are jobs that like to segfault half-way through [16:12] blaines has joined the channel [16:12] jesusabdullah: on a computer that isn't mine [16:13] jesusabdullah: Does that make sense? [16:13] mscdex: upstart? [16:14] mscdex: unless you're on osx [16:14] jesusabdullah: Hmm [16:14] mscdex: or bsd [16:14] jesusabdullah: No, I think it's fedora core 4 [16:14] jesusabdullah: XD [16:14] mscdex: meh [16:14] mscdex: fedora used to use upstart by default... not sure if they've changed or not [16:14] jesusabdullah: hmm [16:14] mscdex: but upstart makes it dirt simple [16:14] jesusabdullah: That's exactly what I need [16:15] jesusabdullah: All I need it to do is start the process again if it segfaults [16:15] mw has joined the channel [16:15] mw has joined the channel [16:15] maushu: I need a global event system. Hmm. [16:15] jesusabdullah: and, ideally, have a way to signal that no, you shouldn't start it again this time [16:16] maushu: Anyone knows of a global event system for browser javascript? [16:16] tjholowaychuk has joined the channel [16:16] mscdex: maushu: no, but you'll probably need more cowbell [16:16] maushu: MOAR COWBELL! [16:17] bradleymeck: global event system means? [16:17] jesusabdullah: Thanks for the help guys [16:17] mscdex: oh man, cisco sucks [16:17] mscdex: and their website sucks [16:17] jesusabdullah: mscdex: Yes they do! [16:18] jesusabdullah: mscdex: I need to use cisco's vpnclient to access my work computer from home, and, well, it's a piece of shit. :( [16:18] mscdex: their website gives instructions for one task that leads to an infinite loop basically [16:18] mscdex: on their phone [16:18] jesusabdullah: It's SO crappy that it's expected to fail to compile! Basically, you run it, copy-paste the errors into google, and hope someone dug into the C and fixed it for you [16:18] mscdex: :-( [16:18] jesusabdullah: It's horrible [16:19] mscdex: ACTION shakes a fist at cisco [16:22] shockie has left the channel [16:23] quirkey has joined the channel [16:24] silentrob has joined the channel [16:25] jesusabdullah: Huh. upstart is evented? [16:25] bradleymeck: maushu are you just looking for an eventlistener interface? [16:26] maushu: Nah, I will just implement some sort of GlobalListener object where other objects can add events. [16:26] maushu: jesusabdullah: Yup. [16:27] maushu: bradleymeck: Basically I want a way to add events not directly linked to an object. [16:28] jamescarr: maushu, yes, I'd like to just publish an event and any subscribers can pick it up [16:28] jamescarr: without going through the direct EventEmitter [16:28] bradleymeck: but the source would still show up? [16:29] maushu: jamescarr: Well, I'm talking about client side but it should work in node.js too. [16:29] maushu: Just create a object that inherits from EventEmitter and make it global. [16:29] jamescarr: hmmm [16:30] jamescarr: client side I always use jquery or YUI's custom event stuff [16:30] maushu: Hmm, I was thinking about jquery events. [16:30] jamescarr: I used them, they're easy [16:31] maushu: But aren't they specific to objects or nodes? [16:31] weepy has joined the channel [16:32] weepy: WORD [16:32] weepy: hey has anyone here written to a ruby child process via STDIN ? [16:32] maushu: OH SHI- [16:32] maushu: Ruby? Wut. [16:32] weepy: i need to send some emails [16:33] maushu: No one uses ruby here. No one. [16:33] weepy: via gmail [16:33] weepy: it's not about ruby really [16:33] ewdafa has joined the channel [16:33] maushu: Use their API? [16:33] jesusabdullah: I send emails using mutt [16:34] weepy: mutt [16:34] jesusabdullah: echo "Yo dawg I heard u liek attachments" | mutt -a file.tgz -s 'yo homes!' jfh@jesusabdullah.net [16:34] weepy: http://www.mutt.org/ [16:34] weepy: ? [16:34] jesusabdullah: like that! [16:34] weepy: i need to send via remote smtp [16:35] jesusabdullah: What do you mean? [16:35] maushu: ACTION spams jesusabdullah e-mail with bestiality. [16:35] jesusabdullah: maushu: The joke's on you--that's not my real email! OHOHO [16:35] weepy: smtp [16:36] maushu: It will get there! [16:36] jesusabdullah: I'm no email expert, so I guess what I'm asking is, how is this different from regular email? [16:36] weepy: its not '! [16:36] weepy: :) [16:36] jesusabdullah: So why won't mutt work? [16:36] jesusabdullah: <_> [16:36] weepy: i wasn't sure if it could send to smtp [16:36] jesusabdullah: I would assume so [16:36] jesusabdullah: Oh, umm, also [16:36] jesusabdullah: have you heard of lamson? [16:37] jesusabdullah: I haven't used it yet, but someday I might! [16:37] jesusabdullah: http://lamsonproject.org/ [16:37] jesusabdullah: For all I know, it could be more your speed [16:37] weepy: sounds kool ! [16:37] jesusabdullah: Yeah! [16:38] weepy: fanx [16:38] jesusabdullah: Zed Shaw's a character [16:38] tek: weepy: SMTP is used to send email - period.... [16:38] jesusabdullah: fbofw [16:38] saikat has joined the channel [16:40] jesusabdullah: Huh [16:40] jesusabdullah: My pkg-config script is TOO OLD [16:43] rsms has joined the channel [16:43] mjijackson has joined the channel [16:43] SamuraiJack has joined the channel [16:44] marshall_law has joined the channel [16:44] ben_alman has joined the channel [16:48] silentrob has joined the channel [16:49] isaacs has joined the channel [16:49] loincloth has joined the channel [16:49] mattly has joined the channel [16:50] creationix has joined the channel [16:51] sudoer has joined the channel [16:54] felixge has joined the channel [16:54] EyePulp: for the record lamson isn't the smtp server, just a mail handler for building mail based apps [16:55] EyePulp: I think he still recommends exim or somesuch to actually send the stuff [16:55] jesusabdullah: Sounds right [16:57] rwaldron has joined the channel [16:57] tahu has joined the channel [16:58] gwoo has joined the channel [16:59] saikat has joined the channel [17:01] bradleymeck: ryah, any recommendation on how to patch the build process so that all files in node/lib get added to the natives list for require()? [17:03] benburkert has joined the channel [17:04] bradleymeck: and and moving from the utf8 last night to binary seems to have worked even if it seems deprecated [17:06] MrNibbles: gents! made a very quick silly game: try it in Chrome [17:06] tjholowaychuk: where at? [17:08] MrNibbles: http://184.106.205.94/ [17:09] slaskis has joined the channel [17:09] EyePulp: holy crap - that's great! [17:09] tjholowaychuk: i suck at that game [17:09] tjholowaychuk: lol [17:09] EyePulp: MrNibbles: nice [17:09] jesusabdullah: dammit, I hate these computers [17:09] jesusabdullah: Can't install ANYTHING [17:09] jesusabdullah: I might have to go back to my stupid shell script :C [17:11] unomi has joined the channel [17:11] SamuraiJack has joined the channel [17:11] MrNibbles: hehe [17:11] MrNibbles: needs aui [17:11] MrNibbles: a ui* [17:12] jesusabdullah: HIGH SCORE [17:13] MrNibbles: hehe [17:13] jesusabdullah: Fun [17:13] BryanWB has joined the channel [17:14] zapnap has joined the channel [17:15] jamescarr: heh [17:15] jkreeftmeijer_ has joined the channel [17:16] romainhuet has joined the channel [17:16] ryah: bradleymeck: hm [17:16] MrNibbles: killed the sever now... [17:17] ryah: bradleymeck: you need to add to lib and modify src/node.cc [17:17] ryah: kind of painful [17:17] MrNibbles: held up rather well under load [17:17] ryah: pquerna is working on a nodec [17:17] ryah: maybe :) [17:17] ryah: a packer [17:18] bradleymeck: yea i can do the lib pretty easy, but adding to node.cc is heh, also it seems module.exports doesnt work, only exports on natives? [17:18] bradleymeck: i have a packer to bundle dirs into a single js file, but heh [17:18] JimBastard has joined the channel [17:19] tjholowaychuk: bradleymeck: I still think that combined with ndistro would be killer [17:19] JimBastard: dramascript [17:19] bradleymeck: yea, gotta just finish the adding to require/module.exports to exports changes [17:19] JimBastard: i wonder if im stilled banned in #php [17:20] mjr_ has joined the channel [17:20] SamuraiJack has joined the channel [17:21] derferman has joined the channel [17:22] bradleymeck: only real problem is when you do something like require('connect/lib') its a nono, gotta just use a main for now on my packer [17:23] stepheneb has joined the channel [17:24] creationix: JimBastard: did you wake up on the wrong side of the apartment jail? [17:25] creationix: ;) [17:25] jesusabdullah: *rimshot* [17:25] JimBastard: creationix: yeah for sure [17:25] JimBastard: php does that to me [17:25] JimBastard: if i see anything remote related to php get even close to node im gonna shoot someone [17:25] creationix: yeah, better stay out of that thread then [17:25] JimBastard: i mean, not literally [17:25] creationix: guns aren't allowed in your state [17:25] JimBastard: i went into the #php room and linked them to the thread [17:25] ashleydev has joined the channel [17:25] creationix: I've got a house for sale in Texas ;) [17:26] JimBastard: and said "can someone please respond to this idiot" [17:26] JimBastard: reverse trolling ftw [17:26] kriszyp has joined the channel [17:26] creationix: respond to you? [17:26] JimBastard: ahahaha, i left that part out [17:26] jesusabdullah: JimBastard: What thread? [17:26] jesusabdullah: XD [17:26] jesusabdullah: Ahaha, that's pretty good! [17:26] JimBastard: i just said "that idiot" from this name, so i'll leave the "idiot" part up to them [17:28] creationix: JimBastard: try to not make the node community look too bad though, even if it's lots of fun [17:28] tekky: lmao [17:28] JimBastard: im not sure how my acting affects that [17:29] silentrob: it already looks like we steal peoples code :) [17:29] phiggins: only JimBastard does [17:29] tekky: creationix: where abouts in TX? [17:29] JimBastard: since people like polotek and creationix and tmpvar come in with the logical, sane, answers [17:29] silentrob: lol [17:29] JimBastard: phiggins: whatever dude, you totally ripped off jQuery [17:29] creationix: tekky: just north of Dallas [17:29] JimBastard: im gonna get JohnResig to sue you [17:30] JimBastard: super cereal [17:30] tekky: ohhh geez thats more like Oklahoma then :P [17:30] JimBastard: :p [17:30] jesusabdullah: I was in Austin once. Don't think Texas is my bag [17:30] creationix: tekky: nah, it's part of the dallas area [17:30] tekky: creationix: Denton I take it? [17:30] creationix: tekky: Richardson [17:30] creationix: much closer [17:30] tekky: ahh [17:30] qFox has joined the channel [17:31] creationix: southern richardson at that [17:31] creationix: perfect place to live if you work in Dallas [17:31] tekky: <-- doesnt :P [17:31] daniellindsley has joined the channel [17:31] tekky: I'm in College Station, but about to start work in Austin [17:31] cardona507 has joined the channel [17:32] jesusabdullah: tekky: for Blizzard? >:P [17:32] jesusabdullah: I met a dude that works for Blizzard while I was there [17:32] jesusabdullah: Awesome stories [17:32] jesusabdullah: Basically, half the people that contact tech support are retarded [17:32] tekky: jesusabdullah: no... will be working with IBM [17:32] _mythz has joined the channel [17:32] jesusabdullah: otoh you get lots of free shit! [17:32] jesusabdullah: orly? [17:32] jesusabdullah: Hmm [17:32] jesusabdullah: That's the one thing with Austin--there are a surprising amount of tech jobs there [17:33] bradleymeck: austinites unite! [17:33] jesusabdullah: I think Austin's pretty overrated, but I could *almost* seem myself living there [17:33] jesusabdullah: No offense Austinites :( [17:34] programble has joined the channel [17:35] tekky: jesusabdullah: heh, I dont want to live here :P but the number of tech people and groups that get together on a regular basis, I'll prolly end up moving anyways [17:36] jesusabdullah: tekky: I see [17:36] jesusabdullah: I have to admit, I'm biased. I live in Alaska, which is much colder, much less humid, has much more sane traffic and has way more in the way of coffee shops [17:39] tekky: I grew up in TX but lived in CO for 6 years ... I miss that weather :P [17:39] jesusabdullah: the TX or CO weather? [17:39] tekky: CO (in tx now) [17:39] jesusabdullah: Ah [17:39] cloudhead has joined the channel [17:40] jesusabdullah: gohl-durned why does my girlfriend like exercising? >:| [17:40] jesusabdullah: "Let's go for a jog and/or run!" [17:41] jesusabdullah: The truth is, I'm lazy! [17:42] tekky: lol [17:43] c4milo has joined the channel [17:43] CIA-77: node: 03Ben Noordhuis 07master * r4b19bd2 10/ lib/http.js : Client.onend: Anticipate that the HTTP parser object is uninitialized when the client setup failed. - http://bit.ly/d2nKPE [17:43] CIA-77: node: 03Ryan Dahl 07master * ra6bc68a 10/ (48 files in 11 dirs): Upgrade V8 to 2.3.4 - http://bit.ly/bfX6Dp [17:46] polyrhythmic has joined the channel [17:47] ryah: :/ [17:47] ryah: didn't mean to push that other patch, but whatever [17:48] mjr_: "Performance improvements on all platforms" [17:48] mjr_: oh yes [17:49] ryah: yeah, finally [17:49] mjr_: About time they started looking into performance. [17:49] creationix: what's this about unicode indentifiers? [17:49] ryan_gahl has joined the channel [17:50] technoweenie has joined the channel [17:50] creationix: so any unicode character that's categorized as number or letter is valid now? [17:52] V1 has joined the channel [17:53] creationix: ACTION goes to update the ivy binary again... [17:54] jamescarr: so why the name ivy? [17:54] amerine has joined the channel [17:54] jamescarr: when I first saw it mentioned, i thought you meant apache ivy [17:54] creationix: I thought it would make for a cool logo [17:55] creationix: but it turns out apache ivy is more popular than I estimated [17:56] rauchg_ has joined the channel [17:59] technoweenie: creationix: if you need a mascot: http://blog.newsok.com/extremelygraphic/files/2009/04/poisonivy.jpg [17:59] jesusabdullah: NICE [18:00] weepy: creationix : what about unicode identifiers ? [18:00] sveisvei has joined the channel [18:00] creationix: weepy: http://code.google.com/p/v8/source/browse/trunk/ChangeLog [18:01] weepy: so you can write arabic JS now ? [18:01] creationix: technoweenie: hmm, I think I'll pass [18:01] creationix: weepy: think so [18:01] technoweenie: bah! [18:03] SamuraiJack has joined the channel [18:05] paul_irish has joined the channel [18:06] jamescarr: technoweenie, poison ivy was forever ruined thanks to Batman Forever ;) [18:06] technoweenie: what movie? [18:06] technoweenie: *scarred memory* [18:06] jesusabdullah: jamescarr: I think you mean, Batman & Robin? :v [18:07] jesusabdullah: RIDDLER was ruined by Batman 4evah [18:07] jamescarr: jesusabdullah, I thought both were equally bad... [18:08] jamescarr: just that Batman and Robin proved me wrong when I thought the franchise couldn't get worse ;) [18:08] isaacs: ryah: how would you feel about a patch to be able to cancel the reallyExit call in the process.exit event? [18:08] jesusabdullah: jamescarr: but ivy wasn't in Forever was she? [18:09] jbrantly has joined the channel [18:09] jamescarr: no, batman and robin [18:09] jesusabdullah: I actually only saw Forever once [18:10] jesusabdullah: and B&R a bunch of times >_< [18:10] jamescarr: Bane was too. he was an awesome villain in the book who broke batman's back. in the movie he was some faceless, dumb henchman [18:10] jesusabdullah: Oh, Alicia Silverstone <3 [18:10] claudiu__ has joined the channel [18:12] isaacs: oh, hey, Buffer is a global now, neat [18:12] brapse has joined the channel [18:13] mjr_: isaacs: Yeah, in retrospect, that seems so obvious. [18:14] tjholowaychuk: oOo it is? nice [18:15] isaacs: i worry about the bikeshedding around making every random class a global [18:15] isaacs: EventEmitter, et al [18:15] isaacs: but Buffer is very low-level [18:15] mscdex: yes! "Performance improvements on all platforms." [18:15] isaacs: it's about the same level as String or RegExp [18:16] charlesjolley- has joined the channel [18:16] jbrantly has joined the channel [18:18] mjr_: I finally went and looked up bikeshedding. [18:18] WALoeIII has joined the channel [18:18] charlesjolley- has joined the channel [18:18] mscdex: heh [18:18] mjr_: At some point I couldn't figure out the meaning from the context. [18:18] mscdex: same [18:19] mscdex: silly terms [18:19] mjr_: it's a good one, like "yak shaving," that comes up a lot in programming [18:19] charlesjolley- has joined the channel [18:20] admc has joined the channel [18:20] charlesjolley- has joined the channel [18:20] mscdex: yak shaving is an odd one too [18:22] mscdex: what about gnu shaving? ;-) [18:23] podman has joined the channel [18:23] podman: afternoon [18:24] maushu has joined the channel [18:24] mscdex: afternoon [18:25] ryah: isaacs: ? [18:25] isaacs: ryah: hi [18:25] ryah: hi [18:26] c4milo: ryah: [18:26] isaacs: ryah: so, i'm finding that there are some cases in npm where I really want to do a bit more async stuff in the exit handler. [18:26] c4milo: do I need to do something special to support the new model extension in my addons ? [18:27] isaacs: ryah: especially, unpublishing something when a publish upload fails. [18:27] tjholowaychuk: isaacs: for expresso I had to wrap process.emit() and check for "exit" to do my coverage reporting [18:27] isaacs: tjholowaychuk: yeah, i could do something like that, but that just seems overly hacky [18:28] tjholowaychuk: yup lol [18:28] maushu: I want to get my hands on the minecraft server code to see if a node.js would have better performance. [18:28] isaacs: also, what i need to do is often async, so before it actually hits the event loop, the reallyExit call will cut it off. [18:29] c4milo: ryah: one of my addons explode with segmentation faults after some specific node version, I guess after you push the new extension model :s [18:29] siculars has joined the channel [18:29] isaacs: it'd be nice if my function could return false or something, and then call exit() again later [18:29] mjr_: like the event loop would fire back up if the exit handler returned false and also added something. [18:29] isaacs: or maybe if exit() would check to see if there are things in the event loop after emitting "exit", so if you added async stuff, it'd just delay the actual termination. [18:30] huyhong has joined the channel [18:30] huyhong has left the channel [18:31] isaacs: so, you might have multiple "exit" events, but that's not too different than having multiple "onbeforeunload" events on the browesr. [18:33] paulwe has joined the channel [18:33] Rixius has joined the channel [18:33] JimBastard has joined the channel [18:33] deepthawtz has joined the channel [18:33] mtodd has joined the channel [18:35] TommyM has joined the channel [18:36] ryah: isaacs: but that's not what the 'exit' thing is for [18:36] isaacs: ryah: what is it for? or, is there a "beforeExit" event that can be used for this? [18:37] sudhirj has joined the channel [18:37] ryah: c4milo: ABI is not stable between builds [18:37] ryah: C++ ftw [18:37] ryah: i assume that's what you mean [18:37] mau has joined the channel [18:38] femto has joined the channel [18:38] ryah: isaacs: i was thinking hard about this problem 7 months ago - but now i forget why it is the way it is [18:38] ryah: i feel like there was a reason... [18:38] icebox has joined the channel [18:38] maushu2: ryah, oh boy. That is bad. [18:39] tilgovi has joined the channel [18:39] isaacs: ryah: if i got an error event when the ssl upload crapped out, it'd be less of an issue. [18:39] maushu2: When we implement something and then we forgot why we implemented like that. [18:40] paul_irish has joined the channel [18:43] Rixius: ryah: I'm a javascript developer, but I'm interested in learning C to make some node bindings, do you knwo of any refrences you'd recommend? [18:44] jesusabdullah: Rixius: v8 is c++, not c. Pretty sure. [18:44] tjholowaychuk: its c++ but the same principles apply, c is a lot easier IMO [18:44] jesusabdullah: Rixius: for ansi C, people seem to love Kerrighan & Ritchie. I started reading it, also struck me as quite good [18:45] tjholowaychuk: c++ is weird wacky magic land like ruby [18:45] mjr_: Rixius: the documentation on writing addons is a bit sparse at the moment. [18:45] mjr_: Rixius: I think the best way is to look at other addons and see what they do. [18:46] isaacs: ryah: but in general, i'd like to be able to guarantee that any time npm says "not ok", it undoes whatever it half-did [18:46] isaacs: ryah: and sometimes that means that you have to do something async [18:46] Rixius: Thanks guys [18:47] jesusabdullah: Rixius: http://github.com/pkrumins/node-time [18:47] jesusabdullah: Rixius: It's a useless module, but it's simple so you might be able to get something from it [18:48] mjr_: man, we still have some cases where exceptions get swallowed. [18:49] jetienne: ryah: "Until this is fixed, we won't add more. " from ml <- what do you mean by "this" [18:49] zemanel has joined the channel [18:50] mjr_: for example, client.request("POST", "some invalid url"); Does not throw. [18:51] tjholowaychuk: mjr_:I ran into that way back, I think ryan added clientError or something [18:51] tjholowaychuk: cant remember now [18:52] amrnt has joined the channel [18:52] mjr_: oh, hmm. I'll look for that. Shouldn't it throw though? [18:52] mjr_: I'm surprised by how hard it is to track this down. [18:52] tjholowaychuk: it wont if it is not named "error" [18:53] mjr_: sure, I mean, philosophically, shouldn't it throw? [18:53] tjholowaychuk: ah yeah probably lol, cant remember why he was emitting that instead [18:53] tjholowaychuk: or if that is even related [18:53] tjholowaychuk: socket.addListener('error', function (e) { [18:53] tjholowaychuk: self.emit('clientError', e); [18:53] tjholowaychuk: }); [18:53] tjholowaychuk: i think thats it [18:54] mjr_: woah [18:54] mjr_: I think that's something else. [18:54] tjholowaychuk: nvm maybe not [18:54] mjr_: But it is also something I'm not listening for. [18:56] maqr has joined the channel [18:56] gf3 has joined the channel [18:59] eisd has joined the channel [19:01] streampunk has joined the channel [19:02] GasCan has joined the channel [19:03] b_erb has joined the channel [19:04] c4milo: ryah: ABI yeah, but I recompiled my addon and happens the same :S. Honestly I don't what is wrong :S [19:05] softdrink has joined the channel [19:05] c4milo: ryah: the segmentation fault ocurr whey I do 'require' of the addon [19:05] mikeal has joined the channel [19:05] c4milo: s/ocurr/ocurrs/i [19:06] mjr_: c4milo: did you run node_g under gdb and see what happens? [19:06] pquerna: c4milo: gdb? [19:06] c4milo: node_g never had working for me, It's always throw an strange error [19:06] mjr_: mikeal: since you've been in the http client code lately, do you know where or why an invalid URL will cause the client to silently not work? [19:06] c4milo: s/throw/throws/i [19:07] c4milo: pquerna: mjr_ yeah, I'll have to go more deep with gdb [19:07] mikeal: hrm... [19:07] mikeal: there isn't a lot of validation [19:07] mjr_: You'll need node_g though. [19:07] mikeal: so if it breaks the HTTP rules [19:07] knuckolls has joined the channel [19:07] mjr_: mikeal: I know, I can't figure out what's breaking. [19:07] mikeal: like if it had \r\n in it [19:07] mjr_: But just a space in the query string makes it not do anything, as far as I can tell. [19:08] loincloth has joined the channel [19:08] tpryme has joined the channel [19:09] teemow has joined the channel [19:09] mikeal: oh yeah, that'll break [19:09] mikeal: :) [19:09] mikeal: it needs to be escaped [19:09] jetienne: ryah: in configure you added a v8 compile option to get rid of ccache, a v8 coder told me he doesnt know any problem with ccache, do you remember why you putted there ? [19:09] mikeal: METHOD /url 1.1 [19:09] saikat has joined the channel [19:10] mikeal: an invalid space will break the HTTP version parsing [19:10] mjr_: mikeal: sure, of course it is broken, but why doesn't it throw? [19:10] mjr_: and what part is breaking? [19:10] mikeal: the client probably just sends it [19:10] mjr_: I don't think so, it looks like it never sends anything. I'll put up a gist. [19:10] mikeal: oh really [19:11] brapse has joined the channel [19:14] FransWillem has joined the channel [19:14] BryanWB has joined the channel [19:14] mjr_: mikeal: OK, my isolated test case actually sends the broken URL, so I must be mangling something. [19:14] mjr_: good to know that node isn't silently swallowing some exception. [19:15] paulwe has joined the channel [19:16] astrolin has joined the channel [19:16] Rixius has left the channel [19:18] Tobsn has joined the channel [19:20] mikeal: ryah: so, in my http library (badly named request) I want to leverage the pool [19:20] mikeal: but I need to handle the host header stuff on my own [19:21] joshbuddy has joined the channel [19:22] mikeal: would it be better to use my request library as the foundation for http-easy-client and have pool be a part of it? [19:22] PokeBot has joined the channel [19:22] mikeal: that way people can leverage the pool independently of the high level http library [19:22] dylang: does anyone have any favorite well-written express-based apps? i'm in the middle of a refactor for readability and wonder what others have done. [19:23] FransWillem has joined the channel [19:24] jesusabdullah: dylang: Isn't expresso based on express? [19:24] mikeal: wait a second [19:24] mikeal: should the high level library really default to keep-alive? [19:25] mjr_: keepalive is something that everybody sort of expects to work, no? [19:25] mikeal: it's gonna keep node from exiting unless the user remembers to call end() [19:25] mjr_: except for that part [19:25] mikeal: yeah, that's the hard part [19:25] mjr_: But they'd certainly expect multiple requests to re-use established connections, until they want to leave. [19:26] mjr_: maybe you need like a pool.close() or something. [19:26] mikeal: already have that [19:26] mikeal: pool.end() [19:26] dylang: jesusabdullah: it doens't seem to be. i'm building a pretty simple web site so looking for something like that. thanks for the suggestion. [19:27] ryah: i'd like to have a mock layer for net.js [19:27] Tobsn: mape but that doesnt work in every browser? (css base64 image) [19:27] ryah: so people could do tests without real i/o [19:27] Tobsn: ryah, just make a separate module that uses net but reroutes all the cursors :P [19:27] Tobsn: and sockets [19:30] alecmuffett has joined the channel [19:31] ryah: mikeal: maybe you can make it so you can override "host" [19:31] mikeal: why don't I just write a nicer high level http interface :) [19:32] mikeal: that does host and auth and all that good stuff [19:32] Tobsn: van dyke released secureCRT in a mac version today as beta: http://www.vandyke.com/download/securecrt/beta.html [19:32] mikeal: and pool is behind the scenes [19:32] mikeal: it seems like we're conflating concerns [19:33] mjr_: ryah: how would you expect that an HTTP server would report parse errors on the requests that it receives? [19:33] mikeal: like, i really want a library that parses the url and gets it' not just has a .get method [19:33] qschzt has joined the channel [19:34] mjr_: ryah: in lib/http.js:763 it checks for an error from the parser, but then just destroys the socket without emitting any event. [19:34] paul_irish has joined the channel [19:34] alecmuffett: module for accessing command-line arguments ? a-la argv[] ? [19:34] mikeal: if it emitted error on the socket would the socket close on it's own? [19:35] mjr_: Not sure, but I need to catch it somehow so I can log something. [19:35] alecmuffett: ah - process.argv - thanks [19:35] mjr_: alecmuffett: glad we could be so helpful. [19:36] feroz_ has joined the channel [19:36] alecmuffett: matthew - i'm really excited to find out about Node; nave been hacking Python/Django for a couple of years, and Perl for about 20 before that :-) [19:37] mikeal: pquerna: you around? [19:37] alecmuffett: i have this theory that Node would make a wonderful foundation for some security scanning tools [19:37] blaines has joined the channel [19:38] mjr_: alecmuffett: yeah, me too. That's why I wrote libpcap bindings for node. [19:38] hansek has joined the channel [19:38] alecmuffett: woo! link ? [19:38] mjr_: http://github.com/mranney/node_pcap [19:38] alecmuffett: yay - thanks [19:38] mjr_: Your name is really familiar to me, but I'm not sure why. [19:38] _mythz has left the channel [19:39] alecmuffett: Ummm… security stuff probably [19:39] mjr_: Yeah, probably. [19:39] alecmuffett: password cracking [19:40] mjr_: Yeah, that's probably it. [19:40] blaines has joined the channel [19:40] mjr_: Seems like I've seen your name a lot in email messages in my blurry past, like nanog or zorch or maybe perl. [19:41] mjr_: holy shit, 297 people in #node.js? 300 is in sight. [19:41] alecmuffett: Ever work for Sun ? I spent 17 years there... [19:42] tjholowaychuk: boo mocking [19:42] streampunk: ACTION considers opening a few IRC clients. [19:42] mjr_: Wow, 17 is a lot years to be working somewhere. [19:43] silentrob: alexmuffett, do you still work for sun? [19:43] silentrob: or oracle [19:44] alecmuffett: silentrob: no, i left last year, am taking a sabbatical year to play with geek stuff [19:44] alecmuffett: it was really a great place for engineering communities [19:45] blaines has joined the channel [19:46] mjr_: alecmuffett: let me know if you have any questions about pcap in node. I'd like to see it become useful for someone other than just me. [19:47] jesusabdullah: pcap, you mean? Or node? XD [19:47] c4milo: mjr_: I was thinking to port libnet [19:47] alecmuffett: i shall do - i have to go do the gym thing for an hour or so, but will be back later or tomorrow [19:47] c4milo: mjr_: I mean , write bindings for node [19:48] alecmuffett: mjr: i was thinking a really basic NMAP replacement should be quite tiny and scarily fast with the Node coding model [19:48] c4milo: mjr_: do you think that it could be useful ? [19:48] mjr_: alecmuffett: yeah, not as fast as native code nmap, but ought to be plenty fast for what most people want. [19:48] c4milo: s/could/would/i [19:49] mjr_: alecmuffett: I don't have the pcap sendpacket or whatever its called method exposed yet, but it would be pretty easy to do so. [19:49] mjr_: c4milo: I don't actually know what libnet is. [19:49] mjr_: allow me to google it [19:49] c4milo: mjr_: :| [19:49] c4milo: mjr_: np , go :) [19:50] alecmuffett: bbl! thanks gis [19:50] alecmuffett: ^guys [19:50] c4milo: mjr_: basicly it's for packet manipulation [19:50] mjr_: c4milo: what bits of that lib do you want to use? [19:50] mjr_: Surely not the driver abstraction parts. [19:51] mjr_: ? [19:53] c4milo: mjr_: packet construction [19:55] mjr_: oh, so you can explicitly generate one side of a TCP conversation, for example? [19:55] jamescarr: gah [19:55] tpryme: Anyone know of a node.js addon for c++ binary search? [19:56] tpryme: I'm trying to replace my all js binary search with one in c. [19:56] c4milo: mjr_: or inject something in the middle [19:56] mjr_: tpryme: I don't, but I want one for the same reason. [19:56] c4milo: mjr_: or modify some field of a specific packet [19:56] mjr_: c4milo: yeah, that'd be fun to play with. [19:57] mjr_: c4milo: if I just exposed pcap_sendpacket(), you could do that with node_pcap [19:57] mjr_: it already knows how to convert a raw packet into a JavaScript object that you can inspect and modify. [19:59] mjr_: I guess it'd get a bit complicated depending on what you wanted to change before re-sending. [19:59] c4milo: mjr_: a packet of any type ? [19:59] mjr_: It doesn't know how to decode everything yet, just a few common things at each level of the stack. [19:59] c4milo: mjr_: because with libnet we can create or modify many types of packets and with node_pcap inject them [19:59] mjr_: oh cool [20:00] c4milo: mjr_: and frames as well [20:00] mjr_: That might be the way to go for general purpose packet injection. [20:00] mrduncan has joined the channel [20:01] mjr_: I want to send ICMP echos right now, and it's sort of annoyingly hard. [20:02] c4milo: mjr_: I'm finding some time to do these bindings [20:02] aheckmann: mikael: [20:02] mjr_: c4milo: cool, let me know when you get it working [20:02] paulwe has joined the channel [20:02] bradleymeck: tpryme add issue to node-overload if there isnt one w/ api spec you want [20:03] mjr_: bradleymeck: you do binary search? [20:03] tpryme: bradleymeck: What's node-overload? [20:03] aheckmann: shouldn't sys.pump callback() when writeStream fires "end" instead of readStreams "end"? [20:03] c4milo: mjr_: of course :) [20:03] bradleymeck: i dont right now, i just throw things into overload that seem reasonable [20:04] mjr_: oh, right, like ephemerontable, etc. [20:04] bradleymeck: overload is some ecma harmony stuff [20:04] bradleymeck: but more, just reasonable things ppl would want [20:06] pquerna: mikeal: pong [20:07] bmizerany has joined the channel [20:07] topfunky has joined the channel [20:08] tpryme: mjr_: I'm putting one together right now [20:08] tpryme: mjr_: Will send you the github repo when i'm done for bin search [20:08] mjr_: cool, thanks. [20:10] blaines has joined the channel [20:10] bradleymeck: i do wonder though if the c++ bridge time will make it faster or not [20:12] james2037 has joined the channel [20:14] tpryme: bradleymeck: Why not? [20:15] topfunky: mape: I noticed that your wargames app is down. Is it because the viet.info server stopped providing IP to lat/long mapping? [20:15] topfunky: I've setup another geoip mapping server if you need it [20:15] bradleymeck: you still have to deref the values and do type coersion [20:15] mape: topfunky: it works here? [20:16] admc has joined the channel [20:16] topfunky: oh. I get only the letter 'a' [20:16] topfunky: maybe a problem on my browser [20:16] topfunky: weird [20:17] matclayton has left the channel [20:19] nefD: mape: Are you using socket.io? [20:19] mape: No [20:20] nefD: blarghme [20:20] qschzt: i am [20:20] qschzt: :) [20:20] nefD: ive been tinkering with it, but im kinda curious about its 'clients' array.. keeps a list of all previously and currently connected clients.. kinda wondering what happens when the keys start getting up into really, really high numbers [20:20] silentrob has left the channel [20:22] qschzt: nefD, yeah it's currently problematic also when the server restarts, and xhr-polling clients try to reconnect - infinite loop [20:22] mjr_: mikeal: what do you think about validating the URL in the HTTP client before you send it? [20:22] voodootikigod has joined the channel [20:22] qschzt: server says no, client 'gets a response', tries to long-poll again [20:22] nefD: qschzt: Holy hell, I didn't even think of that.. did you come up with any solution or workaround that proved worthwhile? [20:23] mjr_: mikeal: or at least providing some sort of way of not accidentally sending bogus data to a server. [20:23] qschzt: nefD yeah there is a patch for it [20:23] mikeal: mjr_: we should escape it [20:23] mikeal: if it's not already escaped [20:23] mikeal: but that sounds dangerous [20:23] mjr_: yeah,I like that. [20:24] nefD: qschzt: Ah ok.. maybe something that'll get implemented into the next release [20:24] mjr_: Right now the http parser on the server side just silently dumps the client connection if you send it an unparseable request. [20:24] mikeal: i fear double-esacpes [20:24] saikat has joined the channel [20:24] qschzt: nefD, rauchg_: isn't the client deleted on disconnect? [20:24] mjr_: yeah, double escapes. I dunno. [20:24] amrnt has joined the channel [20:24] mikeal: it shouldn't be so silent about that :) [20:24] mikeal: maybe it's enough to just do [20:24] mjr_: There should at least be some really easy and obvious way to URL escape things. [20:25] nefD: from what I understand, currently the disconnecting clients entry in the 'clients' array of the listener just gets null'ed [20:25] mikeal: while (url.indexOf(' ') !== −1) url.replace(' ', '%escapenumber') [20:25] knuckolls has joined the channel [20:25] qschzt: tbh I'm not quite sure of the difference between delete and =null :) [20:25] mikeal: because that and [20:25] mikeal: \r\n should be the only things that break the parser [20:26] qschzt: nefD, well that's good at least, a large structure goes away [20:26] mjr_: space breaks the request parser on the server side: http://github.com/ry/node/blob/master/lib/http.js#L763 [20:26] mikeal: yeah, spaces and \r\n [20:27] mikeal: we should escape them in the client [20:27] nefD: sure, but that means the clients array simply continues to grow.. granted, only currently connected clients have an entry in that array with something other than null, but i kinda wonder what resource implications that has, having an array with lots and lots of null values [20:27] mjr_: I fear double escape, and I also fear getting in somebody's way who is trying to do some low level thing. [20:27] mjr_: But man, this one is really tricky. [20:27] mjr_: Because I had a node http client and server. [20:28] mikeal: the http client should do something about totally invalid characters [20:28] BryanWB has joined the channel [20:28] mjr_: Yeah, I guess we could at least make sure that there are no invalid characters in the request. [20:28] mjr_: And then do, what? Exception? [20:28] ashb has joined the channel [20:29] mikeal: we should escape invalid characters in url that will break HTTP [20:29] mikeal: just space and \r\n [20:29] pquerna: do whatever curl does :x [20:30] pquerna: (libcurl that is) [20:30] pquerna: its been abused by more bad php programers than most libraries [20:30] MrTopf has joined the channel [20:30] pkrumins: my useless time module just got useful! :D [20:30] pkrumins: as an example for developers [20:30] MrTopf: good evening [20:31] mjr_: mikeal: I like escaping characters in the URL that will break HTTP. Are you going to add that into your ever-growing patchset? [20:32] qschzt: nefD, trying it.. yeah, it does leak [20:33] nefD: qschzt: If you already have a test bed set up, maybe try dumping some info about memory usage and see what kinda growth is involved when the array grows following connects and disconnects? im curious [20:33] qschzt: 156601001 nulls, about 59.5mb ... so not too bad :) [20:34] nefD: hrm [20:34] nefD: still, 59.5mb being used to store 'null' :P [20:34] sstreza has joined the channel [20:35] qschzt: nefD, submit a patch for it [20:36] nefD: qschzt: I think I understand why it's a difficult thing to fix, though.. im pretty sure the key which is created when a client connects is also sent back to the client, so that Socket.io knows who is who when messages ar ebeing sent and received.. So suddenly changing those keys would mean having to update all connected clients with their new key [20:36] bradleymeck: you need an ephemeron table [20:37] qschzt: nefD, nah, you don't need to remove them until they disconnect / are kicked [20:37] bradleymeck: leaky map arrays are sad [20:37] qschzt: after which you don't need them at all [20:38] sveimac has joined the channel [20:38] qschzt: if they / someone else tries to use the same key, 403 [20:39] rauchg_ has joined the channel [20:39] qschzt: nefD, why change keys? [20:39] nefD: well, the key that is created when a client connects is *probably* listener.clients.length() [20:39] qschzt: nopes [20:39] nefD: oh [20:40] nefD: rauchg_: ping [20:40] qschzt: nefd it's more like new Date().getTime() :P [20:40] rauchg_: nefD: [20:40] rauchg_: pogn [20:40] rauchg_: pong [20:41] nefD: rauchg_: We're talking about socket.io, namely the lister.clients array :D was wondering about ways to consolidate it.. after a while, all those null values add up [20:41] nefD: er, s/lister/listener [20:41] rauchg_: nefD: add up how [20:42] nefD: qschzt did a simple test, 156601001 nulls comes up to about 59.5mb.. not too bad, given such a high number, but still, 59mb for nulls is kinda ehh [20:42] aheckmann: pquerna: [20:42] pquerna: aheckmann: yessir [20:42] megan has joined the channel [20:42] aheckmann: pquerna: i saw your response but I'm not sure that I follow [20:42] megan: I bet Isaac isn't here [20:43] aheckmann: pquerna: on the mailing list about pump that is [20:43] qschzt: not a problem for me at all [20:43] aheckmann: pquerna: shouldn't the callback fire after the writeStream closes? [20:43] qschzt: 15m clients I'm not going to put on the same socket.io-node anyway [20:43] rauchg_: true [20:43] rauchg_: but 15m disconnections [20:43] rauchg_: would yield an additional 60mb [20:44] qschzt: yeah.. [20:44] rauchg_: does setting it to undefined have any different effects on mem usage ? [20:44] pquerna: aheckmann: right, one other way of implementing it would be, on readstream end, call writeStream.close(), and if sys.pump did what you are asking for, that would work [20:44] qschzt: rauchg_ delete clients[sessionId] would work [20:45] pquerna: aheckmann: but more fundamentally, the problem relates to unclear responsibility for when to emit close vs end, and what sys.pumps real desired behavoir should be [20:45] nefD: good question.. typeof null comes out as a numeric, i believe.. undefined might actually use less memory.. qs, can you try that test while 'undefined' rather than 'null'? [20:45] qschzt: yes [20:45] nefD: er, while/with [20:46] rauchg_: this.clientsIndex[client.sessionId] = null; [20:46] rauchg_: this.clients[client.i] = null; [20:46] rauchg_: we can .splice() [20:46] rauchg_: and delete [20:46] qschzt: delete this.clientsIndex[client.sessionId] [20:46] rauchg_: unless setting to undefined [20:46] rauchg_: has the same effect [20:46] aheckmann: pquerna: is read end the smart default? can you think of an example? [20:46] rauchg_: which i'd prefer to .splice() [20:46] qschzt: it doesn't, still leaks [20:46] aheckmann: pquerna: o [20:46] eisd: I thought setting to null would just tag it for deletion for the gc? Unless v8 works differently? [20:47] rauchg_: i thought so too [20:47] qschzt: with delete it still leaks too. [20:47] nefD: Well, its an array entry [20:47] aheckmann: pquerna: i'm thinking the default should be write unless i can think of a good reason not to [20:47] rauchg_: qschzt: :D [20:47] nefD: so deleting it would comprimise the array entries which follow, altering their keys [20:47] rauchg_: remember the GC is magical [20:47] qschzt: yeah what is the GC here? [20:47] isaacs: SO MAGICAL [20:48] eisd: I recall someone saying in here that setting to null is faster than delete in v8 -- haven't done my own benchmarks to confirm though [20:48] rauchg_: anyhow [20:48] rauchg_: it's true, splicing would affect the subsequent .i [20:49] rauchg_: i guess this way is the fastest with very little leakage [20:49] rauchg_: :P [20:49] qschzt: yeah I don't think the nulls are kept? [20:49] Blackguard has joined the channel [20:49] qschzt: they should get gc'd [20:49] qschzt: eventually.. [20:50] pquerna: its a double rainbow [20:50] eisd: js> var t = +new Date(); for (var i=0,o={};i<99999;i++) { o.foo = 1; delete o.foo } +new Date()-t [20:50] gbot2: eisd: 83 [20:50] eisd: js> var t = +new Date(); for (var i=0,o={};i<99999;i++) { o.foo = 1; o.foo = null } +new Date()-t [20:50] gbot2: eisd: 43 [20:51] qschzt: well afaic there it is. [20:52] nefD: but for a server script which is running for a long time, or one that gets frequent disconnects, it means that it might be worthwhile to restart it once a reasonably large clients array size has been reached [20:52] eisd: js> var t = +new Date(); for (var i=0,o={};i<99999;i++) { o.foo = 1; o.foo = undefined } +new Date()-t [20:52] gbot2: eisd: 164 [20:52] nefD: i guess thats fine, just something to keep in mind is all [20:52] eisd: looks like undefined is slowest [20:52] qschzt: eisd, thanks! [20:52] eisd: np [20:53] eisd: inimino: gbot2 is v8, yes? [20:59] bradleymeck: eisd it is, i forget where the vid is, but delete actually causes a class change internally on the object [21:00] eisd: bradleymeck: thanks [21:00] aho has joined the channel [21:00] qschzt: what about GC? where and when? [21:01] qschzt: and what :) [21:01] jakehow has joined the channel [21:02] Astro: hum, what am I doing without connect middleware redirect()? [21:03] mattly has joined the channel [21:04] jetienne: var slota = require('sys'); [21:04] tjholowaychuk: http://kiwijs.com:3000/ [21:05] mape: tjholowaychuk: what am I suppose to do? [21:06] tjholowaychuk: mape: it broke, haha damn crypto [21:06] mape: The selector seems to be a little wonky [21:06] tjholowaychuk: its all wonky [21:06] tjholowaychuk: 2 hour proto I made last night, then realized how much work it would be [21:06] tjholowaychuk: damnit, this persons web socket thing keeps breaking [21:07] mape: but the select thing, should it stick? [21:07] ceej: tjholowaychuk: http://faye.jcoglan.com is really stable [21:07] tjholowaychuk: ceej: I just grabbed the lightest implementation I found [21:08] tjholowaychuk: but apparently it does not work to well [21:08] tjholowaychuk: haha [21:08] ceej: lol well faye is pretty light and now supports web sockets [21:08] tjholowaychuk: mape: i was using css animations so it kinda fucks up [21:08] mape: oh k [21:09] tjholowaychuk: haha its so dumb [21:09] jesusabdullah: tjholowaychuk: Where'd you get the graffix? [21:09] tjholowaychuk: your under mah building! [21:09] bradleymeck: whered you get the images [21:09] tjholowaychuk: starcraft lol [21:09] bradleymeck: might wanna look into scripty2 [21:09] qschzt: faye is a beautiful effort [21:09] jesusabdullah: tjholowaychuk: I'd love to see a polished game like this [21:09] bradleymeck: they have nice css animation w/ fallbacks [21:09] jesusabdullah: or, actually, a fps <_< [21:09] tjholowaychuk: oh me too, would take forever to implement something "good" tho [21:10] tjholowaychuk: kinda just a proof of concept [21:10] tjholowaychuk: 1/8 implemented lol [21:11] tjholowaychuk: whose under mah building [21:12] tjholowaychuk: 2d rts sucks tho you would need sooooo many sprites [21:12] jesusabdullah: Even something really simple but using javascript would be rad [21:13] tjholowaychuk: what do you mean [21:13] tjholowaychuk: just some canvas stuff? [21:13] blaines_ has joined the channel [21:13] jesusabdullah: I guess? [21:13] jesusabdullah: idk [21:13] jesusabdullah: haven't thought it out that well [21:13] eisd: no hardware acceleration until ff 3.7, ie9 -- which is about 90% of browsers [21:14] megan: starcraft? [21:14] tjholowaychuk: lol [21:14] nefD: rts pathfinding would be relatively easy.. theres decent existing A* implementations out there in JS :D [21:14] megan: let's do some dijkstras [21:15] megan: I can totally woop you in starcraft [21:15] tjholowaychuk: :D [21:15] tjholowaychuk: probably [21:15] megan: ya [21:16] megan: I will dance my dragoons in your face [21:16] mape: tjholowaychuk: you should look at something like crimson [21:16] qschzt: jesusabdullah there are already lots of js only 2d games [21:16] tjholowaychuk: mape: not sure what that is, ill google [21:16] MrTopf: just 90%? [21:16] qschzt: jesusabdullah, of particular mention, lord of ultima [21:16] eisd: there have been js/dom games since the 90s :P [21:17] blaines_ has joined the channel [21:17] qschzt: eisd :) [21:17] jetienne: q [21:17] megan: my favorite js/dom game is the one where IE makes you guess how to get your code to work under their implementation of the standard [21:17] megan: it's a classic [21:17] nefD: heh [21:18] tjholowaychuk: mape: what is this crimson thing your talking about [21:18] tjholowaychuk: a framework? game? [21:18] jetienne: eisd: both are using the same techno ? like fast canva ? or more css 3d ? [21:18] eisd: megan: final boss: memory leaks [21:18] megan: LoL [21:18] mape: tjholowaychuk: Well I have to find it myself :P But it is more or less geometry wars but you move around with a dude fighting an alien swarm invasion [21:18] eisd: jetienne: huh? What I'm saying is that there is NO hardware acceleration on canvas until ie9 and ff3.7 -- which means you're missing 90% of the market [21:18] tjholowaychuk: mape: ah nice [21:19] nefD: crimsonland [21:19] megan: eisd, pfff post final boss is stack overflows that allow hackers to control your system [21:19] jetienne: eisd: ok so ff3.7 will have hw accelartion for canva [21:19] jetienne: good :) even if i liked the css3D from sf [21:20] megan: but memory leaks is probably harder [21:20] eisd: jetienne: ff3.5 doesn't hardware accelerate css alpha blending, for example [21:20] mape: nefD: ah yeah, exactly [21:20] mape: tjholowaychuk: http://www.download-games-online.com/i/crimsonland-2b.jpg [21:20] eisd: jetienne: try loading up a large image, alpha blend it, and move it around [21:20] jetienne: eisd: im just interested to know if it will be fixed in one year [21:20] tjholowaychuk: mape: i've always wanted a solid rts for a demo, not sure why [21:20] mape: http://www.download-games-online.com/crimsonland-download.php [21:20] tjholowaychuk: just seems like a good fit [21:21] tjholowaychuk: but to much work right now [21:21] jetienne: eisd: safari got good things more a long time now, ie9 will likely make the others move [21:21] mape: hehe yeah [21:21] FransWillem: What do you guys consider the most stable web-based streaming connection library at this moment (regardless of the method used) ? Socket.IO ? [21:21] tjholowaychuk: not whatever im using [21:21] inimino: eisd ⋱ it's spidermonkey, actually [21:21] megan: how is microsoft just figuring out how to follow standards when google is running quake2 in their browser? [21:22] jan247 has joined the channel [21:22] ryan_gahl: megan: if you mean via NaCl, then that's not standards either [21:22] franksalim: not via NaCl [21:22] megan: ryan_gahl, I mean that microsoft can't seem to even get down the basics [21:23] franksalim: the WebGL port uses only JavaScript compiled from Java using GWT [21:23] ryan_gahl: agreed, IE sucks more than JimBastard sucks at mailing list etiquette [21:23] eisd: inimino: ah, thanks, just wanted to confirm [21:23] megan: JimBastard huh? [21:23] mde: Heheh [21:23] ryan_gahl: (Marak) [21:24] megan: does anybody use haml? [21:24] hellp has joined the channel [21:24] megan: I don't really like the idea of my html not being [21:24] blaines has joined the channel [21:24] tjholowaychuk: megan: I used haml lots with ruby but now I use jade which is my variant for node [21:24] tjholowaychuk: megan: http://jade-lang.com [21:24] qschzt: i have a problem with rendering node.js-side html [21:25] megan: it's still funky looking views [21:25] megan: bleh [21:25] qschzt: i just think you should let the client render it [21:25] tjholowaychuk: for "apps" yeah, sites not so much really [21:25] qschzt: yeah. [21:26] megan: qschzt, do you think it's okay to make the client call back to the server to create the view + data? [21:26] ryan_gahl: megan: are you ok w/ Xhtml? (i.e. custom tags) [21:26] c4milo: tjholowaychuk: what about haml.js, are you going to continue working on it ? [21:26] tjholowaychuk: c4milo: I wanted to port jade back, but I might just add a haml option to jade or something [21:26] megan: ryan_gahl, not so much. we need googles love [21:26] tjholowaychuk: or just let it sit there and rot [21:26] qschzt: megan, sure, to retrieve the view config and the data for it, yes [21:26] c4milo: tjholowaychuk: you jumps a lot :P [21:26] ryan_gahl: ACTION hates when his markup rots [21:27] tjholowaychuk: c4milo: why do I jump lol [21:27] megan: but say for example you had a blog, how could you get the posts into the blog without the ajax? [21:28] ryan_gahl: can't be done :) [21:28] ezmobius has joined the channel [21:28] megan: yeah, it seems to be a very poor user experience [21:28] ryan_gahl: impossible to get the posts into a blog without the ajax :) [21:29] megan: I feel like it's important that the view on the server look as much like the view the user gets as possible so there's no confusion [21:30] rauchg_ has joined the channel [21:30] megan: and you get the full power of html rather than a subset [21:30] ryan_gahl: what tjholowaychuk may be getting at is you probably shouldn't be generating the markup on the fly every request... [21:30] qschzt: megan, the server is just responsible for bootstrapping the browser, to provide it the means to render the page from templates and json [21:30] qschzt: imho. or you can just render the html in the server and cache and return it [21:30] joshbuddy has joined the channel [21:30] joshbuddy has joined the channel [21:30] ryan_gahl: (oops, maybe i meant qschzt) [21:31] megan: like how do you mean? [21:31] rauchg_ has joined the channel [21:31] megan: it seems to be the same problem again where you have to slow down the users experience by making a second request [21:32] qschzt: megan, just as an example, http://plugins.jquery.com/project/jquerytemplate [21:32] tjholowaychuk: i think there is a pretty clear distinction between a site and an app [21:32] ryan_gahl: megan: use the templating engine, but cache the results, and potentially pre-compile them before deploying the results... or ship the templates to the client during initial page load... or ship them lazily on-demand but then cache [21:32] megan: I get the templating [21:32] megan: is it really that fast? [21:32] qschzt: but I agree with tj [21:33] qschzt: if you're making a site, this probably doesn't apply as much as it does to an app [21:33] ryan_gahl: page load > request back to server > server parse templates to return markup every time == Not Right [21:33] tjholowaychuk: i totally agree for an app being "dumb" though, just serve up some json and do whatever with it [21:35] megan: hmm [21:35] megan: so you would do... [21:35] ryan_gahl: client side parsing is faster than http request + server side parsing... but not as fast as everything already being parsed and just served as static content [21:35] megan: page load > javascript calls back for data > data is filled into template [21:35] rwaldron has joined the channel [21:36] ryan_gahl: basically [21:36] megan: and this is actually faster? [21:36] megan: brb [21:36] qschzt: sorry :) [21:36] ryan_gahl: request for data vs. request for data + parsing + returning data+markup? yeah request for just data is faster [21:37] FransWillem: Hmmm [21:37] astrolin has joined the channel [21:37] FransWillem: Did anyone attempt to write some kind of Huffman encoding for Node.js? [21:37] bradleymeck: tjholowaychuk, youre the nDistro goto guy right? would it seem to much for a packer to only have the "main" of a module as an entry point for the modules included [21:37] Tobsn: isaacs: Tobsn: nodejs is not bad. hello world only ~7x slower than lighty2 (using one thread, 9k req/s node, 64k req/s) [21:37] bradleymeck: oooh, havent used huffman in a while [21:38] tjholowaychuk: bradleymeck: ya thats me. hmm, currently I am just chucking lib/* [21:38] tjholowaychuk: in [21:38] tjholowaychuk: I dont do any package.json reading or anything [21:38] isaacs: Tobsn: i'd be curious to see his code. node's hello world should be on par with lighttpd [21:38] FransWillem: bradleymeck: Figured that because in JSON certain characters appear much much more frequently (like {}",:), it should be a good fit for some huffman encoding [21:38] ryan_gahl: that all said, I actually like server side templating, but you have to have it as part of the deploy process, or have really good caching... you don't want the server parsing any more than necessary [21:38] blaines has joined the channel [21:38] Tobsn: #lighttpd [21:39] Tobsn: they're developing on lighttpd v2 right now [21:39] Tobsn: non blocking lua etc. [21:39] bradleymeck: mmm working on that packer so trying to figure out what to do when you require('module/file') since the current natives in require dont allow that '/' [21:39] Tobsn: (i did the wiki etc.) [21:39] mape: has there been any development on lighty since nginx took over? [21:39] tjholowaychuk: bradleymeck: ya i see what your saying. hmm.. some stuff would need refactor, for the best anyways [21:40] bradleymeck: im thinking changing the require's dictionary would be the only solution :( [21:41] megan: ugh, why can't irssi scroll up :P [21:42] mape: it can? [21:42] bradleymeck: but i dont see many if any modules that use sublibs anymore rather than the 'main' style, ps: connect kills my packer due to lazy loading based upon a file list built at runtime include [21:42] dnyy: megan: page up? [21:42] qschzt: megan, esc-p, esc-n [21:43] mde: Actually, y'all, just a data request could potentially be slower for the end-user -- it's just less work on the server. [21:43] mde: Those are two different things. [21:43] sudoer has joined the channel [21:43] megan: okay thanks [21:43] megan: a lot of smart people here :P [21:44] mde: You can make a fast data request, and the client can potentially take a long time rendering it. [21:44] megan: I tried using the mouse [21:44] mde: megan: One of the nice advantages of using Node is that you can use the same templating language on both server and client. [21:44] bradleymeck: not only that, almost no one trying to benchmark against node seems to use sys.pump :( [21:44] megan: how so mde? [21:44] mde: So you can do the initial page render on the server, and the subsequent client-side renders with the same templating language. [21:45] bradleymeck: where is voodootikigod's video [21:45] megan: what templating language is that? [21:45] qschzt: there's a good quersion [21:45] mde: megan: The most basic one that works in both places is plain old EJS. [21:46] ryan_gahl: mde: agreed, the best way IMHO is the server-side templating solution that has an extremely high cache-hit rate [21:46] megan: I just do a jquery thing and duplicate a hidden div n times and fill in spaces with a given class name [21:46] jamescarr: what about jade? [21:46] mde: There are a bunch of different implementations of it, but they all pretty much do the same thing. [21:46] jamescarr: haml.js?? [21:46] tjholowaychuk: jamescarr: jade has a client side impl [21:46] mde: ryan_gahl: Exactly, yeah. [21:46] megan: am I doing it right? :P [21:46] mde: Right, if they're JS, they're run in both places. :) [21:46] pquerna: mde: although, I would be excitted by the first to let you write a server side bind(), and that trasmitted the bind to the client where it did it [21:47] mde: If you care about stuff like SEL, you won't do the initial page render on the client. [21:47] mde: Er. [21:47] mde: SEO, sorry. [21:47] megan: that's true [21:47] mscdex: i wish i could be the SEO of some big corporation [21:47] jamescarr: no u dont [21:47] megan: search exectuive officer [21:47] mde: pquerna: I'd be interested to hear more about what that would look like. [21:47] ryan_gahl: if you care about SEO, you're doing a site not an app, and then it should mostly be static content anyway [21:47] mscdex: :> [21:48] megan: :> [21:48] mde: ryan_gahl: The line between those two things can get pretty blurry. [21:48] jamescarr: hmmm [21:48] mde: Google indexes Twitter public profile pages. [21:48] pquerna: mde: mostly thinking about something like dojo widgits (as flawed as they are otherwise), but when you create them, you can attach on listeners [21:48] mde: pquerna: Ah, right on. Yes, I keep thinking about how with JS, the execution can now happen in either place. [21:49] ryan_gahl: pquerna: you're describing my framework [21:49] pquerna: mde: mostly thinking how you could render it server side, then automatically generate JS that did the listen/binds to events on the dom was it was added in the browser [21:49] mde: So on something under-powered like a phone, you could do more on the server. [21:49] bradleymeck: found the damn thing! megan > http://vimeo.com/12779633 [21:49] megan: what's your framework called ryan [21:49] megan: ugh, thank you bradley. I has no audio :( [21:49] mde: pquerna: Sounds kind of macro-like, but there's no reason something like that wouldn't work. [21:49] megan: I really want to see what it says [21:50] ryan_gahl: jojojs, working on node-izing it :( - I know that essentially makes it vaporware for now, but it's a widget-centric framework that does just what you described [21:50] mscdex: a modern day warrior, mean mean stride; today's tom sawyer, mean mean pride. [21:50] pquerna: ryan_gahl: Everything that can be invented, has already been invented :) [21:50] mde: mscdex: They're playing that album in its entirety on this tour! :) [21:50] x_or has joined the channel [21:50] mscdex: :-D [21:50] megan: vaporware huh? [21:50] mde: I'm going to see them here on the 9th. [21:50] hassox has joined the channel [21:50] jamescarr: hmmm... is there a library to stream ogg? [21:50] megan: stream it to what? [21:50] mscdex: ACTION summons the power of geddy to help configure a cisco ip phone [21:50] pquerna: like starcraft 2 vaporware or duke nukem? [21:51] jamescarr: to [21:51] megan: say duke nukem [21:51] jamescarr: blaH [21:51] mde: megan: If you're looking for something fairly simple to dip your toe in, you could give Geddy a try: http://geddyjs.org/ [21:51] blaines has joined the channel [21:51] jamescarr: one hand typing sucks [21:51] mscdex: "these JimBastards are gonna pay for shooting up my ride!" [21:51] pquerna: jamescarr: so, i have a little recent side project related to that... I'd suggest looking at gstreamer -- its probally one of the coolest APIs i've seen for this kind of stuff [21:51] megan: my toe is wet already mde :O [21:51] pquerna: jamescarr: but i've not seen anyone integrating gstreamer with node.js [21:51] jamescarr: pquerna, i am considering it [21:52] pquerna: jamescarr: my hacks were all using python-gstreamer + twisted to dynamically create an ogg stream [21:52] megan: what is this getty.... hmmm [21:52] dylang: is there a typo or bug in here with next()? I get complaints that next doesn't exist. http://expressjs.com/guide.html#Passing-Route-Control [21:52] hassox has joined the channel [21:52] tjholowaychuk: dylang: my bad, doc typoi [21:52] tjholowaychuk: typo* [21:52] mscdex: node-peart [21:52] mscdex: a drum machine built using node.js [21:52] mde: mscdex: Maybe should have called it that, yeah. :) [21:52] megan: what does geddy do???????? [21:52] mscdex: huhu [21:53] ryan_gahl: anyone here read "Zen and the Art of Motorcycle Maintenance" [21:53] dylang: tjholowaychuk: what should it be? [21:53] tjholowaychuk: dylang: third param is next, I will fix that right away [21:53] mscdex: ryan_gahl: no, but i've watched all seasons of The Crockford Files [21:53] pquerna: ryan_gahl: yes [21:53] qschzt: where are these famed Crockford files huh? [21:53] ryan_gahl: mscdex: are they related? [21:53] pquerna: ryan_gahl: read it if you haven't :) [21:53] megan: time to go home, thanks for all the tips :) [21:53] mjr_: geddy screams out loud about how he's a Working Man [21:54] mjr_: and then mows his lawn while not wearing a shirt [21:54] mjr_: only in JavaScript [21:54] mde: megan: It's a Rails-replacement that runs on Node. [21:54] mscdex: ryan_gahl: qschzt: judge for yourself: http://i27.tinypic.com/2yzn2u8.jpg [21:54] tjholowaychuk: dylang: fixed [21:54] megan: thx [21:54] ryan_gahl: pquerna: my favorite book ever. Going to rename my framework from jojojs to phaedrus I think (jojo is apparently already another project anyway) [21:54] jamescarr: megan, express is cooler ;) [21:54] megan: <3 express [21:54] jamescarr: only because i like sinatra tho [21:54] ryan_gahl: mscdex: lol [21:55] megan: I still need a template engine though [21:55] jamescarr: ejs, haml, jade [21:55] mde: jamescarr: I like Sinatra too, but only for pretty simple apps. [21:55] mjr_: I need to get back to my quality reality and write more code. [21:55] dylang: tjholowaychuk: that worked and i see the updated docs, thanks! [21:55] jamescarr: take your pick [21:55] qschzt: is it http://www.crockford.com/? [21:55] megan: yeah but they make me right some weird html thing [21:55] mde: They're aimed at very different kinds of apps. [21:55] tjholowaychuk: megan: you can use ejs [21:56] tjholowaychuk: megan: jade is just in the app generated by express(1) by default [21:56] megan: hey that looks like .net [21:56] rwaldron has joined the channel [21:56] tjholowaychuk: megan: take a look at ./examples/ejs [21:56] megan: ya [21:56] megan: I see it [21:56] jesusabdullah: I think my 'rents have read Zen&tAoMM [21:57] megan: strongly typed views? [21:57] qschzt: a chuck norris fan. [21:57] megan: well... not typed at all [21:57] jamescarr: MM? [21:57] jesusabdullah: My dad's a biker, so I wouldn't be surprised if he at least took a crack at it [21:57] beelzabub: anyone know how to view the compile errors when building node? [21:59] ryan_gahl: jesusabdullah: much less to do with bikes and much more to do with profound Life Stuff [22:00] ryan_gahl: definitely a masterpiece [22:00] ryan_gahl: the 2nd book, Lila, is by contrast a bit of a clunker [22:00] Dmitry1 has joined the channel [22:02] dylang: tjholowaychuk: do you know of any complex express apps that demonstrate well styled/readable code? I'm looking for good coding style inspiration for myself and team. [22:02] tjholowaychuk: dylang: hm not really no, just the examples I suppose, the "blog" example shows how you can organize the same app in multiple files [22:02] Tobsn: ryah, #lighttpd ;) [22:02] tjholowaychuk: or you can have sub apps [22:03] tjholowaychuk: dylang: the examples illustrate most of the idioms that I tend to stick to at least [22:03] bradleymeck: tj any chance the lazyloader for connect's middleware could stop requiring fs at load time? [22:03] tjholowaychuk: but that is kinda the nice thing with express, if you want json config files you can do that, if you want one file apps you can do that [22:04] tjholowaychuk: bradleymeck: it does? [22:04] ryah: Tobsn: ? [22:04] tjholowaychuk: ill take a look [22:04] bradleymeck: yep, reads in a dir for filenames [22:04] Tobsn: just join, you'll see [22:04] Tobsn: isaac is in there too [22:04] tjholowaychuk: ohh I thought you meant it require('fs') in the get() callback [22:05] bradleymeck: nope, but lazy loading based off a dir will break a packer :/ [22:05] tjholowaychuk: ah boo [22:05] tjholowaychuk: just because its a dynamic require? or what [22:06] bradleymeck: because fs wont point to where you expect, it will be the cwd [22:06] tjholowaychuk: we could __dirname that bad boy [22:06] bradleymeck: __dirname will be a path to a non-existant file :( [22:06] bradleymeck: wait i can patch dirname [22:06] bradleymeck: mmm [22:06] tjholowaychuk: GAH [22:06] tjholowaychuk: lol [22:06] bradleymeck: but you gotta list the files [22:06] felixge has joined the channel [22:07] tjholowaychuk: hm [22:07] bradleymeck: in a diff require or w/e [22:07] Tobsn: ryah, talking about benchmarks lighttpd v2 vs. nodejs [22:07] tjholowaychuk: bradleymeck: it would not really hurt us to require() without the whole deferred require thing [22:07] felixge: creationix: yt? [22:07] tjholowaychuk: they dont really do anything unless used anyways [22:08] steadicat has joined the channel [22:08] tjholowaychuk: just slightly more work for v8 i suppose [22:08] felixge: creationix: I'm wondering how step handles callbacks with variable parameter counts [22:08] bradleymeck: yea, but if you get lots of middleware it can be problems w/o lazyload, you can still lazy load based off a list, but cant read in a dir [22:08] tjholowaychuk: bradleymeck: ah right ok I see what you are saying now [22:09] tjholowaychuk: in "keys" I simple have a func and do (...)('Riak')('nStore')('Redis') etc [22:09] tjholowaychuk: that could easily be done [22:10] bradleymeck: <3, going to try packing connect once i figure out whats going on w/ module.exports being odd in natives [22:13] ryan_gahl_ has joined the channel [22:13] Tobsn: ryah, now they're talking about your http parser ;) [22:13] ryah: Tobsn: who? [22:13] creationix has joined the channel [22:13] Tobsn: #lighttpd [22:13] ryah: oh [22:13] Tobsn: stbuehler, isaac and icy [22:13] ryah: do they like it? [22:14] Tobsn: isaacs: hm, it looks like your http parser switches heavily between c and javascript [22:14] Tobsn: just join ;) [22:15] Tobsn: the connect() is causing a lot of cpu load [22:15] Tobsn: the benchmark script hits 99% very fast [22:16] ryah: what is connect() ? [22:16] aglemann has joined the channel [22:16] aglemann has left the channel [22:17] Tobsn: idk, i just try to get you in there and im working on something on the side so i only pay partialy attention ;) [22:17] Tobsn: i just know that nodejs got up to almost 20k req/sec and lighttpd had 29k req/sec and nodejs gets slower with more than 4 cores used with multinode [22:18] littlebir has joined the channel [22:19] ryah: Tobsn: the load is pretty distributed [22:19] ryah: there is really nothing that locks [22:19] Tobsn: just join the channel - they're benchmarking right now [22:19] ryah: so it's up to the os scheduler [22:20] bvleur has joined the channel [22:21] jkreeftmeijer has joined the channel [22:28] qschzt has joined the channel [22:28] ryah: we should have cpu affinity support [22:28] qschzt: so there's some ruby/rails cluster config management tool that I forget the name of [22:28] deepthawtz has joined the channel [22:28] ryah: i.e. bind http://linux.die.net/man/2/sched_setaffinity [22:29] qschzt: starts with a c I think [22:29] ryah: qschzt: capistrano [22:29] deepthawtz: was there once an express commandline tool? [22:29] tjholowaychuk: deepthawtz: here is now [22:29] tjholowaychuk: currently just generates an app skeleton tho [22:30] deepthawtz: i can't find that in the source [22:30] tjholowaychuk: deepthawtz: ./bin/express [22:30] cadorn has joined the channel [22:30] qschzt: ryah, thanks [22:31] deepthawtz: tjholowaychuk: just pulled the latest, don't see a bin in there [22:31] beelzabub: hey ryah - is there any good way to omit code through js2c? [22:31] tjholowaychuk: deepthawtz: the git repo? [22:31] deepthawtz: yeah [22:31] ryah: beelzabub: there are macros [22:31] ryah: beelzabub: whcih can be compiled out [22:31] beelzabub: so far the only thing I've thought of is to use CONSTANT X = 0 [22:32] beelzabub: right - by i have blocks of code i want to omit [22:32] ryah: beelzabub: not sure, i don't think so [22:32] beelzabub: the macros are also pretty limiting - can't do something like macro process.assert(x) = ; [22:32] ryah: beelzabub: nod [22:32] qschzt: any better ones than Capistrano? [22:32] qschzt: (off topic, soz) [22:32] beelzabub: also, do you happen to know if j2sc does minification on the code? [22:32] _testing_KVIrc has joined the channel [22:34] deepthawtz: tjholowaychuk: visionmedia/express? [22:34] deepthawtz: or did that move? [22:34] tjholowaychuk: deepthawtz: nope that is right, , its there tho http://github.com/visionmedia/express/blob/master/bin/express [22:36] deepthawtz: tjholowaychuk: whoops, pull didn't go through the first time. conflicts... [22:36] deepthawtz: i see it. [22:36] tjholowaychuk: if you dont do a fresh clone you will probably have tons of conflicts [22:36] tjholowaychuk: lots has changed [22:37] deepthawtz: tjholowaychuk: on npm install with express, where does that executable live? [22:37] isaacs: deepthawtz: npm config get binroot [22:38] topfunky: Remixed mape's wargames to show geolocated visits to my site in real time: http://dribbble.com/shots/41452-Live-Site-Stats [22:38] mape: neat [22:41] jamescarr: I forget... what is the proper way of adding a method to an existing type in a non polluting way? [22:41] jamescarr: as opposed to just tacking it onto the prototype [22:44] isaacs: AHA! [22:44] isaacs: ryah: i figured out that issue that makes npm help jump all over the place. [22:44] ben_alman has joined the channel [22:44] isaacs: the file descriptors passed to the child_process are in nonblocking mode, which node is fine with, but most other programs can't handle properly [22:45] mape: isaacs: still have that gist I sent you open? [22:45] isaacs: mape: yeah [22:46] mape: if anything is unclear please let me know [22:46] mtodd_ has joined the channel [22:46] isaacs: hm... so, instlal profile, and then run it, and it doesn't work [22:47] isaacs: profile actually won't install for me, since locate can't find the tick processor [22:47] hdon_ has joined the channel [22:47] isaacs: mape, tpryme: http://gist.github.com/506030 [22:47] x_or: Can someone give me a brief understanding of npm and nvm? I have a bunch of stuff installed but when I run node it cannot find libraries. I just tried reinstalling according to http://github.com/isaacs/npm and things broke even further. [22:48] mape: isaacs: yes? [22:48] isaacs: tpryme: i really need the full output of teh failed install to see what's broken about it [22:48] dylang: are there step-by-step instructions for quickly pushing a project and dependent modules to heroku or joyent? [22:48] mape: isaacs: does the bin file need +x for npm to make it work? [22:48] mape: Seemed to work for me without it but added it just in case [22:48] isaacs: mape: it might, but i think i do that for you anyway [22:49] mape: Yeah [22:49] jkreeftmeijer has joined the channel [22:49] isaacs: x_or: install node using ./configure && make && make install. install npm using the curl instructions on the website. then everything should work. [22:49] isaacs: x_or: the issue is that nvm puts your node executable in a weird place, so that's where npm thinks you want executables to be. [22:50] x_or: isaacs: Thanks for building this tool, and thanks for helping me. This is a great boon to using node, btw. [22:50] isaacs: x_or: np [22:52] x_or: isaacs: It seems like I should not use npm when I am using nvm. Is that correct? [22:52] isaacs: x_or: no, npm should work fine, but you might want to customize your .npmrc a bit. [22:53] isaacs: x_or: set the "binroot = /path/where/you/want/executables/to/go" and "root = /path/where/you/want/modules/to/go" [22:53] isaacs: x_or: then it should work as expected. [22:53] frodenius has joined the channel [22:53] frodenius has joined the channel [22:53] isaacs: x_or: you could use $HOME/bin as your binroot, and $HOME/.node_libraries as the root, for instance. [22:54] chrischris has joined the channel [22:56] ajpiano has joined the channel [22:56] creationix has joined the channel [22:56] creationix: aww, I missed felix [23:03] freshtonic has joined the channel [23:04] dylang: isaacs: is there a npm way to copy dependent libraries into my project? [23:04] hassox_ has joined the channel [23:04] isaacs: dylang: why not just put a "dependents" hash in your package.json? [23:05] dylang: doing that first - but heroku needs all libraries included [23:05] tjholowaychuk: dylang: nDistro would be good for that [23:05] isaacs: dylang: oh, well, you could just do "npm config set root $PWD/deps" and then install them normally [23:06] isaacs: dylang: and then do require("./deps/whatever") [23:06] isaacs: dylang: and then when you're done, npm config set root back to whatever it was, or npm config delete root to go back tot he default. [23:08] jamescarr: I love the javascript I find o banking sites [23:08] isaacs: dylang: alternatively: npm --root $PWD/deps install whatever [23:08] jamescarr: banking sites and jewelry sites [23:08] jamescarr: they never cease to impress [23:08] jamescarr: https://www.kay.com/js/credit/XMakePayment.js [23:10] jamescarr: the method with the comment "Checks to make sure the ssn is valid" above it makes me giggle [23:10] creationix: so what's the status on a non cygwin version of node on windows? [23:13] knuckolls has joined the channel [23:13] ashleydev: tjholowaychuk: regarding ejs patch for single quotes -- my patch is faster than the one you took [23:13] ashleydev: tjholowaychuk: it's single pass rather than 5 [23:13] isaacs: jamescarr: wait, it's not checking the ssn at all.... [23:13] tjholowaychuk: ashleydev: do you mind applying it to HEAD with the new tests [23:13] ashleydev: tjholowaychuk: i.e. there's no hidden String.replace() calls in there [23:14] isaacs: jamescarr: is that kind of security through stupidity or somethign? [23:14] ashleydev: tjholowaychuk: I did add tests, but yeah sure I could apply it [23:14] tjholowaychuk: ashleydev: awesome! appreciated [23:15] nuba has joined the channel [23:15] jamescarr: isaacs, I guess o ;) [23:15] jamescarr: *so [23:16] jamescarr: either that or a usual case of code comments not matching functionality. Either way, his javascript sucks ;) [23:16] jchris has joined the channel [23:16] mape: hmm why are people not using seedjs? [23:17] isaacs: mape: well, you know my reason ;) [23:17] podman has left the channel [23:17] mape: hehe yeah, just wondering why it didn't get much traction [23:17] isaacs: mape: my biggest complaint with all other package managers is that they're not designed exactly like how i'd design a package manager. [23:17] x_or has joined the channel [23:18] tjholowaychuk: once I get more node binaries going I think nDistro is all I will need [23:18] tjholowaychuk: love npm for checkign things out quickly though [23:18] tjholowaychuk: and obviously to get my stuff out there more :) [23:18] mape: I just want to get to a point where having dependencies isn't a big pain [23:18] isaacs: tjholowaychuk: how do you plan to work around the "convention sucks and everyone hates it" problem? [23:18] isaacs: ACTION only mostly joking [23:19] tjholowaychuk: mape: ditto [23:19] isaacs: i mean, doesn't nDistro require you to structure your packages in a very specific way? [23:19] tjholowaychuk: isaacs: ATM somewhat, does not have to be that way but right now yeah [23:19] creationix: isaacs: who is this "everyone" you speak of [23:19] creationix: :P [23:19] isaacs: creationix: mostly me [23:20] isaacs: creationix: but srsly, conventions mean that we all have to agree, and as a general rule, people aren't so great at that. [23:20] creationix: I'd rather agree on a simple format than be dependent on a program parsing some config file and implementing a bunch of stuff just to install a lib [23:20] ryan_gahl_: 11,00•12,00isaacs11,00• 03I agree [23:20] mape: isaacs: thought about doing a less verbose version of npm? not important but yeah [23:20] mape: christ [23:20] mape: what happened to your text ryan_gahl_ ? [23:20] isaacs: mape: i have an issue about that. i'd like to have log levels. [23:21] isaacs: mape: at the moemnt, it's changing so much, and i spend so much time debugging problems that having that stupidly loud output is really just too handy [23:21] paul_irish: mape: he forgot this wasnt DALnet, i guess. [23:21] mape: isaacs: Yeah, that'd make sence [23:21] ryan_gahl_: 03hmm... trying a new set of scripts for mIRC - is it the nick completion that looks messed up? [23:21] mape: paul_irish: Colored text should be banished :/ [23:21] DTrejo__ has joined the channel [23:21] paul_irish: amen [23:21] isaacs: creationix: but the config file is easy [23:21] mape: ryan_gahl_: The fact that your text is green?.. [23:22] creationix: isaacs: having a bin and lib folder is easier [23:22] creationix: and doesn't depend on npm [23:22] isaacs: creationix: anyone can parse a package.json. it's simple. [23:22] ryan_gahl_: 03lol, had no idea it would change the color for all!! [23:22] creationix: I'll agree that the npm and package.json route is more flexible and powerful, but not more simple [23:22] ryan_gahl_: 03yay I'm green [23:22] MrNibbles: argh colour!!!! [23:22] MrNibbles: my eyes [23:22] creationix: isaacs: bash can't parse json [23:23] isaacs: creationix: so don't write your package manager in bash [23:23] isaacs: creationix: i mean, that is kind of crazy [23:23] creationix: isaacs: that's my point [23:23] ryan_gahl_: ok, that better? [23:23] creationix: what if I want to use bash [23:23] isaacs: creationix: it depends on your definition of "simplicity" [23:23] mape: yes [23:24] ryan_gahl_: just on a stupid hunt for a nice looking transparent overlay client [23:24] isaacs: creationix: imo, a pacakge manager should empower the authors, and simplify life for the users. npm aims to do this. it doesn't do a perfect job, of course, and has bugs, and such, but that's because it's very young. [23:24] creationix: installing packages in ivy = "cd lib/node && ln -s ../../modules/*/lib/* ./" [23:24] creationix: that's it! [23:24] creationix: how much simpler does it get? [23:24] isaacs: creationix: installing packages in npm = "npm install whatever" [23:25] mape: sudo dat [23:25] creationix: isaacs: no, that's my implemention, not my external api [23:25] isaacs: creationix: it's simpler for you, the package manager author. not for me. [23:25] creationix: npm's implementation is thousands of lines of js [23:25] isaacs: creationix: i'm not impressed by you having to write less code. i'm impressed by me having to write less code, and have access to more power. [23:26] creationix: ok, but it's a pain to have to install npm first to install anything [23:26] creationix: bash is everywhere [23:26] isaacs: creationix: in ^, you == package manager author, me == package manager user [23:26] isaacs: creationix: it's one line to install npm. [23:26] bradleyprice has joined the channel [23:26] isaacs: provided you have curl, that is [23:26] creationix: isaacs: not really [23:26] creationix: npm doesn't work for most my environments [23:26] isaacs: curl http://npmjs.org/install.sh | sh [23:26] rauchg_: my only concern about npm is authors assuming its installation, so instead of shipping a submodule, you're asked to `npm install dependency` [23:27] isaacs: creationix: that's because you don't install node in the standard ways. but, in the next version, you'll be able to make your envs support npm without any headaches. [23:27] jchris1 has joined the channel [23:27] isaacs: rauchg_: how is shipping a submodule any easier? [23:27] isaacs: i mean, yeah authors should make their packages easy to install any which way [23:27] rauchg_: git submodule add [23:28] tjholowaychuk: rauchg_: :D but then what do you do when you have 4 or 5 middleware that rely on connect internals or something? have like 9 versions of connect running? [23:28] isaacs: rauchg_: what i mean is, dealing with submodules is not easier than dealing with package deps. [23:28] rauchg_: tjholowaychuk: for special cases like connect [23:28] rauchg_: you require.paths.unshift [23:28] rauchg_: to a single connect location [23:28] rauchg_: in your project [23:28] tjholowaychuk: updating submodules id kindof a bitch [23:28] creationix: node could even include a convention to look in "./modules/*/lib/*" and there would be no install at all [23:28] creationix: just git submodules [23:28] tjholowaychuk: BUT at least you can verify shit works [23:28] rauchg_: and [23:28] rauchg_: you can have [23:28] isaacs: rauchg_: so, basically, you end up doing all the same things that npm does, but by hand, and without covering the edge cases that npm does. [23:28] rauchg_: the same module [23:29] rauchg_: at 2 different commits [23:29] rauchg_: working for 2 different projects [23:29] rauchg_: at the same time [23:29] jetienne: moving submodules path in the repo is not exactly easy either :) [23:29] isaacs: rauchg_: npm handles that case quite easily. [23:29] rauchg_: isaacs: what does it do [23:29] isaacs: each thing can depend on different versions of a dep, and it'll serve up the right one to each child. [23:29] creationix: isaacs: I think the problem is that we (developers) don't trust npm to do what we want [23:29] isaacs: rauchg_: it uses shims and does some require.path magic. [23:29] creationix: it's better to have something transparent [23:30] isaacs: creationix: the source is open. [23:30] creationix: isaacs: so is V8, but you tell me how it does GC [23:30] isaacs: creationix: meh. i know it works. [23:30] creationix: (granted npm is several magnatudes simpler) [23:31] creationix: isaacs: don't misunderstand, npm is great, just understand why it doesn't work for me [23:31] _alex: creationix: it uses stop-the-world gc [23:31] creationix: _alex: sure, but when and under what conditions [23:31] isaacs: creationix: that's ok. npm works for me. that's its purpose in life. working for other developers is part of making it work for me, since i want to use their stuff, too. [23:31] jakehow has joined the channel [23:31] creationix: isaacs: ok, how about this [23:32] creationix: isaacs: make is support packages without package.json but with lib and bin folders [23:32] isaacs: getting everyone to use a specific folder structure is pretty impossible. sending a patch with a package.json is a lot easier [23:32] hij1nx has joined the channel [23:32] isaacs: creationix: no. but i do plan to implement a helper script to create package.json. [23:32] creationix: and let me npm install http://github.com/creationix/step.git [23:32] joshbuddy has joined the channel [23:32] joshbuddy has joined the channel [23:32] isaacs: installing from git is silly. github gives you tarballs. [23:33] isaacs: npm install http://github.com/creationix/step/tarball/master [23:33] mape: would that work with update? [23:33] rauchg_: isaacs: i thought the tarballs didn't include submodules [23:33] creationix: heck, I'd like "npm install creationix/step" and assume github from some internal config [23:33] tjholowaychuk: rauchg_: I think they do now [23:33] _alex: you could write a bash script [23:33] isaacs: creationix: that's all procelain, and pretty high-level porcelain at that. [23:33] isaacs: creationix: if npm ever does that, it wont' be soon. there are other rocks in the way. [23:34] creationix: isaacs: until it's less work to use npm and/or the speed of node development slows, people's packages will often be out of date [23:35] creationix: 99% of projects are on github [23:35] rauchg_: i think git(hub) is our package manager [23:35] isaacs: creationix: i dunno if i agree. a lot of people are pushing packages to the npm registry pretty regularly. [23:35] creationix: and most of then either have a convention about folders or package.json or both [23:35] tjholowaychuk: I have to admit I get headaches when people tell me the npm stuff is wack if I have not pushed for a while [23:36] tjholowaychuk: but thats the nature of the community right now regardless [23:36] tjholowaychuk: with everything nearly [23:36] tjholowaychuk: newbbbbbsss [23:36] creationix: yeah, I want a package manager that works against git directly [23:36] creationix: and with minimal effort on the package developer [23:36] aniero: homebrew is pretty minimal as far as usage goes [23:36] jetienne: github allow not to have username/password specific to npm, thus no need to memorize them [23:36] isaacs: creationix: then why not just tell people to clone your repo and build it themselves? [23:36] isaacs: creationix: or use mode? [23:37] isaacs: i mean, that's kind of what mode IS. [23:37] _alex: it's nice to have packages with versions for deployment sanity [23:37] creationix: what's mode? [23:37] isaacs: creationix: http://github.com/rsms/mode [23:37] creationix: _alex: yeah, that's where git submodules come in handy [23:37] isaacs: kinda abandoned [23:37] FransWillem: creationix: Do you work for Sencha ? [23:37] creationix: FransWillem: yes, why? [23:37] isaacs: along with kiwi, it's one of the PM/ModuleLoader things that's kinda in the middle of the spectrum [23:38] FransWillem: creationix: Read it somewhere, impressed :) [23:38] lachlanhardy has joined the channel [23:38] tjholowaychuk: isaacs: and dead in a month :D [23:38] _alex: I suppose if you rely on git for deployment and lock in all your deps it's just a different way of working [23:38] _alex: rather than the package manager way I'm used to [23:38] isaacs: tjholowaychuk: well, there are a few reasons for that, i think. i can't speak to why rsms abandoned it, but i can say why i would have. [23:38] _alex: after a decade of apt, ports [23:39] _alex: dpkg [23:39] creationix: isaacs: I think it the central repository I don't like, it's a pain to keep that synced with the primary sources [23:39] tjholowaychuk: isaacs: nono i meant kiwi lol [23:39] isaacs: tjholowaychuk: oh, haha [23:39] rsms: isaacs: I simply didn't have time [23:39] isaacs: rsms: hey, you're here :) [23:39] rsms: isaacs: I just happened to pass the laptop when I saw Colloquy jumping in the dock :) [23:40] isaacs: hehe [23:40] rsms: isaacs: seems like NPM have taken a lot of ground, which is nice [23:40] cloudhead: submodules are a pain [23:40] isaacs: rsms: yeah, it's been a fun project. [23:40] cloudhead: npm makes things so much easier [23:41] isaacs: creationix: what would make the central repo less onerous? (i don't much like the way it is now, either) [23:41] creationix: cloudhead: I like your modules, they support both npm and my style [23:41] tjholowaychuk: i usually submodule deps anyways [23:41] creationix: isaacs: maybe document a way to hook up github commit hooks to push versions when a package is tagged [23:41] tjholowaychuk: so i can support clones to ~/.node_libraries, npm etc [23:42] rsms: I'm the kind of guy who run away scared when someone says "dependencies". Like all those crazy ass Ruby projects where they first brag about how small their code base is and then there's a looong list of dependencies. FTW. :P [23:42] cloudhead: creationix: yea, it would be nice if npm would default to that dir structure, so most of the stuff in package.json becomes optional [23:42] _alex: rsms: from a billion lame rails/jquery plugins [23:42] isaacs: rsms: yeah, "parses html in 10 lines of ruby!" (and hpricot...) [23:43] creationix: isaacs: actually I was quite suprized that npm didn't assume "lib" and "bin" as defaults [23:43] rsms: _alex: isaacs: yeah, lol. [23:43] tjholowaychuk: cloudhead: that is what confuses me with npm some times, i forget to set that shit [23:43] isaacs: creationix: yeah, commit hooks would be handy. personally, i am pretty fast-and-loose with my commits, and --force push a lot, so that's not something I'd ever use [23:43] tjholowaychuk: and then i have to republish lol [23:43] cloudhead: tjholowaychuk: yea, I copy/paste my package.json files from other projects [23:43] isaacs: creationix: so, here's the thing... "lib" is not good. [23:43] isaacs: creationix: that is going away, super duper soon. [23:44] rsms: I really appreciate ryah being a minimalist with passion for pretty (read: good enough) architecture. [23:44] isaacs: cloudhead: it's more likely that there'll be a helper script to generate a package.json for you, and that might be smart. npm tries to assume just about nothing; [23:44] _alex: I still like hpricot [23:44] rsms: Would like to see node being used for other things than HTTP though. Have been trying to pitch it at Spotify, but with little success [23:45] cloudhead: isaacs: yea, that'd help, to this date, I still don't fully understand what the different options mean [23:45] rsms: _alex: what's hpricot? [23:45] cloudhead: dir vs main etc [23:45] mape: html parsing [23:45] _alex: rsms: a ruby html/xml parser [23:45] jetienne: rsms: it will, just because it avoid to learn other server script langauge. and everybody already knows js. but this is clearly young [23:45] _alex: the author did some nice ragel stuff that made it pretty fast and kept the ruby simple [23:45] rsms: mape: ah... like hpricot(string) -> dom object ? [23:46] isaacs: cloudhead: all you need are name, version, and main (for require() modules) or bin (for cli scripts) [23:46] isaacs: cloudhead: everything else is optional. [23:46] ashleydev: tjholowaychuk: ok pull request sent -- i found bugs during the merge process as well, and added extra tests. [23:46] mape: rsms: parse and then use xpath [23:46] tjholowaychuk: ashleydev: wicked thanks bud, gotta run soon but I will check it out ASAP [23:46] mape: isaacs: what is spotify running now? python? [23:46] cloudhead: isaacs: so I don't need "lib" and "directories" ? [23:46] ashleydev: tjholowaychuk: thx [23:46] _alex: or css selectors [23:46] isaacs: cloudhead: nope [23:46] isaacs: cloudhead: http://github.com/isaacs/npm/issues#issue/144 [23:46] cloudhead: aha ok [23:47] isaacs: cloudhead: so, currently, the "lib" directory will be exposed as a symlinked folder named for your app. [23:47] rsms: jetienne: yeah, hopefully. It's among the fastest JITed dynamic languages (except from LUAJIT etc), so can't blame the speed of v8. Node adds some latency with all events though, but I guess it's negligible in most situations. [23:47] isaacs: cloudhead: {"name":"foo", "directories":{"lib":"./lib"}} would symlink the "./lib" inside the foo pkg to a folder named "foo" [23:47] cloudhead: ah I see [23:48] isaacs: cloudhead: the problem is that this doesn't have any way to fix dependencies, or path names, etc. so if one of those modules did require("bar"), there's no telling if it's the "bar" that foo depends on, or some other version that happens to be active. [23:48] rsms: I'm pressing the suspend button on myself now. 2am here in Sweden. Nighty guys. [23:48] MattJ: rsms: That's "LuaJIT" btw, it's "Lua", not "LUA" too :) [23:48] MattJ: 'night :) [23:48] isaacs: if one of those modules to require("../utils/baz") then it'll be ALL messed up. [23:48] paulwe has joined the channel [23:48] mape: nn [23:48] isaacs: g'nite, rsms [23:48] rsms: MattJ: you're correct, of course :) [23:48] MattJ: I'm always correct! [23:48] mape: Yeah should get some sleep :( If only the neighbours would stop their rave music [23:48] isaacs: cloudhead: more here: http://groups.google.com/group/npm-/browse_thread/thread/20b0e62c25394b63 [23:48] _alex: I saw a site that kept referring to git as GIT [23:48] _alex: all caps [23:48] cloudhead: isaacs: hmmm reading [23:49] MattJ: _alex: Yep, there's an XMPP client called Psi.. everyone calls it "PSI" [23:49] _alex: a site that hosts git repos [23:49] _alex: :| [23:49] MattJ: Just never name your project anything with 3 letters [23:49] paulwe has joined the channel [23:49] isaacs: _alex: kinda like how people call npm NPM [23:49] isaacs: :3 [23:49] MattJ: isaacs: Yes, but.... [23:49] rsms: MattJ: before leaving, I once wrote this crazy ass super-fast (12k r/s on a laptop, single proc) FastCGI server with embedded Lua. http://github.com/rsms/elua [23:49] _alex: another one is the i in Apple products [23:49] MattJ: isaacs: NPM is actually an acronym :P [23:50] tjholowaychuk: gotta head out, have a good one guys [23:50] _alex: iPhone, IPhone, i-Phone, I-PHONE [23:50] isaacs: MattJ: yes. a lower case acronym. [23:50] ashleydev: tjholowaychuk: one note -- [23:50] dylang has joined the channel [23:50] MattJ: isaacs: That one is harder to defend against these people :) [23:50] _alex: and 'iTouch' which just sounds disturbing [23:50] _alex: I thought tj would be an ssh/screen irc kind of man [23:51] mape: irssi <3 [23:51] DTrejo__: isaacs: is there anything to be learned from leiningen? [23:51] isaacs: not familiar with leiningen! checking this out now. [23:51] _alex: I still use irssi [23:52] _alex: I loaded bitchx the other day just to see if it'd work still [23:53] zemanel has joined the channel [23:53] tpryme has joined the channel [23:54] isaacs: project.clj looks remarkably similar to package.json [23:54] isaacs: bit more conventional than npm [23:55] ricardobeat has joined the channel [23:56] _alex: but lein saves you from java's tools [23:56] isaacs: also, no sharing dependencies. but if you're doing stuff with jars, you probably dont' care about that [23:56] davidwalsh has joined the channel [23:56] _alex: you just care about not meddling with XML [23:56] isaacs: yeah [23:56] isaacs: oh, yeah, java's tools are hellish [23:56] ricardobeat has joined the channel [23:56] shajith has joined the channel [23:57] DTrejo__: isaacs: I like how lein can install clojure for you [23:57] ricardobeat: hi there [23:57] ricardobeat: anyone using jade? [23:57] _alex: night folks [23:57] isaacs: DTrejo__: oh, meh. that's a parlor trick. [23:58] DTrejo__: isaacs: I have a perhaps irrational wish that npm would do that too [23:58] DTrejo__: oh [23:58] isaacs: DTrejo__: i mean, *lein* doens't install clojure for you. [23:58] isaacs: DTrejo__: a *bash script* installs both clojure and lein for you [23:58] isaacs: http://github.com/technomancy/leiningen/raw/stable/bin/lein [23:59] DTrejo__: I haven't looked at it in a while, and back then I didn't know bash scripts at all, forgive me haha [23:59] isaacs: hehe [23:59] DTrejo__: I'm off now [23:59] isaacs: have fun [23:59] DTrejo__: have a good day everyone [23:59] DTrejo__: oh question: what time is the meetup on the 10th?