From bfreis at gmail.com Thu May 22 14:19:30 2008 From: bfreis at gmail.com (=?UTF-8?Q?Bruno_Fran=C3=A7a_dos_Reis?=) Date: Thu, 22 May 2008 20:19:30 +0200 Subject: [Muby-talk] Problem with examples Message-ID: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> Hello people. I was very happy once I found Muby, a mud client in Ruby. However, I cannot do much with it. I've installed in my Ubuntu 8.04. I went to: http://jrandomhacker.info/Muby_programming and I've tried some examples, like: print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" but it does not work. Instead, it gives me an error message: NameError: (eval):1:in `do_execute': uninitialized constant Muby::HelperMethods::RED Something alike happens when I try to use triggers. Is there anything I can do to correct it? Thanks Bruno -- Bruno FRAN?A DOS REIS msn: brunoreis666 at hotmail.com skype: brunoreis666 tel: +33 (0)6 28 43 42 16 e^(pi*i)+1=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zondolfin at gmail.com Fri May 23 05:01:01 2008 From: zondolfin at gmail.com (Martin Kihlgren) Date: Fri, 23 May 2008 11:01:01 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> Message-ID: <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> Oh, thanks for finding that bug! I had to include a module in a different class - the example would have worked if you wrote Muby::Styled::RED instead of RED :) Now the example should work, in muby 0.7.7. regards, //Martin On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis wrote: > Hello people. > I was very happy once I found Muby, a mud client in Ruby. > > However, I cannot do much with it. I've installed in my Ubuntu 8.04. I went > to: http://jrandomhacker.info/Muby_programming > and I've tried some examples, like: > > print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" > > > but it does not work. Instead, it gives me an error message: > NameError: (eval):1:in `do_execute': uninitialized constant > Muby::HelperMethods::RED > > Something alike happens when I try to use triggers. Is there anything I can > do to correct it? > Thanks > Bruno > > -- > Bruno FRAN?A DOS REIS > > msn: brunoreis666 at hotmail.com > skype: brunoreis666 > tel: +33 (0)6 28 43 42 16 > > e^(pi*i)+1=0 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > From zondolfin at gmail.com Fri May 23 05:01:38 2008 From: zondolfin at gmail.com (Martin Kihlgren) Date: Fri, 23 May 2008 11:01:38 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> Message-ID: <27acba740805230201p20931ea9x7faed5f234b15b73@mail.gmail.com> Oh uh, I forgot about your second question. Exactly what happens when you try to use triggers? //Martin On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren wrote: > Oh, thanks for finding that bug! I had to include a module in a > different class - the example would have worked if you wrote > Muby::Styled::RED instead of RED :) > > Now the example should work, in muby 0.7.7. > > regards, > //Martin > > On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis wrote: >> Hello people. >> I was very happy once I found Muby, a mud client in Ruby. >> >> However, I cannot do much with it. I've installed in my Ubuntu 8.04. I went >> to: http://jrandomhacker.info/Muby_programming >> and I've tried some examples, like: >> >> print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" >> >> >> but it does not work. Instead, it gives me an error message: >> NameError: (eval):1:in `do_execute': uninitialized constant >> Muby::HelperMethods::RED >> >> Something alike happens when I try to use triggers. Is there anything I can >> do to correct it? >> Thanks >> Bruno >> >> -- >> Bruno FRAN?A DOS REIS >> >> msn: brunoreis666 at hotmail.com >> skype: brunoreis666 >> tel: +33 (0)6 28 43 42 16 >> >> e^(pi*i)+1=0 >> _______________________________________________ >> muby-talk mailing list >> muby-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/muby-talk >> http://rubyforge.org/projects/muby/ >> > From bfreis at gmail.com Fri May 23 14:38:34 2008 From: bfreis at gmail.com (=?UTF-8?Q?Bruno_Fran=C3=A7a_dos_Reis?=) Date: Fri, 23 May 2008 20:38:34 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <27acba740805230201p20931ea9x7faed5f234b15b73@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> <27acba740805230201p20931ea9x7faed5f234b15b73@mail.gmail.com> Message-ID: <99886d920805231138s7839e65fr982e88d1381eb78e@mail.gmail.com> Hi, Martin! Thanks for your answer! The "RED" thing works now with 0.7.7. For the problem with triggers, I will try to reproduce it, once I have details, I write to the list. Anyways, the client said something like "undefined method []=", if this can help you. On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren wrote: > Oh uh, I forgot about your second question. > > Exactly what happens when you try to use triggers? > > //Martin > > On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren > wrote: > > Oh, thanks for finding that bug! I had to include a module in a > > different class - the example would have worked if you wrote > > Muby::Styled::RED instead of RED :) > > > > Now the example should work, in muby 0.7.7. > > > > regards, > > //Martin > > > > On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis > wrote: > >> Hello people. > >> I was very happy once I found Muby, a mud client in Ruby. > >> > >> However, I cannot do much with it. I've installed in my Ubuntu 8.04. I > went > >> to: http://jrandomhacker.info/Muby_programming > >> and I've tried some examples, like: > >> > >> print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" > >> > >> > >> but it does not work. Instead, it gives me an error message: > >> NameError: (eval):1:in `do_execute': uninitialized constant > >> Muby::HelperMethods::RED > >> > >> Something alike happens when I try to use triggers. Is there anything I > can > >> do to correct it? > >> Thanks > >> Bruno > >> > >> -- > >> Bruno FRAN?A DOS REIS > >> > >> msn: brunoreis666 at hotmail.com > >> skype: brunoreis666 > >> tel: +33 (0)6 28 43 42 16 > >> > >> e^(pi*i)+1=0 > >> _______________________________________________ > >> muby-talk mailing list > >> muby-talk at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/muby-talk > >> http://rubyforge.org/projects/muby/ > >> > > > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > -- Bruno FRAN?A DOS REIS msn: brunoreis666 at hotmail.com skype: brunoreis666 tel: +33 (0)6 28 43 42 16 e^(pi*i)+1=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bfreis at gmail.com Fri May 23 15:25:53 2008 From: bfreis at gmail.com (=?UTF-8?Q?Bruno_Fran=C3=A7a_dos_Reis?=) Date: Fri, 23 May 2008 21:25:53 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <99886d920805231138s7839e65fr982e88d1381eb78e@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> <27acba740805230201p20931ea9x7faed5f234b15b73@mail.gmail.com> <99886d920805231138s7839e65fr982e88d1381eb78e@mail.gmail.com> Message-ID: <99886d920805231225j19cffbe8t4649a813ecaead6d@mail.gmail.com> By the way... I was playing with local triggers, and had some problems. First: is it possible to re-read all the configuration files without closing and reopening Muby? Second: is there a "one-liner" to create a local trigger that takes arguments? By one-liner I mean some really short code that I can enter in the input window in Muby.I tried something like: /conf.local_trigger[/^lalala (.*)$/] = "echo $1" But it won't work as expected. I've read about ... = Proc.new do |inwin, outwin, match|, but it is way too big. Then I decided to clear all the local triggers, and as I've seen conf.local_triggers is a Hash object, I did: /conf.local_triggers.clear and every command stopped working. I mean, after that, when I tried a command, say /quit it sent the command to the mud instead of interpreting it. I had to "kill muby" from another shell to close it! On Fri, May 23, 2008 at 8:38 PM, Bruno Fran?a dos Reis wrote: > Hi, Martin! Thanks for your answer! The "RED" thing works now with 0.7.7. > > For the problem with triggers, I will try to reproduce it, once I have > details, I write to the list. > Anyways, the client said something like "undefined method []=", if this can > help you. > > > > On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren > wrote: > >> Oh uh, I forgot about your second question. >> >> Exactly what happens when you try to use triggers? >> >> //Martin >> >> On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren >> wrote: >> > Oh, thanks for finding that bug! I had to include a module in a >> > different class - the example would have worked if you wrote >> > Muby::Styled::RED instead of RED :) >> > >> > Now the example should work, in muby 0.7.7. >> > >> > regards, >> > //Martin >> > >> > On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis < >> bfreis at gmail.com> wrote: >> >> Hello people. >> >> I was very happy once I found Muby, a mud client in Ruby. >> >> >> >> However, I cannot do much with it. I've installed in my Ubuntu 8.04. I >> went >> >> to: http://jrandomhacker.info/Muby_programming >> >> and I've tried some examples, like: >> >> >> >> print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" >> >> >> >> >> >> but it does not work. Instead, it gives me an error message: >> >> NameError: (eval):1:in `do_execute': uninitialized constant >> >> Muby::HelperMethods::RED >> >> >> >> Something alike happens when I try to use triggers. Is there anything I >> can >> >> do to correct it? >> >> Thanks >> >> Bruno >> >> >> >> -- >> >> Bruno FRAN?A DOS REIS >> >> >> >> msn: brunoreis666 at hotmail.com >> >> skype: brunoreis666 >> >> tel: +33 (0)6 28 43 42 16 >> >> >> >> e^(pi*i)+1=0 >> >> _______________________________________________ >> >> muby-talk mailing list >> >> muby-talk at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/muby-talk >> >> http://rubyforge.org/projects/muby/ >> >> >> > >> _______________________________________________ >> muby-talk mailing list >> muby-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/muby-talk >> http://rubyforge.org/projects/muby/ >> > > > > -- > Bruno FRAN?A DOS REIS > > msn: brunoreis666 at hotmail.com > skype: brunoreis666 > tel: +33 (0)6 28 43 42 16 > > e^(pi*i)+1=0 > -- Bruno FRAN?A DOS REIS msn: brunoreis666 at hotmail.com skype: brunoreis666 tel: +33 (0)6 28 43 42 16 e^(pi*i)+1=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zondolfin at gmail.com Fri May 23 21:07:08 2008 From: zondolfin at gmail.com (Martin Kihlgren) Date: Sat, 24 May 2008 03:07:08 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <99886d920805231225j19cffbe8t4649a813ecaead6d@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> <27acba740805230201p20931ea9x7faed5f234b15b73@mail.gmail.com> <99886d920805231138s7839e65fr982e88d1381eb78e@mail.gmail.com> <99886d920805231225j19cffbe8t4649a813ecaead6d@mail.gmail.com> Message-ID: <27acba740805231807y1e382643wf2cdd0608df04410@mail.gmail.com> Right. Yes, you can reload everything - note that it will not clear anything per se, but everything will be overwritten by what is in the config files. You just do /reload_application! and it will reload all the default application classes, and your personal configuration files. Sure, you can do /conf.local_triggers[/^i am (.*)$/] = lambda do |i,o,m| print "hello #{m[1]}\n" end then if you enter i am martin it will reply hello martin Unfortunately you need that kind of structure if you want to take arguments. The arguments are: the input window, the output window and the match between the regular expression and the string. And yes, don't clear the local_triggers, they contain the trigger that makes /... execute ruby :) //Martin On Fri, May 23, 2008 at 9:25 PM, Bruno Fran?a dos Reis wrote: > By the way... > I was playing with local triggers, and had some problems. > First: is it possible to re-read all the configuration files without closing > and reopening Muby? > Second: is there a "one-liner" to create a local trigger that takes > arguments? By one-liner I mean some really short code that I can enter in > the input window in Muby.I tried something like: > > /conf.local_trigger[/^lalala (.*)$/] = "echo $1" > > But it won't work as expected. I've read about ... = Proc.new do |inwin, > outwin, match|, but it is way too big. > > Then I decided to clear all the local triggers, and as I've seen > conf.local_triggers is a Hash object, I did: > > /conf.local_triggers.clear > > and every command stopped working. I mean, after that, when I tried a > command, say > /quit > it sent the command to the mud instead of interpreting it. I had to "kill > muby" from another shell to close it! > > > On Fri, May 23, 2008 at 8:38 PM, Bruno Fran?a dos Reis > wrote: >> >> Hi, Martin! Thanks for your answer! The "RED" thing works now with 0.7.7. >> >> For the problem with triggers, I will try to reproduce it, once I have >> details, I write to the list. >> Anyways, the client said something like "undefined method []=", if this >> can help you. >> >> >> On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren >> wrote: >>> >>> Oh uh, I forgot about your second question. >>> >>> Exactly what happens when you try to use triggers? >>> >>> //Martin >>> >>> On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren >>> wrote: >>> > Oh, thanks for finding that bug! I had to include a module in a >>> > different class - the example would have worked if you wrote >>> > Muby::Styled::RED instead of RED :) >>> > >>> > Now the example should work, in muby 0.7.7. >>> > >>> > regards, >>> > //Martin >>> > >>> > On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis >>> > wrote: >>> >> Hello people. >>> >> I was very happy once I found Muby, a mud client in Ruby. >>> >> >>> >> However, I cannot do much with it. I've installed in my Ubuntu 8.04. I >>> >> went >>> >> to: http://jrandomhacker.info/Muby_programming >>> >> and I've tried some examples, like: >>> >> >>> >> print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" >>> >> >>> >> >>> >> but it does not work. Instead, it gives me an error message: >>> >> NameError: (eval):1:in `do_execute': uninitialized constant >>> >> Muby::HelperMethods::RED >>> >> >>> >> Something alike happens when I try to use triggers. Is there anything >>> >> I can >>> >> do to correct it? >>> >> Thanks >>> >> Bruno >>> >> >>> >> -- >>> >> Bruno FRAN?A DOS REIS >>> >> >>> >> msn: brunoreis666 at hotmail.com >>> >> skype: brunoreis666 >>> >> tel: +33 (0)6 28 43 42 16 >>> >> >>> >> e^(pi*i)+1=0 >>> >> _______________________________________________ >>> >> muby-talk mailing list >>> >> muby-talk at rubyforge.org >>> >> http://rubyforge.org/mailman/listinfo/muby-talk >>> >> http://rubyforge.org/projects/muby/ >>> >> >>> > >>> _______________________________________________ >>> muby-talk mailing list >>> muby-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/muby-talk >>> http://rubyforge.org/projects/muby/ >> >> >> >> -- >> Bruno FRAN?A DOS REIS >> >> msn: brunoreis666 at hotmail.com >> skype: brunoreis666 >> tel: +33 (0)6 28 43 42 16 >> >> e^(pi*i)+1=0 > > > -- > Bruno FRAN?A DOS REIS > > msn: brunoreis666 at hotmail.com > skype: brunoreis666 > tel: +33 (0)6 28 43 42 16 > > e^(pi*i)+1=0 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > From bfreis at gmail.com Sat May 24 21:40:24 2008 From: bfreis at gmail.com (=?UTF-8?Q?Bruno_Fran=C3=A7a_dos_Reis?=) Date: Sun, 25 May 2008 03:40:24 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> Message-ID: <99886d920805241840ib1839dfsbd34d4765ef473ae@mail.gmail.com> About the constants RED, BOLD, etc..., I've tried this in 0.7.7: file.rb: $aaa = "" conf.local_triggers[ /^wefwef (.+)$/ ] = lambda do |i, o, m| $aaa = m[1] o.print RED, "NEW VALUE: ", WHITE, $aaa end and I have exact the same error as before when I enter: wefwef something When I write Muby::Styled::RED in the code, it works (as expected). On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren wrote: > Oh, thanks for finding that bug! I had to include a module in a > different class - the example would have worked if you wrote > Muby::Styled::RED instead of RED :) > > Now the example should work, in muby 0.7.7. > > regards, > //Martin > > On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis > wrote: > > Hello people. > > I was very happy once I found Muby, a mud client in Ruby. > > > > However, I cannot do much with it. I've installed in my Ubuntu 8.04. I > went > > to: http://jrandomhacker.info/Muby_programming > > and I've tried some examples, like: > > > > print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" > > > > > > but it does not work. Instead, it gives me an error message: > > NameError: (eval):1:in `do_execute': uninitialized constant > > Muby::HelperMethods::RED > > > > Something alike happens when I try to use triggers. Is there anything I > can > > do to correct it? > > Thanks > > Bruno > > > > -- > > Bruno FRAN?A DOS REIS > > > > msn: brunoreis666 at hotmail.com > > skype: brunoreis666 > > tel: +33 (0)6 28 43 42 16 > > > > e^(pi*i)+1=0 > > _______________________________________________ > > muby-talk mailing list > > muby-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/muby-talk > > http://rubyforge.org/projects/muby/ > > > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > -- Bruno FRAN?A DOS REIS msn: brunoreis666 at hotmail.com skype: brunoreis666 tel: +33 (0)6 28 43 42 16 e^(pi*i)+1=0 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zondolfin at gmail.com Sun May 25 05:01:10 2008 From: zondolfin at gmail.com (Martin Kihlgren) Date: Sun, 25 May 2008 11:01:10 +0200 Subject: [Muby-talk] Problem with examples In-Reply-To: <99886d920805241840ib1839dfsbd34d4765ef473ae@mail.gmail.com> References: <99886d920805221119v40576c3cu9857c94bf925812f@mail.gmail.com> <27acba740805230201u675b1fe2ncd68a7ba1b97d86c@mail.gmail.com> <99886d920805241840ib1839dfsbd34d4765ef473ae@mail.gmail.com> Message-ID: <27acba740805250201w1f8f4845g7eb2ee96978d6aee@mail.gmail.com> Argh damn namespaces. Try to add the string include Muby::Styled to the top of different files in the lib/muby/*.rb files, and see which one helps :) I can try to help you later on , but right now I have to leave :/ regards, //Martin On Sun, May 25, 2008 at 3:40 AM, Bruno Fran?a dos Reis wrote: > About the constants RED, BOLD, etc..., I've tried this in 0.7.7: > > file.rb: > > $aaa = "" > conf.local_triggers[ /^wefwef (.+)$/ ] = lambda do |i, o, m| > $aaa = m[1] > o.print RED, "NEW VALUE: ", WHITE, $aaa > end > > and I have exact the same error as before when I enter: > wefwef something > > When I write Muby::Styled::RED in the code, it works (as expected). > > On Fri, May 23, 2008 at 11:01 AM, Martin Kihlgren > wrote: >> >> Oh, thanks for finding that bug! I had to include a module in a >> different class - the example would have worked if you wrote >> Muby::Styled::RED instead of RED :) >> >> Now the example should work, in muby 0.7.7. >> >> regards, >> //Martin >> >> On Thu, May 22, 2008 at 8:19 PM, Bruno Fran?a dos Reis >> wrote: >> > Hello people. >> > I was very happy once I found Muby, a mud client in Ruby. >> > >> > However, I cannot do much with it. I've installed in my Ubuntu 8.04. I >> > went >> > to: http://jrandomhacker.info/Muby_programming >> > and I've tried some examples, like: >> > >> > print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" >> > >> > >> > but it does not work. Instead, it gives me an error message: >> > NameError: (eval):1:in `do_execute': uninitialized constant >> > Muby::HelperMethods::RED >> > >> > Something alike happens when I try to use triggers. Is there anything I >> > can >> > do to correct it? >> > Thanks >> > Bruno >> > >> > -- >> > Bruno FRAN?A DOS REIS >> > >> > msn: brunoreis666 at hotmail.com >> > skype: brunoreis666 >> > tel: +33 (0)6 28 43 42 16 >> > >> > e^(pi*i)+1=0 >> > _______________________________________________ >> > muby-talk mailing list >> > muby-talk at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/muby-talk >> > http://rubyforge.org/projects/muby/ >> > >> _______________________________________________ >> muby-talk mailing list >> muby-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/muby-talk >> http://rubyforge.org/projects/muby/ > > > > -- > Bruno FRAN?A DOS REIS > > msn: brunoreis666 at hotmail.com > skype: brunoreis666 > tel: +33 (0)6 28 43 42 16 > > e^(pi*i)+1=0 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ >