[00:00] kriskowal: yeah, but i'm curious what the overhead comes from. i understand *some* overhead, but the fast track is ascii equivalent. [00:01] kriskowal: if it's having to look ahead to check buffer sizes, that could account for it, but can also be avoided [00:01] _ry: isaacs: oh yeah [00:02] kriskowal: i'm not about to draw a hard line in the sand, but i am morally opposed to the parse/stringify dichotomy, mostly the latter [00:03] kriskowal: ACTION objectifies some strings [00:04] _ry: isaacs: took it the serialization patch - i'll push in the near future [00:04] _ry: s/it // [00:04] isaacs: _ry: i kinda like having encode/decode as aliases, too [00:04] isaacs: if that floats your boat [00:05] _ry: sure [00:05] _ry: i'll add it to that commit [00:05] isaacs: i'd like to keep kriskowal happy if possible. [00:05] isaacs: ;) [00:05] kriskowal: my happiness, aw [00:06] mjr_: adorable [00:06] darkf: very [00:06] _ry: isaacs: i assume stringify = encode? [00:06] isaacs: _ry: yep [00:06] isaacs: kriskowal: i think you can blame crockford for the parse/stringify naming convention. [00:06] CrockBot: Everytime Douglas Crockford blinks his eyes, another IE6 instance is killed. tobeytailor [00:08] kriskowal: yeah, i'm not above blaming the crock for things. i think it was probably a joke though. [00:08] isaacs: kriskowal: no, he wrote json.js, which became the basis for the JSON builtin [00:08] kriskowal: yeah, i know [00:08] isaacs: kriskowal: pretty sure he likes "stringify" [00:09] kriskowal: i had hoped he stole the convention from ruby or something, but i guess not [00:09] isaacs: and everyone got used to it, and by the time there were objections, it was too late. [00:10] kriskowal: ah, well, the standard include encode/decode, so while perfection is marred, we have a migration path to sanity [00:10] kriskowal: that's all i ask. don't need to bring my dueling pistols to jsconf [00:10] kriskowal: although it would be thematically appropriate [00:16] _ry: man. i accidentally commited a v8 patch of mine to node without realizing it [00:17] _ry: oh well, i need it anyway [00:17] isaacs: _ry: push upstream? [00:17] _ry: it's still being reviewed [00:18] isaacs: i see [00:18] isaacs: _ry: thoughts on removing require.*? [00:18] malkomalko has joined the channel [00:18] _ry: isaacs: sigh. i'd love to entertain thought about it, but i don't think the time is right [00:18] _ry: too many things in flux [00:19] isaacs: i see. [00:19] _ry: i'd rather the modules be more or less common js compliant [00:19] isaacs: _ry: yeah, that's my goal. [00:20] isaacs: not removing "require" [00:20] isaacs: removing require.async and require.uncached and so on [00:20] _ry: but require.async? [00:20] _ry: uncached doesn't exist [00:20] isaacs: require.async is very much in flux yet [00:20] isaacs: (scroll up) [00:20] isaacs: and that's also completely doable in a non-core module [00:20] devinus has joined the channel [00:21] _ry: oh [00:21] _ry: hmm.. i don't know [00:21] isaacs: require.ensure is a lot like existing module loaders for hte clientside, where sync isn't an option [00:23] isaacs: anyway, i'll see how little code it takes to do that, and maybe in a version or three we do it. [00:23] isaacs: gotta run. [00:30] mikeal has joined the channel [00:30] stepheneb has joined the channel [00:37] bmizerany has joined the channel [00:37] fictorial: _ry: could you spare some cycles and look at this? http://gist.github.com/357054 [00:44] figital has joined the channel [00:47] binary42 has joined the channel [00:48] figital has left the channel [00:49] _ry: fictorial: great! [00:49] _ry: thanks [00:49] _ry: very nice test [00:50] fictorial: In my experience you have to isolate things to a distinct test case that fails for anyone else to help you. [00:51] fictorial: after scanning the utf8Slice code and String::New etc it looks right so I'm a little confused why the terminating NULL is in there... [00:56] icey has joined the channel [00:56] CIA-77: node: 03Ryan Dahl 07master * r1b758ef 10/ (8 files in 4 dirs): Allow stream to write on close - http://bit.ly/bUmpZB [00:56] CIA-77: node: 03isaacs 07master * r4befe93 10/ (lib/ini.js test/simple/test-ini.js): Add ini.stringify functionality, a test, and some TODOs in ini.js - http://bit.ly/apSRZp [00:56] CIA-77: node: 03Ryan Dahl 07master * r3d751d0 10/ (lib/net.js src/node_buffer.cc test/simple/test-buffer.js): Fix bug in buffer.utf8Write() which included \u0000 - http://bit.ly/dpw8so [00:56] _ry: fictorial: here is a fix---^ [00:57] fictorial: wish I knew to look all over the place for that fix myself (lib/net.js? whoa) [00:57] fictorial: anyway, you're my hero [00:57] _ry: wait nevermind [00:58] fictorial: you are no longer my hero then [01:02] ditesh|cassini has joined the channel [01:03] alexiskander has joined the channel [01:03] sh1mmer has joined the channel [01:06] derferman has joined the channel [01:06] RayMorgan_ has joined the channel [01:10] deanlandolt has joined the channel [01:12] CIA-77: node: 03Ryan Dahl 07master * r53dd9fe 10/ (lib/net.js src/node_buffer.cc test/simple/test-buffer.js): Fix bug in buffer.utf8Write() which included \u0000 - http://bit.ly/bx4v1n [01:12] _ry: fictorial: okay here is your fix [01:12] _ry: was off by one [01:12] fictorial: thanks! [01:12] fictorial: I'm always off by one. Always. Office Space is based on me. [01:20] silentrob has joined the channel [01:22] icey: anyone here familiar with socket.io-node? [01:23] fictorial: _ry: thanks, that was my last failing test [01:23] fictorial: :) [01:23] dnolen has joined the channel [01:23] gwoo has joined the channel [01:30] _ry: man, it's pretty clear that WriteUtf8 isn't being used by chrome [01:30] _ry: it totally sucks. [01:31] fictorial: heh [01:32] ditesh|cassini has joined the channel [01:36] fictorial: _ry: BTW I did in fact rewrite the redis reply parser to be stateful. [01:46] softdrink has joined the channel [01:46] _ry: fictorial: cool [01:47] tilgovi has joined the channel [01:48] stepheneb has joined the channel [02:00] mcarter has joined the channel [02:01] bmizeran_ has joined the channel [02:11] rictic has joined the channel [02:12] statim has joined the channel [02:16] towski has joined the channel [02:21] dgathright has joined the channel [02:22] RayMorgan has joined the channel [02:26] admc has joined the channel [02:30] gwoo has joined the channel [02:34] confounds has joined the channel [03:03] bmizerany has joined the channel [03:05] bmizerany has joined the channel [03:07] gf3 has joined the channel [03:11] keeto_ has joined the channel [03:16] icey: has anyone gotten the socket.io demo running? the chat one? [03:19] ssteinerX has left the channel [03:25] mrjjwright has joined the channel [03:28] rictic has joined the channel [03:33] kriszyp has joined the channel [03:34] charlesjolley has joined the channel [03:43] icey has left the channel [03:44] mjijackson has joined the channel [03:48] sh1mmer has joined the channel [03:55] Yuffster_ has joined the channel [03:58] PyroPete1 has joined the channel [04:15] mjijackson has joined the channel [04:23] fictorial: ACTION is feeling a lot of yinst love in npm [04:33] emyller has joined the channel [04:39] mjr_ has joined the channel [04:53] devinus: _ry: how would you benchmark a tcp server? [05:00] joshbuddy has joined the channel [05:11] bronson has joined the channel [05:24] ditesh|cassini has joined the channel [05:39] mrjjwright has joined the channel [05:46] kriskowal has joined the channel [05:48] fictorial: http://twitter.com/fictorial/status/11683913862 thanks for the help everyone [05:49] felixge has joined the channel [05:49] felixge has joined the channel [05:53] mrjjwright has joined the channel [05:55] malkomalko has joined the channel [06:07] _ry: http://codereview.chromium.org/1594017 [06:07] _ry: really speeds up some of the tests [06:07] mikeal has joined the channel [06:10] nsm has joined the channel [06:17] brianmario has joined the channel [06:25] zam3858 has joined the channel [06:38] admc: window 1 [06:56] kjeldahl_ has joined the channel [07:22] bpot has joined the channel [07:23] kriskowal has joined the channel [07:34] keeto has joined the channel [07:35] kjeldahl_ has joined the channel [07:35] piranha has joined the channel [07:37] javajunky has joined the channel [07:40] felixge has joined the channel [07:40] felixge has joined the channel [07:54] teemow has joined the channel [08:10] maritz has joined the channel [08:12] TomY has joined the channel [08:23] hellp has joined the channel [08:24] tisba has joined the channel [08:42] piranha has joined the channel [08:56] botanicus has joined the channel [09:05] markwubben has joined the channel [09:08] hassox has joined the channel [09:08] dandean has joined the channel [09:11] mikeal has joined the channel [09:12] caolanm has joined the channel [09:14] caolanm: Has anyone had any success getting the upstart config from howtonode working on ubuntu lucid beta? http://howtonode.org/deploying-node-upstart-monit [09:21] micheil: caolanm: I'm not sure [09:22] micheil: caolanm: take note that the article there may be for an older version of node [09:26] caolanm: Perhaps I should try and get it working on karmic first, since I assume that's what the article was written for [09:26] caolanm: upstart seems a great idea, but its proving a real pain to use [09:26] micheil: caolanm: you could also try contacting Tim on github: http://github.com/Tim-Smart [09:27] micheil: caolanm: I'm not too familiar with server setup, but what of God and Monit..? [09:29] rtomayko has joined the channel [09:40] maushu has joined the channel [09:50] jazgot has joined the channel [09:51] hellp has joined the channel [09:52] piranha has joined the channel [09:53] mikeal has joined the channel [10:08] caolanm: micheil: upstart seems to work fine if I start it manually, even respawns the process... it just won't start it on startup [10:08] caolanm: "start on startup" never seems to fire :\ [10:08] micheil: hmm.. no idea then [10:09] caolanm: also tried "start on (local-filesystems and net-device-up IFACE=eth0)" ...which seems to fire, but I'm getting strange complaints of files not existing [10:09] botanicus has joined the channel [10:10] caolanm: ah well, maybe I'll send tim a message [10:12] MattJ has joined the channel [10:19] cmlenz has joined the channel [10:21] tbassetto has joined the channel [10:32] piranha_ has joined the channel [11:08] ditesh|cassini has joined the channel [11:09] tisba_ has joined the channel [11:24] demolithion has joined the channel [11:29] maushu: I think I had this issue before: http://github.com/ry/node/issues#issue/83 [11:29] maushu: It would send a whole image. Only part of it. [11:29] maushu: *wouldn't [11:31] piranha_ has joined the channel [11:34] javajunky: holy-cow the eclipse debugger support in node is now awesome, I just *assumed* it wouldn't work, doh! [11:39] maushu: Shame there isn't a js tld. [11:41] ditesh|cassini has joined the channel [11:49] ithinkihaveacat has joined the channel [11:56] kjeldahl has joined the channel [12:02] nsm has joined the channel [12:05] ssteinerX has joined the channel [12:09] nikhil_ has joined the channel [12:10] nsm has joined the channel [12:19] jamesduncan has joined the channel [12:25] kriszyp has joined the channel [12:43] jamesduncan has joined the channel [13:01] joshbuddy has joined the channel [13:01] joshbuddy has joined the channel [13:05] botanicus has joined the channel [13:05] gf3 has joined the channel [13:08] davidsklar has joined the channel [13:10] tekky has joined the channel [13:18] stepheneb has joined the channel [13:20] gf3: hey guys, I noticed that process.mixin is deprecated what's the alternative? [13:24] hassox has joined the channel [13:24] jherdman has joined the channel [13:24] gf3: hey jherdman [13:24] jherdman: hey gf3! [13:24] gf3: what's shakin'? [13:25] jherdman: a fresh cup of coffee, and ... that's about it. i'm trying to get motivated atm :) [13:25] gf3: mmm, I think I need a Timmy Ho's run soon [13:26] jherdman: hopefully you can get there and back before it starts raining again [13:26] matthewford has joined the channel [13:27] gf3: yea true, thankfully there is one just a few buildings down [13:27] gf3: balls, well I kind of found what I was looking for: http://github.com/ry/node/commit/c1613e6ebb37a74b103e600467c89e3df15d005c [13:28] jherdman: does anyone know why mixin is being removed? i think i missed that conversation [13:29] gf3: I don't think anyone's awake yet [13:29] TheEnd2012 has joined the channel [13:39] xla has joined the channel [13:42] felixge has joined the channel [13:42] felixge has joined the channel [13:49] confounds has joined the channel [14:13] softdrink has joined the channel [14:14] dnolen has joined the channel [14:18] nsm has joined the channel [14:19] javajunky: jherdman: because it was a 'flawed' approach : ( .. ie. there were lots of edge cases for which it didn't quite work [14:22] jherdman: do you have time to give me a quick example so that i might grasp the problem at hand? [14:23] paul___ has joined the channel [14:23] gf3: mhmm [14:24] javajunky: jherdman: fraid not, but it was all my fault :( I noticed a problem and submitted a (minor) fix for it , net result everyone decided it was rubbish and not meant to be part of 'sys' .. and it got deprecated :( [14:24] jherdman: hehe :) no worries. i'm sure it's somewhere in the IRC logs. if i get some ambition later i'll go hunting [14:25] alex-desktop has joined the channel [14:25] gf3: it just sucks that I have to write simple boilerplate now [14:27] softdrink: boilerplate for…? (i missed the first part of the conversation) [14:27] gf3: process.mixin [14:28] softdrink: ah [14:28] ashb: its like 20 chars isn't it? [14:28] jbowman has joined the channel [14:28] ashb: for( var i in o ) o2[i] = o[i]; [14:28] softdrink: what are you trying to do exactly? [14:28] gf3: yea, but now it's my responsibility to maintain it in my scripts [14:29] gf3: it's not difficult, I just liked the convenience [14:29] gf3: jussayin' [14:29] softdrink: there's the mootools server-side build… :) [14:29] aryounce has joined the channel [14:29] softdrink: though i haven't tried it with node honestly [14:30] gf3: mmm, I'm sure underscore would work as well [14:30] softdrink: probably [14:30] gf3: you could probably even build a custom version of Prototype [14:31] softdrink: i'm just biased 'cause i like moo ;) [14:31] gf3: jherdman: Timmies IV hooked in! [14:38] jherdman: well done, good sir :) [14:42] quirkey has joined the channel [14:45] CodeOfficer has joined the channel [14:45] creationix has joined the channel [14:46] creationix: Does anyone have experience using git submodules as a form of dependency management in node libraries? [14:47] gwoo has joined the channel [14:47] creationix: this is what I mean: http://github.com/creationix/wheat/blob/master/.gitmodules http://github.com/creationix/wheat/blob/master/lib/wheat.js#L1 http://github.com/creationix/wheat/tree/master/deps/ [14:48] creationix: I'm sure I'm not the first to think of this, so I'm wondering why it's not more widely used [14:48] Yuffster has joined the channel [14:48] creationix: there must be some drawback to it [14:49] jherdman: creationix my experience is that most people haven't used submodules [14:49] softdrink: dunno, but i think it's worth trying [14:49] creationix: other than the dependency on the git repository, it seems to work great [14:50] gf3: creationix: I've been using submodules for my libraries [14:51] gf3: creationix: it really simplifies things [14:51] creationix: gf3: do people get really confused when they have to do the extra init and update steps? [14:51] softdrink: we *just* started using submodules at work [14:51] gf3: creationix: I don't think so, if your instructions are clear [14:52] creationix: ok, so just put it in the readme then, I can do that [14:52] jherdman: i can only speak to using submods with Ruby, but gf3 is right. if the instructions are clear, people will be okay [14:52] gf3: creationix: I tried to make sure it was as simple as possible to get started [14:52] softdrink: creationix: start a de facto standard, much like "./configure && make && make install" [14:52] malkomalko has joined the channel [14:53] creationix: also, why is it that we don't use real Makefiles for this kinds of stuff [14:53] softdrink: because make syntax can be a pain in the ass [14:53] softdrink: that said, i use it. lol [14:53] creationix: have a "make install" command that gets the submodules and links the library into the user's .node_libraries folder [14:53] mikemike86 has joined the channel [14:53] softdrink: i propose a MakeItSoFile... [14:54] softdrink: ¬¬ [14:54] softdrink: ./engage [14:54] sudoer has joined the channel [14:54] creationix: I used to have a node script called ./do back before I made the Do library [14:54] gf3: creationix: I provide a one-line, copy & paste command in the README to get started: http://img.gf3.ca/67e3eb8d159c9c88660de5e66e1ee49e.png [14:55] ithinkihaveacat has joined the channel [14:55] softdrink: (sorry. i've been playing with picard.) [14:55] creationix: softdrink: that works [14:56] jherdman: i think Express used to use a Makefile to install submodules. he's all upons Kiwi now (which is pretty great, imho) [14:57] bpot has joined the channel [14:58] creationix: The thing I like about submodules is you don't have to worry about the user having the wrong version of a dependency [14:58] creationix: sure, if two libraries have the same dependency you're duplicating code on the HD, but code doesn't usually take a lot of space [14:58] gf3: unless they do stuff manually [14:59] gf3: e.g.: cd deps/lol && git pull origin master [14:59] creationix: can yo do that with submodules? [15:00] creationix: well, either way, there is no way to prevent users from breaking stuff on purpose [15:00] jherdman: yeah. you can manually update to any revision you want. that said, it's your own damn fault [15:00] gf3: creationix: yea submodules are full-on git repos, you can do anything you would a normal repo [15:00] gf3: creationix: even committing and pushing, etc... [15:01] creationix: but the update doesn't update the .gitmodules file in the parent right? [15:01] gf3: it does [15:01] jherdman: right, but you have to commit the change for it to be permanent though [15:01] gf3: yes [15:01] creationix: interesting [15:01] softdrink: there's potential for cross-dependency issues…. say you have some lib that you checked out ages ago that has a dependency on Foo, then you check out a shiny new lib that also has a dependency on Foo but it gets the newer one… what happens if you use both libs? [15:02] creationix: even package managers die in that case [15:02] softdrink: creationix: yeah but generally you'd only have one version of Foo that could be included in the end anyway, right? [15:03] gf3: softdrink: submodules can have submodules :) [15:03] creationix: hmm, I'm not sure about multiple levels [15:03] gf3: I am [15:03] softdrink: gf3: what i'm getting at is, what if you're using two libs that have the same dependency on a third lib, but one of the libs' version of the dependency is out of date... [15:04] gf3: softdrink: if those two libs used submodules as dependencies it is a non-issue [15:04] creationix: are there any package managers out there that get this right? [15:04] creationix: rubygems don't [15:04] softdrink: gf3: what if the user neglects to update one of the libs that they installed like a month ago? [15:05] gf3: "installed"? [15:05] softdrink: with other package managers you don't generally have duplicated code [15:05] creationix: if I had a clear path of how to implement a package manager it would be easy, but I can't think of any good prior art [15:06] softdrink: package management = brain hurt [15:06] creationix: rvm is pretty good with it's per-project set of gems [15:06] softdrink: yeah i kinda dig rvm [15:06] creationix: and multiple versions of ruby [15:06] creationix: nvm ;) [15:06] softdrink: hehe [15:08] binary42 has joined the channel [15:11] creationix: so the three main "problems" with submodules are duplicated code on the hard-drive, nested modules are hard, and the user has the extra steps to init and update the submodules [15:12] creationix: duplicated code solves the version mismatch issue of most package managers [15:12] creationix: hard-drives are large [15:12] mjr_: k [15:12] creationix: and a make file or clear instructions fixes the "hard" problem [15:12] deanlandolt: don't all those problems go away with fake submodules? [15:12] creationix: fake submodules? [15:13] mjr_: It turns out babies can press keys on keyboards. [15:13] softdrink: lies. [15:13] creationix: mjr_: yes, and even delete important emails, I would know [15:13] deanlandolt: creationix: http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb [15:13] softdrink: my netbook is missing the down arrow key thanks to my son *sigh* [15:14] mjr_: Wow. And I thought an errant and distracting 'k' was rude. [15:15] creationix: deanlandolt: the only problem with that is my free github account it getting full [15:15] creationix: easy on the end-user though [15:16] deanlandolt: creationix: heh...yeah, that limit's a little arbitrary...what's the cheapest paid account? [15:16] creationix: double the space for $7/mo [15:16] deanlandolt: ah, that's not terrible [15:16] creationix: no, it's just I haven't got paid since January, so it's a little tight right now [15:16] softdrink: i have server space and bandwidth available, at least temporarily… if node's package management system starts to get the same traffic as rubygems, it'd have to move.... [15:17] felixge has joined the channel [15:17] felixge has joined the channel [15:22] alexiskander has joined the channel [15:24] gf3: creationix: heh: http://github.com/creationix/wheat/blob/master/test/test.js#L4-5 [15:25] creationix: yeah, the Git library can read bare repos and full repos [15:30] micheil: creationix: beating me to the git lib? :P [15:30] creationix: just a simple wrapper [15:31] micheil: heh heh [15:31] creationix: I've got to get the new engine done this week [15:31] micheil: ACTION will one day finish up his git wrapper [15:31] micheil: rather, git library [15:31] creationix: micheil: mine is read-only and only the features that I need for the blog [15:32] micheil: yeah [15:32] creationix: i may add more later if there is demand [15:35] creationix: dang, __dirname doesn't resolve synlinks [15:36] creationix: that breaks my plans [15:37] creationix: is that a bug or is there a reason __dirname doesn't return the real file's directory? [15:37] aryounce has joined the channel [15:39] creationix: How do you resolve a symlink in node? [15:40] creationix: fs.stat gives nlink:1, but not the path [15:40] creationix: micheil: you were working on this a while back, right? [15:41] micheil: umm.. [15:41] micheil: i think there's something like realpath [15:41] micheil: it's been ages since I've been able to do any node related stuff, so I can't really remember [15:44] mikemike86 has joined the channel [15:44] Yuffster has joined the channel [15:44] rednul has joined the channel [15:44] zol has joined the channel [15:48] TomY: is there a way to get the current time in node, or to time an operation? [15:50] gf3: Date [15:50] TomY: does it work like the client-side? [15:50] TomY: ACTION goes to check :-) [15:51] gf3: TomY: ECMA262 3rd edition is fully implemented [15:51] gf3: and some fancyness from the 5th edition [15:51] TomY: of course [15:51] TomY: ACTION feels a little silly now :-o [15:52] brainproxy has joined the channel [15:59] sh1mmer has joined the channel [16:00] charlesjolley has joined the channel [16:00] cadorn has joined the channel [16:01] RayMorgan has joined the channel [16:04] dandean has joined the channel [16:12] nsm has joined the channel [16:13] stepheneb has joined the channel [16:21] creationix: does anybody want to test my install script to see if it "just works" [16:21] mrjjwright has joined the channel [16:22] mjijackson has joined the channel [16:28] JimBastard has joined the channel [16:29] silentrob has joined the channel [16:31] bpot has joined the channel [16:36] JimBastard: fucking retards in #ruby-lang [16:37] aryounce has joined the channel [16:38] lifo has joined the channel [16:38] aryounce_ has joined the channel [16:42] kriskowal has joined the channel [16:42] technoweenie: heh [16:46] steadicat has joined the channel [16:46] JimBastard: sup technoweenie [16:46] JimBastard: i heard you are at github now [16:47] JimBastard: (well i read it) [16:47] sztanpet has joined the channel [16:52] technoweenie: yup [16:53] JimBastard: cool stuff man, i got banned from github the other week by tekkub [16:54] JimBastard: abusing undocumented unthrottled APIs [16:54] JimBastard: i got unbanned though [16:54] technoweenie: naughty [16:59] sh1mmer has joined the channel [17:01] isaacs has joined the channel [17:02] piranha has joined the channel [17:05] devinus has joined the channel [17:05] creationix: naughty is JimBastard's middle name [17:06] JimBastard: yeah im constantly inviting strange men from the internet over to my house [17:06] JimBastard: right creationix ;-) [17:06] creationix: yep [17:07] JimBastard: any luck getting air and tickets to jsconf? [17:07] kjeldahl has joined the channel [17:08] dgathright has joined the channel [17:09] creationix: no [17:09] sh1mmer has joined the channel [17:10] fizx has joined the channel [17:11] softdrink: "JimNaughtyBastard"? [17:12] fizx has joined the channel [17:12] JimBastard: it's actually James B. Basterington III [17:13] JimBastard: bastard is my middle name [17:13] softdrink: Esq. [17:13] softdrink: SSC BSC [17:13] devinus: How would you guys implement an FSM in the context of node.js? as an eventemitter ? [17:14] JimBastard: http://www.reddit.com/r/funny/comments/7o4pc/one_of_the_many_reasons_i_got_banned_from/ [17:14] felixge has joined the channel [17:14] felixge has joined the channel [17:14] softdrink: FSM.blessWith(FSM_NOODLEY_APPENDAGE); [17:15] JimBastard: finite state machine? [17:15] devinus: JimBastard: yes [17:15] technoweenie: devinus: yea that sounds good [17:16] technoweenie: you'd have something to define the events with any guards [17:16] JimBastard: i think hook.io is implemented as a FSM [17:16] devinus: i'm trying to wrap my mind around using an fsm in a completely async manner.... [17:16] JimBastard: we use event emitters [17:16] technoweenie: async? that might be awkward. [17:16] devinus: technoweenie: yeah....tell me about it [17:16] devinus: maybe i'm smoking doobies [17:17] JimBastard: if you cant tell if you are we should have a talk [17:17] JimBastard: i have some informative reading materials [17:17] softdrink: what are you trying to do exactly? [17:17] devinus: but i need an fsm and i dont want to break the asynchronicity of my app [17:18] JimBastard: doesn't seem like it would be that complex to implement [17:18] JimBastard: i'd have to see bidness requirements though [17:19] silentrob has joined the channel [17:19] devinus: JimBastard: having a generic fsm would be nice [17:19] devinus: JimBastard: like this: [17:19] bronson has joined the channel [17:19] devinus: JimBastard: http://antsdev.wordpress.com/2008/06/18/a-simple-js-finite-state-machine/ [17:22] JimBastard: seems simple enough devinus [17:22] JimBastard: are you worried about entering a new state before the previous one async completed? [17:23] JimBastard: brb coffee [17:24] devinus: JimBastard: right [17:25] CIA-77: node: 03Vanilla Hsu 07master * rd7a4501 10/ wscript : freebsd install execinfo's header to /usr/local, add it to include path. - http://bit.ly/cfXNrZ [17:25] devinus: JimBastard: keep in mind that i'm pretty new to this whole fsm and async stuff... [17:25] devinus: learning as i go [17:31] JimBastard: its cool devinus im the biggest noob of them all [17:31] JimBastard: in fact, I am King of all Noobs [17:32] JimBastard: im assuming there is a generic approach when dealing with async and FMS, going from state to state [17:32] tlrobinson_ has joined the channel [17:32] JimBastard: in route.js (which is a client-side routing / state machine i did) we didn't really care if a state finished [17:32] JimBastard: if you triggered a new state before the old one completed it jut got tossed [17:32] JimBastard: im assuming that would be sufficient for your problem [17:37] JimBastard: errr [17:38] JimBastard: im assuming that WONT be sufficient for your problems, sorry devinus [17:38] paul___ has joined the channel [17:38] JimBastard: >.< [17:38] charlesjolley has joined the channel [17:39] creationix: http://thechangelog.com/post/501053444/episode-0-2-0-node-js-with-felix-geisendorfer [17:39] creationix: it's live [17:40] sh1mmer has joined the channel [17:41] creationix: ACTION listening to Felix [17:41] JimBastard: unless he says when v2 of dirty is coming i ain't listening :p [17:42] devinus: JimBastard: route.js ? [17:42] creationix: he talks about dirty [17:42] JimBastard: devinus: kinda unrelated to your issue [17:42] JimBastard: more of a client-side tool [17:43] JimBastard: there are a few node.js server-side routing solutions though [17:43] botanicu_ has joined the channel [17:43] creationix: devinus: I wonder if conductor would help. http://github.com/creationix/conductor [17:44] creationix: it's a control-flow library with automatic dependency resolution [17:44] JimBastard: creationix: is it Do, Step, or Conductor? lol [17:44] creationix: they are three different libraries [17:45] JimBastard: they all kinda do the same thing? [17:45] JimBastard: just diffirently? [17:45] creationix: they all try to solve the same problem, but in very different ways [17:45] mjr_ has joined the channel [17:45] JimBastard: got ya [17:45] JimBastard: i think some control flow lib would help devinus [17:46] creationix: Do makes stuff work continuable style and adds some utilities. [17:46] JimBastard: i think he just needs to block or queue new events until his previous event completes [17:46] creationix: Step is my favorite for small stuff [17:46] creationix: I just added docs to it so it should be easier to understand [17:46] JimBastard: Step is the one where you pass functionas as arguments right? [17:46] JimBastard: Step (fn, fn, fn) [17:48] mape has joined the channel [17:48] creationix: yep [17:48] creationix: http://github.com/creationix/step [17:49] mape: If I want to interface with a mysql db, is there any currently working code to do that? I've tried 2 and they don't seem to be working with the latest version of node.js. [17:49] tmpvar has joined the channel [17:49] tmpvar: felixge, congratz on the changelog interview! [17:50] javajunky has joined the channel [17:50] JimBastard: mape you might have to checkout a specific branch of node [17:50] JimBastard: are you using HEAD? [17:50] mape: I did a git pull [17:50] sveisvei has joined the channel [17:51] JimBastard: yeah, the node api is still changing [17:51] JimBastard: if you want to use a lib you'll have to find which version of node it's built against and use that [17:51] JimBastard: until v1.0 expect breaking changes [17:51] mape: tried http://github.com/sidorares/nodejs-mysql-native and http://github.com/masuidrive/node-mysql and none seemed to work at all [17:51] mape: Ah ok.. [17:51] JimBastard: masuidrive is probaly the better [17:52] JimBastard: i heard that guy writes code in the bathtub [17:52] mape: Yeah node.js >= 0.1.33 [17:52] mape: Hehe [17:52] JimBastard: the breaking changes kinda suck, but its for the better [17:53] mape: Error: addListener only takes instances of Function [17:53] mape: What might that be? [17:54] creationix: mape: the first arg needs to be the event name [17:54] mape: First arg to the connect? Or the constructor? [17:54] sh1mmer has joined the channel [17:54] creationix: addListener [17:55] creationix: http://nodejs.org/api.html#_events [17:55] mape: Hmm k, I copypasted the test example so figured it would work but, I'll start digging, thanks :) [17:57] devinus: creationix: conductor looks cool, but not really what i need :-) [17:57] devinus: i def need a straight up old skool fsm [17:57] creationix: what's your problem that you're trying to solve devinus: [17:57] mape: Hmm strange, seems he is passing args in the example but the code takes callback [17:57] devinus: evented :-/ [17:58] mape: There we go, seems he just switches them [17:58] devinus: creationix: there can be step 1, step 2, step 3, if step 2 fails, go back to step 1, step 3 fails go back to step 2, that kind of thing [17:58] creationix: ahh, no conductor can't handle branches on the control flow [17:58] devinus: right [17:59] devinus: so im guessing i need some kind of callback for each branch [17:59] isaacs: devinus: what's the use case for this? [17:59] admc has joined the channel [17:59] isaacs: devinus: i mean, do you really need a general purpose branching control flow util, or is there a simpler way perhaps to get what you need? [18:00] devinus: isaacs: hrm...um...let's say, for example a multi-user dungeon signup process that takes you through choosing a name, race, character class, etc [18:01] steadicat has joined the channel [18:01] isaacs: right, and if you don't choose a class, it says "Error" and goes back to the signup process. [18:01] mjr_: If you wrote this in client-side JS, would you still be wanting some fancy control library? [18:01] JimBastard: devinus: are you trying to build this as a command line app? [18:01] isaacs: devinus: can't that logic be encapsulated in the signup class? [18:01] devinus: JimBastard: just an example of a use case [18:02] isaacs: devinus: i mean, what's your *actual* use case? [18:02] JimBastard: i mean, i would build that shit client-side [18:02] devinus: isaacs: well, the reason for using an fsm is to easily define new states. i dont want crazy boolean logic and switch statements, just an fsm [18:02] charlesjolley has joined the channel [18:02] JimBastard: and pass a message containing the info the API [18:02] JimBastard: and validate [18:02] silentrob has joined the channel [18:02] JimBastard: devinus: maybe use routes? [18:03] JimBastard: where each unique route represents a state? [18:03] devinus: JimBastard: oh, it's server-side, there is no client [18:04] devinus: sorry i didnt mention that sooner [18:04] charlesjolley has joined the channel [18:05] devinus: erlang has a gen_fsm methodology i wish i could use [18:05] devinus: but with node.js i have callbacks or an eventemitter [18:05] isaacs: devinus: how about just porting that? [18:05] devinus: as my tools [18:05] devinus: isaacs: porting what? [18:05] isaacs: devinus: gen_fsm [18:06] devinus: isaacs: completely different paradigm i think [18:06] aho has joined the channel [18:06] isaacs: devinus: use turing completion! [18:06] devinus: isaacs: brain asplod [18:06] isaacs: gotta run, bbiab [18:06] devinus: isaacs: k [18:07] sztanphet has joined the channel [18:07] mape: creationix: JimBastard if anyone else comes in here asking a similar question it seems the issue is that masudrive had some issues in the example, the conn.connect() shouldn't take the user/pass args, it should be empty, and the new mysql.Connection() should take the args [18:08] JimBastard: yo mape [18:08] JimBastard: what am i? [18:08] JimBastard: the issues tab on github? [18:08] JimBastard: ;-D [18:08] JimBastard: open an issue with that shit [18:08] mape: nah, just figured a good thing to know figuring you tried helping :D [18:08] JimBastard: now you are contributing! huzuaah [18:09] creationix: mape: this is the mysql library right? [18:09] mape: Yes, masuidrive / node-mysql [18:09] JimBastard: create a github issue mape, that will help other people [18:09] mape: JimBastard: Doing it right now [18:09] JimBastard: i don't have enough ram to remember yoru solution [18:09] JimBastard: awesome! you da the man [18:09] mape: Hehe k [18:10] JimBastard: i create issues for my opensource projects all the time, except nobody seems to ever fix them [18:10] gwoo: haha [18:10] JimBastard: github should add a feature that automatically fixes issues you create [18:16] fictorial: It's time for me to pick a WebSockets implementation for Node.js. What are you guys using for WS? [18:16] atmos: fictorial: ws.js [18:16] atmos: fictorial: what's up with the require("net") in node-redis-client ? [18:17] JimBastard: sup atmos [18:17] JimBastard: im Marak from the github if haven't figured it out [18:17] atmos: ahh, cool [18:17] atmos: i didn't put that together :) [18:17] JimBastard: aye, ive been keeping an eye on your hooking stuff [18:18] JimBastard: im probaly gonna setup hookIO as a plugin or whatever for express [18:18] JimBastard: hookIO itself is a valid CommonJS module, so it shouldnt be too hard [18:18] creationix has joined the channel [18:18] atmos: that'd be awesome, i'm *almost* done with what i've been trying to accomplish [18:18] javajunky has joined the channel [18:19] JimBastard: im still a bit aways from hook.io being usefull, but its getting there one commit at a time [18:19] JimBastard: doing a talk at ScruvyConf / JsConf about it [18:19] atmos: i wish i was going to jsconf [18:19] JimBastard: did the yard get any tickets? [18:19] atmos: i'm giong to dc this weekend to give a ruby talk that i haven't started yet :\ [18:20] atmos: nope, maybe yehuda [18:20] JimBastard: my boss here is like friends with yehuda from back when [18:20] JimBastard: whenever we have ruby / jquery arguments my boss does what i call, dropping a Y bomb [18:21] atmos: HAHA [18:21] JimBastard: "yehuda says x" [18:21] atmos: where do you work ? [18:21] atmos: hah [18:21] JimBastard: do you work with yehuda? [18:22] caolanm has joined the channel [18:22] atmos: i used to [18:22] atmos: he's been pretty much just doing merb/rails for 18 months [18:22] atmos: i worked on an internal tools team for a while when i was remote, now i sorta work on everything [18:23] JimBastard: got ya [18:24] atmos: node is a pleasant escape from the ruby overload i experience at work [18:25] JimBastard: yeah, I've been suffering with a mild case of Rails Rage for a couple months [18:26] fictorial: atmos: what about the require("net")? [18:26] atmos: fictorial: is that included in node or is it from somewhere else ? [18:26] JimBastard: all i want from my back-end is a good JSON-RPC / JSONP API [18:26] fictorial: net replaced tcp [18:26] JimBastard: and have it serve shit tons of requests fast [18:27] atmos: fictorial: do i have to install from github ? [18:27] atmos: i'm on .33 [18:27] fictorial: there's a note in the README.md about compatibility [18:27] atmos: JimBastard: yeah we have a fleet of sinatra apps, three merb apps, and a ton of gems [18:27] atmos: fictorial: k [18:28] atmos: JimBastard: i haven't written rails in like 2+ years [18:28] JimBastard: hey creationix it looks like you might be fixing a hook.io issue today! http://github.com/Marak/hook.io/issues#issue/13 lol [18:28] creationix: JimBastard: how so? [18:28] JimBastard: actually not at all [18:28] JimBastard: oops [18:28] JimBastard: thats for git, not github [18:28] creationix: node-blog has this somewhat [18:29] creationix: you can look in it [18:29] JimBastard: shouldnt be too hard [18:31] JimBastard: i can make the Github.js protocol just accept post commits for now anyway [18:31] JimBastard: sorry i got confused [18:32] creationix: now if you can find a way to query remote repos, I would be interested in that [18:32] creationix: node-git only supports local repos currently [18:32] creationix: `git show` is the main command I need [18:33] mikeal has joined the channel [18:34] caolanm: anyone had any success getting the upstart example on howtonode.org to work? http://howtonode.org/deploying-node-upstart-monit [18:34] creationix: somewhat [18:35] creationix: it only works for me on some apps [18:35] caolanm: any idea why it might work for some but not others? [18:35] caolanm: as far as I can tell 'start on startup' doesn't seem to fire at all [18:36] creationix: caolanm: no idea, here is the config for one of mine that works http://pastie.org/906069 [18:36] creationix: if I keep the exact same config and just change paths, another app won't start [18:36] mikeal: i think i'm gonna have a BBQ this Friday [18:36] mikeal: you all are invited [18:37] caolanm: creationix: I just asked about some of this in #upstart with no luck [18:37] caolanm: they seem confident it should work [18:37] creationix: caolanm: one thing is to test your app from the root directory [18:37] creationix: that way you'll know if it's a path issue [18:37] caolanm: good idea, I'll give it a go [18:37] creationix: node /full/path/to/app.js [18:38] creationix: mikeal: where do you live again? [18:39] caolanm: creationix: yeah, that works... in fact I can 'start appname', 'stop appname' etc... it even respawns fine, it just won't load on startup! [18:39] creationix: oh, that's the easy part [18:39] creationix: hmm, but I'm guessing you already set it to start on boot according to the blog post [18:40] caolanm: yeah, as far as I can tell it just never runs the script [18:40] WALoeIII has joined the channel [18:41] charlesjolley has joined the channel [18:41] creationix: also upstart has a restart directive that does most of what monit does [18:42] caolanm: respawn? [18:42] mikeal: creationix: Oakland! [18:43] creationix: hmm, that a long walk from Dallas [18:43] webben has joined the channel [18:44] creationix: yeah, and looking at the article, I'm realizing it's missing a couple of key points [18:45] lifo has joined the channel [18:45] creationix: I seem to remember there was a command you had to issue to tell upstart what runlevel to start your service under [18:46] qFox has joined the channel [18:47] creationix: hmm, no the start on and stop on config options in the file should be enough [18:48] nefD: hrm.. looks like theres been some early work on module reloading (according to the google group), i'm guessing this sort of thing is still unavailable unless you're ready to apply some patches to the node source? [18:48] statim has left the channel [18:48] caolanm: creationix: I think its possible to do "start on runlevel 3" [18:48] caolanm: but that doesn't seem to work for me either [18:48] creationix: runlevel [3] [18:48] creationix: if you want that syntax [18:49] caolanm: ah ok :) ..brb, just realised I'm running irssi on the same server I want to test upstart on, d'oh! [18:49] creationix: oops [18:49] caolanm has left the channel [18:51] creationix: caolanm: found the docs http://upstart.ubuntu.com/wiki/Stanzas [18:51] creationix: the respawn stanza is what I mean by restart [18:52] JimBastard: is http://github.com/defunkt not working for anyone else? [18:52] JimBastard: there we go [18:52] JimBastard: odd [18:56] brianmario has joined the channel [18:57] caolanm has joined the channel [18:58] kriskowal has joined the channel [19:01] dandean has joined the channel [19:03] piranha has joined the channel [19:06] botanicus has joined the channel [19:06] jherdman has joined the channel [19:09] nefD: hrm.. so- I suppose rather than worrying about hot-reloading modules, you could theoretically have a node script running as a daemon (using that nifty node.daemon module), and have that script spawn one or more child processes of the 'worker' nodes which would need reloading, and when necessary, instruct the daemon to kill and restart the child process(es) as needed.. [19:12] steadicat has joined the channel [19:14] creationix: nefd: yes, that would work [19:14] creationix: also it would allow you to scale to multiple processors [19:14] creationix: JimBastard: http://news.ycombinator.com/item?id=1245250 [19:14] _ry: yey, v8 patch1 landed http://code.google.com/p/v8/source/detail?r=4352# [19:14] atmos: fictorial: around ? [19:14] creationix: _ry: awesome [19:15] fictorial: atmos: kind of, what's up? [19:15] atmos: can you push the node_0.1.33__redis_1.3.8 tag as a kiwi version of like 0.0.1 or something ? [19:16] atmos: upgrading to the latest stuff breaks a bunch of other libs i'm using atm [19:16] atmos: well, upgrading off of node 0.1.33 [19:16] nefD: creationix: Ah so! Yea, didn't consider that benefit.. [19:16] fictorial: Yeah I think so. Hang on. [19:16] creationix: _ry: quick question, will there be a 0.1.34 version or will we wait till 0.2.0 is ready? [19:17] _ry: creationix: i think i'm going to release 0.1.90 next [19:17] _ry: :) [19:17] xla has joined the channel [19:17] creationix: ahh, like a RC [19:17] _ry: should be out soon [19:18] creationix: will there be major api changes between 0.1.90 and 0.2.0? [19:18] creationix: or just bugfixes [19:19] nefD: <3 _ry <3 [19:19] _ry: creationix: um - not sure yet [19:19] creationix: ok, just wondering [19:19] _ry: i think i'm going to rename close() to end() and forceClose() to destroy() [19:20] creationix: so maybe some minor changes then, but nothing major like removing promises or moving childprocess to it's own module [19:21] _ry: well that rename will be a rather major change [19:22] creationix: I guess so, but nothing a search and replace won't fix. Removing promises made us rewrite code structure or pull in the compat library [19:22] gwoo has joined the channel [19:22] JimBastard: having issues today binary42 ? [19:23] binary42: JimBastard: Hah. Just joking with some people in #couchdb. [19:23] pedrobelo has joined the channel [19:23] binary42: jan____ seems to like his suffix. So I was going for the longest prefix. [19:24] JimBastard: Crockford approves [19:24] CrockBot: When Douglas Crockford says, "The Software shall be used for Good, not Evil." He means it. troynt [19:24] binary42: /"/"/ [19:24] fictorial: atmos: so, sort of. version 0.1.0 is up there now on kiwi. however, it does not work with kiwi's loader (file not found); I guess because there's no lib/ directory. I suggest just checking out the tag and bundling it with your app for now. [19:27] JshWright has joined the channel [19:28] towski has joined the channel [19:28] atmos: fictorial: k [19:28] dekroning has joined the channel [19:29] JshWright: having some trouble running Express on Node.js... Node complains it is unable to load the module 'multipart', I've also tried creating a simple test file that just requires 'multipart', and that fails with the same error, any suggestions? [19:29] cloudhead has joined the channel [19:29] atmos: JshWright: node out of git / [19:30] atmos: looks like it's only in .33 [19:30] JshWright: atmos: I'm using the latest git checkout, are you suggesting I should use the .33 tarball? [19:30] atmos: JshWright: yeah [19:30] JshWright: I'll give that a go, thanks [19:30] atmos: _ry: when is .34 coming out ? [19:31] _ry: atmos: next release hopefully today (maybe tomorrow) [19:31] atmos: awesome [19:32] creationix: _ry: I know you're generally against changing the built-in javascript language, but I think a simple Object.prototype.forEach built-in would be really handy, what do you think? [19:32] Wandrewvious has joined the channel [19:32] creationix: I've got a clean implementation that is super fast and doesn't break for..in loops [19:33] deanlandolt: creationix: narwhal has a moar-monkeys module that patches Object's proto with this kind of stuff...patching Object.prototype is the kind of think you only have to do once for a given app [19:33] stepheneb has joined the channel [19:33] creationix: I know, I use my proto library, I just think it's so useful that it should be built-in [19:34] creationix: just forEach and maybe map, nothing more [19:34] _ry: creationix: no, sorry [19:34] creationix: ok, no problem, just wondering [19:34] deanlandolt: heh...i agree -- but the place to start is by barking at ecma for inclusion in es-next :) [19:35] teemow has joined the channel [19:35] creationix: I wonder why they never added a forEach to objects, I'm sure it's been brought up before [19:36] JimBastard: ask Crockford [19:36] CrockBot: Douglas Crockford dreams in obfuscated JavaScript. stevestreza [19:36] creationix: I'll ask him at texasjs [19:36] fictorial: anyone have a problem receiving the onmessage callback using websockets? I know it's a little off-topic, sorry. I'm testing node.ws.js [19:37] binary42: Which side? [19:38] fictorial: me? onmessage is client side [19:40] rtomayko has joined the channel [19:41] atmos: fictorial: nope, i have some working examples if you wanna take a look [19:41] fictorial: nope what? sure, thanks [19:42] fictorial: oh [19:42] fictorial: very odd - says its sending to the browser but then nada, no onmessage callback [19:42] atmos: http://github.com/atmos/molly that should work [19:42] atmos: check the readme for how to run it [19:44] tav has joined the channel [19:47] botanicus has joined the channel [19:47] fictorial: thanks, but that's kind of huge. I'm just trying to get the very simplest thing working first. [19:48] fictorial: I'm now somehow consistently crashing Chrome [19:48] fictorial: when the message is sent [19:48] fictorial: downgraded to node 0.1.33 to try that out and boom [19:49] fictorial: http://gist.github.com/358003 [19:51] fictorial: atmos: does that example in the gist work for you? [19:51] WALoeIII has joined the channel [20:06] fictorial: are most of you guys on the west coast of the US because I think you all just went to lunch :) [20:06] JimBastard: im on the east coast [20:06] JimBastard: and not taking lunch today [20:07] mjr_: Take out Indian food is delicious. [20:07] aryounce has joined the channel [20:08] fictorial: I used to live in Curry Hill (cf. Murray Hill) in NYC. Food was amazing. [20:08] JimBastard: i live in curry hill [20:08] JimBastard: dahba [20:09] JimBastard: handi (if its 3am) [20:09] JimBastard: im right across the street from the Charlie Paan shop [20:09] JimBastard: fictorial [20:13] JimBastard: fictorial are you still in nyc? do you goto nyc.js? have we met? [20:15] binary42: fictorial: Very good agreed. If you are still around NYC you should def. come by thursday's NYC.js meeting. [20:16] fictorial: atmos: chrome on mac issue -- nightly webkit works fine. thanks for your sample anyway. [20:16] fictorial: binary42: I know... one of these days I need to get down there. [20:16] fictorial: I've been working literally 15 hours a day for months [20:17] binary42: fictorial: Understand that one. We have meetings every month and hopefully a new hack event coming up too so any time. [20:17] fictorial: awesome, thanks! [20:17] JimBastard: i also host unoffical laptop parties in the curry hill on occasion [20:19] binary42: Rooftop hacking ftw! [20:20] binary42: JimBastard: btw, I left my power adaptor there. [20:21] JimBastard: ohh yeah i noticed that actually [20:21] JimBastard: forgot [20:21] JimBastard: come by whenever i have it [20:21] binary42: Yeah. Will do. I have a spare so I'll be good for now. [20:28] towski has joined the channel [20:28] JimBastard: i read that really fast binary42 and it looked like you said, "spear" [20:29] JimBastard: i was like damn im sorry [20:29] JimBastard: please dont stab me [20:29] tisba has joined the channel [20:29] binary42: I have one of those too, but they are reserved for poor students looking for internships. [20:30] JimBastard: grumble [20:30] mrjjwright has joined the channel [20:31] charlesjolley has joined the channel [20:52] teemow has joined the channel [20:53] felixge: _ry: I think I forgot to tell people to use released versions [20:54] _ry: felixge: it was a really good interview though. You did much better than I would have [20:55] _ry: ACTION is trying his hand at V8 hacking. it's very scary [20:55] felixge: _ry: ok, glad you don't think I completely butchered it :) [20:55] _ry: this is the first time i've ventured beyond api.cc and platform*.cc [20:55] felixge: _ry: did somebody look at your string patch yet? [20:55] _ry: yeah it got accepted [20:55] indiefan has joined the channel [20:56] mikeal: are we pretty sure that issue 77 goes away with all the new net code? [20:56] mikeal: http://github.com/ry/node/issues#issue/77 [20:56] felixge: _ry: nice! [20:56] _ry: mikeal: i thought that was fixed with something else [20:56] bmizerany has joined the channel [20:57] mikeal: it's still open and there aren't any comments [20:57] mikeal: rnewson ended up writing what he needed in erlang so he's not checking anymore [20:57] devinus: man [20:57] _ry: wow! wtf [20:57] _ry: my patch worked [20:57] _ry: uh sweet. [20:57] devinus: ACTION still struggling with writing an async fsm [20:58] _ry: http://pastie.org/906361 [20:59] devinus: _ry: what does that patch do ? [21:00] devinus: _ry: oh you're modifying v8 itself [21:00] _ry: it makes WriteUtf8 fast [21:01] devinus: _ry: i'm sure the v8 guys would like that patch [21:01] _ry: heh, i actually have no idea what i'm doing [21:02] _ry: but i found what appears to be an unused bit in the instance type field [21:02] _ry: and am using it to indicate if the string has been written out before or not [21:05] gf3: hey _ry, will we ever see a replacement for process.mixin [21:05] gf3: ry_, also process.mixin is still mentioned twice in: http://github.com/ry/node/blob/master/doc/api.markdown [21:05] sztanpet has joined the channel [21:09] _ry: gf3: yeah the docs need work before the next release [21:09] _ry: i keep forgetting about it [21:09] _ry: i'm just a bit distracted atm by 8 [21:09] _ry: v8 [21:11] joshbuddy has joined the channel [21:11] joshbuddy has joined the channel [21:11] gf3: _ry: no worries, will there be another incarnation of process.mixin? I understand it's trivial for me to implement, it was just very convenient is all. [21:12] isaacs: gf3: it's trivial to have it in your code. it's not trivial to put it in node in a way that everyone expects to work the way that they think it should (since that involves a lot of contradiction) [21:12] isaacs: gf3: qv. the mailing list discussions. [21:21] gf3: isaacs: cool, thanks [21:22] admc has joined the channel [21:27] nefD: hmm.. so by running a daemon process (via daemon.node) as a front end to another node script, it would also make it easier to detect if the target script bombs out for any reason, and provide a simple way to instantly restart it.. bypassing the need for monit [21:27] nefD: ACTION hopes daemon.node stays updated [21:27] _ry: http://codereview.chromium.org/1594017 [21:28] _ry: the most hardcore code i've ever touched [21:29] _ry: gf3: no, no mixin [21:30] gf3: _ry: thx [21:33] _ry: mikeal: right. it's not fixed. [21:33] mikeal: damn [21:34] orlandov: _ry what is meant by "flattening" a string? [21:35] Elfix has joined the channel [21:35] mattly has joined the channel [21:43] binary42 has joined the channel [21:48] devinus: orlandov: if it means what i think it means => [['a', 'b', 'c'], 'd', 'e', 'f'] = 'abcdef' [21:49] orlandov: i think it has something to do with v8 string internals but it's a bit over my head [21:51] bronson has joined the channel [21:52] lifo has joined the channel [21:52] _ry: orlandov: when you concat a string, the new string just has a pointer to each part [21:53] _ry: orlandov: flattening it creates new space and writes it out as a single object [21:53] orlandov: ah, got it [21:53] _ry: oh, i got denyed. i guess that wasn't the correct way to do it [21:54] orlandov: what was the reasoning behind the denial? [21:55] _ry: 1http://groups.google.com/group/v8-dev/browse_thread/thread/63f61953c3f7d455 [21:56] fictorial: is there some function built-in to Node that takes an Object and merges in another Object? Oh, I suppose mixin but that's deprecated. [21:56] dnolen has joined the channel [21:56] fictorial: I like to take an Object representing options and set defaults where the user-given options are missing [21:57] fictorial: The defaults would be the object to merge [21:57] isaacs: fictorial: easy, just use __proto__ [21:57] isaacs: fictorial: conf.__proto__ = defaultConfigs [21:58] isaacs: then the stuff directly on conf will override whatever's in the default, and you don't even have to have the vm copy anything. [21:58] orlandov: oh- neat [22:00] fictorial: oh neat is right; see, that is why I ask potentially silly questions. thanks! [22:00] devinus: what's an simple example of an eventemitter in code ? [22:00] devinus: i need it to meditate on [22:01] micheil: orlandov: was your mongodb client the one that worked really well, or was that the other guys? [22:03] javajunky: micheil: the other guy is christkv .. dunno which driver you consider to be better though ;) [22:04] micheil: I heard one worked / passed all it's tests and the other didn't [22:05] javajunky: christkv's is the one I use, all its tests seem to work [22:05] javajunky: http://github.com/christkv/node-mongodb-native [22:06] orlandov: micheil: mine's the C++ driver, i haven't worked on it recently [22:07] orlandov: i wouldn't be surprised if things have bit rotted [22:07] micheil: okay, cool [22:14] bmizerany has joined the channel [22:21] mrjjwright has joined the channel [22:22] charlesjolley has joined the channel [22:25] CIA-77: node: 03Ryan Dahl 07master * rca0038b 10/ src/node.cc : Add mising EV_DEFAULT_UC in ev_now() - http://bit.ly/avLZ0d [22:25] quirkey_ has joined the channel [22:25] hellp has joined the channel [22:30] fictorial: Linkinus likes to play random alert noises - scared the crap out of me. [22:35] darkf has joined the channel [22:44] chakrit has joined the channel [22:44] chakrit1 has joined the channel [22:45] hassox has joined the channel [22:46] chakrit has joined the channel [22:47] gf3 has joined the channel [22:48] tmpvar has joined the channel [23:01] mattly has joined the channel [23:04] charlesjolley has joined the channel [23:05] devinus has joined the channel [23:10] mattly: hm [23:10] mattly: i kinda wish that anything that took a callback would also return an eventEmitter emitting "error" and "done" events [23:11] mattly: it seems like i'm writing a lot of unnecessary glue code between callbacks and EventEmitters [23:11] mattly: :/ [23:12] r11t has joined the channel [23:12] orlandov: like a promise? :) [23:12] chakrit: like http://github.com/kriszyp/node-promise ? [23:12] mattly: heh [23:13] mattly: i came to node after promises were removed [23:14] mattly: so i really have no idea what all they embodied [23:14] orlandov: yeah, they were removed from core not too long ago, but you can still use them for your stuff [23:14] mattly: other than being EventEmitters that could block [23:14] mattly: right [23:15] chakrit: there's also node-do [23:16] chakrit: the thing with js is that it's really easy to roll your own [23:16] brainproxy has joined the channel [23:16] mattly: right [23:16] chakrit: if you want [23:16] mattly: i've got my own that i'm working on [23:16] r11t_ has joined the channel [23:17] chakrit: I'm listening to github podcast where felix is talking about promises right now [23:17] chakrit: node do is at creationix/do [23:17] chakrit: if you're interested [23:18] CIA-77: node: 03Ryan Dahl 07master * r38041fc 10/ (5 files in 4 dirs): [23:18] CIA-77: node: Try out Flatten API [23:18] CIA-77: node: Speeds up WriteUtf8 significantly when dealing with strings made by the [23:18] CIA-77: node: concatenation of many others. - http://bit.ly/9gXYjv [23:22] mattly: afaik do is being replaced with something else [23:26] tmpvar: we have something in the works.. im not sure its going to replace do though [23:26] tmpvar: you might want to check out creationix/step [23:26] tmpvar: similar to do [23:26] mattly: yeah that's the new one [23:27] tmpvar: and conductor is what we have been collab'ing on, which is a bit more generic, but harder to use heh [23:27] mattly: the one i've been working on will both take eventEmitters and wrap callbacks [23:27] tmpvar: nice, is the code public? [23:28] mattly: not yet [23:28] tmpvar: alright [23:28] tmpvar: well hook it up when it is :P [23:28] mattly: i want to test it first [23:28] tmpvar: ive been messing around : file:///home/tmpvar/work/javascript/carena/index.html [23:28] mattly: also i'm writing it in coffeescript :p [23:28] mattly: the thing with mine is, you provide a key along with the EE or the callback to wrap [23:29] tmpvar: i see [23:29] mattly: and when all the given emitters/callbacks finish, it emits an object with the arguments for everything [23:42] pedrobelo has joined the channel [23:50] sudoer has joined the channel [23:52] freshtonic has joined the channel [23:54] marienz has joined the channel