[00:03] tekky: jesusabdullah: and throw() [00:03] benburkert has joined the channel [00:03] tekky: kinda all go together if you ask me :P [00:06] jesusabdullah: tekky, stride: Thx dawgs [00:06] jesusabdullah: ;) [00:06] maushu: When everything flops. uncaughtException is your friend. [00:07] omarkj: SubStack: You're not a fan of getting the error message passed into the callback ? [00:07] tekky: np [00:08] stride: I prefer the other way around, passing an error callback and by that handling error control to the caller [00:09] jesusabdullah: I need to use uncaughtException :/ [00:09] omarkj: That would be cool as well. [00:09] jesusabdullah: maushu: Is the nodebot yours? Do you have code up somewhere? [00:09] jesusabdullah: I'd be interested in borrowing the twitter code <_< [00:10] maxsilver has joined the channel [00:10] maushu: Why people keep trying to rape announcer?! HE NEVER HURT ANYONE! [00:10] jesusabdullah: :( [00:10] jesusabdullah: I think announcer is awesome! [00:10] maushu: http://graphnode.com/stuff/ircbot.js [00:10] jesusabdullah: maushu: Awesome! Thanks [00:10] SubStack: omarkj: indeed I am not a fan [00:11] maushu: What you want is in checkTweets(); [00:11] beelzabub: in the http module, how can i respond with >1 headers that have the same name? [00:12] jesusabdullah: maushu: Do you have to deal with the ircbot timing out? [00:12] jesusabdullah: Or has it just not been a problem? [00:12] maushu: The bot itself? Nope. [00:12] jesusabdullah: Hmm [00:12] maushu: Twitter? All the time. [00:12] jesusabdullah: Ah [00:12] jesusabdullah: I meant the bot itself [00:12] jesusabdullah: I have a bot that drops connection within a few hours [00:13] maushu: Thats weird. [00:13] jesusabdullah: Probably not too hard to fix, but [00:13] jesusabdullah: Well, it could just be my internets aren't so good [00:13] jesusabdullah: being in Alaska and all [00:13] jesusabdullah: horrendous ping sometimes [00:13] maushu: Yup. Thats it. [00:13] jesusabdullah: Yeah [00:13] maushu: Announcer is in a great server, in the UK. [00:13] jesusabdullah: I think maybe I can catch the timeout error and make it reconnect [00:14] jesusabdullah: but I don't have a good background in error handling, so it'd be new for me :) [00:14] jesusabdullah: *shrug* [00:14] jesusabdullah: Anyways! Thanks maushu! [00:14] maushu: *Shameless plug*: Similar to those I'm going to use on the startup. [00:14] omarkj: You got one of those maushu ? [00:15] maushu: Hmm? [00:15] omarkj: Startup. [00:15] maushu: http://www.graphnode.com/ [00:16] matt_c has joined the channel [00:16] omarkj: Oh I love the last point. [00:16] stride: jesusabdullah: which irc library are you using? I have a small reporting bot that has the same issue and I was going to implement reconnect for that anyway [00:16] omarkj: Interesting stuff. [00:17] maushu: omarkj, the last point is for people that don't trust my infrastructure and are afraid I might close down sooner or later. [00:17] jesusabdullah: stride: Right now? node-IRC I think [00:17] jesusabdullah: stride: You? [00:17] maushu: NOT THAT IT WILL EVER HAPPEN. <- Optimist. [00:18] jesusabdullah: maushu: Your web page won't scroll :S My screen is really short and I can't see the top of it! [00:18] JimBastard: hrmm so the new version of broodmother is kinda working lol [00:18] maushu: jesusabdullah, get a bigger screen. Fixed. NEXT! [00:18] JimBastard: json api ftw [00:18] omarkj: maushu: Hehe. And it's good for people living on islands in the middle of the ocean. Latency you see.. [00:18] stride: jesusabdullah: me too, version 0.1.2 [00:18] jesusabdullah: stride: Sweet :D [00:18] Marak: stfu JimBastard [00:18] JimBastard: no u [00:18] JimBastard: get out of my house [00:19] jesusabdullah: ACTION & driving [00:19] jesusabdullah: Thanks guys! [00:19] jesusabdullah: stride: Keep me posted, I'd definitely be interested [00:19] jesusabdullah: stride: http://github.com/jesusabdullah/lulzbot [00:19] stride: jesusabdullah: will do [00:19] maushu: omarkj, still trying to find honest and transparent ways of keeping the users here with that last option. [00:20] maushu: Maybe automatic updates to the framework in their server or something similar. [00:20] omarkj: Ah, yeah, I see your problem. [00:20] siedrix: does node has sha-1? [00:20] omarkj: That could be tricky. [00:21] maushu: For now I'm just hoping my product is so awesome that they come back again and again and never unregister. [00:21] maushu: jesusabdullah, what is the size of your screen? [00:22] hassox has joined the channel [00:23] brianmario has joined the channel [00:24] dylang has joined the channel [00:26] maushu: jesusabdullah, AhAH! [00:26] maushu: I was wondering on how could you use Jerk and found out gf3 did add functions to the outside of the watch_for. [00:27] maushu: (When I implemented announcer, there weren't any functions like "say" on the client.) [00:27] maushu: That is why I went the high-road and used node-IRC instead. [00:27] jakehow has joined the channel [00:28] maushu: Yeah, it was this one: http://github.com/gf3/Jerk/commit/66f7cee82af69e276c5ba7e0d2f19ae6b3bc305f [00:29] maushu: Maybe I should shift to the Jerk lib now. [00:32] quirkey has joined the channel [00:35] mscdex: beelzabub: you have to use an array instead of an object, like: ['Content-Type: text/html', 'Set-Cookie: foo=bar', 'Set-Cookie: nodejs=rules'] [00:35] stride: jesusabdullah: the irc library obviously has a retryCount parameter you can set in the options (see 3rd constructor param) doesn't react on the error event, if that doesn't help I guess the connections error event has to be evaluated, too [00:35] beelzabub: thanks mscdex [00:36] beelzabub: last minute fire came up because there's a 3rd party service that doesn't use standard http headers [00:37] stride: jesusabdullah: I'm trying retryCount: 3 now, though that will only work if the end event is called, time will tell :) [00:42] wilmoore has joined the channel [00:43] ryan[WIN] has joined the channel [00:46] EyePulp has joined the channel [00:49] bmesh has joined the channel [00:52] stride: jesusabdullah: so, I just checked with iptables, retryCount actually works in the ping timeout scenario as well. should help you, too [00:55] beelzabub: mscdex: that didn't work [00:57] _announcer: Twitter: "asynchronous chat was node.js + express. You can easily enjoy this event on the server side! How about ... DB is going Redis" [ja] -- ishikawan(21). http://twitter.com/scraperonce/status/20101019419 [01:02] dannycoates has joined the channel [01:02] mscdex: beelzabub: my fault, it's an array of pairs instead: [['Content-Type', 'text/html'], ['Set-Cookie', 'foo=bar'], ['Set-Cookie', 'nodejs=rules']] [01:03] derferman has joined the channel [01:03] beelzabub: yup [01:03] beelzabub: thanks [01:03] beelzabub: was just looking through the code [01:08] ashleydev has joined the channel [01:11] dnolen has joined the channel [01:11] n3v3le has joined the channel [01:13] dipser has joined the channel [01:14] n3v3le has joined the channel [01:16] ditesh|cassini has joined the channel [01:22] dylang has joined the channel [01:24] dannycoates has left the channel [01:26] n3v3le has joined the channel [01:30] n3v3le1 has joined the channel [01:31] gwoo has joined the channel [01:31] hassox: guys... [01:31] hassox: I've I'm writing an app using Mongoose [01:32] hassox: would it be considered bad form to put Mongoose on the global object so I don't have to keep requireing it in every file? [01:32] SubStack: yes [01:34] softdrink has joined the channel [01:37] hassox: SubStack: so I should be requireing everything in every file? [01:37] hassox: and, why is it considered bad form? [01:38] sudoer has joined the channel [01:40] mscdex: hassox: there's no performance hit for multiple requires since require uses a cache [01:40] hassox: sure, but I have this dirty big list of requires at the top of every file [01:41] hassox: so, why is attaching things, which are cached (and therefore global) to the global scope considered bad form? [01:41] tmpvar has joined the channel [01:41] dipser: what am i doing wrong :( i tried to install the example chat from node.js but i cant connect to server.. [01:42] root__: check your firewall ports [01:42] joshdulac: woops... didnt realize my nick was root [01:42] SubStack: hassox: you can probably refactor your program to be pretty [01:43] hassox: SubStack: but that still doesn't explain why it's a bad thing [01:43] hassox: the require cache is global anyway, so why is it even considered a different thing? [01:44] _announcer: Twitter: "Gettin insane fired up about @node_knockout... #nodejs rockin it." -- hij1nx. http://twitter.com/hij1nx/status/20104009682 [01:44] SubStack: hassox: http://en.wikipedia.org/wiki/Don't_repeat_yourself is why [01:45] hassox: SubStack: ? [01:45] hassox: aren't I repeating myself by requiring the files? [01:45] hassox: i don't see how DRY is relevant in this question [01:46] dipser: joshdulac: i have opened it for 8001: http://84.132.56.145/~dipser/Node/ [01:46] joshdulac: dipser: on both the client and the server? [01:47] dipser: yes [01:48] joshdulac: hmm [01:48] joshdulac: are they on two different boxes? [01:48] dipser: its on my mac [01:48] dipser: both [01:48] SubStack: hassox: perhaps http://www.eetimes.com/discussion/break-point/4025723/A-pox-on-globals is more appropriate [01:49] joshdulac: oh true. hmmm, i havent played around with the example code [01:49] joshdulac: it might not be updated for the latest release of node, if that's what your using [01:49] hassox: SubStack: thanx [01:49] hassox: ACTION reads [01:49] dipser: yes im using the latest version [01:49] dipser: from yesterday [01:51] dipser: joshdulac do you know a fresh example with chat/broadcasting or something to start with? [01:51] dipser: every script i found is out of date ^^ [01:52] joshdulac: hmm, i havent tried any chat applications yet [01:52] joshdulac: one second [01:52] SubStack: the point about interrupts and reentry seems especially relevant to node [01:52] hassox: what do you mean/>? [01:52] foobarfighter has left the channel [01:53] foobarfighter has joined the channel [01:53] jchris has joined the channel [01:53] joshdulac: dipser: here are a ton of node modules, check out the node-chat one, it says its simple: http://wiki.github.com/ry/node/modules [01:53] hassox: SubStack: I guess the 'globals' I'm talking about aren't values as such, but more like namespaces of other languages [01:53] hassox: the top level namespaces, like modules or classes you might find in ruby / java [01:53] joshdulac: dipser: node-chat repo is here: http://github.com/scottgonzalez/node-chat [01:53] hassox: 0nce declared, thses top level namespaces are available everywhere [01:54] Byron has joined the channel [01:54] dipser: joshdulac: thank you [01:54] joshdulac: dipser: oh wait, im guessing thats the one your using? [01:54] dipser: no [01:54] joshdulac: dipser: oh no its different =) [01:55] SubStack: hassox: still it makes your program more tightly coupled [01:55] hassox: sure, kinda [01:55] hassox: the fact that require is cached, has the same effect [01:55] SubStack: not at all [01:55] hassox: how sso [01:56] SubStack: if somebody else looks at your code and sees YourGlobal in a source file [01:56] SubStack: they won't have any idea where it came from [01:56] SubStack: also you can't write unit tests that test just that lib without reintroducing YourGlobal [01:56] bradleymeck2 has joined the channel [01:57] hassox: well I'm only talking about library objects, like Mongoose [01:57] hassox: what do you mean test can't be written for it? [01:57] hassox: why not? [01:57] SubStack: that's what I was talking about [01:57] SubStack: hence the capital Y [01:58] hassox: the only difference I can see is that when you open a file, you can see that Mongoose === require( [01:58] SubStack: hassox: it's possible to write tests, it's just much harder when you need to recreate some global state [01:58] hassox: require('mongoose').Mongoose [01:58] SubStack: why do you need mongoose to be littered across a bunch of source files anyways [01:59] hassox: my model definitions, my access to those models [01:59] hassox: everything requires mongoose for this app [01:59] SubStack: seems like poor abstraction [01:59] hassox: er.. [01:59] hassox: what would you suggest [01:59] SubStack: I haven't used mongoose [01:59] hassox: I could put everything in one file... [01:59] hassox: but that has other issues then [02:00] hassox: by seperating the logic out a bit, it makes each file grokable [02:00] hassox: and the whole app organised [02:00] pufuwozu has left the channel [02:00] hassox: the fact that each file needs to use mongoose (it's a mongo backed app) shouldn't come as a surprise [02:00] dipser_ has joined the channel [02:02] hassox: brb [02:04] dmcquay has joined the channel [02:04] jwcooper has joined the channel [02:06] meso_ has joined the channel [02:07] mattly has joined the channel [02:08] devinus has left the channel [02:11] mscdex: hassox: well if you have an MVC design, then you should only need to really include it in one file [02:12] SubStack: in your models: exports.model = { /* ... */ }, in your db driver: mongoose.model('User', User.model) [02:12] SubStack: or some such [02:13] _announcer: Twitter: "@robcthegeek Thought of also picking up Node.js? I've dabbled, but want to dig further into it." -- Rob Mason. http://twitter.com/iamcalledrob/status/20105825387 [02:13] _announcer: Twitter: "分享 Node.js: JavaScript on the Server http://tinyurl.com/27utc7j http://plurk.com/p/6otij1" -- Wing. http://twitter.com/darkwings/status/20105827613 [02:14] n3v3le has joined the channel [02:15] isaacs has joined the channel [02:17] joshbuddy has joined the channel [02:19] Tim_Smart has joined the channel [02:20] JimBastard: woot [02:20] joshdulac: JimBastard: success? [02:20] JimBastard: great success [02:21] JimBastard: i can spin up node instances to serve requests in real time [02:21] joshdulac: Apache's default great success! ? [02:21] JimBastard: :-D [02:21] joshdulac: instances - you mean over multiple cores? [02:22] JimBastard: multiple cores on multiple machines [02:22] joshdulac: delightful [02:22] JimBastard: indubiously [02:22] JimBastard: just gotta keep working on it [02:22] joshdulac: who are you hosting the boxes with? [02:22] JimBastard: gonna push the new version soon [02:22] JimBastard: rackspace [02:23] joshdulac: nice, same here [02:23] Marak: this is all part of http://github.com/nodejitsu [02:23] joshdulac: version? whats your gitrepo user [02:23] Marak: and the broodmother [02:23] kreyman has joined the channel [02:23] JimBastard: http://github.com/Marak/broodmother [02:23] JimBastard: but thats just an outdated read me [02:23] JimBastard: more stuff coming [02:24] mattly has joined the channel [02:24] jlilly: is there a debugger for node? [02:24] bradleymeck2: there a good way to make it so you cant set the properties of an Object that are currently there (including prototyped values)? [02:24] jlilly: specifically, I want to breakpoint at a specific part of code and muck around in it. [02:24] JimBastard: frankenbugger? [02:24] bradleymeck2: http://github.com/dannycoates/node-inspector is easy enought to set up [02:24] joshdulac: JimBastard: sounds like a great idea [02:25] bradleymeck2: requires chrome or a webkit browser though [02:25] joshdulac: JimBastard: so its once instance per domain [02:25] joshdulac: ? [02:25] JimBastard: joshdulac: depends how much traffic that domain is getting :-) [02:25] matt_c: ACTION hasn't looked at it but watched http://github.com/smtlaissezfaire/ndb the other day too. [02:25] joshdulac: JimBastard: Ok, so its not limited? [02:25] JimBastard: broodmother can spawn more instances [02:25] joshdulac: to one [02:25] JimBastard: nope, but you need to have your application state maintained somewhere [02:25] JimBastard: like the database [02:26] joshdulac: true [02:26] JimBastard: we are still actively developing a lot of stuff [02:26] joshdulac: how do you handle the load balancing? [02:26] JimBastard: with javascript [02:26] joshdulac: lol [02:26] JimBastard: :-) [02:27] joshbuddy has joined the channel [02:29] Byron has left the channel [02:29] siedrix has joined the channel [02:29] bradleymeck2: cant reveal all your secrets? :( [02:30] admc has joined the channel [02:33] tmpvar has joined the channel [02:35] JimBastard: id like to but it would be epic frustrating to explain it over chat [02:35] bradleymeck2: yo tmpvar [02:35] JimBastard: gotta make more graffles [02:36] kreyman has joined the channel [02:36] bradleymeck2: i really wish we had a simple image gallery in node [02:36] JimBastard: ? [02:36] JimBastard: like full app? [02:36] bradleymeck2: yea full [02:36] JimBastard: build it on connect with the assett manager [02:36] JimBastard: and use yayquery ui [02:36] JimBastard: bam [02:37] bradleymeck2: uploads / zips up stuff together, havent used yayquery yet [02:37] JimBastard: jQuery UI [02:37] JimBastard: sorry [02:37] JimBastard: there are other ones too [02:37] bradleymeck2: im busy porting junk in c++ land [02:38] bradleymeck2: cant figure out a few things in oniguruma, like how to make it so it wont do overlaps [02:38] ezmobius has joined the channel [02:39] powdahound has joined the channel [02:39] JimBastard: "message":"EAFNOSUPPORT, Address family not supported by protocol family" [02:39] JimBastard: hrmmmm [02:39] joshdulac: just use processing.js [02:39] bradleymeck2: trying to do multicasting? [02:39] joshdulac: @Jim [02:40] joshdulac: for your graphic remarks [02:40] joshdulac: not your error [02:40] JimBastard: imacomputer [02:40] bradleymeck2: so that makes you... a gay robot [02:44] mscdex: stop all the downloadin'! [02:47] jamescarr: damn [02:47] jamescarr: a day full of painting [02:47] jamescarr: JimBastard, re: international payment gateways... [02:48] jamescarr: did you find a solution? I tried to tell you after you left that paypal payflow pro works in the US, GB, AU, NZ, and one other place ;) [02:48] mshadle has joined the channel [02:49] _announcer: Twitter: "說 http://plurk.com/p/6otij1 ([ReP]) @darkwings: Node.js: JavaScript on the Server http://tinyurl.com/27utc7j #... http://plurk.com/p/6ou2ko" -- ericpi. http://twitter.com/ericpi/status/20108003248 [02:49] jamescarr: also got AIM payment method working with Authorize.net, but left off at some mad refactoring to combine some functionality [02:49] mshadle: anyone used node.js w/ nntp or usenet or anything? as a client? [02:49] JimBastard: jamescarr: a lot of people were saying something here last night [02:49] JimBastard: its in the logs [02:50] JimBastard: mshadle: whats that [02:50] JimBastard: http://en.wikipedia.org/wiki/Network_News_Transfer_Protocol ? [02:50] mshadle: yes [02:50] bmesh has joined the channel [02:51] mshadle: i believe it's all plaintext protocol. so it wouldn't be -too- hard. but node was compared against python twisted and such, except it doesn't crap out under load like twisted does [02:51] tilgovi has joined the channel [02:52] joshdulac: mshadle: im sure its possible, but i havent seen any modules on github for it [02:52] joshdulac: mshadle: someone made a bittorrent client in node, so a nntp wouldnt be hard [02:52] jamescarr: JimBastard, I'll try to wrap up some of my recombination efforts and get an initial push to github [02:52] mshadle: i was looking at making it quickly on my own. no clue if i could get something really cool [02:52] JimBastard: mshadle: it would probably be somewhat easy to build a module to work with that service [02:52] JimBastard: jamescarr: thats awesome man, you are the node payment master [02:52] JimBastard: :-) [02:53] mshadle: im having a probem with now just making a simple tcp connection to memcached and printing stats [02:53] jamescarr: I'll take a look at the logs to see what I missed... for the most part I have a haphazard framework that is coming together that makes it easy to define new modules ;) [02:53] JimBastard: api > code [02:53] JimBastard: you can always refactor the code [02:55] bradleymeck2: refactor the api! make the devs suffer! [02:59] jchris has joined the channel [03:00] Tobsn has joined the channel [03:00] Tobsn: hu [03:00] isaacs has joined the channel [03:01] Tobsn: JimBastard, http://github.com/tobsn/flexihash.js [03:03] JimBastard: Tobsn: cool [03:03] Tobsn: :) [03:03] JimBastard: whats the point of this again [03:03] Tobsn: consistent hashing [03:04] Tobsn: well not much of a reason behind it... just wanted to try out nodejs "code" [03:04] mtodd has joined the channel [03:04] Tobsn: so i chose that as first entry into coding for nodejs... because there was no flexihash implemention yet [03:05] joshdulac: great work! [03:05] joshdulac: good thing it was released under MIT license [03:05] Tobsn: its a 1:1 port of the php version [03:05] Tobsn: well i just copied the comments :P [03:05] Tobsn: oooh [03:05] Tobsn: yeah [03:05] Tobsn: youre right [03:05] Tobsn: :D [03:05] Tobsn: well either way i guess nobody would give a damn [03:06] joshdulac: well its free code - its permitted to be used in propreitary software [03:06] mscdex: mshadle: there's an nntp module already [03:06] joshdulac: so by refactoring it in JS is great - and you linked back to the author / license [03:07] joshdulac: so your good [03:07] Tobsn: :) [03:07] mscdex: well, there's a couple... but they haven't been updated in awhile [03:07] joshdulac: how long did it take you [03:07] mscdex: mshadle: here's the most recent one: http://github.com/mikeal/node-nntp [03:07] Tobsn: the flexihash thing? [03:08] Tobsn: maybe 4 hours of actual work with testing (crc32 was a bit wacky and i didnt found the bug etc.) but like a week of reading about nodejs etc. [03:08] Tobsn: to really grasp it [03:08] mikejs has left the channel [03:08] joshdulac: cool [03:09] Tobsn: also i had to copy and paste and alter a couple tiny scripts for the functions that are implemented as standard in php... like in_array, array_unique, array_keys, array_values and ksort() [03:09] Tobsn: but it works now 1:1 like the php version [03:09] joshdulac: ya, that's what i figured would have to take the longest time [03:09] joshdulac: PHP is such a massive language [03:09] Tobsn: well not really [03:09] Tobsn: phpjs.org is pretty helpful [03:09] CIA-77: node: 03Danny Coates 07master * rdc8c079 10/ (lib/module.js src/node.cc): remove node::CheckBreak in favor of using the v8 debugger js object - http://bit.ly/aTzClw [03:10] Tobsn: (see comments on the functions further down starting with flexihash.prototype.__* ) [03:10] joshdulac: oh. i totally forgot about phpjs [03:10] Tobsn: yeah :) [03:11] mscdex: it's too bad there isn't a phpjs function for parsing a PHP session [03:11] mscdex: unserialize isn't compatible with sessions :\ [03:11] Tobsn: ;) [03:11] Tobsn: wait [03:11] Tobsn: what? [03:12] joshdulac: i dont think that is possible [03:12] Tobsn: why not? [03:12] Tobsn: i think you can easy share sessions between nodejs and php [03:12] mscdex: no [03:12] Tobsn: no? [03:12] Tobsn: do tell :) [03:12] mscdex: unless you write your own PHP session parser [03:12] mscdex: i've already looked into this [03:13] Tobsn: but its just a serialized array? [03:13] mscdex: it's not [03:13] Tobsn: isnt it? [03:13] Tobsn: hu?! [03:13] mscdex: that's what i thought at first, it's just a serialize()'ed object [03:13] mscdex: but it's different [03:13] Tobsn: whats different? [03:13] Tobsn: wait, im gonna try that out [03:13] mscdex: take a look at some of your PHP session files [03:14] Tobsn: first i gonna find out where the heck that thing stores them right now on one of my dev nodes [03:14] Tobsn: oh and i gotta turn off memcache sessions for that node [03:14] jamescarr: hmmm... [03:14] mscdex: you can also scroll down to the comments section here: http://phpjs.org/functions/unserialize [03:15] Tim_Smart has joined the channel [03:15] _announcer: Twitter: "Navicat is finished on the pushdown. . . Continue to tinker with NodeJS" [zh-CN] -- Kristy Swan. http://twitter.com/LonelySwan/status/20109634988 [03:15] mscdex: either phpjs isn't an identical implementation of unserialize in php, or php unserializes sessions some other way than just a call to unserialize [03:16] mscdex: ACTION shrugs [03:16] Tobsn: well thats pretty easy to find out [03:17] Tobsn: PHPAPI ps_module *_php_find_ps_module(char *name TSRMLS_DC); [03:17] Tobsn: 227 PHPAPI const ps_serializer *_php_find_ps_serializer(char *name TSRMLS_DC); [03:17] Tobsn: thats how the session.h implements it [03:17] mscdex: is that what unserialize() uses? [03:19] Tobsn: if (php_var_unserialize(¤t, (const unsigned char **) &p, (const unsigned char *) endptr, &var_hash TSRMLS_CC)) { [03:19] Tobsn: 823 php_set_session_var(name, namelen, current, &var_hash TSRMLS_CC); [03:19] jamescarr: I'm in vows hell [03:19] Tobsn: php_var_serialize(&buf, struc, &var_hash TSRMLS_CC); [03:19] Tobsn: it looks like it [03:19] mscdex: so then phpjs's implementation is sucking [03:19] Tobsn: http://svn.php.net/viewvc/php/php-src/trunk/ext/session/session.c?view=markup [03:20] Tobsn: probably [03:20] Tobsn: lemme see if i find the php_var_un/serialize functions [03:20] jamescarr: Error: EISDIR, Is a directory [03:20] jamescarr: :( [03:20] Tobsn: they should be in the standard ext [03:20] jamescarr: vows can't handled nested directories???? [03:21] Tobsn: http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/php_var.h?revision=301143&view=markup [03:21] Tobsn: there it is [03:21] CIA-77: node: 03isaacs 07master * r65037ee 10/ (lib/path.js test/simple/test-path.js): (log message trimmed) [03:21] CIA-77: node: Don't let path.normalize get above the root. [03:21] CIA-77: node: Any path.join or path.normalize that starts with a / will not go "above" that [03:21] CIA-77: node: after normalization. This is important because /../foo is almost *always* some [03:21] CIA-77: node: sort of error, and doesn't match the corollary in sh: `cd $p; pwd` [03:21] CIA-77: node: At the worse, this can be a vector for exploits, since a static file server [03:21] CIA-77: node: might do path.join(docroot, path.normalize("/"+req)) to get the file. If the [03:21] Tobsn: well not really [03:21] Tobsn: http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/var_unserializer.c?view=log [03:21] Tobsn: there it is [03:22] Tobsn: holy crap. [03:23] Tobsn: the person who wrote that must be braindead now [03:23] CIA-77: node: 03Brian 07master * r71009ad 10/ src/node.js : Allow signals to be used with process.on in addition to process.addListener. - http://bit.ly/ddVyYw [03:24] mscdex: \o/ [03:25] mscdex: go nodebuilder go! [03:25] Tobsn: mscdex, http://php.net/manual/en/function.unserialize.php - just read the comments on the implemented function... looks like even the working php function is broken half way [03:27] SubStack: "Someone strap down Jani and give him a sedative please." [03:27] mscdex: ? [03:27] SubStack: in that commit log for var_unserializer.c [03:28] mscdex: oh heh [03:28] powdahound: That's a crazy file... [03:29] mscdex: i'm tempted to fix phpjs's unserialize... [03:29] Tobsn: 5G1vxy2PKsdqHPehbz7m-PI0cBrBg2lsxOZwSLtk60g. [03:29] mshadle: i love plaintext protocols [03:29] Tobsn: what the hell is htat [03:29] mscdex: mshadle: over SSL right? ;-) [03:29] Tobsn: thats in my session file [03:30] mscdex: Tobsn: how is it shown? [03:30] mshadle: mscdex: talk about an oldschool name [03:30] Tobsn: shown? [03:30] mscdex: Tobsn: context? [03:30] Tobsn: cat sessionfile [03:30] mshadle: mscdex: ssl would be the next step :p i'm trying to see if i can make a node.js client for nntp [03:30] mscdex: oh, you mean the filename? [03:30] Tobsn: :/var/lib/php5# cat sess_9d7ddfa3f6851ca7eb8edd061692c5cc [03:30] Tobsn: 5G1vxy2PKsdqHPehbz7m-PI0cBrBg2lsxOZwSLtk60g. [03:30] mscdex: oh [03:30] Tobsn: i stored "test":"test" [03:31] mscdex: Tobsn: no idea... never seen that before [03:31] mshadle: are you running suhosin [03:31] mshadle: suhosin encrypts session files [03:31] Tobsn: which encoding has a dot at the end and uses - [03:31] Tobsn: ooh [03:31] jamescarr: nl2br() [03:31] jamescarr: fuck [03:31] mscdex: mshadle: you saw the link for node-nntp? [03:31] Tobsn: yeah [03:31] Tobsn: its suhoshin [03:31] mshadle: i wasn't sure it was by default [03:31] jamescarr: I forgot all about some of the nonsense there [03:31] mshadle: mscdex: ooh. no [03:31] Tobsn: well how do i turn off suhoshin haha [03:31] mscdex: mshadle: here's the most recent one: http://github.com/mikeal/node-nntp [03:31] mshadle: got it [03:32] mshadle: Tobsn: probably only from php.ini level [03:32] mscdex: mshadle: mikeal frequents here so maybe you can bug him about it ;-) [03:32] jamescarr: cloudhead, hey, is therea mailing list for vows? [03:32] Tobsn: well... couldnt you just use the php CLI to access the data somehow [03:32] Tobsn: mshadle, that was a joke - cause i think nobody actually ever wanted to deactivate it again :P [03:32] mshadle: yah php cli should kick in suhosin [03:32] bmesh has joined the channel [03:33] Tobsn: im using lighttpd v2 on that box with fcgi php... maybe you could use php command line over nodejs to get session data [03:33] Tobsn: hmm. [03:33] Tobsn: gonna talk to stefan [03:33] Tobsn: he coded suhoshin he probably knows if its possible [03:33] mscdex: if you're going to do that, you may as well just conver it over to json while you're at it [03:33] mscdex: heh [03:33] Tobsn: ewll [03:33] Tobsn: well [03:33] mshadle: mscdex: this rocks. he probably knows a HELL of a lot more of node.js than me ;) [03:33] mshadle: definitely more [03:34] mshadle: ha. nntp to couch! [03:34] Tobsn: if suhoshin encodes or crypts it youre probably at a dead end here if youre not going through the php binary [03:34] mikeal: wow [03:35] mikeal: sys.debug totally breaks code sometimes [03:35] mscdex: there he is :p [03:35] mshadle: correct you'd want to use the php binary [03:35] mshadle: mikeal: ++ for nntp [03:35] mikeal: if i use it I completely lose my closure in one place [03:36] mshadle: mikeal: i was thinking it would be neat to use node's non-blocking nature and seemingly less bottlenecked architecture to make a better usenet client. i'm using sab right now and it chokes under too much load. possibly due to how it stores data [03:38] mikeal: i have some code [03:38] mikeal: i wrote it when I hadn't written a ton of node code yet [03:38] mikeal: so it might suck [03:38] mshadle: using mysql or sqlite or whatever would probably be a lot better, i am not sure the sab shit uses a decent datastore [03:39] mikeal: http://github.com/mikeal/node-nntp [03:39] mshadle: yeah [03:39] mikeal: i have code that sticks it all in to CouchDB [03:39] mshadle: i grabbed it. it's more indepth than the code i wrote :p [03:39] mshadle: which was just -barely- getting into logging in, GROUP and BODY [03:40] mshadle: ACTION would like to be able to define a chunk of RAM, stick all the stuff in there, and flush it to disk only so often [03:42] mikeal: anyone know of a good i18n library for node [03:42] mikeal: http://wiki.github.com/ry/node/modules [03:42] mikeal: not seeing anything [03:42] Tobsn: something completely different [03:42] Tobsn: http://sphotos.ak.fbcdn.net/hphotos-ak-snc1/hs261.snc1/8819_1208209736369_1562479483_545306_3216847_n.jpg [03:42] mikeal: mshadle [03:42] Tobsn: ;) [03:42] mikeal: should be easy [03:44] mscdex: here's another unserialize() that might work better: http://www.phpguru.org/downloads/PHP_Unserialize/PHP_Unserialize.js [03:44] Tobsn: im writing stefan right now if its possible to get the data through php in command line or if there is a way to read the crypted stuff [03:44] mscdex: well, maybe not, nevermind [03:44] bradleymeck2: mshadle, buffers? [03:45] mscdex: Tobsn: just start the session, set the session key, then convert $_SESSION to json and echo it to stdout [03:45] mshadle: mikeal: yah. i'm sure [03:45] Tobsn: well you want to read already existing ones [03:45] bradleymeck2: mikeal, i know grasshopper has support for it, dont know if it can be extracted ez [03:45] Tobsn: if i want my own session system i could just build it [03:46] mshadle: i just don't know node much. i could do the shit out of it in php :) [03:46] Tobsn: i thought its about passing session data back and forth [03:46] elliottcable: Is anybody using node-inspector? [03:46] bradleymeck2: new Buffer(bytesize) [03:46] elliottcable: I can’t find the “Load Unpacked Extension” control in Chrome [03:46] mshadle: i was thinking of writing it in php, but i don't think it would be extremely performant [03:46] bradleymeck2: elliottcable, i just installed it last night, i didnt need any extension? [03:47] _announcer: Twitter: ":O A Chrome extension for debugging Node.js stuff? WAY TOO NEAT! http://drp.ly/1sQb9a" -- ell.io. http://twitter.com/elliottcable/status/20111633651 [03:48] mscdex: elliottcable: you have to click the developer mode link [03:48] mscdex: to see that option [03:48] Tobsn: hehe... i know stefan kinda well cause we both got almost sued for hacking from the same guy because we accessed it at the same time messing around with his server - the guy was kinda a "security specilist" who was on TV shows all the time... we messed around with his php file only over http and retrieved all his customer data including addresses, bank accounts etc. etc. and sent it to the biggest online news sites - our two ips where the fi [03:49] elliottcable: bradleymeck2 3» it’s in the Extensions panel, I missed it. Hah. [03:49] elliottcable: mscdex 3» ^^ [03:49] mshadle: i would like to see most of suhosin/etc. ot push into php core [03:49] Tobsn: i just saw they included php-fpm into the core [03:49] Tobsn: core release [03:49] mikeal: mshadle: check out the usernetToCouch.js in test/ [03:49] mshadle: yeah i'm peakin [03:49] mshadle: tobsn: i run php-fpm.org ;) [03:49] elliottcable: alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-experimental-extension-apis' [03:50] Tobsn: oh [03:50] Tobsn: i just wrote an email to antony yesterday [03:50] mshadle: well, php-fpm.org is slowly becoming irrelevant [03:51] mshadle: as it's in core... [03:51] Tobsn: what i want is a node-fpm [03:51] mikeal: mshadle: unfortunately you have to convert damn near every buffer chunk to a string [03:51] mshadle: isn't that just launching node foo.js where foo.js creates a threaded instance [03:51] mikeal: because almost all of the usernet wire protocol is variable length [03:51] Tobsn: yeah there is multinode or something [03:51] elliottcable: usernet? [03:51] elliottcable: hahaha [03:51] Tobsn: that basically does that [03:51] mikeal: so you have to part out the special characters from each one [03:51] Tobsn: also spark [03:51] bradleymeck2: im not sure node fits the cgi model [03:51] mikeal: haha [03:51] mikeal: man, i can't type [03:51] Tobsn: but it all is sorta... well... written in javascript [03:51] Tobsn: ;) [03:52] mshadle: http://www.sitepen.com/blog/2010/07/14/multi-node-concurrent-nodejs-http-server/ [03:52] mshadle: i found that [03:52] Tobsn: yeah but something more stable would be interesting [03:52] mshadle: yeh. [03:52] Tobsn: like php-fpm [03:52] mshadle: i think a node-based binary downloader would only benefit if it could be multiple children [03:52] Tobsn: its like monitoring node.js instances with a node.js instance of monit.js [03:53] Tobsn: makes no sense [03:53] siedrix: hi, im getting a "fs:189 [03:53] siedrix: var r = binding.read(fd, buffer, offset, length, position); [03:53] siedrix: " error, any idea what is the problem? [03:53] Tobsn: i mean if it is the same project - why not [03:53] joshdulac: what is fd [03:53] bradleymeck2: file descriptor [03:53] joshdulac: oh duh [03:53] Tobsn: file descirptor [03:53] Tobsn: FD [03:53] mshadle: lots of typos [03:54] Tobsn: ;) [03:54] Tobsn: anyway, im gonna ask antony... maybe hes bored - he wrote hes on vacation so.. maybe haha [03:54] bradleymeck2: siedrix, you are probably sending bad arguments somehow, (perhaps trying to read a non-existant file?) [03:55] Tobsn: joshdulac, got a msg on github back from the flexihash guy "Nice! :)" [03:55] Tobsn: hehe [03:56] joshdulac: excellence! [03:56] siedrix: ok, let me check... [03:56] joshdulac: watch him convert to node now [03:56] joshdulac: well im off work now [03:56] joshdulac: peace out [03:57] Tobsn: bye [03:57] kriszyp_ has joined the channel [03:58] mshadle: WOW. nntp and node are both 4 characters. [03:58] jlilly: cloudhead: ping? Is it possible to pass vows a custom reporter? http://dpaste.com/224105/ -- that's my attempt which uses dot-matrix. [03:58] Tobsn: btw. does anyone know a good client side template engine? kinda jsonML stuff [03:58] mshadle: so i was typing the wrong one. [03:59] isaacs: hassox: dude, awesome package name: http://registry.npmjs.org/N [03:59] isaacs: hassox: you might want to consider putting a "description" in your package.json though ;P [03:59] bradleymeck2: tobsn, JUP works, and there is json template [03:59] Tobsn: yeah but JUP... idk [03:59] Tobsn: i mean it looks good [04:00] mshadle: odd. i put nntp.js in lib/ and it says it 'nntp' is not found still [04:00] Tobsn: but i want something more compact [04:00] aniero: is there a way i can put javascript in an ejs template? i want to do jquery $(...) onload stuff, but it causes some kind of parse error in ejs [04:00] Tobsn: JUP is just shittons of data if you would actually use it [04:00] Tobsn: bradleymeck2, you mean http://code.google.com/p/json-template/? [04:01] bradleymeck2: are you looking for some kinda binary templates? jup is pretty compact and only a 100~ line file [04:02] bradleymeck2: yea, someone was using that one earlier [04:02] Tobsn: i mean compact in terms of data from server to client [04:03] mikeal: dammit [04:03] mikeal: i totally fucked up my git repo [04:03] Tim_Smart_ has joined the channel [04:04] mshadle: yeah and my creds file can't be parsed. [04:04] bradleymeck2: revert hard! [04:04] bradleymeck2: so, compressed somehow tobsn, like smaller than json? [04:04] Aria has joined the channel [04:04] mikeal: no, like it commited and pushed things wrong [04:05] mikeal: fuck it [04:05] mikeal: i need a clean slate [04:05] mikeal: this attempt at keep-alive is a failure [04:05] bradleymeck2: havent seen any, the decompress would destroy ie6 + reinterpret [04:05] mikeal: i need to start over [04:05] mikeal: i should have done this when ryan originally had me change the API [04:05] Tim_Smart_ has joined the channel [04:06] isaacs: mikeal: that make me sad [04:06] mikeal: something was deeply fucked [04:07] SamuraiJack has joined the channel [04:08] mikeal: isaacs: agreed about tagging stable [04:08] mikeal: although, if there was a web interface where I could just click "stable" on the latest package I wouldn't care so much [04:08] isaacs: mikeal: at this point, npm is the only package that uses that for the curl installer, and i manage to forget that EVERY DAMN TIME. [04:08] Tobsn: hmm yeah like really really small json [04:08] isaacs: it's been convenient like one time, and other than that, it's a huge pita [04:09] Tobsn: btw. can someone implement in some specs or something that *.njs requests are nodejs files? ;) [04:09] ryah: Aria: any thoughts on the zmq thing? [04:09] bradleymeck2: node js files are just javascript [04:09] Tobsn: kinda like *.php is for php... so i can run php and nodejs over nginx/lighttpd [04:09] Tobsn: i know [04:09] ryah: Aria: interested in trying to do a binding? [04:09] Tobsn: well over the web .js is javascript [04:10] Aria: ryah: Looks like you came to the same conclusion I did; I'd love to give it a shot, but my time's gonna be shot for another week or a bit more. [04:10] Tobsn: .njs is available... and would make sense :P [04:10] Aria: ryah: But certainly worth a look -- shouldn't be TOO hard. [04:10] isaacs: Tobsn: but node files ARE javascript ;P [04:10] bradleymeck2: id be reluctant to give it a file name since node isnt just a cgi app [04:10] ryah: Aria: i think it'll be fun [04:10] Tobsn: i KNOW :P [04:10] Aria: Indeed! [04:10] Tobsn: but as file description [04:10] Tobsn: well hmm [04:10] Tobsn: well youre right, i make no sense [04:10] isaacs: Tobsn: ;) [04:11] Tobsn: it would be still nice to have both... somehow [04:11] bradleymeck2: as per the smaller than json, you are probably going to have to just compress it into a binary file somehow [04:11] Tobsn: http://domain.com/test.php and domain.com/test.njs [04:11] Tobsn: bradleymeck2 hmm [04:11] Tobsn: i could compress it [04:12] Tobsn: there are client side browser javascript decompressors for gzip etc. right? [04:12] bradleymeck2: yea, but decompressing is an expensive op [04:12] Tobsn: question is what takes longer... transfering 40kb data plain or 4kb compressed and have to decompress it client side [04:13] ryah: Aria: you should definitely submit patches back to zmq for something like int zmq_socket_fd(zmq_socket*) [04:13] ryah: instead of hacking it [04:13] Aria: Yeah. Your email inspired me to actually pursue that. [04:13] bradleymeck2: browser to browser, ie it prolly takes signif longer, in others prolly about same w/o hw/c support,but it should open up network at the prices of the cpu [04:13] Tobsn: maybe someone can write a jsonML client lib that creates html based on the pure data and not on templates [04:13] bradleymeck2: pure data? [04:14] Aria: Tobsn: The plain transfer. Go look at ryah's chart about how much slower networks are than say, a CPU. [04:14] smtlaissezfaire has joined the channel [04:14] smtlaissezfaire has left the channel [04:14] Tobsn: well as i understand JUP you have a template ['div',{'class':'foo'},{{content}}] and than you have the data {content:'osomething goes in here'} [04:14] Tobsn: wouldnt it be smarter to just build the template basedon the data? [04:15] bradleymeck2: not sure i understand still tobsn, example? [04:15] ryah: Aria: you should experiement with including the zmq source code in your binding distribution and statically building it [04:15] jamescarr: anyone here been using JSGI? [04:15] ryah: that way you can float patches for the fixes before they get into release [04:15] bradleymeck2: you mean something akin to toString? but like toHtml? [04:15] Tobsn: {content:{'type':div','class':foo','data':'something goes in here'}} [04:15] Aria: Mmm, yeah. [04:16] Tobsn: {'type':div','class':foo','data':'something goes in here'} [04:16] Aria: Man, I hate static linking and included deps. But it's wise in that case. [04:16] _announcer: Twitter: "node.js + express the comet test. I made really easy to make chat" [ja] -- ishikawan(21). http://twitter.com/scraperonce/status/20113314482 [04:16] adrienf: Tobsn: isn't the whole idea of a template to decouple data and template ? [04:16] Tobsn: sortof [04:16] bradleyprice has joined the channel [04:16] Tobsn: but youre already doing it [04:16] Tobsn: well hmm [04:17] adrienf: in that case, why not just send the rendering ? [04:17] Tobsn: i mean you can still deliver a base structure