[00:01] agenteo has joined the channel [00:02] pjb3_ has joined the channel [00:02] TobiasFar has joined the channel [00:03] bmizerany: ryah: ok. I get it I think. so, how do I create do `function Foo() { this.data = ''; ... }` with that code? [00:03] SteveDekorte has joined the channel [00:03] vanstee has joined the channel [00:03] SteveDekorte: Is there any sample code for http request that writes the body? [00:04] SteveDekorte: that is, that calls "request.write" [00:04] bmizerany: SteveDekorte: yeah. http://nodejs.org/api.html [00:04] SteveDekorte: bmizerany: that sample code doesn't write a request body [00:05] bmizerany: SteveDekorte: ah. client, not server? [00:05] SteveDekorte: right [00:06] bmizerany: SteveDekorte: http://github.com/bmizerany/swirl-node/blob/master/lib/swirl.js#L56-108 [00:06] bmizerany: SteveDekorte: ignore the parser part. [00:07] SteveDekorte: ah, so you embed it in the header instead of calling write? [00:07] SteveDekorte: nm [00:07] bmizerany: SteveDekorte: ? see the end of the highlighted for the write. [00:07] SteveDekorte: maybe the problem was that I wasn't setting the content length [00:08] bmizerany: SteveDekorte: be sure to req.end() is reachable before you expect a request or else you deadlock. [00:08] kriskowal has joined the channel [00:08] bmizerany: SteveDekorte: ah yeah. you'll need to set the Transfer-Encoding: chunked if you don't have pre-defined length [00:09] CIA-77: node: 03Ben Noordhuis 07master * rb58db3c 10/ lib/http.js : Added reason phrases for a bunch of HTTP status codes. - http://bit.ly/c0Ncrz [00:09] CIA-77: node: 03Ryan Dahl 07master * r0f143f6 10/ (deps/libeio/demo.c deps/libeio/eio.c deps/libeio/xthread.h): Upgrade libeio - http://bit.ly/8YHU1L [00:09] CIA-77: node: 03Brian White 07master * rab5c0dd 10/ (6 files in 2 dirs): Port to OpenBSD - http://bit.ly/chpsOb [00:09] bmizerany: SteveDekorte: you also need to ensure you set the Host as well. or else the server won't know what to do in most cases. node doesn't set that for you [00:09] SteveDekorte: bmizerany: working now - thanks :) [00:09] bmizerany: SteveDekorte: lost some time to those last few pointers. heh [00:09] bmizerany: npp [00:09] bmizerany: *np [00:10] bmizerany: SteveDekorte: how is the port of your graph db coming? [00:11] SteveDekorte: bmizerany: pretty good - the database is ported and tests are passing, the vertex server api is done - writing the tests for it now [00:11] bmizerany: nice [00:11] SteveDekorte: bmizerany: how is the heroku node.js support going? [00:12] bmizerany: good. we're working on making it better and better. have you had a chance to play with it? [00:13] SteveDekorte: note yet - maybe it would be a good place to test vertexjs when it's ready [00:15] bmizerany: SteveDekorte: depends. where is the data stored? [00:15] bmizerany: in mem only? or on disk? [00:15] SteveDekorte: well, the tokyocabinet binding needs disk access [00:15] bmizerany: SteveDekorte: yeah. that won't work. sorry. [00:15] matthew_y has joined the channel [00:15] bmizerany: unless you setup tokoyo on you're own instance [00:16] SteveDekorte: I see - it would be nice if you could support a file sandbox at some point [00:16] bmizerany: and then run the http server on heroku. that will work. just set an ENV var to point to tokyo `heroku config:add TOKOYO_URL='tokyo://....'` [00:17] bmizerany: SteveDekorte: then you can take advantage of our ssl and, maybe some other stuff. [00:18] SteveDekorte: bmizerany: cool [00:18] hassox: hey lads, anyone used zeromq.node ? [00:21] vanstee has joined the channel [00:22] bmizerany: hassox: nope. I just learned about it. very cool. I wonder if the zeromq libs block. [00:22] hassox: yeah not sure, but I hope not [00:22] ryah: they have some pretty funky threading stuff - last time i looked at it [00:22] bmizerany: ah [00:22] polotek has joined the channel [00:22] hassox: ryah: in a bad way? [00:23] ryah: maybe there is a different layer to do pure nb stuff [00:23] ryah: hassox: for integrating into node, yes [00:23] ryah: is there a node binding? [00:23] hassox: the start of one [00:23] hassox: http://github.com/jmtulloss/zeromq.node [00:24] bmizerany: ryah: any pointers on the example above? [00:24] ryah: doesn't look like it does anything [00:25] ryah: bmizerany: example? [00:25] hassox: ACTION doesn't know C so wasn't sure what the cc file was doing [00:25] ryah: bmizerany: oh - mm [00:25] bmizerany: ryah: how to do `function Foo() { this.data = '' }` in C++? mainly, the `this.data = ''` part. [00:26] atmos: bmizerany: you writing c++ ? [00:26] ryah: bmizerany: args.This->Set(String::New('data'), String::Empty()); [00:26] ryah: (or something) [00:27] bmizerany: ryah: ah cool [00:27] bmizerany: ryah: and I get it like `args->This()->Get(String::New('data'))`? (or something)? [00:27] bmizerany: atmos: writing implies I know where I'm going with it. ;) [00:28] ryah: bmizerany: yeah, something like that [00:28] bmizerany: cool. thx [00:29] vnguyen has joined the channel [00:29] bmizerany: ryah: forgive me, but I'm trying to grasp some concepts here. why http://github.com/ry/node_postgres/blob/master/binding.cc#L34 over the `args->This()->Set(..)` around here: http://github.com/ry/node_postgres/blob/master/binding.cc#L150 [00:29] bmizerany: ? [00:31] bmizerany: from what I understand, v8 uses hidden classes, so setting prototype methods _shouldn't_ be more efficient than doing in the function, right? [00:31] ryah: *shrug* [00:31] bmizerany: hehe [00:31] ryah: you don't have to do the Set for each object [00:31] ryah: just once when you load the module [00:32] bmizerany: ah ok [00:32] ryah: so maybe access is faster - but creation is slower [00:32] bmizerany: ah [00:32] ryah: s/faster/the same/ [00:32] ryah: probably doesn't really make a difference either way though [00:40] Tim_Smart has joined the channel [00:44] joshbuddy has joined the channel [01:02] Tim_Smart_ has joined the channel [01:03] darkf has joined the channel [01:09] _announcer: Twitter: "@Outsider__ 덕분에 손안대고 코풀게 생겼네요, 대신node.js는 제가 보답하면되겠네요" -- A.J. http://twitter.com/andrwj/status/14590917059 [01:10] hassox: ryah: are you talking as oscon ? [01:13] ditesh|cassini has joined the channel [01:20] behmann has joined the channel [01:21] _announcer: Twitter: "@andrwj ㅎㅎㅎㅎ 그렇게 되면 제가 이익인것 같지만 어쨌든 좋습니다.. ㅎㅎㅎ 어제 node.js좀 보다가 딴거하느라 마저 못봤네요.. 헬로월드까진 해볼려고 했는데요 ㅎ" -- Outsider. http://twitter.com/Outsider__/status/14591558114 [01:27] richcollins: is there any chance that watchFile changes the access time by monitoring it? [01:28] richcollins: the callback is executed ... I have no idea why it changed [01:29] _announcer: Twitter: "How to test your node.js app: I’ve wanted to hack on a node.js project for a while, and a new app idea has given m... http://bit.ly/cSVgsV" -- ibmkhd. http://twitter.com/ibmkhd/status/14592000237 [01:31] kriszyp has joined the channel [01:32] mrjjwright has joined the channel [01:32] keyvan has joined the channel [01:33] Ned_: anyone know how child processes can "fake" a tty ? [01:38] saikat` has joined the channel [01:42] _announcer: Twitter: "How to test your node.js app: http://url4.eu/3glNf" -- ibmkhd. http://twitter.com/ibmkhd/status/14592694384 [01:42] joshowens has joined the channel [01:46] iwasbiggs has joined the channel [01:57] bmizerany: arg. I'm trying every possibility I can on return types and still get errors on this. any ideas? http://gist.github.com/411436 [01:58] _announcer: Twitter: "how to test your node.js app?: http://news.ycombinator.com/item?id=1372124 ..." -- S Yoshiks. http://twitter.com/yoshiks/status/14593599738 [01:58] ncb000gt has joined the channel [02:03] bmizerany: polotek: tmpvar any ideas? I think my understanding on templates is out of whack. [02:04] alexiskander has joined the channel [02:06] polotek: Get returns a Handle [02:07] bmizerany: I think I tried that [02:07] polotek: did you get a different error? [02:07] bmizerany: https://gist.github.com/7b520878b92fa0add114 [02:07] bmizerany: yes [02:08] bmizerany: that's an error on ` Handle temp = String::Concat(data, String::New("foobar")); ` [02:14] bmizerany: polotek: if you get a chance: here is the full picture http://gist.github.com/411455 [02:14] bmizerany: as of curreny [02:14] bmizerany: *current [02:16] jedschmidt has joined the channel [02:17] polotek: Concat returns a Handle try changing that [02:17] bmizerany: hrm. I've got the source open, it's a local as I can see. in v8/src/api.cc [02:18] bmizerany: or maybe that's the wrong place I'm looking. [02:18] bmizerany: trying that change [02:18] hassox has joined the channel [02:18] polotek: I don't know how handle are cast when the template type is different [02:19] bmizerany: polotek: https://gist.github.com/056e20455b522d9c80d5 [02:19] _announcer: Twitter: "Getting over ~3K requests per second on the (unoptimized) first version of vertexdb on node.js on a Macbook Pro." -- Steve Dekorte. http://twitter.com/stevedekorte/status/14594800683 [02:21] bmizerany: polotek: it maybe the error is because of what is going in, not coming out. [02:21] bmizerany: hrm [02:22] ryah: bmizerany: value->ToString() [02:22] ryah: bmizerany: it's important to understand that -> is overload in v8 [02:23] bmizerany: SOB. that was it. good god [02:23] bmizerany: haha. thx man [02:23] ryah: yeah - that was like 2 weeks of my life figuring that out [02:23] bmizerany: haha [02:23] ryah: (im not a c++ programmer) [02:23] bmizerany: oh jesus. overloaded? my god. why would that do that?! [02:23] bmizerany: me wither [02:23] bmizerany: *either. obviously [02:24] bmizerany: ryah: what is overloaded too? [02:24] ryah: it is actually rather nice - but it takes some getting used to [02:24] ryah: that's the only operator that's overloaded [02:24] ryah: oh and * sometimes [02:24] ryah: (deref) [02:24] bmizerany: ryah: yeah. I don't have may complaints so far. it's nice when it's used well. Ragel was a great example of why people get angry with C++ [02:24] ryah: bmizerany: http://github.com/ry/node/blob/1369d606f740545953dacd835dd7d36743f82d6f/deps/v8/include/v8.h#L224 [02:25] bmizerany: ah [02:25] bmizerany: so it's just a value accessor? [02:25] ryah: so basically with a var of type Local, . references methods/members of the local handle [02:25] ryah: e.g. .IsEmpty() [02:25] polotek: ryah: I'm still messing with ObjectWrap [02:25] ryah: and -> references String members/methods [02:26] ryah: it's like a box [02:26] polotek: some of my code is trying to call it as a public function [02:26] ryah: -> reaches inside [02:26] ryah: . is for the handle [02:26] bmizerany: ryah: ah! great insight. thank you. I'll make sure I keep that in mind [02:26] polotek: ryah: I thought I had a handle on that [02:26] ryah: bmizerany: yeah, i think that's the hardest part of v8 - the rest is rather straightforward [02:26] polotek: just not good at spotting when it's being used incorrectly [02:26] polotek: re: the -> thing [02:26] ditesh|cassini has joined the channel [02:27] ryah: yeah, but you get compile errors like bmizerany did [02:27] polotek: but I asked the other day why Wrap() in ObjectWrap was protected [02:27] polotek: it works fine as long as you only call it from the derived class [02:27] ryah: well - in that case it was he needed to "cast" Local to Local [02:27] polotek: But it's being called by a static function [02:27] bmizerany: ryah: why is .IsEmpty() not ->? that seems like it should be, they way I'm reading you're note [02:28] ryah: polotek: a static member function? [02:28] ryah: bmizerany: because IsEmpty is a Handle method [02:28] ryah: handles can be empty [02:28] polotek: no, actually the function isn't static, it's file scoped [02:28] maushu: ryah, thinking in adding google language api to translate tweets and perhaps find a way to parse the links and find originals to see if it was posted before. [02:28] ryah: http://github.com/ry/node/blob/1369d606f740545953dacd835dd7d36743f82d6f/deps/v8/include/v8.h#L222 [02:28] polotek: it's standalone and being pushed into js space as is [02:29] polotek: but it's not class scoped [02:29] ryah: polotek: so put it in the class :) [02:29] bmizerany: ryah: ah. I was thinking of String.prototype.IsEmpty(). That means, is the "Handle" empty? i.e. has not state/value? [02:29] polotek: there's no class. it's an inline macro [02:29] ryah: maushu: sounds like overkill [02:30] ryah: bmizerany: yeah [02:30] bmizerany: ah ok. [02:30] bmizerany: got it [02:30] bmizerany: thx man [02:30] maushu: Overkill is what I would do to all those twitter spammers if I got my hands on them. [02:30] ryah: polotek: there must be something derived from ObjctWrap? [02:31] ryah: bmizerany: Local s; assert(s.IsEmpty()); [02:32] bmizerany: ah [02:32] ryah: (i think that works, in any case) [02:32] keyvan has joined the channel [02:32] ryah: s = String::New("blah"); assert(!s.IsEmpty()); [02:32] bmizerany: ryah: where is This() defined? I can't find it. [02:32] bmizerany: ah [02:33] bmizerany: found it [02:34] polotek: I'm thinking I need to add a GetInstance method [02:34] polotek: to the class [02:34] polotek: and have this function call that instead [02:34] polotek: which defeats the purpose of using an inline macro [02:34] polotek: but whatever [02:34] polotek: does that sound reasonable? [02:35] _announcer has joined the channel [02:36] maushu: Updated to 96. [02:36] maushu: If it explodes it's ryah's fault. [02:36] maushu: Not because of my awesome code. [02:37] maushu: srsly [02:37] mikeal has joined the channel [02:39] ryah: polotek: hmm? [02:40] polotek: ryah: there are classes that derive from ObjectWrap [02:40] polotek: but there is a macro that takes the class type and returns a jsobject pointing to it [02:40] polotek: creates it if necessary [02:40] polotek: this is an inline macro that is being called from a function outside of the class [02:41] polotek: that macro tries to call obj::Wrap [02:41] airportyh has joined the channel [02:41] polotek: to crap it in a js object [02:41] polotek: so the scope wrong now that Wrap is protected [02:42] polotek: http://github.com/polotek/libxmljs/blob/master/src/libxmljs.h#L55-70 [02:42] Azeroth has joined the channel [02:43] polotek: so I can do LXJS_GET_MAYBE_BUILD(, inner) [02:44] polotek: it builds the T class if necessary wrapping inner object which is a C object [02:44] polotek: then it returns a persistent handle to the T object [02:44] polotek: handy macro [02:44] polotek: but depends on being able to call Wrap on the T object [02:47] captainbenis has joined the channel [02:47] polotek: wow, I didn't realize how effed up the previous sentences were [02:47] captainbenis: does anyone know if mongodb-native [02:48] polotek: "to crap it in js object" [02:48] captainbenis: will support multiple simultaneous queries on a collection? [02:48] polotek: how about "wrap it" [02:48] captainbenis: or is that 'undefined'? [02:48] captainbenis: (sorry polotek) [02:48] maushu: ryah, I think it was creatonix who tried to do a reverse proxy first using json objects (and sockets) and then using http clients and server, he said the latter was faster, do you have any reason for why? [02:49] ryah: eh? [02:49] ryah: no [02:49] ryah: i guess the http client tears down the tcp connection each time [02:50] maushu: Huh, wouldn't that make it slower? [02:51] ryah: yes [02:51] ryah: ignore my first 'no' :) [02:51] binspace has joined the channel [02:51] Aria: tmpvar: I tossed you a push request on jsdom. [02:52] ryah: i really need to fix up the http client.. [02:53] maushu: I'm going to do a reverse proxy and I found it weird. [02:53] polotek: ryah: we were talking about that earlier [02:53] polotek: it would be awesome if it supported pump correctly [02:53] maushu: Obviously json is not good for binary but I have an idea for that. [02:54] ryah: polotek: it's my main todo item [02:54] polotek: tough to do? [02:55] ryah: yeah, kind of [02:55] ryah: just the http stuff needs some refactoring [02:55] ryah: sharing code between server and client is hard [02:56] Aria: Yes it is. [02:56] ryah: questionable if that's worthwhile [02:56] hassox has joined the channel [02:57] charlesjolley has joined the channel [02:57] maushu: No idea. [02:57] Aria: Yeah... I'm torn on that too. Thinking about imap implementations. [02:58] smtlaissezfaire has joined the channel [02:58] polotek: if it's the same code it usually is [02:59] polotek: but I'm guessing it's a lot of the same interspersed with key differences [02:59] darkf_ has joined the channel [02:59] maushu: I need to pump a http server request to another http server depending on some variables. [02:59] polotek: usually is worthwhile that is [02:59] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://dlvr.it/19DkJ" -- Tech & Friki Stuff. http://twitter.com/FrikiFeeds/status/14597113177 [03:00] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/cx0Nki" -- hkrnws. http://twitter.com/hkrnws/status/14597131670 [03:00] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime: http://bit.ly/bS8xrq Comments: http://bit.ly/a1l3dO" -- Hacker News. http://twitter.com/HNTweets/status/14597132434 [03:00] maushu: WTF. [03:00] polotek: seriously? are peoiple really excited about this .NET hack version of node? [03:00] maushu: NO, it's those damn spam bots! [03:00] richcollins has joined the channel [03:00] maushu: THIS MEANS WAR! [03:00] ryah: maushu: use the http client - it'll get better soon [03:01] maushu: ryah, as a reverse proxy? Hmm. [03:01] polotek: oh, are they targeting this irc specifically? [03:01] _announcer: Twitter: "New post: Node.net - Node.js implemented in Ja http://geeknews.me/2010/05/24/node-net-node-js-implemented-in-javascript-on-the-net-runtime/" -- geek. http://twitter.com/geeknewsme/status/14597218564 [03:01] maushu: polotek, no! [03:01] maushu: Twitter is filled with spambots! [03:01] ncb000gt: maushu: nowai [03:01] polotek: yeah I know [03:01] maushu: They listen to something and then repeat it, damn it. [03:02] polotek: but I don't see a lot of these in my saved search for nodejs [03:02] ncb000gt: Twitter put lots of time and effort and money and ... i give up [03:02] JimBastard has joined the channel [03:02] polotek: I guess your'e on the other side of their spam filter [03:02] JimBastard: sup tmpvar , hows opengl going [03:02] polotek: search is much delayed so I'm sure part of that is spam filtering [03:02] ncb000gt: JimBastard will get em [03:02] JimBastard: sup [03:02] ncb000gt: mmmm opengl bindings for node == sexytime [03:02] maushu: polotek, pretty much. [03:03] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime - http://su.pr/7A04yE" -- kicauan. http://twitter.com/kicauan/status/14597359158 [03:03] JimBastard: LOL [03:03] JimBastard: ^^^% [03:04] ncb000gt: JimBastard: those are the things you'll "get". [03:04] ncb000gt: heh [03:04] ncb000gt: the twitter spam bots [03:04] JimBastard: C:\> node.exe server.js [03:05] polotek: maushu: are you reporting the spam to twitter? don't they have an api for that? [03:05] polotek: not saying it'll help, but it would be nice [03:05] JimBastard: does this mean node in windows? [03:05] maushu: JimBastard, it doesn't use v8. [03:05] ncb000gt: JimBastard: Node.net intends to be that [03:05] ncb000gt: but it is using JScript [03:05] aurynn has joined the channel [03:05] ncb000gt: afaik [03:06] polotek: Yeah it's a port basically [03:06] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/cc78eJ" -- HN Comments. http://twitter.com/HNComments/status/14597490540 [03:06] maushu: .. [03:06] maushu: Every single of them comes from Hacker news. [03:06] polotek: using .NET modules for everything. jscript for runtime, .NET threadpool, .NET networking [03:06] Aria: Interesting. [03:06] JimBastard: i mean [03:06] JimBastard: thats a way of saying it [03:07] Aria: Go one for having TWO async js implementations. [03:07] maushu: polotek, one way to prevent it would be checking the links. [03:08] ncb000gt: If it brings people to the real node.js then i'm happy, if it just means "OMFG Node.NET DUZNT WERK" then /facepalm [03:08] keyvan has joined the channel [03:08] polotek: you'd have to follow the bitly link though. weak [03:08] maushu: True. [03:08] JimBastard: i could make an irc bot that picked up twitter announcements in the channel and retweeted them, would that help? [03:08] maushu: ...no. [03:08] JimBastard: i could make an irc bot that picked up twitter announcements in the channel and retweeted them, would that help? [03:08] maushu: ...no. [03:09] JimBastard: id go for 3 but i learnt that lesson [03:09] polotek: ncb000gt: problem with that is if the .NET guys start looking at that, ryah will get all the support requests when it doesn't work :) [03:09] JimBastard: that would be a funny email [03:09] ncb000gt: hahaha [03:09] JimBastard: hey - your node library sucks, im running it on VS2008 and it has no built in support [03:09] JimBastard: where the fuck are the docs?!?! [03:09] JimBastard: stupid language [03:10] ncb000gt: polotek: true, "what's an eye are sea?" [03:10] bpot has joined the channel [03:12] tmpvar: Aria, great! ill peek here in a few [03:12] tmpvar: JimBastard, haven't worked on it much today, you saw my screeny? [03:12] JimBastard: no [03:12] ncb000gt: tmpvar: you need any help with the ogl stuff? I'd be more than happy to help [03:12] JimBastard: but i keep seeing the word cider in my github stream [03:12] JimBastard: i think someone took the name [03:12] tmpvar: http://tmpvar.com/node-ogl-triangle.png [03:12] tmpvar: oh yeah? [03:13] ncb000gt: tmpvar: yes [03:13] JimBastard: nice tmpvar [03:13] tmpvar: ncb000gt, hrm? [03:14] ncb000gt: tmpvar: are the very least, my offer stands so if you do think of or find something let me know. :) [03:14] tmpvar: oh wow, sorry about that [03:15] keyvan has joined the channel [03:15] tmpvar: umm, im trying to auto-generate the majority of the bindings.. thats whats working now with the triangle and what not [03:15] JimBastard: when in doubt, meta [03:15] polotek: ryah: I didn't want to do it, but making Wrap public does the trick [03:15] tmpvar: there is a ton to do ;) i mean if you wanted to port the nehe tuts to js [03:16] polotek: I'll refactor after I get some other stuff working the way I want [03:16] ncb000gt: tmpvar: cool, I actually ported some of those in college to JoGL [03:16] ncb000gt: ;D [03:16] tmpvar: texturing and what not doesn't work currently though [03:16] ncb000gt: So yea, I can port those [03:16] tmpvar: ah, nice [03:16] ncb000gt: cool [03:16] tmpvar: the addon needs to handle the ogl calls that take with pointers [03:16] tmpvar: -with [03:17] ncb000gt: That's fine. I'll fork it and if I find something that needs doing, I'll hack it in and send a merge req. [03:17] tmpvar: awesome :) [03:17] ncb000gt: Sweet. I was working on node-gtk bindings, but that might go to hold since I love me some ogl. ;D [03:18] _announcer: Twitter: "May I just say that nodejs is awesome?" -- Sean McCune. http://twitter.com/geek/status/14598197592 [03:18] polotek: maushu: chill out, that guy sounds legit [03:18] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://ff.im/kOJZj" -- antest. http://twitter.com/antest/status/14598228331 [03:18] tmpvar: ncb000gt, yeah.. i got that example in the screenshot running at ~14000 fps lol [03:18] maushu: polotek, you were saying? [03:18] ncb000gt: LOL [03:19] polotek: lol, sorry [03:26] ncb000gt: Heh. This is hard. I have 4-5 major projects I want to work on with Node. Need to figure out a good way to split my time. =\ [03:26] jedschmidt has joined the channel [03:26] KungFuHamster: cloning [03:27] ncb000gt: KungFuHamster: inorite? I've tried training my cat...so far it's not been successful. [03:27] polotek: ncb000gt: quit your job [03:27] ncb000gt: polotek: now that's an idea. ;D [03:28] KungFuHamster: "winning the lottery" would have also been acceptable [03:28] ncb000gt: haha [03:30] tmpvar: oh it does look like someone is using cider [03:30] tmpvar: ah well [03:31] _announcer: Twitter: "OpenGL bindings for #nodejs. Now that is hawt! http://is.gd/cmxDH" -- Nick Campbell. http://twitter.com/ncb000gt/status/14598929420 [03:31] ncb000gt: wait for it... [03:31] ncb000gt: oh snaps, _announcer is faster than me [03:31] ncb000gt: =\ [03:32] avidal: wonderful readme [03:32] tmpvar: nice :) [03:32] tmpvar: ncb000gt, how elite are you with ogl? [03:33] stevendavie has joined the channel [03:33] ncb000gt: haha, lets not call it elite. [03:33] avidal: hrm, $660 due on the 1st for my current place, plus another like 600 for my new place due on the 12th [03:33] tmpvar: hehe [03:33] ncb000gt: lets say that I've writing code using it [03:34] polotek: ncb000gt: hopefully better than your english [03:34] ncb000gt: because that's what i've done. [03:34] PyroPete1 has joined the channel [03:34] ncb000gt: wow [03:34] tmpvar: got yah, im in the same boat. many failed "learning projects" and the last thing i did last year was a scene graph in obj-c [03:34] tmpvar: Aria, thanks for the changes :) [03:35] ditesh|cassini has joined the channel [03:35] ncb000gt: polotek: gud think englush iz mah native lang eh? blood boiling yet? [03:36] Vekz has joined the channel [03:36] tmpvar: fun fact about opengl :: its non-blocking :) [03:36] ncb000gt: tmpvar: last think I did with opengl was a few years ago. But, I've been looking for an excuse to get back into it. [03:36] tmpvar: nice [03:36] ryah: tmpvar: how do you call the render loop? [03:36] tmpvar: setTimeout() [03:37] tmpvar: or Interval [03:37] ryah: what's it called? [03:37] Aria: nextTick? [03:37] Aria: Oh. Heh. [03:37] ryah: i want to look at the binding [03:37] Aria: Nevermind. [03:37] tmpvar: oh, node-ogl [03:37] tmpvar: http://github.com/tmpvar/node-ogl [03:38] ryah: tmpvar: the binding to the render loop [03:38] tmpvar: im using glfw for creating a context / swapping buffers [03:38] tmpvar: how about this? http://github.com/tmpvar/node-ogl/blob/master/example/nehe/lesson3.js [03:38] ryah: oh, i see [03:39] tmpvar: there is no actual "render loop" in the c++ code, which is pretty awesome :) [03:39] ryah: tmpvar: what bout making it give you a callback when the buffer swap is done? [03:39] tmpvar: thats a good idea [03:39] ryah: to avoid the race inhernet with the setTimeout(render) [03:39] tmpvar: the swap call may be blocking (not sure) [03:39] bmizerany: ryah: why the *2+1? http://github.com/ry/node_postgres/blob/master/binding.cc#L173 [03:39] tmpvar: ryah, thats glfw's world [03:40] bmizerany: ryah: is that just excess for the result? [03:40] ryah: tmpvar: i guess there is no race right now since swapBuffers is sync [03:41] ryah: bmizerany: i guess each char can be escaped to 2? [03:41] ryah: '\c' [03:41] bmizerany: ryah: thought so. just checking. right. [03:41] ryah: plus 1 for null [03:41] bmizerany: ok cool. my guess was right. [03:42] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime... http://github.com/dnewcome/Node.net" -- Hacker News Bot. http://twitter.com/hackernewsbot/status/14599582213 [03:42] bmizerany: ACTION still has it! :P [03:42] bmizerany: whoa. [03:42] _announcer: Twitter: "HNews: Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/9eVQfP" -- Tech news (BOT). http://twitter.com/tek_news/status/14599598427 [03:42] tmpvar: wtf is that noise [03:42] ncb000gt: lol [03:42] alexiskander has joined the channel [03:42] ryah: maushu: can you blacklist these bots? [03:42] tmpvar: the mono project, no? [03:42] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime: http: Comments: http:" -- YC Hacker News. http://twitter.com/YCHackerNews/status/14599627256 [03:43] maushu: ryah, right now? No. [03:43] ryah: tmpvar: it would be interesting to do all the opengl stuff in a separate thread [03:43] polotek: the sender changes often [03:43] ncb000gt: maushu: would be nice to "register" blacklist users through chat [03:43] tmpvar: ryah, why? [03:43] maushu: I know. [03:44] maushu: Pretty useless right now since each bot it's not repeating itself. [03:44] ryah: tmpvar: so that the buffer swaps wouldn't effect the speed [03:44] maushu: I will add it tomorrow though. [03:44] maushu: And link checking like I said. [03:44] ryah: tmpvar: who knows if that's useful or not though [03:44] tmpvar: yeah, i think with hardware acceleration the buffer swap is extremely fast [03:45] ryah: it's probably extremely fast, yes [03:45] maushu: ...what about sendfile? [03:46] ncb000gt: might be fast, but if you can make it faster, then your 3d hackers will love you for it [03:46] tmpvar: hehe [03:46] ncb000gt: since there is a lot to buffer/swap/cram-in [03:47] tmpvar: for now, I think getting it working is priority numero uno [03:47] ncb000gt: "that 1 fps is SOOOOOOOOOOO important" [03:47] ncb000gt: true [03:47] tmpvar: cant do texture mapping yet because i need to dig in and remember how that works heh [03:47] ncb000gt: heh [03:47] polotek: maushu: a simple thing to do is check the following number [03:47] tmpvar: then provide a mechanism to js for doing it "easily" [03:47] polotek: bots dont follow people [03:48] maushu: polotek, hmmm. [03:48] ncb000gt: man, this is a bad to find sunday night.... [03:48] ncb000gt: *cough* i feel sick [03:48] tmpvar: lol [03:48] tmpvar: well, i started on it yesterday evening (good progress if you ask me heh) [03:48] maushu: polotek, http://twitter.com/YCHackerNews [03:48] maushu: This one follows one. [03:48] maushu: :p [03:48] ryah: tmpvar: i'm pretty sure glFlush/glSwapBuffer do bus i/o [03:48] polotek: yeah I saw that [03:48] ncb000gt: tmpvar: very [03:49] maushu: Less than 3 people? [03:49] ryah: tmpvar: which technically makes them blocking [03:49] tmpvar: ryah, ah [03:49] polotek: give it a few points deviation [03:49] maushu: < 3? [03:49] tmpvar: ryah, yeah pushing data through a pipe. I guess if it becomes a problem threading is an option :) [03:49] polotek: yeah [03:49] maushu: That I can add quickly. [03:49] ryah: i suspect high perf games do gl stuff in a different thread than networking [03:50] binspace: polotek: Can I use css selectors in libxml.js? [03:50] polotek: binspace: not yet [03:50] tmpvar: ryah, oh definitely. [03:50] polotek: long way down the roadmap I'm afraid. [03:50] polotek: probably do a w3c wrapper first [03:50] ncb000gt: polotek: you going to try and mold something like Sizzle to work? [03:50] binspace: aah [03:51] polotek: which will make integrating sizzle much easier [03:51] polotek: but I haven't looked into it at all [03:51] ryah: tmpvar: what i think would be fast is if all gl calls were serialized and sent to a different thread [03:52] ryah: which would give you a callback after each swapbuffer was called [03:52] tmpvar: got ya, I agree. I'll put it on the list :) [03:53] polotek: binspace: what are you using it for? [03:54] binspace: polotek: Mainly I want to have selectors for testing. [03:55] Vekz: Does anyone have a reliable base64 encode solution in use with Node? Each of the few javascript implementations i have ported over have been different and not correct. I am looking to match the algorithim PHP uses. [03:56] polotek: binspace: libxmljs supports xpath [03:56] polotek: if you found a converter you might be able to get something going [03:56] ncb000gt: Vekz: there is a module for node but I'm not sure it works [03:56] polotek: that's all it really takes to support css selectors [03:56] tmpvar: Vekz, http://phpjs.org/functions/base64_encode:358 -- heh [03:57] polotek: well obviously there's more involved than that. but 80% probably [03:57] ncb000gt: Vekz: http://github.com/brainfucker/node-base64 [03:57] Vekz: tmpvar i tried that but it does something weird with newlines or something and isn't 100% to the php implementation [03:57] ncb000gt: I haven't used it though. [03:58] ncb000gt: It isn't pure JS though [03:58] Vekz: ncb000gt I think it is pretty out of date but I will check what he is doing [03:58] tmpvar: damn, its 12 already. [03:58] Vekz: thanks guys [03:58] ncb000gt: haha [03:59] tmpvar: ryah, from the glfw manual "recommended that all GLFW and OpenGLTM functions are called from the main thread" [03:59] ncb000gt: Vekz: I looked at the C++ quickly and it doesn't appear he's doing anything that would be affected by it's "age" so it might be worth trying. [04:00] tmpvar: ryah, i think that is general practice actually.. once you split the main thread and ogl there is weirdness (or so I hear) [04:00] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/dCV9LZ" -- news.yc Popular. http://twitter.com/newsycombinator/status/14600619551 [04:01] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime. http://bit.ly/bUV6wI" -- Arif. http://twitter.com/libpcap/status/14600648227 [04:01] tmpvar: ryah, does that mean we don't need to do a win32 port? haha [04:02] polotek: maushu: see these two [04:02] _announcer has joined the channel [04:02] polotek: one is bad and one is legit [04:02] polotek: legit follow count = 64 [04:02] polotek: you could probably weed out most of the bots with that heuristic [04:02] maushu: polotek, it's done. [04:03] maushu: Now the other idea is checking the url for a 301 that goes to a already registered url. [04:03] ncb000gt: maushu: huzzah! [04:03] maushu: That and I need to refresh myself with text based algorithms to compare tweets. [04:04] ryah: tmpvar: that's a warning for i/o idiots [04:05] ryah: who will start like 10 threads and call gl functions from all of them [04:05] tmpvar: ah [04:05] steadicat has joined the channel [04:06] polotek: what's the best way to restrict the significant digits of a float in js? [04:06] _announcer: Twitter: "@steveklabnik @geek good node.js tutorial/overview here http://bit.ly/dsAgwk (@geek probably not as useful to since you use it already)" -- Matt Otto. http://twitter.com/matthewotto/status/14600928053 [04:06] polotek: just for printing [04:06] _announcer: Twitter: "node.net as node.js in js on .net?: http://news.ycombinator.com/item?id=1373648 ..." -- S Yoshiks. http://twitter.com/yoshiks/status/14600934233 [04:07] polotek: hmm, hadn't seen that node tutorial before [04:08] polotek: ha, maushu follow count = 4 [04:08] maushu: .....FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU- [04:08] maushu: Thats it. [04:08] maushu: I'm going on rampage. [04:08] ncb000gt: LOL [04:08] polotek: you could shut down hacker news [04:08] polotek: probably be easier [04:08] ncb000gt: ACTION watches for the ail Whale [04:08] ncb000gt: err [04:08] ncb000gt: Fail... [04:08] ncb000gt: damn [04:09] _announcer has joined the channel [04:09] maushu: Increased to 5. [04:10] polotek: num.toFixed(2) for decimal sign digits [04:11] justinlilly has joined the channel [04:11] polotek: num.toPrecision(4) for total significant digits [04:11] polotek: and they're part of the spec [04:11] polotek: good enough [04:13] joshbuddy has joined the channel [04:15] nsm has joined the channel [04:19] _announcer: Twitter: "Switched from lesscss.org's ruby lessc to node.js-based v2. Installation a nightmare; can't seem to run from /usr/local/bin. But 10x faster." -- Patrick Gibson. http://twitter.com/pgib/status/14601559635 [04:22] steadicat has joined the channel [04:24] tpryme has joined the channel [04:24] mrjjwright has joined the channel [04:26] _announcer: Twitter: "#expressjs for #nodejs passes 800 followers on github, whoop! http://github.com/visionmedia/express" -- TJ Holowaychuk. http://twitter.com/tjholowaychuk/status/14601902420 [04:27] captainbenis has joined the channel [04:28] rictic has joined the channel [04:28] captainbenis has left the channel [04:31] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/cVkC2B" -- hackernews. http://twitter.com/hackernws/status/14602105614 [04:31] tmpvar: wow [04:35] _announcer: Twitter: ""dnewcome's Node.net at master - GitHub - Node.net - Node.js implemented in Javascript on the .NET runtime..." http://bit.ly/9ciP0A" -- Cory. http://twitter.com/liucory/status/14602287005 [04:35] JimBastard: whats the easiest way to start a process on a remote machine in linux, assuming i control both machines [04:35] JimBastard: also assume im on a vlan and its secure [04:36] jwm: ssh [04:36] jwm: heh [04:36] tmpvar: setup a ssh key on the remote box, from the source do something like echo "/etc/init.d/samba start" | ssh user@host [04:36] JimBastard: piping over ssh is really the best way? [04:37] jwm: http://bashcurescancer.com/run_remote_commands_with_ssh.html [04:37] jwm: there [04:39] softdrink has joined the channel [04:42] polotek: JimBastard: that's how I would do it. [04:42] JimBastard: cool [04:42] polotek: you're not gonna get the same feedback loop obviously [04:42] JimBastard: its just a one off [04:43] JimBastard: my executable is reporting back when it spins up [04:43] JimBastard: over http [04:43] JimBastard: or something [04:43] JimBastard: ;-) [04:43] JimBastard: but yeah, thats really simple should work great [04:46] javarants2 has joined the channel [04:50] _announcer: Twitter: "Just spent three hours fighting a nasty file receive truncation bug on Blackberry. Turns out it was a bug in #nodejs :(" -- Thomas Dimson. http://twitter.com/cosbynator/status/14602949072 [04:50] _announcer: Twitter: "@stesla is this node.js or ... like the stuff that makes rails apps flashy?" -- Matt Secoske. http://twitter.com/secos/status/14602963800 [04:53] hassox has joined the channel [04:54] _announcer: Twitter: "@aaronblohowiak Snow Leopard. To clarify, node.js was easy to install. It was less.js that wasn't: http://github.com/cloudhead/less.js" -- Patrick Gibson. http://twitter.com/pgib/status/14603124123 [04:56] javarants2 has left the channel [04:57] charlesjolley has joined the channel [05:00] _announcer: Twitter: "node.js が何かを理解. 既にブックマークしていたのだけれど, そのコメントが「デザインがクール」というしょうもないモノだったので書き換えておいた. "node.js" - http://j.mp/dC8SL6" -- mooz 8 clicks. http://twitter.com/stillpedant/status/14603364439 [05:01] _announcer: Twitter: "Just to clarify: node.js = easy to install; less.js not so easy..." -- Patrick Gibson. http://twitter.com/pgib/status/14603424833 [05:02] tmpvar: g'night [05:03] _announcer: Twitter: "EventMachine や Twisted では EventMachine::run() などとして明示的にイベントループへ入る必要があるけれど, node.js ではスクリプトを実行した瞬間にそれはもうイベントループに入っているらしい. ブロッキング call の完全な排除." -- mooz 8 clicks. http://twitter.com/stillpedant/status/14603516006 [05:03] riq has joined the channel [05:07] justinlilly: _announcer: really? [05:07] aaronblohowiak: night [05:07] aaronblohowiak: i think i have a memory leak [05:11] polotek: aaronblohowiak: join the club :) [05:11] aaronblohowiak: polotek: so we have to be careful to null our object references, huh [05:13] polotek: and make sure our persistent handles are weak [05:13] saikat has joined the channel [05:13] aaronblohowiak: polotek: i am in pure js [05:13] polotek: lol [05:13] polotek: then how do you get a memory leak? [05:13] aaronblohowiak: oh wait, it just takes v8 gc some time to sweep [05:13] aaronblohowiak: ACTION blushes [05:15] polotek: yes, yes it does :) [05:15] _announcer: Twitter: "node.js は Modules と Unit Test を実装してるらしい. Module のひとつとしてイベント駆動型の何かを独自サポートしてるということかな. "CommonJS Spec Wiki" - http://j.mp/9dt9tv" -- mooz 8 clicks. http://twitter.com/stillpedant/status/14604000093 [05:15] polotek: ryah: you still there? [05:16] _announcer: Twitter: "Hmm! Node.js... in .NET. http://bit.ly/cxqV1l" -- Jeremy McGee. http://twitter.com/JeremyMcGee/status/14604026591 [05:16] polotek: he's probably tired of trying to help me :) [05:17] _announcer: Twitter: "@stillpedant @teramako require だけは CommonJS 由来ですね。Node.js っぽくするなら requireAsync です。" -- edvakf. http://twitter.com/edvakf/status/14604071873 [05:17] _announcer: Twitter: "Node.JS의 초간단 HTTP 서버코드: require("http").createServer().listen(8888);" -- A.J. http://twitter.com/andrwj/status/14604095096 [05:18] _announcer: Twitter: "Getting started with node.js on Windows [ Lazycoder ] - http://octofinder.com/~etd1" -- OctoFinder.com. http://twitter.com/octofinder/status/14604113284 [05:21] hassox has joined the channel [05:21] admc has joined the channel [05:26] _announcer: Twitter: "@teramako require だけってことはないですが、Node.js は CommonJS とはちょっと距離があると思います。CommonJS の JSGI とかは同期が基本になので、非同期ベースの EJSGI というのがあったり。http://j.mp/c2PWK5" -- edvakf. http://twitter.com/edvakf/status/14604428049 [05:28] _announcer: Twitter: "@webshark what is Node.net (or Node.js)?" -- Adi A.. http://twitter.com/dotmad/status/14604520129 [05:29] ec: oh gods [05:29] ec: is that never going to stop? [05:29] ec: the twitter -> irc idea was a bad one [05:29] ec: lol [05:29] polotek: ec: it was a good idea [05:29] polotek: ruined by spam [05:29] ec: well yeah [05:29] polotek: like so many others [05:29] ec: that’s kindasorta what I meant [05:29] polotek: :( [05:29] jwm: ec: just /ignore it [05:29] ec: I’d have the bot restrict it somehow [05:29] ec: either to a specific list of users [05:29] jwm: heh [05:30] ec: good idea jwm :3 [05:30] jwm: yeah I never ignore [05:30] jwm: I just tell other people to do it [05:30] jwm: I like lots of verbosity in a channel [05:30] jwm: :) [05:30] polotek: we've been watching people try to filter the spam for a hours now [05:30] jwm: I love irc bots hehe [05:30] polotek: it's pretty persistent [05:31] jwm: certainly reduces the SNR of the channel [05:31] jwm: :) [05:36] xn-1L1a has joined the channel [05:43] chakrit has joined the channel [05:57] nsm has joined the channel [05:58] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/dCV9LZ" -- Ufuk Kılıç. http://twitter.com/ufukkilic/status/14605641395 [06:03] ryah: polotek: ping [06:04] polotek: ryah: hey, I need to discuss a resolution to this ObjectWrap thing with you [06:04] polotek: I want to use it in the "right" way [06:04] ryah: ok [06:05] polotek: so I ran into problems with Wrap and now Ref/Unref being protected [06:05] ryah: they should be used from derived classes [06:05] polotek: yeah and most of the time I'm doing that [06:06] ryah: also - i don't see why you would need ot Ref in an libxml binding [06:06] polotek: but there is an instance where a separate function wants to get a wrapped reference to my class [06:06] ryah: no i/o is performed [06:07] polotek: and I'm wondering if I should provide a NewInstance method that is a public interface to wrap [06:07] keyvan has joined the channel [06:07] polotek: okay two separate issues [06:07] polotek: the ref/unref is simpler to justify [06:08] ryah: i suppose we can make Wrap public [06:08] polotek: my libxml nodes aren't referenced in js space at all [06:08] polotek: in fact they aren't even referenced by my C++ wrapper objects [06:08] polotek: libxml keeps it's own structs tree [06:08] ryah: then why do they need js object wraps? [06:08] WALoeIII has joined the channel [06:08] polotek: ? [06:09] polotek: I still need to reference the nodes in the tree [06:09] polotek: but what that means is that the js objects don't have direct references to them [06:09] ryah: so they are in js [06:10] polotek: the c structs are the only things that references each other in libxml [06:11] polotek: so libxmljs wraps the c struct in a C++ object to hange v8 methods on [06:11] polotek: to access and manipulate the struct [06:11] ryah: yeah, sounds reasonable [06:11] polotek: and that is derived from object wrap [06:11] polotek: but because it is the inner struct that is referenced and not the C++ object [06:12] polotek: the C++ object has no references to it when it's not in js space [06:12] polotek: and since all of the persistent handles are weak [06:12] ryah: ? [06:12] polotek: they are getting collected when the gc runes [06:12] polotek: runs [06:12] ryah: the libxml structs should be in one-to-one coorespondence with the c++ objects / js objects [06:13] polotek: yes they are [06:13] polotek: but the C++ objects aren't composed into a tree [06:13] _announcer: Twitter: "node.js http://ff.im/-kP5jK" -- teramako. http://twitter.com/teramako/status/14606185500 [06:13] polotek: the c structs are [06:13] trochala has joined the channel [06:13] polotek: there's nothing pointing to the C++ object [06:13] ryah: polotek: well, as long as they belong to one and only one c struct, they are composed into a tree by reference [06:14] ryah: ah [06:14] ryah: okay [06:14] polotek: so objectwrap provides a persistent reference to the C++ object [06:14] polotek: but it has to be refed or it gets collected almost immediately [06:15] ryah: hm [06:15] polotek: so [06:15] polotek: what I've done is define the ref behavior like this [06:15] polotek: if you're inner struct is attached to the tree, you're refed [06:15] ryah: i'm not convinced this is the right way to do things [06:15] polotek: when your inner struct gets removed, unref [06:15] _announcer: Twitter: "heroku は node.js サポートを実験的に開始してますよ http://blog.heroku.com/archives/2010/4/28/node_js_support_experimental/" -- Takuto Wada. http://twitter.com/t_wada/status/14606274106 [06:16] ryah: can i see the code? [06:16] polotek: I would love to hear a different strategy :) [06:16] ryan[WIN]: hey guys i have a question [06:16] ryah: i wish i knew libxml so i could be more helpful [06:16] ryan[WIN]: i'm making an assembler and i'm using an array to store labels and offsets [06:16] ryan[WIN]: so Labels["whatever"] = address; [06:17] polotek: ryah: which part do you think would be most helpful? [06:17] ryan[WIN]: the problem i'm running into is that the built-in array methods are set to non-nll [06:17] ryan[WIN]: so Labels["push"] = 5; breaks horrendously [06:17] polotek: http://github.com/polotek/libxmljs/blob/master/src/xml_node.h [06:17] polotek: this is the base node class [06:17] ryan[WIN]: since Labels.push() is defined [06:17] polotek: xmlNode *xml_obj [06:17] ryan[WIN]: is there a way to get around that? [06:17] polotek: is the reference to the libxml struct [06:18] aaronblohowiak: ryan[WIN]: there is no such thing as an associative array in javascript [06:18] ryah: polotek: can you point me to the docs for this object [06:18] ryan[WIN]: other than just insisting that labels can't be any defined javascript object methods (which i can check for) [06:18] ryah: polotek: the libxml docs [06:18] ryah: found it nm [06:19] ryan[WIN]: aaronblohowiak, that may be true but on the back-end it's implemented as such [06:19] aaronblohowiak: ryan[WIN]: you are adding properties to an array object when you have var a =[]; a["hello"] = 5; one work-around is to simply prefix all of your identifiers [06:19] polotek: ryah: http://www.xmlsoft.org/html/libxml-tree.html [06:19] ryan[WIN]: aaronblohowiak, that's actually a really good idea [06:19] aaronblohowiak: ryan[WIN]: it matters because of things like array.length [06:19] ryah: polotek: http://www.xmlsoft.org/html/libxml-tree.html#xmlNode [06:19] ryan[WIN]: so instead of [06:19] ryah: polotek: void * _private : application data [06:19] ryah: polotek: that seems to be what you need [06:20] ryan[WIN]: Labels["push"] i do Labels["LABEL_push"] [06:20] polotek: ryah: yeah, that's where I'm storing my C++ object [06:20] polotek: that's working fine [06:20] ryah: polotek: right, so you do have a reference [06:20] aaronblohowiak: ryan[WIN]: yes, although you should just have a get() and set() method to abstract that away. so your code isnt littered with LABEL [06:20] polotek: I have a reference to it in the c struct [06:20] polotek: that's not going to keep it from getting collected by v8 [06:21] polotek: it goes like this [06:21] ryah: ah, i see what you mean [06:21] aaronblohowiak: ryan[WIN]: http://github.com/aaronblohowiak/JavaScript-datastructures/blob/master/read-through-cache-sync.js [06:21] ryan[WIN]: aaronblohowiak, labels are only Get'd in a couple of places but i see your point [06:21] aaronblohowiak: i should add a prefix to those =) [06:21] polotek: xml_obj->_private(C++)->handle_(Handle from ObjectWrap) [06:22] ryan[WIN]: aaronblohowiak, yes you should [06:22] ryan[WIN]: or else you'll run into my same issue :) [06:22] aaronblohowiak: :-) [06:22] polotek: that handle_ needs to either have a reference in js or not be weak [06:22] polotek: because right now it's weak all the time and gets collected [06:22] ryah: polotek: yeah, i get it now [06:23] polotek: ryah: I thought I saw a C++ OO version of libxml at one point [06:23] polotek: which might make my life a lot easier [06:24] ryah: polotek: have you looked at chrome's v8 binding to libxml? [06:24] polotek: but doesn't seem to be popular [06:24] ncb000gt: polotek: this the last thing before the next version of libxmljs is released? [06:24] polotek: ryah: didn't know they used it [06:24] polotek: they implement the DOM with it? [06:24] ryah: yes, i think so [06:24] polotek: it's the last thing before the memory is stable [06:25] charlesjolley has joined the channel [06:25] polotek: I've been doing all of this work to make sure objects stick around when they should and get collected when they aren't referenced anymore [06:25] polotek: and when they're referenced, the inner libxml object is freed properly [06:25] ryah: polotek: yeah - let me think about it over night [06:25] ryah: i'll get back to you tomorrow [06:25] ryah: ACTION away [06:26] polotek: ha [06:26] polotek: he's like superman [06:26] ncb000gt: :) [06:26] ncb000gt: time for bed [06:26] drostie has joined the channel [06:27] ncb000gt: 2:30am [06:27] ncb000gt: you should too polotek [06:27] nsm has joined the channel [06:28] ineation has joined the channel [06:29] polotek has left the channel [06:30] ryan[WIN]: i hate xml [06:30] ryan[WIN]: json 4 lyfe [06:32] aaronblohowiak: ryan[WIN]: xml is better than json when you need to validate [06:32] ryan[WIN]: no wai [06:34] Tim_Smart has joined the channel [06:36] jwm: hehe [06:41] JimBastard has joined the channel [06:42] virtuo has joined the channel [06:43] virtuo has joined the channel [06:53] mikemike86 has joined the channel [06:54] micheil has joined the channel [06:55] Azeroth has joined the channel [06:57] jedschmidt has joined the channel [06:58] JimBastard: i've had to take getFu away from the public [06:58] JimBastard: its too dangerous in the hands of noobs [06:58] JimBastard: toFu and isFu will still destroy though [06:58] JimBastard: ^_^ [06:58] qFox has joined the channel [06:59] _announcer: Twitter: "про node.js рассказывали на DevConf, а вот .NET-версия этого сервера http://tinyurl.com/39rsagj" -- Владимир Юнев. http://twitter.com/XaocCPS/status/14607747398 [07:01] markwubben has joined the channel [07:01] _announcer: Twitter: "Going evented with Node.js - Node.js is an evented I/O framework built on top of Google’s V8 JavaScript... http://tumblr.com/xs3adl8bc" -- Loon Palace. http://twitter.com/loonpalace/status/14607838394 [07:02] _announcer: Twitter: "ajaxian.com은 뭔가 꽤 알려진후에야 소식이 나오는 경향이 있는듯. .Net용 Node.JS http://ow.ly/1OWt4" -- A.J. http://twitter.com/andrwj/status/14607848803 [07:04] Azeroth has joined the channel [07:06] _cheerios has joined the channel [07:07] jedschmidt: i'm kinda torn on the competing package managers. npm is awesome, but i prefer nodule's URL-based approach. [07:07] saikat: there's also tusk [07:08] Azeroth has joined the channel [07:10] _announcer: Twitter: "Link: サーバサイドJavaScriptの「node.js」を試してみました : アシアルブログ http://tumblr.com/xevadlktq" -- jugyo [十行]. http://twitter.com/jugyo/status/14608113337 [07:10] N` has joined the channel [07:11] isaacs has joined the channel [07:16] isaacs: jedschmidt: you can always use both [07:16] isaacs: jedschmidt: "dependencies" : { "nodules" : "*" } [07:16] jedschmidt: hey, isaacs! isn't it past your bedtime, young man? [07:17] isaacs: jedschmidt: yeah, it totally is [07:17] isaacs: but i have some work that needs to get done before monday morning, and had family in town over the weekend. [07:17] jedschmidt: isaacs: yeah, i'd rather stick to a single package mananger if i can. [07:17] jedschmidt: npm is great [07:18] Azeroth-Working has joined the channel [07:18] isaacs: jedschmidt: nodules isn't precisely a package manager. it uses package.json, but it's way more over on the "custom module loader" side of things [07:19] isaacs: otoh, npm is fundamentally a set of shortcuts for setting everything up the way that you probably set it up manually anyhow. [07:19] jedschmidt: isaacs: the problem i'm running into now is trying to make my framework platform agnostic. [07:19] isaacs: of course, you could say "install nodules. then go to the fab dir, and run 'nodules' in it" [07:20] jedschmidt: isaacs: aka, something that would work in the browser and node.js. [07:20] isaacs: jedschmidt: jesus. ok, good luck. [07:20] jedschmidt: isaacs: i'm afraid i may end up rolling my own. [07:20] isaacs: what's teh value of something like (fab) in the browser? [07:20] jedschmidt: also because i'd like to make require async, which node.js doesn't support well. [07:20] isaacs: jedschmidt: if i get my way, it won't support it at all. [07:21] isaacs: jedschmidt: that's userspace magic. [07:21] jedschmidt: isaacs: what's the value of any javascript in the browser? [07:21] jedschmidt: makes sites snappier. [07:21] jedschmidt: separates concerns. [07:21] jedschmidt: no need to render html in the server if you can just spit out json and let (fab) render html in the browser. [07:22] jedschmidt: so you'd use (fab) to define your JSON on the server, and (fab) to render and route on url fragments in the client. [07:22] isaacs: jedschmidt: oh, ok, so you'd use the templating bigs [07:22] isaacs: *bits [07:22] jedschmidt: yeah. [07:23] jedschmidt: what's wrong with async require? [07:23] isaacs: well, it's tricky to get right, and i'd prefer if nodejs didn't spend all its time on fancy module loaders. better to just have a basic sync one that covers 90+% of use cases, and is exposed and extensible. [07:24] jedschmidt: yeah, i guess i can see that. [07:25] isaacs: the best async require implementation that i've seen yet is yui3's. it looks a lot like require.ensure, and it sends the metadata about all modules down in the seed file. [07:25] isaacs: though, actually, by just specifying the root and the url-creation logic, it's not much metadata. [07:26] isaacs: but you do need to know up front which moduels require which other modules before they can load, and it doesn't do circular dependencies. [07:27] jedschmidt: isaacs: is yui3's require called "use"? [07:27] isaacs: yeah [07:27] jedschmidt: ah, okay. will have to take a look. [07:27] isaacs: you define modules with YUI.add, and then pull them in with YUI(configs).use [07:28] aconbere: isaacs: I'm having some issues with npm's bin directive [07:28] aconbere: I have , "bin" : { "boxer" : "./bin/boxer.js" } [07:28] isaacs: ok [07:28] aconbere: which seems to result in [07:28] aconbere: boxer being added to my bin dir [07:28] isaacs: that should install a "boxer" shim that links to $pkg/bin/boxer.js [07:28] aconbere: right that's what I would expect [07:29] aconbere: and... never mind [07:29] aconbere: apparently I'm crazy [07:29] isaacs: hehe [07:29] aconbere: ACTION sighs [07:29] aconbere: I hate it when that happens [07:30] jedschmidt: isaacs: my require is probably going to end up looking like this require.call( function( lib1, lib2, lib3 ){ ... do something ... }, "lib1", "lib2", "http://somesite.org/lib3.js" ) [07:30] isaacs: jedschmidt: why the .call? [07:31] jedschmidt: isaacs: because i'm co-opting this in all functions as the callback. [07:31] isaacs: though i guess it does make the argument parsing more easily [07:31] jedschmidt: (fab) v0.5 is async only. [07:31] jedschmidt: so i need some way of unifying the callback system. hijacking "this" is how i do that. [07:31] isaacs: i see [07:32] isaacs: so this alwasy == callback [07:32] isaacs: rather than the last-arg approach [07:32] jedschmidt: right. [07:32] jedschmidt: yeah, that way arguments is always a list. [07:32] isaacs: that's clever. [07:32] jedschmidt: which basically makes every app a 'map' function. [07:33] derferman has joined the channel [07:33] jedschmidt: isaacs: it makes the code look a bit weird. but it also makes everything airtight, since "this" and "arguments" are the only two ways to pass data to a function. [07:33] isaacs: yeah, that's neat [07:34] isaacs: though, even if you dropped the .call, it's still about the same to say that arguments[0] is always the callback, and the rest are the args. [07:34] isaacs: but it wouldn't be as clever. [07:35] isaacs: it's a very aesthetically pleasing separation to make the cb the context [07:35] jedschmidt: right, it would require more munching and Array.prototype.blahblah hackery. [07:35] jedschmidt: anyway, requiring everything up front not only forces apps to describe their requirements, but also means i can still get something vaguely DSLy without 'with'. [07:35] isaacs: well, you'd just do function fn ( cb, lib1, lib2, lib3 ) [07:35] isaacs: what about circular dependencies, though? [07:36] jedschmidt: isaacs: i don't handle them. [07:36] isaacs: how will you handle unfinished objects? [07:36] isaacs: oh, well, i guess that answers that. [07:36] jedschmidt: there are none. [07:36] jedschmidt: yeah, you can require more than once until you return the final function. [07:36] jedschmidt: so that may solve some issues with circular stuff. [07:37] isaacs: but i mean, like: (a.js) require.call(cb, "b"); (b.js) require.call(cb, "a") [07:37] isaacs: does b's cb get an unfinished "a" in that case? [07:37] isaacs: if so, then it's pretty close to regular commonjs/node style [07:38] micheil: I should really reply to that packages thread [07:38] sechrist_ has joined the channel [07:38] _announcer: Twitter: "Py a la node http://neversaw.us/2010/5/20/py-a-la-node/ #nodejs #python #lolwut" -- Ⓘⓢⓐⓐⓒ. http://twitter.com/izs/status/14609034009 [07:38] jedschmidt: isaacs: well, for now, i'm just removing circular dependencies. [07:38] jedschmidt: isaacs: but yeah, i should think more about that eventually. [07:39] isaacs: ha, that thing follows me. [07:39] sechrist_: :\ I can't get jsdom's jquery demo to work [07:39] jedschmidt: isaacs: the reason i like nodule's approach using URLs is that it's decntralized... which is more compatible with browser implementations. [07:39] sechrist_: or any type of browser augmentation to work as it does in a browser actually [07:40] isaacs: jedschmidt: imo, "let's share code between the browser and server" is like the opposite of FUD. [07:40] jedschmidt: isaacs: ha, how so? [07:40] isaacs: jedschmidt: what i mean is, it's like positive happy words that we say to make people feel positive and happy, but it's bullshit, and not really realistic or anywhere near as relevant as its made out to be. [07:41] isaacs: browsers aren't *like* servers. [07:41] jedschmidt: isaacs: well, i'm embedding a server in a browser. [07:41] jedschmidt: isaacs: so they're not that far apart. [07:41] isaacs: jedschmidt: sure, and that's neat. [07:41] sechrist_: huh [07:42] isaacs: but will you actually serve 1000 rps from your web browser? what does that even mean? [07:42] sechrist_: is he adding node to chrome or something? [07:42] jedschmidt: rps? [07:42] jedschmidt: what is that? [07:42] isaacs: requests per second [07:42] isaacs: i think this whole "servers do the serving, browsers do the browsing" pattern is here to stay for a while longer. [07:43] jedschmidt: isaacs: ha, no no. [07:43] isaacs: our clients will alternate between being fat and thin, just like they've been for a while. [07:43] jedschmidt: isaacs: the idea is that instead of DOM hackery, you have a function that renders pages just like a server. it sits in the browser and uses document.write to update the current page. [07:43] jwm: jedschmidt: where is your project, I'm kind of doing the same [07:44] jwm: except planning on using websockets [07:44] jedschmidt: jwm: well, eventually it'll be in (fab), nothing public yet. [07:44] isaacs: jedschmidt: so the "server" is really a metaphor for the dom hackery? [07:44] sechrist_: well doing client-side rendering through json objects or something isn't a new concept, what do you mean exactly? [07:44] jedschmidt: the reason for the dependencies thing is that i want each app to know of it's dependencies ahead of time so i can push only the stuff you use to the client. [07:44] isaacs: ie, you're writing the whole dom over and over agian. [07:45] jedschmidt: isaacs: optionally. you can also just call the "server" out of band and render partials within the DOM. [07:45] isaacs: so, you still have a client and a server, thne [07:45] isaacs: it's just that the client is fetching json instead fo html. [07:45] technoweenie has joined the channel [07:46] linuxsable has joined the channel [07:46] jedschmidt: right. just splitting the server in two. [07:46] jedschmidt: one "server" sits in the browser. [07:46] jedschmidt: the other is remote. [07:46] jwm: ohh heh [07:46] _announcer: Twitter: ""we should ALL learn node.js" -- jacob kaplan-moss in his djangoconeu.eu keynote #django #nodejs #djangoconeu" -- Tim Lossen. http://twitter.com/tlossen/status/14609290441 [07:46] isaacs: hm..well, that's not useful terminology. [07:46] jwm: you're kind of running over the term server with a semi [07:47] isaacs: i mean, you have a client and a browser. the network IO bridge is long enough that it ought to have a special name. [07:47] jedschmidt: isaacs: well, it's the same code base, so i'm not sure it's too far a stretch. [07:47] isaacs: "client" is the program where the user is, and "server" is the program that sits far far away on a network somewhere. [07:47] jedschmidt: i mean, everything is an app anyway for me, so the idea of a single server is out the window anyway. [07:48] isaacs: even if they're both running the same program. [07:48] jedschmidt: isaacs: point taken... i wonder what different jargon i should use... [07:48] ryan[WIN]: hurp [07:48] isaacs: what youv'e got is a framework where the server and client can share a lot of code. [07:49] isaacs: and that's cool. [07:49] isaacs: but there are some fundamental things that are still very very different. [07:49] isaacs: also, i'm not sure that sending json will be any faster than sending html, and the browser will probably not render it as fast as th eserver. [07:49] paraboul has joined the channel [07:49] isaacs: ie, convert from obj to html [07:50] jedschmidt: isaacs: the point is that you don't have to decide where you render. [07:50] jedschmidt: do whichever makes more sense for your app. [07:50] isaacs: ah, this thing finally finished loading all the data. back to it. maybe i can even sleep tonight. [07:51] isaacs: anyway... rendering partials without having to re-render the whole UI might be faster. [07:51] isaacs: but that precludes document.write. [07:52] isaacs: ie, look at gmail or yahoo mail. they load a HUGE pile of code up front, and then just fetch the messages as necessary. [07:52] jedschmidt: isaacs: you can do that too, of course. [07:52] jedschmidt: the client "server" (okay!) renders html. whether you use document.write or $("#somediv").html, it's the same. [07:53] isaacs: right [07:53] isaacs: why not just call it "fab client" and "fab server"? [07:53] isaacs: they're both (fab)ulous [07:53] ryan[WIN]: heh [07:53] isaacs: except one is on top of node and the other is on top of jquery [07:53] ryan[WIN]: i've got my dumb VM demo working [07:54] isaacs: anyway, back to work. have fun, guys. [07:54] jedschmidt: jah, i should think about that. [07:54] jedschmidt: d'oh. belated g'night, isaacs. [07:56] mfeiri_ has joined the channel [08:08] zomgbie has joined the channel [08:11] ineation has joined the channel [08:14] charlesjolley has joined the channel [08:17] joshbuddy has joined the channel [08:18] saikat has joined the channel [08:25] TomY has joined the channel [08:26] _announcer: Twitter: "Node.NET: #NodeJS is now available on Windows Server #tech http://bit.ly/aBKqfq" -- Qasim Shabbir. http://twitter.com/qasimshabbir/status/14610530867 [08:28] Ori_P has joined the channel [08:32] jan____ has joined the channel [08:33] _announcer: Twitter: "node.js写静态服务器性能也能和nginx相比..." -- aki. http://twitter.com/aki_xavier/status/14610771989 [08:35] _announcer: Twitter: "node.js写静态服务器性能也能和nginx相比... http://img.ly/1jTA" -- aki. http://twitter.com/aki_xavier/status/14610818141 [08:38] _announcer: Twitter: "@aki_xavier 感觉你成为 node.js 的粉丝了" -- Chris. http://twitter.com/Chris_Ys/status/14610914194 [08:39] _announcer: New Question: "Node.js projects/tutorials?" by kNIGHTS. http://stackoverflow.com/questions/2895641 [08:44] botanicus has joined the channel [08:45] hellp has joined the channel [08:48] ineation has joined the channel [08:49] jan____ has joined the channel [08:51] _announcer: Twitter: "@zziuni ^_^ 아,, 저도 머 그렇게 빠르게 아는 건 아니구요, .Net 용 Node.JS 소식은 한... 이주정도? 전에 Announce 됐었거든요. 아마 인터뷰하고 페이지 만든다고 시간걸린 모양입니다." -- A.J. http://twitter.com/andrwj/status/14611324748 [08:53] jedschmidt has joined the channel [08:56] _announcer: Twitter: "@zhoushuqun 之前那是没有统一的解释方法,又跟css和html搅到一起,极度fuck...而现在有了node.js..." -- aki. http://twitter.com/aki_xavier/status/14611488142 [08:59] nsm has joined the channel [08:59] _announcer: Twitter: "@aki_xavier 精确一点你是node.js控。" -- zhoushuqun. http://twitter.com/zhoushuqun/status/14611597001 [09:00] _announcer: Twitter: "@aki_xavier 因为node.js把你从fuck中拯救了出来,于是你很感激它,从而喜欢上了它。这在精神病院里常见的,就是病人好了之后一般都会对其医生产生爱慕。哈哈哈。" -- zhoushuqun. http://twitter.com/zhoushuqun/status/14611643475 [09:06] jan____ has joined the channel [09:07] maushu has joined the channel [09:08] maushu: God damn chinese. [09:08] jan____ has joined the channel [09:09] jan____ has joined the channel [09:14] Azeroth-Working: lol [09:15] MattJ has joined the channel [09:17] ithinkihaveacat has joined the channel [09:19] keyvan has joined the channel [09:21] isaacs has joined the channel [09:25] ineation has joined the channel [09:28] Ori_P has joined the channel [09:30] hassox has joined the channel [09:39] nsm has left the channel [09:42] ryan[WIN]: anyone awake? [09:42] jwm: yeah [09:43] ryan[WIN]: i coaded up a solution to project euler problem 2 using my dumb vm :D [09:44] ryan[WIN]: http://pilot.ryanbroomfield.com:8030/test.html [09:45] _announcer: Twitter: "悲剧, node.js 不能在 windows 下玩" -- Chris. http://twitter.com/Chris_Ys/status/14613137341 [09:52] maushu|work: blahblah, node.js, blah moonspeak, windows, blah blah [09:52] ineation has joined the channel [09:55] darkf_ has joined the channel [09:55] hassox: ryah: are you about? [09:56] darkf__ has joined the channel [09:59] eto has joined the channel [09:59] eto: hello is node js ported to freebsd or openbsd? [09:59] _announcer: Twitter: "Hummingbird: realtime stats with this free open source tool #mongodb #node.js http://bit.ly/dmUvzM" -- Geraud Schmit. http://twitter.com/geraudschmit/status/14613615989 [10:00] mscdex: eto: yes, it compiles and works [10:00] eto: on both, that would be awesome if so i would prefer openbsd [10:01] mscdex: yes on both, although there is a tiny patch currently needed to get working on freebsd [10:01] eto: great i will try to compile it this evening [10:01] mscdex: you'll need to grab the head rev though, 0.1.96 won't work [10:01] eto: so this means i need to isntall git? [10:02] maushu|work: Huh, I believe so. [10:02] jwm: git is awesome :) [10:02] eto: no problem i just never used it [10:02] maushu|work: You could download the code from the site. [10:02] eto: but people talk plenty about it, seems to be really good tool [10:03] eto: maushu|work thanks for idea [10:03] mscdex: no [10:03] mscdex: you don't need git [10:03] maushu|work: eto: There is a "Download Source" in github. I recommend using git though. [10:03] mscdex: just go to github.com/ry/node and click Download Source [10:03] mscdex: heh [10:04] maushu|work: After installing git go to a folder and do "git clone http://github.com/ry/node.git" and the node folder should magically appear. [10:05] eto: noted that [10:06] maushu|work: If, later on, you want to update the code you do "git pull". [10:06] maushu|work: It will get the latest code from the repository and merge it with your local repository. [10:06] maushu|work: No idea what will happen to the patch though, you should ask a git expert. :p [10:08] mscdex: well for openbsd you don't need to patch [10:08] eto: noting that too [10:08] eto: thank you all, okay another thing is, well I have some mostly "procedural" experience, plenty of strange basic clones a bit of pascal and some bit of C [10:08] eto: I tried OOP too but I just can't get my head around that, I don't tend to see those objects, my object designs are not good [10:09] eto: although I did some event-driven things in those procedural languages (using main loop and case statements as event dispatcher) [10:09] maushu|work: Javascript is prototypal. [10:09] eto: do you think I have chance with node.js? [10:09] eto: from reading I did for now I understand only callbacks [10:09] mscdex: callbacks essentially are events [10:10] mscdex: you're saying when such and such happens, execute this callback for me [10:10] maushu|work: Well, you just have to remember that JavaScript is prototypical and async is madness. [10:10] eto: by prototypal and related searches i got to ducktyping, so I got that if the "object" resmbles to protoype it can be used as argument in function call for example or for method invocation [10:11] SubStack: javascript is more functional than object-oriented [10:11] eto: like it was prototype [10:12] maushu|work: eto: An object is just a container with fields. Json represents it pretty well: { username: "John", age: 25, website: "http://www.example.com" } [10:12] eto: yeah async seems madness, but node.js still seems somehow better then critical sections [10:14] eto: maushu|work okay that is similar to types in BASICs or structs in C, from what i read these containers can also contain functions [10:14] maushu|work: eto: Functions are objects. [10:14] maushu|work: That is the part that makes people's brains explode. [10:15] maushu|work: Objects can contain objects. [10:15] eto: well not that much, you can imagine function like any other field [10:15] eto: i guess it has also some special properties being a function like arguments and whatnot [10:17] stagas has joined the channel [10:17] stagas: hi [10:18] eto: I just want to know whether such complex types eg. static data and functions get used a lot in node.js projects, or I will be able to survive just with ojects as data types/structs only, like the json example you posted? [10:20] eto: well thank for input anyway [10:21] stagas: which framework would you recommend for starting with node.js? [10:21] maushu|work: eto: forget about static, there isn't static. :p [10:22] _announcer: Twitter: "node.js 蛮好玩的 =w= thx @aki_xavier @luosheng" -- Chris. http://twitter.com/Chris_Ys/status/14614450645 [10:23] SubStack: static data and functions? what are those? [10:24] stagas: anyone? [10:24] maushu|work: http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=node.js%20%E8%9B%AE%E5%A5%BD%E7%8E%A9%E7%9A%84&langpair=|en [10:25] SubStack: stagas: node.js /is/ a framework [10:25] maushu|work: "node.js very funny"? wat. [10:25] ineation has joined the channel [10:25] maushu|work: stagas: Well, if you mean a web framework you can try express. It's very famous around here. Never used it though. [10:26] screen-x: ACTION dabbles with express [10:26] maushu|work: http://github.com/visionmedia/express [10:26] stagas: yes a web framework thank you [10:26] eto: maushu|work I know, but you understand what i mean, just primary types, i know they are objects in js too [10:26] screen-x: stagas: http://wiki.github.com/ry/node/modules [10:26] eto: just like functions and everything else [10:27] maushu|work: eto: Almost nothing is sacred in JavaScript. [10:29] stagas: thanks screen-x [10:29] stagas: and maushu|work [10:29] eto: well i hope i will survive this thx [10:30] nsm has joined the channel [10:32] eto: ah want thing i wanted to know [10:33] eto: there is plenty of nosql stores some are tableish and some are key value pairs [10:33] eto: which is the most simple one with node.js support? [10:34] eto: redis, couchdb, voldemort, memcached, tokiocabinet i just got lost in that [10:35] gabe_hollombe has joined the channel [10:40] N`: don't forget riak ;) [10:40] mscdex: i don't have any experience with any of them, so i can't really comment [10:40] mscdex: but there is one you missed though: mongodb [10:41] N`: I think redis with http://github.com/fictorial/redis-node-client is a good start [10:42] _announcer: Twitter: "@cramforce You do a lot of node.js stuff, don't you? Can you recommend any good resources of documentation apart from the node API docs?" -- Leon Weidauer. http://twitter.com/techpriester/status/14615179699 [10:44] mscdex: someone should reply back to him, pointing to howtonode.org [10:44] mscdex: :P [10:45] eto: thanks [10:52] _announcer has joined the channel [10:52] fermion has joined the channel [10:53] mscdex: wb _announcer! [10:53] _announcer: Twitter: "any eventmachine or node.js guys who can talk sockets with the 0Mq guys in #zeromq on irc?"-- Daniel Neighman. http://twitter.com/hassox/status/14615589667 [10:53] dridge has joined the channel [10:53] mscdex: huhu [10:54] _announcer: Twitter: "測試播音員中文。 node.js"-- Graphnode. http://twitter.com/graphnode/status/14615628679 [10:54] maushu|work: Dammit. [10:56] _announcer has joined the channel [10:58] _announcer: Twitter: "Test announcer Chinese. node.js" [zh-TW]-- Graphnode. http://twitter.com/graphnode/status/14615793318 [10:59] _announcer: Twitter: "The Republic of Korea pretty good. I think. node.js" [ko]-- Graphnode. http://twitter.com/graphnode/status/14615839999 [11:00] maushu|work: Well, not exactly what I wanted to say, but yeah. [11:00] _announcer: Twitter: "The test the announcer in Portuguese. node.js" [pt]-- Graphnode. http://twitter.com/graphnode/status/14615879047 [11:00] maushu|work: Well, it works. [11:01] maushu|work: At least we should now know what the moonspeakers are saying about node.js [11:01] maushu|work: Or at least grasp the basics. [11:03] maushu|work: I really need to organize the code, is starting to look like a spaghetti monster. [11:04] mscdex: heh [11:04] mscdex: suite [11:05] _announcer: Twitter: "Node.net - Node.js implemented in Javascript on the .NET runtime http://bit.ly/9VaTDP"-- yescomputers. http://twitter.com/yescomputers/status/14616084262 [11:06] maushu|work: God dammit. [11:08] mscdex: hmm [11:09] maushu|work: Yes, the only solution is checking the urls. [11:09] maushu|work: Since every URL shortener uses 301 to move the user I should check for that. [11:10] maushu|work: Get the location and compare it witht he last 12 hours of tweets. [11:10] mscdex: maybe before you check the URLs you could do a check on Levenshtein distances or something [11:11] mscdex: to see if it's worth checking the url or not [11:11] xla has joined the channel [11:11] jan____: maushu|work: mine uses 302. [11:12] maushu|work: >_> [11:12] pdelgallego has joined the channel [11:13] mscdex: heh [11:14] jbrantly has joined the channel [11:20] olegp has joined the channel [11:20] maushu|work: mscdex: Would need to save every tweet from the last 12 hours. [11:22] mscdex: fun [11:22] _announcer: Twitter: "Dealt with links to MongoDB. In the console, everything works fine, I translate the same in the code for # nodejs" [ru]-- Serge Shirokov. http://twitter.com/kurokikaze/status/14616806514 [11:23] TobiasFar has joined the channel [11:25] maushu|work: Woot, it works. [11:30] voodoo1 has joined the channel [11:31] voodoo1: is anyone here into the journey router? [11:33] margle has joined the channel [11:33] hellp has joined the channel [11:35] zomgbie has joined the channel [11:40] mertimor has joined the channel [11:46] stepheneb has joined the channel [11:51] mscdex has joined the channel [11:53] stagas has joined the channel [11:54] charlesjolley has joined the channel [11:55] Tim_Smart has joined the channel [11:57] isaacsu has joined the channel [11:57] isaacsu: hi. if i put node.js behind apache mod_proxy, will apache be a bottleneck to performance? [11:57] isaacsu: significantly? [11:57] mape: isaacsu: are you isaacs? [11:58] isaacsu: no i am isaacsu [11:58] mape: bah :( [11:58] isaacsu: ;) [11:58] isaacsu: mape: yeah, i know... right? [11:58] mscdex: heh [11:59] isaacsu: i know this is a little off topic, but i'm trying to run a comet server with node.js, but still want to serve stuff from apache [11:59] stagas_ has joined the channel [11:59] isaacsu: from the same port [11:59] mape: Apache doesn't play well with node [12:00] mape: Since you loose the whole idea, at least if there is a lot of connections being proxied [12:00] isaacsu: that's what i'm wondering - i suppose i should be asking this in an apache room [12:00] mscdex: i've just been using them separately [12:01] mape: isaacsu: perhaps use jsonp and connect straight to the port? [12:01] mape: but then you need to make sure you don't have a lot of connections open at the same time [12:01] mscdex: yeah, that's what i do [12:01] mscdex: or xhr/multipart for better browsers ;-) [12:02] isaacsu: so run node on a seperate port altogether, and JSONP? [12:02] mscdex: or websockets [12:09] ineation has joined the channel [12:13] keeto has joined the channel [12:16] isaacsu has left the channel [12:18] cce has joined the channel [12:18] ddollar has joined the channel [12:18] ec has joined the channel [12:18] alex-desktop has joined the channel [12:18] kkaefer has joined the channel [12:18] atmos has joined the channel [12:18] inarru has joined the channel [12:23] trochala has joined the channel [12:32] stepheneb has joined the channel [12:34] margle has left the channel [12:36] maushu|work: So... tired... [12:39] kriszyp has joined the channel [12:39] mscdex: werd [12:40] larssmit has joined the channel [12:45] larssmit: How do I develop without constantly reload the server? [12:47] kriszyp: larssmit: you can use http://github.com/kriszyp/nodules [12:48] mape: larssmit: DJ [12:50] mape: larssmit: http://github.com/lrbabe/node-DJs [12:51] larssmit: thanks kriszyp and mape! [12:51] larssmit: Trying DJ first [12:56] kriszyp: doesn't DJ reload the server? (thought you were trying to avoid that) Just curious if that is how it works [12:59] technoweenie has joined the channel [12:59] mape: kriszyp: yeah it does [13:01] behmann has joined the channel [13:03] ineation has joined the channel [13:05] yatiohi has joined the channel [13:07] mitkok has joined the channel [13:10] maushu|work: kriszyp: Nah, we just doesn't want to reload the server every time he changes something. [13:10] maushu|work: Laziness at it's best! [13:12] margle has joined the channel [13:14] ditesh|cassini has joined the channel [13:19] davidsklar has joined the channel [13:28] [[zz]] has joined the channel [13:29] davidsklar has joined the channel [13:30] WALoeIII has joined the channel [13:38] larssmit: Ok DJ is working for me now [13:38] larssmit: reloading and debugging just what I need now [13:43] charlesjolley has joined the channel [13:46] steadicat has joined the channel [13:46] ncb000gt has joined the channel [13:53] larssmit: Trying nodules now [13:54] voodootikigod has joined the channel [13:59] ceej has joined the channel [13:59] larssmit: ok, nodules is nice, but at the moment I prefer node-DJs at the moment because it's simple, small, working out of the box and it fulfills my needs [14:01] kriszyp: yeah, DJ is a good starting point, restarting the server is plenty fast for small apps, but as your app gets big, nodules becomes more helpful (doesn't have to reload everything, helps with deps) [14:06] larssmit: restarting the server IS an issue, but we'll see when my apps get bigger [14:07] kriszyp: as fast as node is, it is true that you can load a surprisingly large apps pretty quick [14:07] thoolihan has joined the channel [14:09] pkrumins: shiaat. [14:09] pkrumins: http://socket.io is the best website and domain ever [14:09] nefD has joined the channel [14:10] pkrumins: each time i'd search for socket.io in chrome, it would think i want 'http://socket.io', so each time i had to add a '?' in front like '?socket.io' [14:10] pkrumins: no more. :D [14:11] derferman has joined the channel [14:11] ncb000gt: :) [14:15] xla has joined the channel [14:20] ditesh has joined the channel [14:21] ineation has joined the channel [14:22] ajpiano has joined the channel [14:23] behmann: kriszyp: looking at the module reloading section in the nodules readme, what advantage do you get by reloading the my-app.js file instead of restarting the VM? it seems like restarting would be "safer" [14:24] Yuffster has joined the channel [14:25] xla has joined the channel [14:33] kriszyp: behmann: the advantage is that it is a lot faster (only need to reload what is needed and you don't need to rerun any initialization steps), your server continues running which means you don't have to restart your debugging connection, or any comet connections from the server. it could be "safer", but nodules does dependency tracking to try to make sure all modules that have a references are... [14:33] kriszyp: ...re-executed (the factory is reran) [14:33] kriszyp: restarting debugging would be particularly painful for me right now [14:36] gwoo has joined the channel [14:38] voodoo2 has joined the channel [14:38] maushu has joined the channel [14:38] aho has joined the channel [14:38] maushu: !so-last [14:38] _announcer: Last Question: "Node.js projects/tutorials?" by kNIGHTS. http://stackoverflow.com/questions/2895641 [14:39] joshbuddy has joined the channel [14:41] cedricv has joined the channel [14:42] dridge_ has joined the channel [14:53] stepheneb has joined the channel [14:54] softdrink has joined the channel [14:54] stepheneb_ has joined the channel [14:57] riq has joined the channel [14:58] ineation has joined the channel [15:01] Aria has joined the channel [15:11] texodus has joined the channel [15:19] pgriess has joined the channel [15:22] felixge has joined the channel [15:22] felixge has joined the channel [15:25] Nohryb has joined the channel [15:25] Nohryb: . [15:31] icebox has joined the channel [15:34] stevendavie has joined the channel [15:37] nsm has joined the channel [15:38] xn-1L1a has joined the channel [15:39] mscdex: ..? [15:39] mscdex: heh [15:43] [[zz]] has joined the channel [15:45] richcollins has joined the channel [15:47] quirkey has joined the channel [15:48] felixge: ryah: how difficult would it be to get drain to work for net.write ? [15:49] JimBastard has joined the channel [15:56] mscdex has joined the channel [15:57] texodus has joined the channel [15:58] charlesjolley has joined the channel [16:02] stevendavie1 has joined the channel [16:04] technoweenie has joined the channel [16:05] javarants has joined the channel [16:06] javarants1 has joined the channel [16:07] steadicat has joined the channel [16:10] stepheneb has joined the channel [16:11] jedschmidt has joined the channel [16:12] ayo has joined the channel [16:21] bpot has joined the channel [16:21] zomgbie has joined the channel [16:24] Nohryb_ has joined the channel [16:24] stevendavie has joined the channel [16:26] lucas- has joined the channel [16:30] kkaefer: http://pastie.textmate.org/private/h0jos6xn1gbb4soayxwrxw [16:31] kkaefer: is there a way to "inherit" the property descriptor of a prototype to an actual "instance" of that prototype? [16:31] kkaefer: other than manually defining all the property descriptors for every instance [16:31] JimBastard: kkaefer: did you try using javascript? [16:31] kkaefer: JimBastard: ? [16:31] JimBastard: i would try that first [16:32] JimBastard: then maybe post a non-private pastie [16:32] kkaefer: it's failing for me too [16:32] JimBastard: yeah, that makes sense [16:32] JimBastard: :-) [16:32] kkaefer: http://gist.github.com/412097 [16:33] JimBastard: so what do you want the syntax to look like kkaefer [16:33] tbassetto has joined the channel [16:33] JimBastard: can you post a how it is / how i want it [16:33] kkaefer: I understand that setting that property on an instance overwrites the whole property (after all, that property is now local to the object and no longer "inherited") [16:34] kkaefer: I'd prefer it, if sys.puts(sys.inspect(test)); // --> { } [16:34] kkaefer: i.e. the enumerable property of the 'foo' property is overwritten by defining it local to the "instance object" [16:35] kkaefer: I'd have to redefine the property after each instance creation [16:36] JimBastard: i dunno thats a lot of big words [16:36] dridge has joined the channel [16:36] chakrit: property as in java-style property? the new ecma standard stuff? [16:36] JimBastard: read the gist [16:36] JimBastard: Object.defineProperty [16:37] chakrit: oic [16:39] mrjjwright has joined the channel [16:39] chakrit: Have you tried Object.preventExtensions()? [16:39] chakrit: kkaefer: ^ [16:39] linuxsable has joined the channel [16:40] kkaefer: chakrit: afaik that's not implemented in v8 [16:40] chakrit: Hmmm [16:40] kkaefer: besides, I don't want to lock down the object completely [16:40] tbassetto has joined the channel [16:41] lucas- has joined the channel [16:43] chakrit: I suppose it's not possible. [16:44] chakrit: but I could be wrong... since I havn't really used it that much [16:45] kkaefer: that severly impacts the ecmascript 5 property system :( [16:47] chakrit: IMO I think it's a little too complicated for most serious js people. [16:47] chakrit: Why even bother? there's many way to achieve closed/fixedness [16:47] chakrit: but maybe that's just me :) [16:48] chakrit: I love the interception capability though, that'd be plenty useful :) [16:50] Nohryb: kkefer: what is it that severly impacts the ecmascript 5 property system ? [16:51] kkaefer: Nohryb: that property states (like enumerable) don't propagate through prototype "inheritance" [16:54] mjr_ has joined the channel [16:56] zomgbie has joined the channel [16:58] kriszyp has joined the channel [16:58] lucas- has joined the channel [16:59] wilmoore has joined the channel [17:00] Nohryb: kkaefer: Ah, ok. You could preset the property attributes in the constructor, no ? [17:00] kkaefer: Nohryb: yeah, but that would be a huge penalty because it would have to be done for every instance [17:01] richcollins has joined the channel [17:02] charlesjolley has joined the channel [17:02] PyroPeter has joined the channel [17:03] CIA-77: node: 03Aapo Laitinen 07master * rc4876d0 10/ (doc/api.markdown lib/path.js test/simple/test-path.js): [17:03] CIA-77: node: Change the behavior of path.extname [17:03] CIA-77: node: Make path.extname return an empty string also if: [17:03] CIA-77: node: - The last dot is not in the last path component [17:03] CIA-77: node: - The last dot starts the last path component - http://bit.ly/b1Z80T [17:05] demolithion has joined the channel [17:06] zomgbie has joined the channel [17:07] Nohryb: kkaefer: hmm, but just once per property, and only if you want other than the default attrs [17:07] ryah: felixge: net.write? [17:07] felixge: ryah: well HttpResponse.write() [17:08] felixge: I was assuming it to be broken on the low-level as well? [17:08] ryah: it's working on net.STream [17:08] felixge: ryah: so it shouldn't be difficult to fix http? [17:08] ryah: um, basically you need to burrow down to the socket [17:09] ryah: and if the socket emits drain, then emit it on the OutgoingMessage [17:09] markwubben has joined the channel [17:10] felixge: ryah: doesn't sound that difficult? [17:10] mfeiri_ has joined the channel [17:10] ryah: felixge: eh, it's mildly annoying [17:10] felixge: ryah: I guess I'll have to look at the code [17:11] felixge: ryah: I'll be on the plane back to germany later today, so maybe I'll have some time to hack on this [17:11] felixge: :) [17:14] stepheneb has joined the channel [17:14] chakrit has joined the channel [17:15] SubtleGradient has joined the channel [17:17] isaacs has joined the channel [17:19] richcollins: Is watchFile broken on OS X? [17:20] richcollins: The process of watching a file appears to modify it, causing watch file to always execute a callback [17:20] ryah: richcollins: i don't think so [17:21] richcollins: ryah: Perhaps something else is modifying the files then [17:21] richcollins: not sure what it could be [17:21] richcollins: The access time changes [17:21] mjr_: richcollins: does it work right on Linux then? [17:21] richcollins: not sre [17:23] kriszyp: richcollins: on OS-X watchFile fires a lot more frequently than it should [17:23] richcollins: kriszyp: Why's that? [17:23] WALoeIII has joined the channel [17:24] kriszyp: I don't know, but I also do a check in watchFile: function(oldstat, newstat){ if(oldstat.mtime.getTime() !== newstat.mtime.getTime()){//its for real... [17:24] kriszyp: s/also/always [17:24] richcollins: ah good point [17:25] kriszyp: and then if you watchFile on smb networked paths, it takes like 20 seconds to fire (had to write a manual setInterval based file watcher for that) [17:26] richcollins: kriszyp: Ah ok that shouldn't be a problem but thanks for the heads up [17:26] kriszyp: sorry, that was more me whining that being helpful :) [17:27] JimBastard: kriszyp: stupid question, you are unwatching the file right [17:27] JimBastard: stats trigger the filewatcher as well [17:27] kriszyp: does watchFile call stats? [17:27] JimBastard: if you arent unbinding the watcher it will fire a bunch of times [17:27] kriszyp: no, I am not unwatching [17:28] JimBastard: really? [17:28] JimBastard: can i see your watcher code? [17:28] kriszyp: its basically watchFile(path, function(oldstat, newstat){ if(oldstat.mtime.getTime() !== newstat.mtime.getTime()){ ... [17:28] kriszyp: I think adding an unwatch and rewatch for every fire would actually be a bit more code [17:29] JimBastard: lol [17:29] kriszyp: and that code does work [17:29] JimBastard: one sec, let me bring up this code [17:29] JimBastard: yeah [17:29] JimBastard: if you arent unwatching the file as the first step in the handler [17:30] JimBastard: and then you are doing anything with the file [17:30] JimBastard: you gonna have issues [17:30] JimBastard: at least, thats what i discovered [17:30] kriszyp: well, I don't have issues now [17:30] ineation has joined the channel [17:30] JimBastard: [13:24] richcollins: on OS-X watchFile fires a lot more frequently than it should [17:30] JimBastard: what does that mean [17:31] kriszyp: well "should" means what kriszyp expects ;) [17:31] JimBastard: ? [17:32] JimBastard: watchFile only fires when there is activity on the file? when else would you expect it to fire? [17:33] kkaefer: JimBastard: on linux, yes, but not on os x [17:33] kkaefer: JimBastard: on os x, watchFile is polling [17:34] JimBastard: uhhh really [17:34] kriszyp: oh yeah, its way slower than I expected too [17:34] JimBastard: i havent seen that behavior [17:34] kriszyp: I have something like: fs.watchFile(path, {persistent: false, interval: process.platform == "darwin" ? 300 : 0},function... [17:34] JimBastard: ive got a fairly large app which relies heavily on watchFile [17:34] JimBastard: like, really heavily [17:35] mattly has joined the channel [17:35] kkaefer: os x doesn't support inotify [17:35] kkaefer: if someone feels like implementing it, os x supports http://en.wikipedia.org/wiki/FSEvents [17:35] JimBastard: shouldnt the poll not fire watched unless the file has changed? [17:36] mjr_: I thought there was an efficient way to do watchfile on OSX. A bunch of the higher level Mac APIs encourage this behavior. [17:36] mattly_ has joined the channel [17:36] kkaefer: mjr_: ^^ [17:36] mfeiri_ has joined the channel [17:36] Aria: Yeah. . . I know that there's a way. FSEvents shouldn't need polling... [17:36] mjr_: sorry, webkit nightly update happening os I didn't click on that link. [17:36] Aria: That's kinda the way Spotlight works. [17:37] JimBastard: anyone see RayMorgan around, i heard his company lost 1.6 mill due to a programming error [17:37] zomgbie has joined the channel [17:38] mjr_: kkaefer: are you sure that YOU don't feel like implementing fdevents in node? [17:38] mjr_: er, fsevents [17:38] kkaefer: mjr_: hehe, yes ;) [17:38] kkaefer: at least not right now [17:39] mjr_: It's also odd that you can't watch a single file, but rather a whole directory. How hard could that have been for them to implement in their library? [17:40] Aria: More overhead. Linux's dnotify is directory-based, too, for the same reason [17:40] mjr_: Aria: that doesn't leave a lot of room for ryah to complain about OSX though. [17:41] kkaefer has left the channel [17:41] kkaefer has joined the channel [17:42] Aria: Hehe. [17:42] Aria: OSX is weird in entirely other ways ;-) [17:43] mjr_: My recent work with bpf/pcap has added me a few hate points for OSX. [17:43] Aria: Heh, no kidding. [17:43] Aria: (I wish they had an any device. Not that I don't see why not.) [17:44] mjr_: I'm just bummed about the buffering. tcpdump on OSX uses blocking IO and often has really bad lag (up to a second) compared to linux. [17:45] Aria: Eww. [17:45] Aria: That's odd. I've never noticed that, actually. [17:45] mjr_: Yeah, it's nuts. [17:45] Aria: Huh. [17:45] Aria: I might have to look into that to understand it [17:45] Aria: . [17:46] mjr_: I have a link that explains it, if you are interested. On the phone at the moment. [17:47] cloudhead has joined the channel [17:47] kkaefer has left the channel [17:48] mikeal has joined the channel [17:49] Nohryb: http://osxbook.com/software/fslogger/download/fslogger.c [17:49] devinus has joined the channel [17:50] mikeal: wow [17:50] mikeal: http://ajaxian.com/archives/node-net-running-node-on-windows-via-net [17:50] devinus: somebody give me a fundamental computer science thing i can implement in js. i just did an FSM, an LRU cache, a natural sort algorithm, and a linked list....what can i do next? [17:51] mikeal: this dude re-implemented the entire API on .NET [17:51] WALoeIII has joined the channel [17:51] devinus: mikeal: that's pretty sweet [17:52] mikeal: that's impressive [17:52] mape: mikeal: Some people just like their language of choice :) [17:52] isaacs: devinus: how about a balanced binary tree? [17:52] WALoeIII has joined the channel [17:52] mikeal: i'm sure it's not nearly as performant, but who the hell runs Windows in production :) [17:52] devinus: isaacs: ooh that's good thanks! i'll do that next [17:52] isaacs: mikeal: a LOT of people, actually [17:52] mape: isaacs: hey [17:52] mikeal: i would like a good balanced btree in node.js [17:52] isaacs: devinus: or a map traversal algorithm [17:53] mikeal: who other than StackOverflow :P [17:53] devinus: .NET is something high on my to-do list [17:54] devinus: i hear nothing but praise for it since 3.0 [17:54] mikeal: this function argument names thread really upsets me for some reason [17:54] devinus: mikeal: on the commonJS mailing list? [17:54] mikeal: this level of introspection doesn't exist in the language so you just shouldn't write APIs that depend on it [17:54] mikeal: it's on the node.js list [17:54] isaacs: mikeal: inorite!? [17:54] mape: isaacs: Changed some stuff on http://npm.mape.me/ [17:54] isaacs: mikeal: i think i actually wrote a b-tree implementation in js once upon a time... [17:54] mikeal: it's not python/ruby [17:54] isaacs: mape: cool, i'll check it out [17:54] mikeal: don't pretend that it is [17:54] ryah: i don't think he implemented very much [17:55] ryah: look at the source [17:55] mikeal: mape: pretty! [17:55] mape: isaacs: And also made something that perhaps will be useful for the package sprint http://gist.github.com/412196 (returns generic information for each module on the nodejs modules wiki) [17:55] mikeal: isaacs: there are two for browser javascript I've been meaning to try [17:55] mikeal: one is a red-black tree [17:55] mape: mikeal: Hopefully useful as well :) [17:56] matthew_y has joined the channel [17:56] mape: isaacs: something like http://pic.thefarm.se/mape/20100524195400/ [17:58] mikeal: how are you guys planning on doing fulltext search? [17:58] mikeal: couchdb-lucene? [17:58] tilgovi has joined the channel [17:58] mape: I just put it in there so someone would figure out how to do it [17:58] mikeal: haha [17:58] mikeal: probably needs to happen [17:58] unomi has joined the channel [17:59] mikeal: all of couchone.com supports couchdb-lucene [17:59] mape: Seems like the easiest way to get stuff done in an open source channel. "You can't do that!" "Hey.. sure I can.." [17:59] unomi: Bespin is being reimplemented in node :) [17:59] mape: Oh really? [17:59] mikeal: is that for sure yet? [17:59] unomi: Kevin just announced it [17:59] mikeal: i talked to kevin dangoor last week and he said "probably" [17:59] mikeal: oh awesome [17:59] CIA-76 has joined the channel [17:59] mape: Nice [18:00] unomi: yeah, thats really great news [18:00] mape: Nice to see "larger projects" adopt node [18:00] unomi: now if only they would redo the front-end in yui :p [18:00] mape: jQuery now? [18:00] isaacs: mikeal: http://gist.github.com/412199 [18:00] isaacs: mikeal: doesn't auto-balance. [18:00] unomi: the mac thingy [18:00] unomi: sproutcore [18:00] mape: Oh [18:00] mikeal: cool [18:01] mikeal: what I *really* need is an on-disc append only btree [18:02] isaacs: devinus: you should write a neural-network implementation in js [18:02] isaacs: devinus: it's actually not that hard. [18:02] devinus: isaacs: that sounds fun [18:02] maushu has joined the channel [18:02] devinus: isaacs: i may do all three in the order you mentioned them, actually [18:02] isaacs: hehehe [18:03] isaacs: what was the second one? [18:03] isaacs: oh, map traversal [18:03] isaacs: heuristics. [18:04] jherdman has joined the channel [18:07] ineation has joined the channel [18:08] paul_irish has joined the channel [18:08] collink has joined the channel [18:08] mape: ACTION rubs some node on paul_irish  [18:09] collink has left the channel [18:09] paul_irish: aaah. thx. :D [18:09] mfeiri_ has joined the channel [18:10] mape: The more the merrier [18:10] charlesjolley has joined the channel [18:11] matthew_y has joined the channel [18:12] jbrantly: I <3 neural networks [18:14] unomi: I stand corrected: We have downsized Bespin, trading SproutCore for jQuery. [18:16] mape: unomi: Where are the announcements? [18:16] inimino: didn't they just switch to sc in their last "reboot"? [18:16] mape: Perhaps more patches/contribs when using jQuery? [18:16] unomi: mape: just got them in my inbox - from the bespin-core ML [18:16] mape: oh k [18:16] mikeal: are they pulling SproutCore out of the full thing or just bespin-embedded? [18:17] unomi: bespin-core.googlegroups.com [18:17] mikeal: http://groups.google.com/group/bespin-core/browse_thread/thread/66c1e46896688868 [18:17] unomi: I think from the whole thing [18:18] jviereck_ has joined the channel [18:18] mape: No mention of node? [18:19] unomi: Kevin said he might drop in [18:20] mikeal: Bespin gist plugin [18:20] mikeal: that is f'ing hot [18:20] temp01: mape: http://groups.google.com/group/bespin/browse_thread/thread/6de8c718d64232a0 [18:21] mape: could work nice with an inline patch submission like http://doc.mape.me/api.html [18:21] mape: temp01: Thanks [18:22] joshbuddy has joined the channel [18:24] mikeal: http://groups.google.com/group/bespin/browse_thread/thread/6de8c718d64232a0 [18:24] mikeal: oh, haha, it got posted [18:25] jviereck_ has left the channel [18:25] jviereck_ has joined the channel [18:26] mjr_: Yeah, so I guess it's official: JavaScript is better than Python. [18:26] sechrist: mikeal: I'm using your http lib [18:26] sechrist: working fine so far [18:28] mikeal: sechrist: cool [18:28] mikeal: i pushed an update recently [18:28] mikeal: are you running the lastest? [18:28] mikeal: mjr_: haha [18:28] sechrist: ah my clone was like 12 hours ago [18:29] mikeal: oh you pulled it right from git [18:29] sechrist: still trying to get a http parser working like a browser [18:29] mikeal: i figured you installed with npm [18:29] sechrist: oh np [18:29] sechrist: no [18:29] mikeal: sechrist: if you want cookies I can work on adding them [18:29] sechrist: I don't need them atm but a proper implementation should have them [18:30] JimBastard: mape me [18:30] JimBastard: sounds painful [18:30] JimBastard: and possibly illegal [18:30] mape: JimBastard: ? which part? [18:30] jviereck_ has left the channel [18:30] JimBastard: the part where i switched M with R [18:31] Aria has joined the channel [18:31] mape: oh you mean the bad joke part [18:31] mikeal: sechrist: well, the intention of request isn't to be 100% "browser-like", just to provide most of the stuff you would normally like to have in an http client [18:31] sechrist: oh oh no I mean like jsdom [18:31] mikeal: isaacs is talking about building more up on top of it to provide a full brower stack [18:31] sechrist: I need to do stuff with the html [18:31] mikeal: cookies is something I want in the regular library tho [18:32] sechrist: once it downloads [18:32] isaacs: or at least have the http features of curl. [18:32] mikeal: jsdom + node-html5 [18:32] mikeal: oh man [18:32] sechrist: I have trouble with aria's html5 [18:32] Aria: Hehe. I got a change pushed last night, sechrist, that should help. [18:32] sechrist: I think my problem is there's multiple projected named htmlparser and jsdom [18:32] sechrist: oh really? [18:33] Aria: And I haven't plumbed innerHTML support into it yet, but that's on the schedule for today or tomorrow. [18:33] mape: Aria: got it all playing with jQuery? :) [18:33] Aria: Hehe, haven't played with jQuery on top of jsdom yet. [18:33] sechrist: like p.tree.document.body is undefined or is that not how i'm supposed to work [18:33] sechrist: jquery wouldn't run [18:33] sechrist: when I tried [18:33] Aria: I should. I did however get the browserAugmentation working [18:33] sechrist: the functions work [18:34] sechrist: well actually [18:34] Aria: (had to add a toLowerCase() in a ton of places) [18:34] sechrist: I didn't get getelementsbyid working [18:34] Aria: Lemme make sure I actually pushed all of that. [18:34] sechrist: but I'm probably using the jsdom object all wrong [18:34] sechrist: can I make sys.inspect show the entire tree without the circulars? [18:34] Aria: No, inspect is pretty much straight descent, tracking circular references. [18:35] Aria: And the DOM objects are craaazy that way. However, the html5 lib includes a serializer. [18:35] sechrist: ah I want to see if the tree actually forms properly [18:35] sechrist: I couldn't get past body [18:35] sechrist: I did getElementsByTagName("body")[0] :X [18:35] sechrist: document.body fail [18:35] sechrist: however i'm probably inept [18:36] cloudhead: sechrist: sys.inspect(obj, false, null) [18:36] Aria: Pull the latest code, sechrist, and see if it works. [18:36] Aria: It's using the browser-model augmentation now [18:37] creationix has joined the channel [18:37] creationix has left the channel [18:37] creationix has joined the channel [18:37] Aria: (like, just pushed the last of it this moment, since I apparently forgot one final push) [18:37] sechrist: git pull up to date already [18:37] Aria: try once more now. [18:37] sechrist: did you juuuust push? [18:37] Aria: I Juuust pushed. [18:37] sechrist: ah boom [18:37] Aria: (and it took a moment to pack objects. Caught me off guard.) [18:38] steadicat has joined the channel [18:40] mjijackson has joined the channel [18:42] pkrumins: node should internally add strong binary data primitives [18:42] ryah: "strong"? [18:43] pkrumins: precisely. [18:43] pkrumins: currently the foundations are very shaky [18:43] devinus: lol [18:43] ryah: O_o [18:43] pkrumins: just sayin'. [18:43] devinus: has anybody done a good testing lib ? [18:43] thoolihan has left the channel [18:43] devinus: pkrumins: what kind of primitives ? [18:44] ryah: pkrumins: how is it shaky? [18:44] mikeal: i find the Buffer object works great :) [18:44] N`: devinus: I'm using http://github.com/iterationlabs/jasmine-nodejs/ [18:44] ryah: the buffer object is the most basic thing you could imagine [18:44] N`: devinus: but you can find inspiration on http://dev.af83.com/testing-strategies-asynchronous-environment-using-nodejs/2010/05/18 [18:44] mikeal: i rarely have to do manipulation of binary, i mostly just need to proxy it from one place to another [18:45] devinus: N`: thanks! [18:45] mikeal: if i wanted an amazing binary API I'd just use erlang :) [18:45] ryah: yes, i'm not convinced i should provide integer serialization/deserialization primatives [18:45] ryah: pretty easy to throw it together:) [18:46] creationix: http://github.com/creationix/postgres-js/blob/master/lib/buffer_extras.js#L34 [18:46] creationix: something like that? [18:46] devinus: N`: top notch one too, thanks for that. def going to use it [18:47] mikeal: ryah: the only thing I'm missing for testing right now is a collector script that will run all of the tests in a sane way with timeouts [18:47] pkrumins: devinus, ryah, there is no interface for working with binary data in C++ code, it takes crazy effort to pass binary data back to javascript app [18:47] mikeal: the assert module is basically everything i need, and I want to keep the tests as executable scripts [18:47] ryah: creationix: http://github.com/ry/node-amqp/blob/3618d4dbfc9d3c0614d6174eed5754c85d083274/amqp.js#L475 [18:47] pkrumins: like, you have to Encode it to BINARY, but then it's two-byte array that gets returned [18:47] mikeal: is there anything else you'd like to see in a collector/runner script? [18:47] pkrumins: and would only work with functions that know what 'binary' encoding is [18:47] saikat` has joined the channel [18:47] ryah: pkrumins: no, you're doing it wrong [18:47] ryah: pkrumins: the http-parser passes data using buffer [18:48] creationix: ryah: nice [18:48] pkrumins: ryah: which is a hack [18:48] ryah: pkrumins: it's not a hack.. ? [18:48] pkrumins: ryah: http://github.com/ry/node/issues#issue/152 [18:48] ryah: this is definitely how it will be, forever [18:49] mikeal: it's not a hack, it's exactly what you want :) [18:49] pkrumins: ryah: i can't use Buffers freely :( [18:49] ryah: pkrumins: i haven't looked at it - but it's a superficial problem [18:50] joshowens has joined the channel [18:51] pkrumins: okay, i am gonna look into it more! [18:54] bradleymeck has joined the channel [18:54] bradleymeck: anyone have a good example of making a named property interceptor in v8? [18:55] isaacs: mikeal: you know that " [18:55] isaacs: mikeal: you know that "old gf new gf" analogy you use about python and javascript? [18:57] isaacs: mikeal: following that analogy, this seems to really just open the door for all kinds of inappropriate things: http://neversaw.us/2010/5/20/py-a-la-node/ [18:58] ryah: pkrumins: i guess the issue is that the Buffer c++ stuff hasn't be loaded yet [18:58] pkrumins: ryah: i am looking throughout node's code, Buffers are constructed in the heap everywhere [18:59] ryah: pkrumins: but since all node programs use Buffer, we'll just load it at start [18:59] pkrumins: but i am constructing it in the stack there. [18:59] mikeal: oh man [18:59] mikeal: i hate things that compile in to javascript [18:59] ryah: pkrumins: if you throw a require('buffer') before your require [18:59] ryah: does that change it? [18:59] mikeal: i feel the same way about this as I do coffeescript [19:00] pkrumins: ryah: let me see. [19:00] mikeal: i don't see why people don't just write javascript, they are way too worried about syntax [19:00] pkrumins: ryah: but i just discovered that the general pattern is to construct Buffer via new, then wrap it in Handle as I return it? [19:00] ryah: you can't allocate a buffer on the stack - it's inherently a heap thing [19:00] pkrumins: oh. [19:01] pkrumins: ryah: that's why it's crashing then perhaps? [19:01] pkrumins: ryah: what I do in CrashMe() is I construct Buffer on the stack. [19:01] pkrumins: http://paste.pocoo.org/show/216331/ line #19 [19:01] pkrumins: and if it can only exist on a heap, then that might expain it [19:01] ryah: pkrumins: i don't understand like 38 [19:01] ryah: s/like/line [19:02] ryah: oh [19:02] ryah: nm [19:02] pkrumins: ryah: let me try to allocate it on the heap, and then delete it. [19:02] pkrumins: if that works, i guess then there is no reason to keep it on the stack [19:02] mrjjwright: mikeal: CoffeeScript isn't a different runtime, it writes really nice Javascript and does all type of useful things. It's written by people who love JavaScript. [19:03] pkrumins: hmm unless you need temporary storage [19:03] pkrumins: ryah: why can't objects be placed on the stack? [19:03] mikeal: mrjjwright: what "useful things"? [19:03] ryah: pkrumins: 2 things - it needs to be under a HandleScope [19:04] ryah: pkrumins: and you need to require('buffer') before [19:04] pkrumins: ryah: trying [19:04] pkrumins: just added the 2nd only, but it still crashed [19:04] pkrumins: adding 1st [19:04] pkrumins: ryah: still crashes :( [19:05] ryah: i think that should work - actually [19:05] ryah: what's the erorr? [19:05] pkrumins: Segmentation fault [19:05] pkrumins: ryah: let me paste the new code [19:05] ryah: stack trace? [19:05] mrjjwright: mikeal: well there is a whole list well documented here: http://jashkenas.github.com/coffee-script/. The ones I personally like the most are lexical scoping (declaring var for you), and comprehensions. [19:05] mikeal: that's syntax [19:05] sveisvei has joined the channel [19:06] pkrumins: ryah: http://paste.pocoo.org/show/217782/ [19:06] pkrumins: ryah: stacktrace and the new code [19:06] mikeal: it's not worth the extra headace of a compile step and convoluted debugging to provide syntax difference unless the original syntax is something as verbose as Java [19:06] mrjjwright: mikeal: right, that is the point. It respects JavaScript, just patches the language a bit. [19:06] pkrumins: ryah: and i am using require('buffer') in js code. [19:06] ryah: pkrumins: can you use node_g [19:06] pkrumins: i can, using it. [19:07] pkrumins: umm, there is no node_g in my install [19:07] ryah: ./configure --debug && make [19:07] mikeal: "patches the language" [19:07] mikeal: that implies something is wrong with the language and that it's so bad that it's worth a compile step to fix it [19:07] mikeal: which I just don't agree with [19:07] pkrumins: ryah: ok that will take 15 mins for me to do, be back in 15 then [19:08] pkrumins: ryah: cause node compiles that long for me [19:08] mjr_: pkrumins: JOBS=2 make [19:08] mikeal: but hey, at least it keeps people from trying to do this crazy introspection that doesn't exist that people are talking about on the mailing list :) [19:08] mjr_: or JOBS=x [19:08] ceej has joined the channel [19:08] pkrumins: mjr_: i use make -j2 [19:08] pkrumins: mjr_: not when you have celeron with 32kb of cache [19:08] ryah: pkrumins: okay - yeah seems like a bug - but i maintain that it's something superficial [19:08] mrjjwright: mikeal: sure, I understand. [19:08] mjr_: I don't think that'll get passed to v8 unless you do JOBS=, unless I'm wrong. [19:08] pkrumins: ryah: no way it's superficial [19:09] pkrumins: ryah: buffers are super needed in c++ code [19:09] pkrumins: ryah: and if they crash, that can't be superficial [19:09] ryah: pkrumins: i mean that the bug is superficial [19:09] ryah: or fix [19:09] ryah: i agree, you should definitely be able to do what you're doing [19:09] pkrumins: yeah [19:10] ryah: it might be time to start talking about doing some c++ API tests [19:10] pkrumins: like, user buffers where i want, and return them most importantly from functions [19:10] ryah: instead of just testing the js api [19:10] pkrumins: so that i can do `var foo = my_cpp_func()` [19:10] pkrumins: and foo is now buffer [19:10] pkrumins: ryah: I can't do that currently! [19:10] pkrumins: ryah: can you set this bug a higher priority on you issue queue? [19:10] pkrumins: :) [19:11] ryah: pkrumins: i don't look at priority anyway - but if you bug me i'll fix it:) [19:11] ayo has joined the channel [19:11] pkrumins: ryah: plz fix it :) [19:11] ncb000gt has joined the channel [19:11] pkrumins: ryah: while you're at it.. :) [19:11] mrjjwright: mikeal: for me the compile step is worth it because the code is so much cleaner (I really value the clean Python style of code) and the translation to JS is very straightforward so debugging isn't an issue. [19:12] steadicat has joined the channel [19:12] pkrumins: would be so awesome, i could use Buffers in my code already! no need for dirty hacks to store and return binary data! [19:12] grahamalot has joined the channel [19:12] mrjjwright: mikeal: but that is just me and others who like CoffeeScript, it's just a preference of course. [19:12] mjr_: pkrumins: can't you just write a trivial JS wrapper for now unitl ryah fixes it? [19:12] pkrumins: mjr_: that's what i am doing! [19:12] pkrumins: return binary encoded data from my function [19:12] ryah: pkrumins what's your app btw? [19:12] mjr_: pkrumins: nice! [19:13] mikeal: i've seen a half dozen of these things and none have been successful long term [19:13] pkrumins: ryah: it's virtual machines! [19:13] pkrumins: ryah: putting virtual machines on the web [19:13] mikeal: the main issue is that you still need to know javascript in order to debug, and debugging is half of programming [19:13] pkrumins: ryah: my and SubStack's startup! [19:13] ryan[WIN]: er [19:13] ryan[WIN]: VIRTUAL MACHINES ON THE WEB [19:13] ryan[WIN]: http://pilot.ryanbroomfield.com:8030/test.html [19:13] mikeal: so you never really get to live in the higher level abstraction, which just means it's an extra layer of indirection [19:14] pkrumins: ryah: http://github.com/substack/stackvm [19:14] mikeal: but, you know, all the best, whatever people wanna do with their time [19:14] JimBastard: you crazy ryan[WIN] [19:14] mikeal: objective-j is basically the same thing with more features [19:14] mikeal: and more syntax :) [19:14] pkrumins: ryah: we're not coding new ones, but making existing available [19:14] ryan[WIN]: but i think my VM is different than yours [19:14] ryah: pkrumins: cool [19:14] pkrumins: ryah: like use vmware, qemu or any other in the browser [19:14] ryan[WIN]: JimBastard, i'm going to be working on jzzzt when i finish up this project (which is almost done actually) [19:15] JimBastard: cool cool [19:15] JimBastard: look forward to it [19:15] ryan[WIN]: this project has been a thorn in my side since 2002 but the cool thing is [19:15] JimBastard: you might want to rebsae from our repo [19:15] JimBastard: we added a bunch of comments [19:15] ryan[WIN]: it's a vm that works in JS and C++ [19:15] mrjjwright: mikeal: I wouldn't personally just follow any such hack on a whim. This is from jashkenas who really deeply understands and loves JS and I have learned more about JS, not less through CoffeeScript. [19:15] ryan[WIN]: JimBastard, ok i'll check it out [19:15] pkrumins: that's pretty awesome, but not oriented for the masses [19:15] JimBastard: shouldnt be anything destructive changes.... [19:15] pkrumins: ryah: we want to put vms in blog posts [19:15] ncb000gt: mikeal: my code is bug free...no debugging for me... [19:15] mikeal: mrjjwright: not that i'm a poster child for time well spent, i just wrote an NNTP client for god sakes :) [19:15] JimBastard: i took out all the console.log statements too [19:15] JimBastard: made them debug.log [19:16] pkrumins: ryah: imagine you come to my blog, and can use a real linxu right there [19:16] ncb000gt: <.< [19:16] pkrumins: ryah: or just use it as a service, or create virtual networks and do a hacking contests, etc. [19:16] mrjjwright: mikeal: haha [19:16] mikeal: ncb000gt: if your name Donald Knuth? [19:16] mikeal: s/if/is [19:17] ncb000gt: hold on, let me go get some guvment papers... [19:18] sechrist: woah woah woah [19:18] sechrist: virtual machine implemented in js [19:19] sechrist: ryan[WIN]: god damn [19:19] ryah: pkrumins: Assertion failed: (handle_.IsNearDeath()), function ~ObjectWrap, file ../src/node_object_wrap.h, line 16. [19:19] pkrumins: ! [19:19] sechrist: this is like perfect to learn assembler in [19:19] ryah: pkrumins: that makes sense. let me see if removing that assert helps. [19:20] pkrumins: k! :) [19:20] pkrumins: but don't fix the bugs by removing defenses. :) [19:20] ryan[WIN]: sechrist, if you want to tear your eyes out [19:20] ryan[WIN]: look at the source of entity.js [19:20] pkrumins: hope that asswer is neutral [19:21] ryan[WIN]: http://pilot.ryanbroomfield.com:8030/entity.js [19:21] sechrist: implementing an entire CPU spec in js seems like a pain [19:21] sechrist: but jsnes is doing it so lol [19:21] sechrist: ryan[WIN]: the code isn't retna ripping [19:22] ryan[WIN]: lul [19:22] ryan[WIN]: no touching [19:22] ryan[WIN]: YOU CAN LOOK BUT NO TOUCH [19:22] ryan[WIN]: 5 DOLLAR SOLDIER BOY [19:23] mattly has joined the channel [19:24] sechrist: full linux kernel [19:24] sechrist: emulated in js [19:24] sechrist: gogo [19:24] sechrist: :) [19:24] ryan[WIN]: sechrist, i'm working on a high level language [19:24] ryan[WIN]: but uh [19:24] ryan[WIN]: pretty soon i'm going to have the threading and scheduling part implemented [19:25] ryan[WIN]: so that's gonna be pretty sweet [19:25] sechrist: threads eh? [19:25] ryan[WIN]: then i'm going to implement the api hooks [19:25] ryan[WIN]: so you [19:25] ryan[WIN]: will be able to do some neato stuff [19:25] ryan[WIN]: yeah threads [19:25] sechrist: fauxthreads? [19:25] ryan[WIN]: of course it's js [19:26] sechrist: async functions on the event loop i'm assuming [19:26] sechrist: that's neat [19:28] pkrumins: ryah: got a node.js question meanwhile - suppose I have a string that is encoded to BINARY. As I understand it's actually represented in memory as two-byte sequence for every byte. How do I indicate in C++ code that the args[0], which is this BINARY string, should be treated as String object? [19:29] ryah: pkrumins: args[0]->ToString() [19:29] pkrumins: ryah: there is String::Utf8Value and String::AsciiValue, but if I call args[0]->ToString, it's neither UTF8 or ASCII. [19:30] pkrumins: that's why i was quite dissatisfied about binary strings earlier. [19:31] ryah: pkrumins: i understand the problem with buffer creation now [19:31] pkrumins: ryah: most excellent. :) [19:32] pkrumins: ryah: what is it? [19:32] pkrumins: just curious since i bet i'll be doing quite a lot of node hacking in the future, best to know these details. [19:33] ryah: pkrumins: those constructors i made public should not be public after all [19:33] ryah: i'm creating a static method on Buffer to construct them [19:34] ryah: Buffer *b = Buffer::New(1024) [19:34] ryah: is that okay? [19:34] pkrumins: ryah: seems good [19:39] mikeal: does anyone have a cookie parser in node yet? [19:40] mape: think there is node-cookie [19:40] mikeal: oh, jed wrote one [19:41] mikeal: this is for signed cookies [19:41] mikeal: *sigh* [19:43] JimBastard: nom nom nom [19:43] JimBastard: cookie monster [19:43] JimBastard: i think cookiejar might do something [19:43] JimBastard: mikeal: maybe some code in http://github.com/voodootikigod/cookiejar [19:44] liucougar has joined the channel [19:45] isaacs: mikeal: it'd be rad to write a lib that could augment an http req object to parse the headers and add a "cookie" field. [19:46] sechrist: also an easy interface with redis as a cookie store [19:46] sechrist: so I can have a ton of workers use the same cookiez [19:46] isaacs: sechrist: why would you use redis as a cookie store? [19:46] mjr_: isaacs: yeah, that'd be perfect. [19:46] isaacs: that seems weird. [19:46] mikeal: isaacs: i'm keeping that state in the request options where i keep all the other state [19:46] sechrist: I was joking [19:47] isaacs: mikeal: so, you want cookies for the client, then? [19:47] isaacs: like the "send this cookie to that server" kinda deal? [19:47] mikeal: because you want to pass around the cookiejar between different client instances because they might connect to different hosts and need all the subdomain logic [19:47] isaacs: right [19:47] voodootikigod has joined the channel [19:48] JimBastard: mikeal: there are a bunch of client-side cookie tools [19:48] isaacs: JimBastard: client as in http.createClient, not as in a web browser DOM js [19:49] JimBastard: 10-4 [19:49] JimBastard: i would think this wouldnt be hard [19:49] isaacs: eh. it's not hard in the NP sense, no. just a thing to do. [19:49] isaacs: another crossword puzzle sudoku type parser thing to write up. [19:49] isaacs: a pleasant saturday afternoon project [19:50] pkrumins: hey guys, i just wrote a node-base64 module that actually encodes stuff correctly http://github.com/pkrumins/node-base64 [19:51] pkrumins: before that i patched node itself, but there is no need to do that [19:51] pkrumins: all other modules don't work with binary data [19:51] isaacs: oh, hey, pkrumins, you're the catonmat dude. [19:51] pkrumins: just produces nonsensical bullshit [19:51] mjr_: It's almost as if node should include proper base64 support. [19:51] isaacs: didn't realize that. [19:51] pkrumins: isaacs: that is true! [19:51] pkrumins: mjr_: it should, right? [19:51] isaacs: pkrumins: so, any way to do this in just JS, so that it doesn't have to be compiled? [19:52] isaacs: ie, handle buffer objects or strings? [19:52] mjr_: I think it should. I keep bugging ryah about it, and I think he's reluctantly coming around. [19:52] pkrumins: isaacs: compiling is really surprisingly easy! [19:52] mjr_: But he's quite rightly resisting adding anything to node that isn't essential. [19:52] pkrumins: isaacs: node-waf configure build [19:52] pkrumins: isaacs: and *poof* module is built [19:52] isaacs: pkrumins: sure, i know, it's not hard, but npm has a base64 encoder in js, and i don't want to have to have a compilation step. [19:53] pkrumins: oic [19:53] mjr_: The JS implementations are bound to be a lot slower than a native code one. [19:53] pkrumins: isaacs: i saw some benchmarks, base64 in js is 6x slower [19:53] pkrumins: i benched it on my computer as well [19:53] isaacs: pkrumins: sure, but npm isn't very speed-sensitive. [19:53] pkrumins: so result can be trusted. [19:53] isaacs: it's a packager, so you don't really use it in production situations. [19:53] pkrumins: isaacs: i tried two base64 modules and they both produced wrong data for binary input [19:53] pkrumins: so i didn't bother to try more js code [19:53] pkrumins: just wrote my own thing [19:54] mjr_: Probably best to just do base64 in js for most things until a good one comes as part of node. [19:54] isaacs: compared to the time it takes to download a tarball and unzip it, the base64 stuff is instantaneous [19:54] pkrumins: mjr_: if it worked! [19:54] pkrumins: mjr_: i'd do it in js if it worked [19:54] mjr_: It's gotta work [19:55] mjr_: Oh, and have test coverage. [19:55] pkrumins: yeah, i am adding tests to mine as i speak now [19:55] pkrumins: they pass :) [19:55] isaacs: pkrumins: was this one of them? just curious: http://github.com/isaacs/npm/blob/master/lib/utils/base64.js [19:55] pkrumins: didn't pass for js code i tried [19:55] pkrumins: isaacs: looking [19:55] voodoo1 has joined the channel [19:55] pkrumins: isaacs: nope, different one [19:55] isaacs: pkrumins: i only do base64 for the Basic auth, and it seems to work. that's always a short string,s o it's no big deal. [19:56] pkrumins: for strings they all work [19:56] isaacs: oh, ok, so it's just encoding buffers, then? [19:56] bradleymeck has joined the channel [19:56] pkrumins: yeah [19:56] pkrumins: i made it so [19:56] pkrumins: otherwise it was all weird. [19:56] isaacs: you should talk to felixge about putting something like this in formidable [19:56] pkrumins: cause binary strings are twice the size [19:57] mjr_: I keep wanting base64 because I'm shuffling binary data over HTTP, often handled by JavaScript. [19:57] voodoo1: is there a way to compile node scripts to executables? [19:57] pkrumins: mjr_: can use my module now :D [19:57] pkrumins: i am pushing readme and tests in 5 mins. [19:57] pkrumins: ACTION & for that time [19:57] isaacs: voodoo1: sure. just make it executable and put a shebang to node. [19:57] voodoo1: isaacs: i mean binary only [19:58] mjr_: voodoo1: you can also build up a custom node the way that the node build does for the lib directory. [19:58] voodoo1: pkrumins: it's already in the node main source, should be available soon [19:58] ryah: pkrumins: okay - i believe i've fixed your issue [19:59] voodoo1: ryah: when can we expect correct sendfile support? can't wait for that! :) [19:59] ryah: pkrumins: http://gist.github.com/412349 [20:00] ryah: pkrumins: try that patch -let me know if it works for you [20:01] sechrist: JimBastard: Do any of your formatting libs take in a string and spit out urls that were in the string? [20:02] felixge: isaacs: who were you replying to (re: formidable) ? [20:02] JimBastard: sechrist: i have toLink right now, which finds urls and makes them links [20:02] JimBastard: you want the opposite? [20:02] isaacs: felixge, pkrumins. meet each other. [20:02] sechrist: not full a hrefs, just links [20:02] sechrist: out of a haystack [20:02] JimBastard: or do you want an array of links instead of turning into hrefs [20:02] isaacs: felixge: pkrumins did a base64 binary thing that works. [20:02] JimBastard: so like [20:02] JimBastard: getLinks() [20:02] sechrist: yeah [20:02] isaacs: so like, uploading files and such. [20:02] JimBastard: adding now [20:02] isaacs: or decoding them and writing the file. [20:02] sechrist: oooh [20:03] isaacs: if it's a buffer, not a strin. [20:03] voodoo1: which couchdb module for node.js is the most mature one? [20:03] JimBastard: the art of getFu [20:03] sechrist: mongoose [20:03] pkrumins: hello felixge [20:03] felixge: pkrumins: heya [20:03] JimBastard: sechrist: any more input would be amazing, btw [20:03] mikeal: voodoo1: node-couchdb [20:03] pkrumins: felixge: you need some base64 stuff? :) [20:03] JimBastard: ill try to be releasing js-fu this week [20:03] felixge: pkrumins: are you doing anything with web forms? [20:03] pkrumins: web forms in what context [20:03] mikeal: for sure [20:03] sechrist: oh sure, I was going to write a regex [20:03] pkrumins: like plain
or some deeper context? [20:03] sechrist: but I remembered you like to manipulate strings [20:03] mikeal: i still find myself using plain old http half the time tho :) [20:03] felixge: pkrumins: receiving or sending urlencoded/multipart data [20:04] pkrumins: not doing that, nope [20:04] felixge: pkrumins: ok, then I guess I don't need that yet : ) [20:04] pkrumins: ryah: thanks for the fix, i am gonna grab latest master, compile it and try [20:04] pkrumins: ryah: will get back to you when it compiles (15+ mins) [20:04] felixge: isaacs: what kind of forms need base64? [20:04] ryah: pkrumins: that patch should probably apply to 0.1.96 [20:04] isaacs: felixge: uploading files. [20:04] ryah: pkrumins: i'll wait for you before committing it [20:05] pkrumins: ryah: how long you gonna be online still? [20:05] JimBastard: .// parses a string and returns an array of URLs in the order they were found in the string exports.getLinks = function ( str ){ return str; } [20:05] ryah: pkrumins: i'm around [20:05] pkrumins: ryah: kk [20:05] JimBastard: sechrist: if you write the regex could you send me? [20:05] felixge: isaacs: what clients? [20:05] voodoo1: mikeal: well i see, it's your own. i'm just waiting for felixge to advertise his one [20:05] sechrist: JimBastard: I found this earlier: http://www.osix.net/modules/article/?id=586 [20:05] felixge: isaacs: all browsers I know don't encode in base64 [20:05] sechrist: JimBastard: but it doesn't really strip out, it validates [20:06] isaacs: felixge: oh, actually, heh, i'm thinking of email, not forms. [20:06] felixge: voodoo1: advertise what? [20:06] mikeal: voodoo1: no, node-couchdb is felix's [20:06] felixge: isaacs: well, the spec allows it, I just don't think it's used in the wild [20:06] mikeal: :) [20:06] isaacs: not for http forms, no [20:06] mikeal: i've just sent a few patches :) [20:06] JimBastard: sechrist: well if you are feeling ambitious http://github.com/Marak/javascript-fu/blob/master/lib/string.js#L48 [20:06] felixge: ACTION is having a hard time multiplexing the channel [20:06] JimBastard: im having a small hackfest tonight to work on this [20:06] JimBastard: getting some help [20:06] isaacs: so maybe not in formidable, but if you wanted to do multipart/mime messages, you'd need that. [20:06] voodoo1: ok i see [20:06] ryah: felixge: demultiplexing :) [20:07] felixge: rythx :) [20:07] felixge: * ryah [20:07] felixge: ryah: proves my point so ;) [20:07] isaacs: ACTION likes "rythx" as a shorthand [20:07] ryah: i feel like node needs a subtitle involving the work "demultiplexer" [20:07] sechrist: dmper [20:07] pkrumins: ryah: it's building now. [20:08] ryah: s/work/word/ [20:09] ryah: voodoo1: sendfile - eh - in the future [20:09] ryah: voodoo1: not a priority right now [20:09] voodoo1: ryah: okay [20:09] JimBastard: voodoo1: isnt voodootikigod is he? [20:09] ryah: normal pump() needs to work [20:09] ryah: once that does - we can make a detour for sendfile [20:10] ryah: in certain cases [20:10] voodoo1: ryah: i'd need it to convice some people that node.js is the right choice. they claim that apache is still faster for a static webserver [20:10] voodoo1: unfortunately it is, when using sendfile support [20:10] mikeal: voodoo1: *maybe* under single reader, but not under concurrent load [20:10] ryah: sendfile is a dubious system call [20:11] mikeal: i actually did benchmark this because of a customer issue once [20:11] mape: isaacs: btw was wondering, the npm.mape.me should it say npm or just js-registry? [20:11] mjr_: voodoo1: at this very moment, node might not be faster than any given, more mature solution. [20:11] ryah: afaik sendfile isn't much faster than a normal pump [20:11] isaacs: mape: where do you live? [20:12] ryah: and that's only if you've got all your ducks in row already [20:12] ryah: which apache doesn't [20:12] mape: isaacs: Sweden? [20:12] isaacs: mape: d'oh. [20:12] isaacs: ok [20:12] mikeal: apache falls over under concurrent load [20:12] kevwil has joined the channel [20:12] voodoo1: ryah: i did some tests which nginx/apache and sendifle. it was almost twice as fast with sendfile support on my hardware [20:12] mape: isaacs: hehe yeah not like I'm able to swing by [20:12] mikeal: voodoo1: what was a single reader wasn't it? [20:12] ryah: most nginx users disable sendfile - because it's done blocking [20:12] mikeal: s/what/that [20:12] ryah: of course we'll do it in the thread pool [20:13] voodoo1: mikael / felixge : does node-couchdb support connection pooling or … rather pipelining / persisting requests? [20:13] ryah: but shrug. pump in kernel or pump in user space - it's the same [20:13] isaacs: mape: ok, so... i'm thinking that it would be good to have a js-registry site that is included right there in the couchapp [20:13] mikeal: no, because the node httpClient isn't doing that right now [20:13] joshbuddy has joined the channel [20:13] isaacs: mape: but it would be also awesome to have an npm frontpage on npmjs.org that maybe links to its registry, saying basically "this is the registry that npm uses by default" [20:13] felixge: voodoo1: no [20:13] mape: isaacs: basic list stuff page and fancy pantsy for npm? [20:13] isaacs: mape: and has links to the bug report, setup instructions, etc. something simple. [20:13] isaacs: mape: sure. [20:13] felixge: isaacs: I really like npm now [20:14] mape: k [20:14] felixge: isaacs: I published a few updates through it, went very smooth [20:14] isaacs: felixge: that's awesome! i get a lot of bug reports, getting the occasional "it works" report is fantastic. [20:14] mape: isaacs: so npmjs is more info on npm (at least the frontpage) and a subpage with the default npm repo? [20:14] isaacs: felixge: at least, until that's the norm. [20:14] mape: *.org [20:14] isaacs: mape: sure. [20:15] mape: k, I'll start poking at a frontpage [20:15] isaacs: mape: npmjs.org is for npm. registry.npmjs.org points to the registry, so that's just the couchapp as-is [20:15] mape: so no fancy bizniz there? [20:15] isaacs: mape: but that should look just like any other js-registry couchapp, so maybe it should be packager agnostic, even though for now it only has one customer. [20:15] mape: hm k [20:15] isaacs: mape: well, it can be fancy html, but not npm-specific. [20:16] mikeal: i think we can probably just put that .html file in couchdb as is and it would just work [20:16] mape: well if it is generic it kinda kills everything that is core couchapp, no github stuff and npm specific design in relations [20:16] mikeal: it's all using JSONP right? [20:17] isaacs: like, say kiwi decides to have a registry, it should be able to put something up at registry.kiwijs.org and ahve it show the packages that kiwi installs by default. [20:17] mape: mikeal: Yeah, but it is awful right now, does one listall req, then a req for each module to fetch info (and an extra github right now to get that info) [20:17] mikeal: the point of it being a couchapp is just so that it replicates to mirrors [20:17] isaacs: mikeal: right. [20:17] mikeal: mape: we can clean that up in to _list functions when we need to [20:17] isaacs: but can't you have it replicate, and also add data to the thing that it's replicating to? or does replication make it 100% identical? [20:17] mikeal: and it would still be a couchapp, and since it would be in the markup it will be more googleable [20:17] isaacs: mape: if you want different data, lmk. it's *very* easy to switch that up. [20:18] mape: mikeal: but now it is npm specific in the design (at least the header), and I guess the right sidebar will be removed [20:18] mikeal: isaacs: replication is bi-directional when you want it to be [20:18] mape: k, just figured I'd fiddle with stuff before asking for changes [20:18] mikeal: or, you can do replication one-way [20:18] mikeal: if you want a private mirror that has all the public stuff + some private stuff [20:19] mikeal: i think we keep it npm specific for a little while, it's a more targetted use case and will help build it out faster [20:19] mikeal: once it's all working and awesome we can abstract some stuff to make it less npm specific [20:19] mikeal: lunch time! brb [20:19] mape: Could just do a nicer couchapp for npm and have a basic one later on [20:19] mape: Yeah [20:20] isaacs: honestly, as long as it keeps serving npm's interests, anything pretty will be fine with me. [20:20] charlesjolley has joined the channel [20:20] isaacs: this is a marketing project, really. [20:21] mape: Well that is what I figured, make it something to remember, and people who don't care for fancy things probly remember it anyways because it is a great project [20:21] mape: Probly better for npm, but means another version for generic js-repo mirror [20:21] mape: Which is simple enough [20:22] mape: Oh and IE support? [20:22] blowery: so what are the major node package managers these days? [20:22] mape: npm, nodules and kiwi? [20:23] isaacs: fuck MSIE in the face. [20:23] mape: :D [20:23] mape: thanks [20:23] kriszyp: I really don't think nodules is a package manager ;) [20:23] isaacs: feel free to figure out a way to crash MSIE immediately, and put it right there in the header. [20:23] isaacs: seriously. that browser needs to die in a fire like 10 years ago. [20:23] mape: hehe there are plenty of jQuery plugins for that [20:24] isaacs: kriszyp: i agree. and npm isn't a module loader. but there's sort of this spectrum connecting them. [20:24] kriszyp: yeah [20:24] isaacs: kriszyp: since a lot of package managers are actually also module loaders, and vice versa. [20:24] kriszyp: your post on the ml a while back really described the situation perfectly, isaacs [20:24] isaacs: kriszyp: thanks. [20:25] kriszyp: but yeah, its seems most people come from backgrounds where the differentiation between a module loader and package manager is foreign to them [20:25] kriszyp: well, I guess it is kind of a new concept [20:25] isaacs: kriszyp: not really. i mean, apt-get and ld aren't the same program. [20:26] isaacs: kriszyp: but people come from shit programs like rubygems that try to do both. [20:26] isaacs: sorry, i didn't mean shit programs. [20:26] isaacs: i meant, really well intentioned programs that do stupid things that seemed really good at the time. [20:26] kriszyp: isaacs: yes, once again, that is a more accurate description of the situation (minus the profanity ;) ) [20:26] mape: hehe [20:27] siculars has joined the channel [20:27] pkrumins: ryah: node finished building, i just tried the example (by using Buffer::New(1024)) and it doesn't crash anymore [20:28] pkrumins: ryah: that's a good sign. But I did not yet try it in my code. [20:28] mjr_: Did the whole, "fuck X in the face" thing start from Funny People, or was that a thing already? [20:28] sechrist: magic all up in this bitch [20:28] pkrumins: ryah: can't do it that fast cause I got to understand how to convert my code to use Buffers now :) [20:28] mape: mjr_: Must be older then that [20:28] charlesjolley_ has joined the channel [20:29] mjr_: I'd never heard it before that movie, and afterwards I hear it all the time. [20:29] ryah: pkrumins: okay - i'll land it then [20:29] sechrist: fuck your couch came form dave chapelle [20:29] CIA-76: node: 03Ryan Dahl 07master * r3768aaa 10/ (src/node_buffer.cc src/node_buffer.h src/node_object_wrap.h): Create a public Buffer constructor for use in addons. - http://bit.ly/cenNKf [20:29] pkrumins: ryah: alright [20:29] isaacs: mjr_: i don't really know. i've been saying "blank that in the blank" since at least high school. [20:29] pkrumins: ryah: if anything, i'll notify you [20:30] isaacs: the first is usually either "shit", "fuck", or "stab", and the second is usually either face or some orific.e [20:30] mjr_: isaacs: sure, we've all been there. But for the specific case where blank2 === "face", I hear that a lot lately. [20:31] isaacs: mjr_: dunno. maybe parallel innovation. it definitely predates Funny People, though. [20:31] mjr_: Now stab in the face, I feel like I've heard that for a long time. [20:31] isaacs: mjr_: oh, everyone loves stab in the face. [20:31] mape: So I assume this channel isn't PG-13? :P [20:31] isaacs: hahahah [20:31] blowery: isaacs: my favorite is "kill you in the face" [20:32] mjr_: Yeah, maybe it's like plumbing systems, different, independent inventors responding to a common need, such as the lack of ways or places to fuck things. [20:32] isaacs: Amy Wong in Futurama often curses in cantonese. now THAT language has some seriously awesome profanity. [20:32] wilmoore has joined the channel [20:32] isaacs: her common "Hailat! da sa ne!" translates roughly to "terrible situation! hit you to death!" [20:33] voodootikigod: what about me JimBastard [20:34] JimBastard: nothing voodootikigod , got confused by another vooodoo [20:34] voodoo1: sorry guys, will change nick next time [20:35] mape: the nickstealing must stop [20:35] voodootikigod: haha [20:35] voodootikigod: its ok [20:35] voodootikigod: you can steal my name [20:35] voodootikigod: just please if you do [20:35] JimBastard: does anyone know the easiest way to drill into a JSON object if you have the "selector" already? like i have blah.foo.bar.pie, and i have the string "foo.bar.pie". i want to apply "foo.bar.pie" to the "blah" object, and get the right part of the object [20:35] JimBastard: any ideas? [20:35] voodootikigod: dont go giving it a good reputation or anything [20:36] voodoo1: i'm not impersonatingon purpose [20:36] mape: Nah, first come first serve, or biggest wins.. Not sure how that works [20:36] mape: voodoo1: try "lilly" or something instead, makes it easier [20:36] voodootikigod: i am the biggest and I always come first [20:36] voodootikigod: :) [20:36] JimBastard: THATS WHAT SHE SAID [20:36] mape: JimBastard: like xpath? [20:37] JimBastard: yeah mape , except im looking more for a 3 liner [20:37] voodootikigod: obj is the json [20:37] JimBastard: xpath and json-query are gay [20:37] voodootikigod: var obj ={}; [20:37] mape: for loop that iterates on a split string and returns the value? [20:37] JimBastard: yeah thats pretty much it [20:37] JimBastard: just wondering what everyone though [20:37] voodootikigod: var p = str.split(".");for (i in ) { obj = obj [20:37] JimBastard: thought [20:37] JimBastard: aye [20:37] maushu: Ok, what the hellp happened to twitter. [20:38] voodootikigod: var p = str.split(".");for (i in p) { obj = obj[p[i] } return obj [20:38] maushu: All this time and no tweets? [20:38] kriszyp: you can also do with(blah){result=eval(str)} (if you trust str) [20:38] isaacs: JimBastard: how are json-query or xpath gay? xpath is like the most prudish straight-laced straight thing ever. [20:38] JimBastard: twitter is having some annotation hackathon contest. im real tempted to apply remotely so i can pump twitter annonations full of Faker.js data [20:38] mape: ACTION throws ] at voodootikigod  [20:38] kriszyp: (and you don't buy that eval and with is evil stuff) [20:38] voodootikigod: yea [20:38] voodootikigod: i caught that post enter [20:39] berb: voodoo there you go… [20:39] voodootikigod: you didnt have to do that [20:39] JimBastard: isaacs: if the libraries have sex with men, it means they gay [20:39] mape: worst boomerang ever :/ [20:39] voodootikigod: but thanks [20:39] JimBastard: isaacs: i had a whole battle with them last year though, JSLINQ is pretty much the solution prefer now [20:39] isaacs: JimBastard: only if they're male. i'm pretty sure that js libs aren't gendered or sexual. [20:39] JimBastard: i'd rather not get into all the points, but it just wasnt working out well for me [20:39] isaacs: JimBastard: i mean, your mom has sex with all kinds of dudes, and she's not gay. [20:39] JimBastard: i did spend a bit of time with both of them though [20:40] JimBastard: xpath is strange for JSON [20:40] JimBastard: json-path i think was the library [20:40] JimBastard: yeah [20:40] JimBastard: http://goessner.net/articles/JsonPath/ [20:40] JimBastard: made me want to cry [20:40] kriszyp: JSLINQ doesn't really have a query string based representation, does it? [20:40] isaacs: ACTION feels a social obligation to poke fun at the use of "gay" to mean anything other than homosexual. because we need a word that means that. don't steal it, please. [20:40] JimBastard: negative kriszyp , so i cant copy pasta jslinq queries to the url bar..... [20:40] JimBastard: not that i really care [20:41] JimBastard: sorry isaacs [20:41] kriszyp: yeah sure, in some situations ,that certainly isn't needed [20:41] _announcer has joined the channel [20:41] _announcer: Twitter: "Testing announcer. nodejs"-- Graphnode. http://twitter.com/graphnode/status/14646049234 [20:41] isaacs: JimBastard: no problem. we all know yo'ure a bastard, it's ok. you add a delightful bit of rudeness to the channel. [20:41] isaacs: :() [20:41] isaacs: :) [20:41] JimBastard: :p [20:41] maushu: ...somehow it lost connection with twitter. [20:41] JimBastard: i do have a lot of gay friends too [20:41] maushu: Dammit. [20:41] JimBastard: i mean i do live in nyc [20:41] isaacs: i never got json-query. like, isn't . and [] enough? [20:41] JimBastard: its about searching isaacs [20:42] mape: wildcarding and whatnot? [20:42] isaacs: what about Array::filter? [20:42] isaacs: oh, ok... i guess... [20:42] JimBastard: yeah, then you gotta write a custom method [20:42] JimBastard: its a whole thing [20:42] isaacs: meh. [20:42] JimBastard: ill assplode if i go into it [20:42] JimBastard: but yeah, jslinq usually works [20:42] JimBastard: im gonna go do my 3 liner for this now [20:42] JimBastard: thanks guys [20:42] JimBastard: thanks voodootikigod [20:43] isaacs: jslinq is cool. but it seems like most of the time, writing your own method is way better than depending on this big generalized framework, just so that you can save 2 lines of code and use a little DSL-string instead. [20:43] mape: people[/name-.*/][(age|death)] [20:43] mape: would be neat [20:43] isaacs: mape: yeah, it would. [20:43] isaacs: i wonder how far you could get with proxy objects to do that. [20:44] mape: bah, * / / [20:44] JimBastard: isaacs: for simple cases, writing your own methods is easy [20:44] JimBastard: but those two lines, add up a lot [20:44] JimBastard: and then for complex stuff [20:44] isaacs: JimBastard: i think the vast majority of cases are actually simple. [20:44] JimBastard: its like ughhhhhh [20:44] JimBastard: and then for re-use its like ughhhh [20:44] JimBastard: and then for chaining its like ughhhh [20:44] JimBastard: yeah [20:44] isaacs: and the complex cases, you're often gonna want some kind of distributed map/reduce thing like couch gives you [20:44] JimBastard: well [20:44] JimBastard: this is only in memory [20:45] isaacs: right [20:45] JimBastard: its a pretty specific use case for the complex stuff [20:45] _announcer: Twitter: "Just wrote a base64 encoding module for node.js, cause no existing ones could cope with binary data http://github.com/pkrumins/node-base64"-- Peteris Krumins. http://twitter.com/pkrumins/status/14646228108 [20:45] JimBastard: i agree with you though [20:45] JimBastard: if you are doing a lot of heavy lifting, it should be in the DB [20:45] isaacs: i just think people get really excited over stuff like this because of the awesome nerdness of it, which is great, but call it what it is. don't pretend it's super useful when it covers like 2 use cases ever. [20:46] JimBastard: well, im using it for my projects [20:46] mape: the 2 most awsomest cases ever! [20:46] isaacs: hahha [20:46] JimBastard: and i really like having it [20:46] creationix has joined the channel [20:46] JimBastard: and saying two uses cases is not really correct [20:46] mape: more like 3? [20:46] JimBastard: ill agree the utility is somewhat limited though [20:46] mape: :P [20:46] JimBastard: but to me, there is utility [20:46] JimBastard: ill be putting in more work to the library as my use cases expand a bit [20:47] JimBastard: and i start doing benchmarking / performance / R graphing, just because [20:47] JimBastard: that will be fun [20:50] pkrumins: ha, i got annonced :D [20:54] sechrist: JimBastard: did you do anything with getlinks()? [20:54] isaacs: i haven't worked on npm for 4 whole days. this sucks. i don't know how i'm gonna handle next week. [20:54] isaacs: going to have to go on a cruise or something. [20:54] JimBastard: sechrist: i just added the stub, im working on js-fu tonight. having a hack party [20:54] sechrist: noice [20:54] JimBastard: im at work now, working on my JS behavior library [20:54] JimBastard: integrating slickgrid as the default grid behavior [20:54] JimBastard: ^_^ [20:55] JimBastard: if you have a regex for that you can fork and commit, or just comment on the page and i'll do it [20:56] SubtleGradient: JimBastard: I assume slickgrid has nothing to do with Slick.js? [20:58] JimBastard: unknown SubtleGradient [20:58] JimBastard: slickgrid is a jquery grid that does virtualization [20:58] SubtleGradient: virtualization of what? [20:58] JimBastard: of rows? [20:58] pkrumins: ryah: i am now converting my code to use buffers internally, and i have a question [20:58] SubtleGradient: k [20:58] JimBastard: you know what im talking about? [20:58] SubtleGradient: I can just google it [20:59] pkrumins: ryah: suppose I have a function that returns Handle and I construct `Buffer ret_buf = Buffer::New(...)`. How do I return the `ret_buf` as Handle? [20:59] JimBastard: yeah, im not sure of any good resources [20:59] JimBastard: id read the slickgrid readme [21:00] JimBastard: SubtleGradient: http://wiki.github.com/mleibman/SlickGrid/ [21:00] JimBastard: scoll down to Virtual rendering [21:00] JimBastard: that shit is really important in doing complex UI's [21:00] JimBastard: im making it my duty to inform you now [21:01] SubtleGradient: good stuff [21:01] JimBastard: :-) [21:01] SubtleGradient: I've actually known about the technique for a while. but it's nice to have a framework for it [21:01] JimBastard: if enough people learn about this, we can kill pagination forever [21:02] JimBastard: well having a framework for it is another story [21:02] JimBastard: slickgrid is only for grids [21:02] JimBastard: if you were really slick, you'd have it as part of your databinding engine [21:02] SubtleGradient: yeah, but what's a grid? [21:02] JimBastard: and then you'd have a vritual list [21:02] JimBastard: and your grid would be a composite of multiple list controllers [21:02] JimBastard: grids are only one control that can be virtual [21:03] JimBastard: but most controls are just a bunch of lists anyway [21:03] JimBastard: anywho, back to it [21:03] SubtleGradient: anyone interested in developing for the iPhone/iPad/Android/WebOS/Blackberry by publishing a simple CommonJS Package/Module? [21:04] ajpiano has joined the channel [21:05] unomi has joined the channel [21:05] _announcer: Twitter: "Using node-DJs for #nodejs development now. Looking into nodules soon (if the apps getting bigger)."-- Lars Smit. http://twitter.com/larssmit/status/14647215158 [21:07] charlesjolley has joined the channel [21:08] _announcer: Twitter: "Bespin Using # nodejs - http://bit.ly/anho76" [lv]-- Lars Smit. http://twitter.com/larssmit/status/14647377408 [21:10] mape: huh? phonegap? [21:11] joshr has joined the channel [21:11] ctp has joined the channel [21:12] joshr: hi noders [21:12] mario__ has joined the channel [21:13] mario__: does anyone have a link for downloading files from a remote site? [21:13] isaacs: hi, joshr [21:13] joshr: rough day. a few coworkers got their walking papers. [21:14] joshr: which effectively ruins productivity [21:14] technoweenie has joined the channel [21:14] mario__: this is how I tried [21:14] mario__: http://pastebin.com/C5K38XN1 [21:14] mario__: but the file is always corrupted, very frustrating. [21:15] mario__: I guess I could use curl or wget [21:15] isaacs: mario__: http://github.com/isaacs/npm/blob/master/lib/utils/fetch.js [21:15] isaacs: mario__: there's some npm-specific stuff in there, but should be pretty easy to get the basic idea. [21:15] mario__: isaacs, thanks [21:16] isaacs: mario__: you could also check out mikeal's "request" util. [21:17] mario__: perfect!!!! thank you so so much [21:23] mrchrisadams has joined the channel [21:24] berb has left the channel [21:24] mrchrisadams: ACTION looks at node.debuggable.com [21:25] mrchrisadams: is there any order to the logging of the chats listed on http://nodejs.debuggable.com/ ? [21:25] isaacs: mrchrisadams: um... chronological? [21:25] mrchrisadams: they're not daily or weekly, nor do they seem to be based on around size [21:25] mrchrisadams: sorry, order was the wrong phrase [21:25] isaacs: mrchrisadams: they're daily [21:25] isaacs: mrchrisadams: gmt, i believe [21:27] mrchrisadams: jeez, I must be going snowblind - I totally missed the last row of numbers column when I looked at the file names... [21:27] mrchrisadams: how embarassing [21:28] ryah: pkrumins: you have to unwrap it [21:28] isaacs: hehe [21:28] Phazm has joined the channel [21:29] JimBastard: i really wish someone would parse those irc logs [21:29] JimBastard: and do stats already [21:29] Nohryb has joined the channel [21:29] Phazm: JimBastard: what sort of stats? # of messages, character count, links, etc? [21:30] maushu: Stats?! WE DON'T NEED NO STINKY STATS! [21:30] ryah: pkrumins: i guess you could do buffer->handle_ [21:30] JimBastard: Phazm: ill show you [21:30] isaacs: JimBastard: it'd be interesting to see who talks the most, and who they talk to. [21:30] JimBastard: http://elanor.mine.nu/daeron/script.fi.html [21:30] JimBastard: ^^^ [21:30] mjr_: I thought mape wrote a thing that did that [21:30] JimBastard: there are log of irc log parsers [21:30] JimBastard: that can produce some pretty awesome information [21:31] JimBastard: setting up an existing one on a server is pretty trivial [21:31] mape: mjr_: that didnt have msg count and whatnot [21:31] JimBastard: ive just got like 10 projects im maintaing atm [21:31] mape: show what time of day it is the most active etc [21:31] Phazm: interesting [21:31] JimBastard: ill even do hosting if someone wants to set it up [21:31] pkrumins: ryah: gonna try ->handl_ [21:31] JimBastard: a nodejs parser would be a neat project, but there are solution [21:31] JimBastard: s [21:31] pkrumins: ryah: not sure how to unwrap it. [21:32] Phazm: speaking of hosting, JimBastard, how's that project going? I'm going to need to host my node/redis project sometime relatively soon, and I'm looking for a provider [21:32] ryah: pkrumins: yeah, that's probably best, using handle_ [21:32] JimBastard: i'll pm you [21:33] admc has joined the channel [21:36] sechrist: TypeError: Cannot set property generationTime of undefined which has only a getter [21:36] sechrist: wat [21:36] maushu: JimBastard, are you going to host? [21:37] JimBastard: maushu: host what? [21:37] screen-x has joined the channel [21:37] maushu: node.js [21:37] JimBastard: maushu: ive got a nodej hosting company in the works [21:38] maushu: Et tu, Brutus? [21:38] JimBastard: its hosting a few apps already [21:38] JimBastard: like http://chat.nodejitsu.com/ [21:38] JimBastard: if you need an app hosted, i can hook you up with an account [21:38] maushu: We are enemies from now on. [21:38] sechrist: what's sitting on 80? [21:38] JimBastard: but we are still in private alpha, so its not gonna be all rainbows and kittens [21:38] sechrist: node itself? [21:38] maushu: TO THE END! [21:39] JimBastard: lolwut maushu [21:39] JimBastard: are you with heroku? or you doing a private service? [21:39] maushu: I'm going to create a provider too. [21:39] mitkok has joined the channel [21:39] JimBastard: are you the hippo guy? [21:39] sechrist: ACTION plays dueling banjos [21:39] maushu: Hopefully our ideas are different enough. [21:39] maushu: Not really. I terminated the hippo guy. [21:39] mape: otherwise someone has to die [21:39] maushu: You're next! [21:39] JimBastard: lol [21:39] _announcer: Twitter: "@bespin moving to node.js : http://bit.ly/bYf1aB (via YC) ♠ :)"-- Scott Fitchet. http://twitter.com/figital/status/14648907952 [21:39] JimBastard: well, best of luck [21:40] JimBastard: do you have anything online yet? [21:40] maushu: Stabbity stab! [21:40] maushu: No. [21:40] maushu: Still working on the background. [21:40] mape: for the website? [21:40] JimBastard: if you think you can defeat me in an automatic deployer for node apps, i'd like to see it [21:40] JimBastard: please [21:40] JimBastard: this is not trivial stuff [21:40] mape: like colors and patterns? ;D [21:40] maushu: That is why I'm taking so long! [21:40] JimBastard: it almost took me 3 full days of coding to get a hacked prototype working [21:40] JimBastard: thats very long for me [21:40] maushu: If it were trivial it would be done like weeks ago. [21:40] JimBastard: (for the hacked prototype) [21:41] JimBastard: yeah [21:41] JimBastard: well, we will be open sourcing our library [21:41] JimBastard: http://github.com/marak/broodmother [21:41] JimBastard: just gotta get our ducks in order first legally [21:41] mape: no mit? [21:41] JimBastard: need to figure all that out [21:41] JimBastard: im gonna aim for MIT [21:42] maushu: Dammit, I like the names you gave them. [21:42] JimBastard: we might release a single server version for MIT [21:42] stagas has joined the channel [21:42] mape: them I'm opening a hosting service as well! [21:42] JimBastard: im not sure if i want to release the multi server version asap [21:42] maushu: Et tu, Brutus?! [21:42] rictic has joined the channel [21:42] mikeal: JimBastard: i was going to write something like this but I decided to wait until the node IPC stuff landed [21:42] stagas: woo just ran node.js on windows xp [21:42] stagas: through portable ubuntu [21:42] bigwavejake has joined the channel [21:42] JimBastard: mikeal: yeah.... [21:42] stagas: been trying all day [21:42] maushu: ACTION facepalm. [21:43] JimBastard: mikeal: there are ways of load balancing your apps without IPC [21:43] maushu: Wait. [21:43] JimBastard: we have some creative solutions [21:43] mikeal: if you come up with the right API you can swap out that implementation detail at any time [21:43] maushu: JimBastard, by hosting it means you will be hosting node.js websites? [21:43] JimBastard: websites? [21:43] JimBastard: no [21:43] JimBastard: apps [21:43] maushu: And apps are...? [21:43] JimBastard: apps [21:43] mikeal: JimBastard: definitely, i just wanted to be able to pass the handler on the socket instead of communicating over stdio or a socket between the drones [21:43] maushu: ... [21:43] JimBastard: not just http.createServer [21:44] JimBastard: if you guys are serious about doing this stuff, i really shouldnt be talking anymore [21:44] JimBastard: ive leaked enough info already on here and the mailing list over the past few weeks [21:44] JimBastard: :-\ [21:44] mape: <3 open source [21:44] stagas: pointing Windows Firefox on 127.0.0.1:8000 goes through portable ubuntu & node.js and back :) [21:44] mikeal: i actually like this way of separating apps [21:44] maushu: ACTION stabs JimBastard. [21:44] maushu: I win! [21:44] JimBastard: yeah....one....day.....i might release some open-source software [21:44] bigwavejake: i'm new to node.js. how would I get an RSS stream from a url? I'd like to put the xml into a string, then parse it for info. [21:44] JimBastard: http://github.com/marak [21:44] mape: "I'm gonna release this MIT, but I probly shouldn't be talking to you..." :P [21:45] JimBastard: you not listening to me mape [21:45] JimBastard: single server versus cloud [21:45] maushu: bigwavejake, use http.Client to get the rss file then use libxml.js to parse it. [21:45] mikeal: i just would ideally like to pass the drone a socket and have it talk to directly instead of having to write all the buffers to a socket then back out to another socket [21:45] isaacs: bigwavejake: sax-js is also pretty nice for streaming xml parsing [21:45] maushu: JimBastard, are you going for cloud too? [21:45] JimBastard: we are on the cloud already [21:45] JimBastard: using the rackspace api [21:46] maushu: This means war. [21:46] mikeal: isaacs: he just wants the string, you're confusing him :) [21:46] maushu: Seriously. [21:46] bigwavejake: thanks maushu and isaacs [21:46] JimBastard: best of luck maushu [21:46] isaacs: mikeal: he said he wants to parse it for info [21:46] mikeal: oh, nm [21:46] isaacs: bigwavejake: you could use mikeal's request lib to just fetch the string. [21:46] maushu: ACTION takes all the luck and runs away. MINE. [21:46] jbrantly: stagas: any gotchas? [21:46] JimBastard: in all fairness ive been working on automatic deployment on the cloud for over two years now [21:46] mikeal: you can also iteratively write it to the parser [21:46] maushu: JimBastard, don't worry, our services don't conflict much. [21:46] mikeal: if sax-js supports that [21:46] JimBastard: and i barely have a grasp on it [21:46] isaacs: bigwavejake: you can use npm to install both, btw. http://github.com/isaacs/npm and then npm install request; npm install sax [21:46] JimBastard: awesome [21:46] stagas: jbrantly: what do you mean? [21:47] isaacs: mikeal: it does [21:47] mikeal: sweet [21:47] isaacs: mikeal: you can even write a single character at a time. [21:47] maushu: I'm going in another direction different from heroku (that is what it seems you are going for). [21:47] isaacs: mikeal: and it runs on any js platform. [21:47] jbrantly: stagas: you said you've been trying all day, implying it doesn't work "out of the box" [21:47] stagas: oh yes it doesn't [21:47] mikeal: request({uri:'http://somesite/xml', bodyStream:{write:saxParserWriteFunction},) [21:47] mikeal: missed a closing } [21:48] jbrantly: stagas: so any tips if I were to try it? :) [21:48] isaacs: stagas, jbrantly: what thing are you talking about that has gotchas? [21:48] stagas: well first of all Portable Ubuntu TRES has a bug on the config and the fix is here: http://portableubuntu.demonccc.com.ar/forum/topic.php?id=237#post-1222 [21:49] jbrantly: isaacs: node.js on windows through portable ubuntu [21:49] isaacs: ah, i see [21:49] stagas: after that you go by installing node.js as described here: http://qfox.nl/notes/98 [21:49] markwubben has joined the channel [21:49] isaacs: feh. windows. [21:50] _announcer: Twitter: "Played with node.js this past weekend..."-- James Wang. http://twitter.com/synthes1s/status/14649403755 [21:50] _announcer: Twitter: "the server side js sombreros, maracas? http://developer.yahoo.com/yui/theater/video.php?v=dahl-node # nodejs" [fr]-- Vincent Voyer. http://twitter.com/vvoyer/status/14649410193 [21:50] stagas: and then you need to add a line on portable_ubuntu.conf: ports_to_redirect=tcp:8000:8000 [21:50] maushu: the server side js sombreros, maracas? [21:50] stagas: to bridge the 8000 port [21:51] stagas: thats all :) [21:51] jbrantly: stagas: beautiful, thanks :) [21:51] stagas: now you can point windows firefox to 127.0.0.1:8000 and goes through the portable ubuntu to node.js and back [21:52] stagas: now I have to figure out how to share a folder [21:52] stagas: and I can use all the tools I was using before but for node.js [21:52] jbrantly: stagas: I'm annoyed with using virtualbox so I'll have to give this a try [21:52] maushu: JimBastard, one problem I'm having is solving the ports problem. [21:52] JimBastard: im sure you are maushu [21:52] JimBastard: good luck with that :-) [21:53] maushu: Unless I give a ip for each user... but IANA is not going to like that. [21:53] stagas: jbrantly: me too thats the reason i've been trying to do it as transparent as possible [21:53] TobiasFar_ has joined the channel [21:54] _announcer: Twitter: "Bespin to move to Node.js - http://su.pr/2rmU5d"-- eBot. http://twitter.com/kicauan/status/14649587623 [21:54] JimBastard: maushu: how many lines of code have you written for this, honestly [21:55] maushu: ...let me see. [21:55] stagas: also it says that the port is bridged to the outside world also so you can point it to tcp:80:80 and run it as a real web server inside windows [21:57] JimBastard: ive got 2600 additions, 42 commits [21:57] JimBastard: just about [21:57] mikeal: i don't know about this twitter announce bot [21:58] maushu: JimBastard, 2097. [21:58] JimBastard: youve got 2k lines of code and you arent hosting apps yet? [21:58] maushu: Nope. [21:58] JimBastard: :-) [21:58] maushu: It's not done! [21:59] maushu: The interface is going to be the masterpiece, I tell you! [21:59] JimBastard: whats your github? [21:59] maushu: http://github.com/graphnode [21:59] maushu: It's not there though and I don't use it much. [22:00] maushu: I still need to put the bot there. *sigh* [22:00] JimBastard: im trying to assess how serious of a threat you are [22:00] _announcer: Twitter: "Bespin to move to Node.js - http://bit.ly/bpJOXC"-- DarkSmith. http://twitter.com/DarkSmith/status/14649891936 [22:00] maushu: JimBastard, MAKE MY DAY PUNK! [22:00] JimBastard: ACTION made [22:00] maushu: Drat. Foiled again. [22:01] maushu: Do you go to http://news.ycombinator.com/ ? [22:01] mikeal: is jquery really using that one-off thing that Resig wrote? [22:02] maushu: In case you don't, you should. There are usually tons of help for startups. [22:02] mikeal: i remember that thread was full of like 100 +1s for dropping that and just using mustache [22:03] mape: mikeal: didn't they opt for some other strange thing without any logic in the template? [22:03] isaacs: mikeal: yeah, that thing is so busted. [22:04] isaacs: it was like, "hey, you can chop strings in js, see?" [22:04] mikeal: there is no logic in mustache templates [22:04] mikeal: that's the whole damn point [22:04] darkf has joined the channel [22:04] isaacs: and everyone said OMG YOU GAIZ, JRESIG GAVES US A TEMPLATRER!!! [22:04] maushu: isaacs, and people fainted of happiness. [22:04] mape: corse you have to be able to loops and if [22:04] isaacs: fainted and then woke up and fainted again!! [22:04] mikeal: i remember the list being pretty pro-mustache [22:04] mikeal: haha [22:06] mikeal: isaacs: speaking of template stuff [22:06] mikeal: jan said that he's finishing up a release of mustache.js [22:06] isaacs: nice [22:06] mikeal: and then he wants to get people to look at some of the js stuff he's doing and see if it can't be sped up [22:06] mikeal: and i thought of you :) [22:06] isaacs: aww, thanks [22:07] isaacs: he should npm the hell out of that face. [22:07] mikeal: hahahaha [22:07] mape: isaacs: you took a look at the gist I pasted in relations to the package.js sprint? [22:07] isaacs: (the mustachioed face, that is) [22:07] isaacs: mape: oh, yeah, i saw it. lost it, though [22:07] mape: http://gist.github.com/412196 [22:07] isaacs: found it, cool [22:07] mape: not sure if there is more info that can be used [22:08] isaacs: mape: that'll help, but it'll probably still need to be massaged somewhat [22:08] mape: yeah, just a base [22:08] isaacs: mape: i'll take a look at this and see how far we can get automatedly [22:08] isaacs: mikeal: sure, feel free to send jan____ my way. squeezing out cycles is a hobby of mine. [22:09] isaacs: s/hobby/neurotic obsession/ [22:09] isaacs: whatever, same diff, i guess. [22:09] mape: Nice way to get a heavy influx of new projects added if doable [22:09] isaacs: totally [22:09] maushu: Excuse me while I hire an assassin to off JimBastard. [22:10] isaacs: although, the slight social friction has actually kind of been nice. [22:10] JimBastard: thats cool maushu [22:10] isaacs: i'll probably try to figure out atomic processes before shoving *everyone* into it. [22:10] maushu: ... [22:10] JimBastard: ive been trying to die for the past 200 years, im immortal [22:10] JimBastard: you cant kill a bastard [22:11] maushu: Drat. Foiled again. [22:11] JBenesch has joined the channel [22:12] hassox has joined the channel [22:15] vnguyen has joined the channel [22:15] JimBastard: vnguyen ! [22:15] JimBastard: maushu: you should be fighting that guy [22:15] vnguyen: ? [22:15] maushu: Why? [22:15] JimBastard: you are the ellusive hippo guy right [22:16] vnguyen: possibly >_> [22:16] maushu: No wai. [22:16] JimBastard: yep [22:16] maushu: JimBastard, lets get together and finish him off. [22:16] JimBastard: ACTION does more research that you'ld feel comfortable with [22:16] JimBastard: no need [22:16] maushu: Then we will try to stab each other at the backs. [22:16] JimBastard: all you [22:16] vnguyen: who are you maushu? [22:16] maushu: No one. [22:16] maushu: ACTION hides knife. [22:16] JimBastard: ill believe elusive hippo when i see it [22:17] vnguyen: i really shoulda blog posted about elhippo... it works but atm, its nothing more than a glorified landing page [22:17] maushu: Mine is called graphnode. [22:17] JimBastard: looks like someone is spending more time on twitter then writing code [22:17] JimBastard: uhh huh vnguyen [22:17] JimBastard: :-) [22:17] JimBastard: did you ever get your free makeup sample? [22:18] JimBastard: ;-) [22:18] vnguyen: ? [22:18] vnguyen: i don't think i want to know [22:19] vnguyen: also, since heroku supports node... does anyone even want elusivehippo to exist? [22:19] maushu: It doesn't matter, my idea doesn't directly conflict with theirs. [22:19] maushu: JimBastard's on the other hand... kekekeke [22:20] JimBastard: maushu: you dont know my idea :-) [22:20] maushu: heroku, node.js version? [22:21] JimBastard: thats a piece! [22:21] maushu: ZING! [22:22] hassox_ has joined the channel [22:23] Phazm: I think I remember someone linking to a node package manager roundup with pros/cons of each... Does such a thing exist? [22:24] JimBastard: yeah Phazm , its on the mailing list [22:24] JimBastard: NPM was the winner [22:25] Phazm: npm it is then, thanks JimBastard [22:25] isaacs: Phazm: i did. my conclusion was that npm is the one i like, but only because i built it the way i wanted it to be. [22:25] isaacs: Phazm: there are differences, and it depends. kiwi is cool. mode is cool. nodules is kind of a whole different kind of thing that dodges the whole question. [22:25] tpryme has joined the channel [22:26] tpryme has left the channel [22:31] JimBastard: isaacs: stfu you dont know what you are talking about [22:31] JimBastard: NPM is the best [22:31] JimBastard: if you dont like it go write your own [22:31] JimBastard: ;-) [22:31] JimBastard: ACTION is kidding [22:32] isaacs: hahah [22:32] ctp has joined the channel [22:32] vnguyen: so I shouldn't go to any nodejs meetups using my real name eh? else get backstabbed IRL O_O? [22:33] maushu: vnguyen, pretty much. [22:34] maushu: Oh, could you do me a favor? Wear this bullseye. [22:34] _announcer: Twitter: "Bespin Server - on node.js: http://wp.me/pKkTb-3E"-- BlackDog. http://twitter.com/blackdog66/status/14651665876 [22:35] Nohryb has joined the channel [22:37] maushu: I call that aggressive competition. [22:38] JimBastard: i havent seen any competition yet [22:38] JimBastard: ;-) [22:38] JimBastard: fuck it, im gonna open source broodmother on the next release [22:38] maushu: IMMA CHARGIN MAH LAZER [22:38] JimBastard: if my partner kills me i dont care [22:38] JimBastard: it will be worth it [22:38] JimBastard: i wont die anyway [22:39] maushu: Your startup will though. [22:39] maushu: Just kidding, no idea what will happen. [22:39] JimBastard: 1. doubtful. 2. there is no money in nodejs hosting this year.....or next [22:41] olegp has joined the channel [22:45] _announcer: Twitter: "@rmurphey Given your extensive JS knowledge/experience, looked at any of Node.js and web stacks like Express on that?"-- Brian Arnold. http://twitter.com/brianarn/status/14652204690 [22:48] CIA-76: node: 03Ryan Dahl 07master * r19f475c 10/ (lib/fs.js test/simple/test-file-read-stream.js): [22:48] CIA-76: node: fs.ReadStream should emit Buffers [22:48] CIA-76: node: And do proper utf8 encoding. - http://bit.ly/aggANj [22:51] Phazm: npm ! Error: node version not compatible: \n required: >=0.1.93 \n actual: v0.1.93-24-gea37d98 [22:52] Phazm: the node I have cloned is the latest. [22:52] stagas: made a wiki guide: http://wiki.github.com/ry/node/installation-on-windows-xp-through-portable-ubuntu-tres [22:52] tpryme has joined the channel [22:56] mrchrisadams has joined the channel [22:57] stagas: what do you think? [22:58] devinus has joined the channel [22:58] _announcer: Twitter: "Glad to have @michaelphines along for the ride on the Node.js hacking today. As usual, our apprentices come in with high standards!"-- Dave Hoover. http://twitter.com/redsquirrel/status/14652863245 [22:59] Tim_Smart has joined the channel [22:59] stagas: I guess it was a barrier for many people who use Windows to start using node.js and code stuff for it and that should make it simple enough and transparent enough since you can use all the tools you are used too before [23:00] pedrobelo has joined the channel [23:01] [[zz]] has joined the channel [23:01] jbrantly: stagas: I'll try it out sometime and PM you how it went [23:02] _announcer: Twitter: "New post: Bespin to move to Node.js http://geeknews.me/2010/05/24/bespin-to-move-to-node-js/"-- geek. http://twitter.com/geeknewsme/status/14653122549 [23:03] _announcer: Twitter: "Web-development / Bespin perehodit of node.js http://ff.im/-kR1Lo" [bg]-- qwertydzen. http://twitter.com/qwertydzen/status/14653144348 [23:06] CaseyH has joined the channel [23:10] polotek has joined the channel [23:11] maushu: God dammit. [23:11] maushu: I really need that distance algorithm. [23:14] stagas: levenshtein? [23:15] polotek: maushu: check this out http://twitter.com/jkalucki/status/14642062258 [23:15] vnguyen has left the channel [23:15] maushu: stagas, yeah, to stop repeated tweets. [23:15] maushu: A distance of 25 tops should be enough. [23:16] stagas: php.js has it: http://phpjs.org/functions/levenshtein:463 [23:16] maushu: polotek, ouch. [23:16] mjr_: BTW, maushu, have you heard that bespin is moving to node.js? [23:16] rolfb has joined the channel [23:16] polotek: yeah, so there's spam filtering on the stream. it just doesn't combat bots very well [23:16] maushu: stagas, I know, I think I found one better. Need to check. [23:17] maushu: mjr_, yeah, I saw the tweets. Nice. Hopefully it will increase node.js usage. [23:17] mjr_: I was just kidding. It was only repeated like 9 times. [23:17] mjr_: filter that shit [23:17] maushu: lulz [23:18] polotek: what the difficulty with killing dupes maushu? [23:18] polotek: oh, that's why you want the levenshtein thing [23:18] maushu: Pretty much. [23:19] Aria has joined the channel [23:20] maushu: stagas, found this one: http://andrew.hedges.name/experiments/levenshtein/levenshtein.js [23:20] maushu: Needs to be tweaked to work with two strings instead of a form but... [23:21] ditesh has joined the channel [23:32] _announcer has joined the channel [23:32] maushu: Ok, it should work better now. [23:32] maushu: Hopefully. [23:33] maushu: I might have to tweak the value. [23:34] gf3 has joined the channel [23:34] _announcer: Twitter: "This is a spam test for node.js"-- Graphnode. http://twitter.com/graphnode/status/14654808258 [23:34] maushu: Yeap, it works. [23:34] maushu: The other didn't show up. [23:38] _announcer: Twitter: "Bespin to move to Node.js http://ff.im/kRlF0"-- antest. http://twitter.com/antest/status/14655050644 [23:39] sechrist: maushu I have a weird problem where cpu usage keeps climbing during my twitter stream with node-twitter [23:39] sechrist: no idea why [23:40] Tim_Smart has joined the channel [23:40] maushu: Ask the owner. I don't use any lib for reasons exactly like that. (I just want a feature, not a fully fledge library.) [23:40] maushu: Still, perhaps the lib is saving the tweets? [23:40] maushu: That is kind of silly. [23:40] sechrist: yeah it is [23:40] maushu: ... [23:40] sechrist: no I mean [23:41] sechrist: yeah it is silly [23:41] maushu: ACTION facepalms. [23:41] polotek: sechrist: you said cpu? [23:41] sechrist: yes I did [23:41] polotek: the twitter stream is pretty heavy [23:41] sechrist: no man [23:41] maushu: polotek, it keeps climbing. [23:42] sechrist: it starts out like 1.5% cpu [23:42] sechrist: at >= 2000 tweets/s [23:42] sechrist: then gets to like 30% [23:42] polotek: how fast does it climb? [23:42] sechrist: at the same rate [23:42] maushu: Weird. [23:42] maushu: Perhaps some back checking? [23:42] sechrist: ah 1.5% to 30% in less than 10 mins [23:42] sechrist: I'm looking [23:42] sechrist: don't see it [23:43] maushu: For the distance algorithm I save the last 100 tweets. [23:43] maushu: So that the biggest loop is just 100. [23:43] sechrist: yeah I will be saving tweets but I'm not yet [23:43] sechrist: I commented out my redis/mongo code for that purpose [23:43] sechrist: to see if that was doing it [23:43] maushu: The saving tweets wouldn't increase CPU. Using those tweets for something else (like spam checking) would. [23:44] polotek: so what are you doing with the tweets right now? [23:44] polotek: without the db stuff? [23:44] polotek: just letting them get GCed? [23:45] sechrist: yep [23:45] sechrist: I have a counter but that's just an int [23:45] polotek: code? [23:46] maushu: The counter is obviously using the cpu for its evil ends. [23:48] polotek: yeah I'm getting it with my client as well [23:48] polotek: actually mine is climbing much faster [23:49] Phazm has joined the channel [23:49] maushu: polotek, also using node-twitter? [23:49] polotek: no, using my evented-twitter lib [23:50] maushu: ... [23:50] maushu: Maybe it's the http client problem? [23:50] polotek: sechrist: are you running this through an http server? [23:50] maushu: It doesn't make sense, why would cpu increase? [23:50] eck has joined the channel [23:50] eck has joined the channel [23:50] sechrist: through an http server? [23:51] sechrist: nah dude [23:51] sechrist: it's not web facing [23:51] sechrist: just for aggregation [23:52] maushu: I will keep a eye on the bot. [23:52] maushu: It might explain why it cut connection to twitter today. [23:54] polotek: it stops printing to my console at some point [23:54] polotek: cpu still spinning [23:54] sechrist: really? [23:54] polotek: but no output [23:54] sechrist: your -- completely differnet lib [23:54] sechrist: has the same symptoms? [23:54] polotek: :) [23:54] polotek: they're pretty similar [23:54] sechrist: ah I see [23:54] polotek: node-twitter was the inspiration for mine [23:54] sechrist: common denominator is node itself [23:54] sechrist: but nah [23:55] maushu: Wait, printing to console? [23:55] sechrist: also my throughput goes to shit [23:55] bpot has joined the channel [23:55] maushu: Turn off output and check cpu usage. [23:56] sechrist: why woul.. okay [23:56] polotek: maushu: I just did that [23:56] polotek: no change [23:57] maushu: ... [23:57] sechrist: yep - climbing here [23:57] polotek: I wonder if it has to do with emitting events [23:57] polotek: there's only two things this code is doing at this point [23:58] polotek: reading from the network stream [23:58] polotek: and emitting events [23:58] sechrist: hehe [23:58] sechrist: yeah my tweet event gets hit a lot, that's what the counter is based on [23:58] sechrist: but yeah hmm [23:59] sechrist: maushu: you're not using one of the avail. modules? [23:59] sechrist: if you are -- pretty sure it's leaking -- just at a slow rate since there's not many tweets with #node [23:59] maushu: Nope. [23:59] sechrist: k [23:59] sechrist: what do you call this [23:59] sechrist: a cpu leak?