From zond at troja.ath.cx Tue Aug 1 03:26:40 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 1 Aug 2006 09:26:40 +0200 Subject: [Muby-talk] receive In-Reply-To: <1e55af990607311049q6ed550dds777741efe81c8231@mail.gmail.com> References: <1e55af990607311049q6ed550dds777741efe81c8231@mail.gmail.com> Message-ID: <20060801072640.GA4854@troja.ath.cx> On Mon, Jul 31, 2006 at 12:49:52PM -0500, Sy Ali wrote: > Is it me, or is receive a little flaky at times? Not to me - to me it works perfectly fine :O > And what is the use of fake_connect anyway? I don't understand its use. To create a connection instance that doesnt go anywhere - all the logic for receiving is in the connection class, so we need one of those to be able to parse input. We COULD have one at all times, just initialize with a fake one, and set up a fake one every time we close a real one, but that seemed a bit too ugly. Id rather have an explicit method that does it. > The last time I played with this (last evening) I had to fake_connect > every time before using receive, and receive wouldn't always work. Show me exactly what you did, and Ill try to see what went wrong. //Martin -- ################################################################### It is better to wear out than to rust out. ################################################################### From zond at troja.ath.cx Tue Aug 1 03:28:39 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 1 Aug 2006 09:28:39 +0200 Subject: [Muby-talk] disconnection issues (not flooding) In-Reply-To: <1e55af990607311059i2cbeaa4bx7f4a97fdc39d4adc@mail.gmail.com> References: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> <20060731082903.GA7693@troja.ath.cx> <1e55af990607311033u170abe82r85d319096ad5129a@mail.gmail.com> <20060731174614.GA19763@troja.ath.cx> <1e55af990607311059i2cbeaa4bx7f4a97fdc39d4adc@mail.gmail.com> Message-ID: <20060801072839.GB4854@troja.ath.cx> The MMCP may not resolve it, but the proxy may - if the proxy buffers stuff while the client is temporarily frozen, that may give enough time for the connection to survive... On Mon, Jul 31, 2006 at 12:59:15PM -0500, Sy Ali wrote: > > On Mon, Jul 31, 2006 at 12:33:22PM -0500, Sy Ali wrote: > > > It looks like there's still a flooding issue.. I did > > > 'conf.output_buffer = 10000' but that didn't change it. > > > > > > I also tried 'conf.show_level = :debug' but it didn't show anything interesting: > > > > > > Connection closed by remote end > > > Disconnecting our end > > > Listening thread finished > > On 7/31/06, Martin Kihlgren wrote: > > > > I cant break it by doing a 'who', not even if I hold down the enter > > key to flood myself with info :O > > Perhaps it is the amount of gags and triggers I have. But I don't > understand how mccp compression would resolve it. Hmm... > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### It is better to wear out than to rust out. ################################################################### From zond at troja.ath.cx Tue Aug 1 03:29:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 1 Aug 2006 09:29:12 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607311101n49b61d8fj1389475842c2f3bf@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> <20060731071447.GC5113@troja.ath.cx> <1e55af990607310947x41e8acf7hb33cbc700aeb4e21@mail.gmail.com> <20060731171847.GA16237@troja.ath.cx> <1e55af990607311045n69fe8366me4a25c739a94f2ff@mail.gmail.com> <20060731174718.GB19763@troja.ath.cx> <1e55af990607311101n49b61d8fj1389475842c2f3bf@mail.gmail.com> Message-ID: <20060801072912.GC4854@troja.ath.cx> Exactly :) On Mon, Jul 31, 2006 at 01:01:19PM -0500, Sy Ali wrote: > On 7/31/06, Martin Kihlgren wrote: > > > > Even if you copy-and-paste them into your scripts, you can get rid of > > that write method you have if you define the local_trigger I > > described... It is probably a lot more efficient... > > Oh I see.. it will substitute even if it's my scripting sending the > text? Interesting. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### It is better to wear out than to rust out. ################################################################### From zond at troja.ath.cx Tue Aug 1 03:30:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 1 Aug 2006 09:30:28 +0200 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line In-Reply-To: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> References: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> Message-ID: <20060801073028.GD4854@troja.ath.cx> Page up and page down dont work on my keyboard (osx + terminal is a bit flaky), so I cant test it. But the methods looked right, and if you hade tested them (done /set_message_line("test") and /set_message_line("")) before you changed them, you would have seen that it wasnt the message line methods that were at fault :O //Martin On Mon, Jul 31, 2006 at 06:32:13PM -0500, Sy Ali wrote: > pageup/down trigger an issue with set_message_line on 77 and 89 of outputwindow. > > It's a scope thing, and after experimenting a bit.. I'm not sure how > to fix it the right way. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### It is better to wear out than to rust out. ################################################################### From sy1234 at gmail.com Tue Aug 1 13:38:41 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 13:38:41 -0400 Subject: [Muby-talk] receive In-Reply-To: <20060801072640.GA4854@troja.ath.cx> References: <1e55af990607311049q6ed550dds777741efe81c8231@mail.gmail.com> <20060801072640.GA4854@troja.ath.cx> Message-ID: <1e55af990608011038q44401f7auf185b098bfc7df22@mail.gmail.com> On 8/1/06, Martin Kihlgren wrote: > Show me exactly what you did, and Ill try to see what went wrong. Ok, I'll write up some examples this evening. I'm hoping that perhaps I was just doing something wrong. You saying that it works for you gives me some hope. =) From sy1234 at gmail.com Tue Aug 1 13:43:57 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 13:43:57 -0400 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line In-Reply-To: <20060801073028.GD4854@troja.ath.cx> References: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> <20060801073028.GD4854@troja.ath.cx> Message-ID: <1e55af990608011043g7c2fe144x96baefc829a458dc@mail.gmail.com> > On Mon, Jul 31, 2006 at 06:32:13PM -0500, Sy Ali wrote: > > pageup/down trigger an issue with set_message_line on 77 and 89 of outputwindow. > > > > It's a scope thing, and after experimenting a bit.. I'm not sure how > > to fix it the right way. On 8/1/06, Martin Kihlgren wrote: > > Page up and page down dont work on my keyboard (osx + terminal is a > bit flaky), so I cant test it. But the methods looked right, and if > you hade tested them (done /set_message_line("test") and > /set_message_line("")) before you changed them, you would have seen > that it wasnt the message line methods that were at fault :O I see that it's working now. I'll take a look at the code later to figure out what's going on. =) I also see that I can pageup even when there isn't enough buffer for me to scroll with.. but I saw that the code checked for this.. I'll investigate this further. From sy1234 at gmail.com Tue Aug 1 17:51:21 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 16:51:21 -0500 Subject: [Muby-talk] speed reduction since 0.5.5 In-Reply-To: <1e55af990607311035i448122b2y573a6c4005f3b603@mail.gmail.com> References: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> <20060731071549.GE5113@troja.ath.cx> <1e55af990607311035i448122b2y573a6c4005f3b603@mail.gmail.com> Message-ID: <1e55af990608011451l6d86731ew6936e69a25f66610@mail.gmail.com> There is absolutely a massive difference with and without my user scripting. Also, I seem to have created my pageup/down bug with my user scripting.. and it's not because of my keyboard preferences. I will spend time on this problem right now. From sy1234 at gmail.com Tue Aug 1 19:28:28 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 18:28:28 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060801072912.GC4854@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> <20060731071447.GC5113@troja.ath.cx> <1e55af990607310947x41e8acf7hb33cbc700aeb4e21@mail.gmail.com> <20060731171847.GA16237@troja.ath.cx> <1e55af990607311045n69fe8366me4a25c739a94f2ff@mail.gmail.com> <20060731174718.GB19763@troja.ath.cx> <1e55af990607311101n49b61d8fj1389475842c2f3bf@mail.gmail.com> <20060801072912.GC4854@troja.ath.cx> Message-ID: <1e55af990608011628k456dc115l78000d84230fe157@mail.gmail.com> > On Mon, Jul 31, 2006 at 01:01:19PM -0500, Sy Ali wrote: > > On 7/31/06, Martin Kihlgren wrote: > > > > > > Even if you copy-and-paste them into your scripts, you can get rid of > > > that write method you have if you define the local_trigger I > > > described... It is probably a lot more efficient... > > > > Oh I see.. it will substitute even if it's my scripting sending the > > text? Interesting. On 8/1/06, Martin Kihlgren wrote: > > Exactly :) Ok, I've implemented it.. it works great. I won't leave it on all the time.. because I really like the novelty of using ; in regular text.. most clients automatically split commands on ; and I want to try life without that. =) From zond at troja.ath.cx Tue Aug 1 19:28:38 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 01:28:38 +0200 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line In-Reply-To: <1e55af990608011043g7c2fe144x96baefc829a458dc@mail.gmail.com> References: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> <20060801073028.GD4854@troja.ath.cx> <1e55af990608011043g7c2fe144x96baefc829a458dc@mail.gmail.com> Message-ID: <20060801232838.GA15093@troja.ath.cx> > I see that it's working now. I'll take a look at the code later to > figure out what's going on. =) Yes, I fixed some issues there. You had mistakenly added a nil parameter to a call to scroll_up and scroll_down. Then you had renamed the methods for some reason? But I renamed them back. Then I realized that I could try the scrolling with other keys than page up/down (yeeey key codes!) and it seemed to work fine :) > I also see that I can pageup even when there isn't enough buffer for > me to scroll with.. but I saw that the code checked for this.. I'll > investigate this further. You can? How much? //Martin -- ################################################################### It is better to wear out than to rust out. ################################################################### From sy1234 at gmail.com Tue Aug 1 19:30:20 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 18:30:20 -0500 Subject: [Muby-talk] speed reduction since 0.5.5 In-Reply-To: <1e55af990608011451l6d86731ew6936e69a25f66610@mail.gmail.com> References: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> <20060731071549.GE5113@troja.ath.cx> <1e55af990607311035i448122b2y573a6c4005f3b603@mail.gmail.com> <1e55af990608011451l6d86731ew6936e69a25f66610@mail.gmail.com> Message-ID: <1e55af990608011630j33ea1dc0jc83ed4f08beaf316@mail.gmail.com> On 8/1/06, Sy Ali wrote: > There is absolutely a massive difference with and without my user > scripting. Also, I seem to have created my pageup/down bug with my > user scripting.. and it's not because of my keyboard preferences. > > I will spend time on this problem right now. Man, this is frustrating.. I went over every line of user scripting and cleaned up regexes and local triggers and even simplified some scripting. Everything is written properly and yet I can't tell what's causing the issue. I'm still looking.. I'm going to go back to blocking out huge chunks of code and retesting. From zond at troja.ath.cx Tue Aug 1 19:30:41 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 01:30:41 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990608011628k456dc115l78000d84230fe157@mail.gmail.com> References: <20060730193710.GA19298@troja.ath.cx> <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> <20060731071447.GC5113@troja.ath.cx> <1e55af990607310947x41e8acf7hb33cbc700aeb4e21@mail.gmail.com> <20060731171847.GA16237@troja.ath.cx> <1e55af990607311045n69fe8366me4a25c739a94f2ff@mail.gmail.com> <20060731174718.GB19763@troja.ath.cx> <1e55af990607311101n49b61d8fj1389475842c2f3bf@mail.gmail.com> <20060801072912.GC4854@troja.ath.cx> <1e55af990608011628k456dc115l78000d84230fe157@mail.gmail.com> Message-ID: <20060801233041.GB15093@troja.ath.cx> Great :) On Tue, Aug 01, 2006 at 06:28:28PM -0500, Sy Ali wrote: > > On Mon, Jul 31, 2006 at 01:01:19PM -0500, Sy Ali wrote: > > > On 7/31/06, Martin Kihlgren wrote: > > > > > > > > Even if you copy-and-paste them into your scripts, you can get rid of > > > > that write method you have if you define the local_trigger I > > > > described... It is probably a lot more efficient... > > > > > > Oh I see.. it will substitute even if it's my scripting sending the > > > text? Interesting. > > On 8/1/06, Martin Kihlgren wrote: > > > > Exactly :) > > Ok, I've implemented it.. it works great. I won't leave it on all the > time.. because I really like the novelty of using ; in regular text.. > most clients automatically split commands on ; and I want to try life > without that. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### It is better to wear out than to rust out. ################################################################### From sy1234 at gmail.com Tue Aug 1 20:56:32 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 19:56:32 -0500 Subject: [Muby-talk] Really simple shell functionality Message-ID: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> I implemented a simple shell extension, to let me perform shell operations from within muby. It's dead-simple, but it works. !command is automatically echoed out to the shell, and any results are returned. !cd will remember the directory change. All I know is that it works.. perhaps you will find issues with it. This kind of functionality might be extra-cool to fold into muby. It's a bad idea to run applications like nano/pico/vi because they won't display to muby. There might be a workaround, but nothing comes to mind and it's not an interesting-enough problem for me to work on right now. =) Within a user script, I do this: $cwd = ENV['HOME'] conf.local_triggers[/^!(.*)/] = Proc.new do |inwin, outwin, match| input = match.to_s.split(' ') input[0] = input[0][1..-1] command = input[0] parameters = input[1..-1].join(' ') case command when "cd" if input[1] != nil then $cwd = input[1] else $cwd = ENV['HOME'] end Dir.chdir($cwd) $cwd = Dir.getwd else Dir.chdir($cwd) Thread.new do print `#{input.join(' ')}` end end print $cwd + " >" end def print(s) Muby::InputWindow.get_instance.print(s.to_s + " ") end I do this strange print-wrapper, because print doesn't seem to work as-expected for me. I require the get_instance because that's the only way I can make this work. You'll remember that I did the same thing with 'write', before. From sy1234 at gmail.com Tue Aug 1 20:58:52 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 19:58:52 -0500 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line In-Reply-To: <20060801232838.GA15093@troja.ath.cx> References: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> <20060801073028.GD4854@troja.ath.cx> <1e55af990608011043g7c2fe144x96baefc829a458dc@mail.gmail.com> <20060801232838.GA15093@troja.ath.cx> Message-ID: <1e55af990608011758q6f412312s2a1b8ea7153b54cf@mail.gmail.com> On 8/1/06, Martin Kihlgren wrote: > > I also see that I can pageup even when there isn't enough buffer for > > me to scroll with.. but I saw that the code checked for this.. I'll > > investigate this further. > > You can? How much? I can scroll back to 20+ pages of nonexistant buffer.. Very strange. Maybe ncurses initialises its buffer with all those empty pages? From sy1234 at gmail.com Tue Aug 1 21:09:28 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 20:09:28 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> Message-ID: <1e55af990608011809n65e1a35awe3ddd8c1a118e383@mail.gmail.com> On 8/1/06, Sy Ali wrote: > I implemented a simple shell extension, to let me perform shell > operations from within muby. It's dead-simple, but it works. Oh wow, I just realised that with this functionality I could have sound triggers! From sy1234 at gmail.com Tue Aug 1 21:16:56 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 1 Aug 2006 20:16:56 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608011809n65e1a35awe3ddd8c1a118e383@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <1e55af990608011809n65e1a35awe3ddd8c1a118e383@mail.gmail.com> Message-ID: <1e55af990608011816j5c82d809o3d0dfeea1013cf58@mail.gmail.com> On 8/1/06, Sy Ali wrote: > On 8/1/06, Sy Ali wrote: > > I implemented a simple shell extension, to let me perform shell > > operations from within muby. It's dead-simple, but it works. > > Oh wow, I just realised that with this functionality I could have > sound triggers! Done! Now any scripting can call external commands through that wrapper.. I can control xmms and keep mudding! From zond at troja.ath.cx Wed Aug 2 02:59:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 08:59:18 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> Message-ID: <20060802065918.GA21331@troja.ath.cx> Ah, this gives me ideas, I may work this into muby main yes :) //Martin On Tue, Aug 01, 2006 at 07:56:32PM -0500, Sy Ali wrote: > I implemented a simple shell extension, to let me perform shell > operations from within muby. It's dead-simple, but it works. > > !command is automatically echoed out to the shell, and any results are returned. > !cd will remember the directory change. > > All I know is that it works.. perhaps you will find issues with it. > This kind of functionality might be extra-cool to fold into muby. > > It's a bad idea to run applications like nano/pico/vi because they > won't display to muby. There might be a workaround, but nothing comes > to mind and it's not an interesting-enough problem for me to work on > right now. =) > > > Within a user script, I do this: > > $cwd = ENV['HOME'] > conf.local_triggers[/^!(.*)/] = Proc.new do |inwin, outwin, match| > input = match.to_s.split(' ') > input[0] = input[0][1..-1] > command = input[0] > parameters = input[1..-1].join(' ') > > case command > when "cd" > if input[1] != nil then > $cwd = input[1] > else > $cwd = ENV['HOME'] > end > Dir.chdir($cwd) > $cwd = Dir.getwd > else > Dir.chdir($cwd) > Thread.new do > print `#{input.join(' ')}` > end > end > print $cwd + " >" > end > > def print(s) > Muby::InputWindow.get_instance.print(s.to_s + " > ") > end > > > I do this strange print-wrapper, because print doesn't seem to work > as-expected for me. I require the get_instance because that's the > only way I can make this work. You'll remember that I did the same > thing with 'write', before. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From zond at troja.ath.cx Wed Aug 2 02:59:40 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 08:59:40 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608011816j5c82d809o3d0dfeea1013cf58@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <1e55af990608011809n65e1a35awe3ddd8c1a118e383@mail.gmail.com> <1e55af990608011816j5c82d809o3d0dfeea1013cf58@mail.gmail.com> Message-ID: <20060802065940.GB21331@troja.ath.cx> Cool :) On Tue, Aug 01, 2006 at 08:16:56PM -0500, Sy Ali wrote: > On 8/1/06, Sy Ali wrote: > > On 8/1/06, Sy Ali wrote: > > > I implemented a simple shell extension, to let me perform shell > > > operations from within muby. It's dead-simple, but it works. > > > > Oh wow, I just realised that with this functionality I could have > > sound triggers! > > Done! Now any scripting can call external commands through that > wrapper.. I can control xmms and keep mudding! > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From zond at troja.ath.cx Wed Aug 2 03:05:13 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 09:05:13 +0200 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line In-Reply-To: <1e55af990608011758q6f412312s2a1b8ea7153b54cf@mail.gmail.com> References: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> <20060801073028.GD4854@troja.ath.cx> <1e55af990608011043g7c2fe144x96baefc829a458dc@mail.gmail.com> <20060801232838.GA15093@troja.ath.cx> <1e55af990608011758q6f412312s2a1b8ea7153b54cf@mail.gmail.com> Message-ID: <20060802070513.GC21331@troja.ath.cx> Ah, I just noticed I never checked for that. So I fixed it, now you should only be able to scroll up one empty page. //Martin On Tue, Aug 01, 2006 at 07:58:52PM -0500, Sy Ali wrote: > On 8/1/06, Martin Kihlgren wrote: > > > I also see that I can pageup even when there isn't enough buffer for > > > me to scroll with.. but I saw that the code checked for this.. I'll > > > investigate this further. > > > > You can? How much? > > I can scroll back to 20+ pages of nonexistant buffer.. Very strange. > Maybe ncurses initialises its buffer with all those empty pages? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From zond at troja.ath.cx Wed Aug 2 03:51:57 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 09:51:57 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> Message-ID: <20060802075157.GA21930@troja.ath.cx> Ah, I have now implemented this in the muby kernel. Look for shell_command! in the user_methods.rb. Also look for local_triggers default settings in configuration.rb, and you will see that both / and ! are now parts of local triggers instead of global conf variables. Its all turning out very nice :) You are an inspiration :) //Martin On Tue, Aug 01, 2006 at 07:56:32PM -0500, Sy Ali wrote: > I implemented a simple shell extension, to let me perform shell > operations from within muby. It's dead-simple, but it works. > > !command is automatically echoed out to the shell, and any results are returned. > !cd will remember the directory change. > > All I know is that it works.. perhaps you will find issues with it. > This kind of functionality might be extra-cool to fold into muby. > > It's a bad idea to run applications like nano/pico/vi because they > won't display to muby. There might be a workaround, but nothing comes > to mind and it's not an interesting-enough problem for me to work on > right now. =) > > > Within a user script, I do this: > > $cwd = ENV['HOME'] > conf.local_triggers[/^!(.*)/] = Proc.new do |inwin, outwin, match| > input = match.to_s.split(' ') > input[0] = input[0][1..-1] > command = input[0] > parameters = input[1..-1].join(' ') > > case command > when "cd" > if input[1] != nil then > $cwd = input[1] > else > $cwd = ENV['HOME'] > end > Dir.chdir($cwd) > $cwd = Dir.getwd > else > Dir.chdir($cwd) > Thread.new do > print `#{input.join(' ')}` > end > end > print $cwd + " >" > end > > def print(s) > Muby::InputWindow.get_instance.print(s.to_s + " > ") > end > > > I do this strange print-wrapper, because print doesn't seem to work > as-expected for me. I require the get_instance because that's the > only way I can make this work. You'll remember that I did the same > thing with 'write', before. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From sy1234 at gmail.com Wed Aug 2 07:18:28 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 07:18:28 -0400 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060802075157.GA21930@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> Message-ID: <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> On 8/2/06, Martin Kihlgren wrote: > > Ah, I have now implemented this in the muby kernel. Look for > shell_command! in the user_methods.rb. > > Also look for local_triggers default settings in configuration.rb, and > you will see that both / and ! are now parts of local triggers instead > of global conf variables. > > Its all turning out very nice :) You are an inspiration :) Awesome. By the way, I did some more thinking, and I wrapped my 'cd' to catch the exception generated when I try to cd into a nonexistant directory. I also implemented globbing in a rough way, to allow the 'cd' to use things like "cd dir*" .. although if "directory1" and "directory2" exist, it'll fail.. really it ought to cd into directory1, but I guess that's extending the functionality a bit. =) I'll take a look at your code later today. It's been a while since I've looked at the muby codebase. I need to catch up. =) $cwd = ENV['HOME'] conf.local_triggers[/^!(.*)/] = Proc.new do |inwin, outwin, match| shell match[1..-1] end def shell(*input) input = input.to_s.split(' ') input[0] = input[0] command = input[0] parameters = input[1..-1].join(' ') case command when "cd" if input[1] != nil then old_cwd = $cwd $cwd = input[1] begin # Allows * in directory names. Dir.chdir(Dir.glob($cwd).join(' ')) $cwd = Dir.getwd # Example on my computer: # Errno::ENOENT: No such file or directory - nothing rescue SystemCallError print "No such directory - " + input[1] $cwd = old_cwd Dir.chdir($cwd) end else $cwd = ENV['HOME'] Dir.chdir($cwd) $cwd = Dir.getwd end else Dir.chdir($cwd) # This looks good, but feels dangerous. =) Thread.new do print `#{input.join(' ')}` end end print $cwd + " >" end def print(s) Muby::InputWindow.get_instance.print(s.to_s + " ") end From zond at troja.ath.cx Wed Aug 2 07:38:32 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 13:38:32 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> Message-ID: <20060802113831.GA24891@troja.ath.cx> I dont think ill wrap the exception - I like to be brutally honest to the user... But the globbing is interesting. I will think about that. //Martin On Wed, Aug 02, 2006 at 07:18:28AM -0400, Sy Ali wrote: > On 8/2/06, Martin Kihlgren wrote: > > > > Ah, I have now implemented this in the muby kernel. Look for > > shell_command! in the user_methods.rb. > > > > Also look for local_triggers default settings in configuration.rb, and > > you will see that both / and ! are now parts of local triggers instead > > of global conf variables. > > > > Its all turning out very nice :) You are an inspiration :) > > Awesome. > > By the way, I did some more thinking, and I wrapped my 'cd' to catch > the exception generated when I try to cd into a nonexistant directory. > > I also implemented globbing in a rough way, to allow the 'cd' to use > things like "cd dir*" .. although if "directory1" and "directory2" > exist, it'll fail.. really it ought to cd into directory1, but I guess > that's extending the functionality a bit. =) > > I'll take a look at your code later today. It's been a while since > I've looked at the muby codebase. I need to catch up. =) > > > $cwd = ENV['HOME'] > conf.local_triggers[/^!(.*)/] = Proc.new do |inwin, outwin, match| > shell match[1..-1] end > > def shell(*input) > input = input.to_s.split(' ') > input[0] = input[0] > command = input[0] > parameters = input[1..-1].join(' ') > > case command > when "cd" > if input[1] != nil then > old_cwd = $cwd > $cwd = input[1] > begin > # Allows * in directory names. > Dir.chdir(Dir.glob($cwd).join(' ')) > $cwd = Dir.getwd > # Example on my computer: > # Errno::ENOENT: No such file or directory - nothing > rescue SystemCallError > print "No such directory - " + input[1] > $cwd = old_cwd > Dir.chdir($cwd) > end > else > $cwd = ENV['HOME'] > Dir.chdir($cwd) > $cwd = Dir.getwd > end > else > Dir.chdir($cwd) > # This looks good, but feels dangerous. =) > Thread.new do > print `#{input.join(' ')}` > end > end > print $cwd + " >" > end > > def print(s) > Muby::InputWindow.get_instance.print(s.to_s + " > ") > end > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From sy1234 at gmail.com Wed Aug 2 08:20:24 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 08:20:24 -0400 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060802113831.GA24891@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> <20060802113831.GA24891@troja.ath.cx> Message-ID: <1e55af990608020520m53334298if4513a211c872e74@mail.gmail.com> On 8/2/06, Martin Kihlgren wrote: > > I dont think ill wrap the exception - I like to be brutally honest to > the user... It looks like these are our major points of difference: * I like to plan for problems even before they are discovered (like requiring a Ruby version) * I like to make all messages as friendly as possible (like error messages) * I like to have simple "helpers" for doing common things. You also seem to like this, but you focus on more powerful features first. Is there a way that we can include the philosophy of simple error messages in the "verbose" concept? From zond at troja.ath.cx Wed Aug 2 08:31:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 14:31:28 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608020520m53334298if4513a211c872e74@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> <20060802113831.GA24891@troja.ath.cx> <1e55af990608020520m53334298if4513a211c872e74@mail.gmail.com> Message-ID: <20060802123128.GA25660@troja.ath.cx> On Wed, Aug 02, 2006 at 08:20:24AM -0400, Sy Ali wrote: > On 8/2/06, Martin Kihlgren wrote: > > > > I dont think ill wrap the exception - I like to be brutally honest to > > the user... > > It looks like these are our major points of difference: > > * I like to plan for problems even before they are discovered (like > requiring a Ruby version) Things that dont require any extra work to implement when they actually become issues shouldnt be implemented before they become issues, common programming sense :) > * I like to make all messages as friendly as possible (like error messages) Errors that are hard to understand can well be simplified, but anyone that wants to use this client instead of any other client probably does so because they want to script in ruby, and because they know a bit of ruby. Under those circumstances its just a pain to get fuzzed up error messages that dont contain the original error information... > * I like to have simple "helpers" for doing common things. You also > seem to like this, but you focus on more powerful features first. > > Is there a way that we can include the philosophy of simple error > messages in the "verbose" concept? As it is now, if you have show_level = :info or above, you wont get a stacktrace, just an error message on one line. I think that is nice enough - but you can allways create an add-on lib that cuddlifies the error messages you feel are nasty. It should be easy to load in your rc-file. //Martin -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From sy1234 at gmail.com Wed Aug 2 12:06:56 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 11:06:56 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060802123128.GA25660@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> <20060802113831.GA24891@troja.ath.cx> <1e55af990608020520m53334298if4513a211c872e74@mail.gmail.com> <20060802123128.GA25660@troja.ath.cx> Message-ID: <1e55af990608020906t19b89a8rf3f292080e38ccaa@mail.gmail.com> On 8/2/06, Martin Kihlgren wrote: > As it is now, if you have show_level = :info or above, you wont get a > stacktrace, just an error message on one line. > > I think that is nice enough - but you can allways create an add-on lib > that cuddlifies the error messages you feel are nasty. It should be > easy to load in your rc-file. This is true. I really like being able to toggle verbosity and see a lot more of the error information for when I do have issues. =) It's a bit wierd to not see a filename and line number for the non-verbose errors.. heh. From zond at troja.ath.cx Wed Aug 2 12:12:39 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 18:12:39 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608020906t19b89a8rf3f292080e38ccaa@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608020418r5b925aeeqb5746dc882c9d6fd@mail.gmail.com> <20060802113831.GA24891@troja.ath.cx> <1e55af990608020520m53334298if4513a211c872e74@mail.gmail.com> <20060802123128.GA25660@troja.ath.cx> <1e55af990608020906t19b89a8rf3f292080e38ccaa@mail.gmail.com> Message-ID: <20060802161239.GA28374@troja.ath.cx> I allways run in show_level = :debug, mostly the error messages get understandable then :) //Martin On Wed, Aug 02, 2006 at 11:06:56AM -0500, Sy Ali wrote: > On 8/2/06, Martin Kihlgren wrote: > > As it is now, if you have show_level = :info or above, you wont get a > > stacktrace, just an error message on one line. > > > > I think that is nice enough - but you can allways create an add-on lib > > that cuddlifies the error messages you feel are nasty. It should be > > easy to load in your rc-file. > > This is true. I really like being able to toggle verbosity and see a > lot more of the error information for when I do have issues. =) It's > a bit wierd to not see a filename and line number for the non-verbose > errors.. heh. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From sy1234 at gmail.com Wed Aug 2 12:13:34 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 11:13:34 -0500 Subject: [Muby-talk] muby is on the map! Message-ID: <1e55af990608020913w369866bm5f684dd9e3d1034b@mail.gmail.com> muby now shows up as #2 on Google for "ruby mud client" =) From sy1234 at gmail.com Wed Aug 2 13:01:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 12:01:51 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060802075157.GA21930@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> Message-ID: <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> On 8/2/06, Martin Kihlgren wrote: > > Ah, I have now implemented this in the muby kernel. Look for > shell_command! in the user_methods.rb. > > Also look for local_triggers default settings in configuration.rb, and > you will see that both / and ! are now parts of local triggers instead > of global conf variables. I see the coding, but shell doesn't seem to be working from the commandline. I've tried it while my user scripting was absent. Also, it seems almost trivial to leverage what you're doing, to add # to ignore the command. This would let users copy code with comments and paste it into muby directly. I tried this, but this is when I ran into the above problem with ! .. and so # wouldn't work either. From zond at troja.ath.cx Wed Aug 2 14:42:38 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 20:42:38 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> Message-ID: <20060802184238.GA30167@troja.ath.cx> On Wed, Aug 02, 2006 at 12:01:51PM -0500, Sy Ali wrote: > On 8/2/06, Martin Kihlgren wrote: > > > > Ah, I have now implemented this in the muby kernel. Look for > > shell_command! in the user_methods.rb. > > > > Also look for local_triggers default settings in configuration.rb, and > > you will see that both / and ! are now parts of local triggers instead > > of global conf variables. > > I see the coding, but shell doesn't seem to be working from the > commandline. I've tried it while my user scripting was absent. ?? --------------------8<---------------- .--.--.--. .--. : :--.--: : .--.--. : : : : : : '-: : : : : : : : : : : ' : '--'--'--'-----'----'--. : The Ruby MUD Client : : ------------------- '--' Version 0.6.0 Reading history file !cd svnroot/muby !ls LICENSE contrib lib muby.rb muby.rb~ prepare_release_tarball.sh --------------------8<------------------ Works fine with me... > Also, it seems almost trivial to leverage what you're doing, to add # > to ignore the command. This would let users copy code with comments > and paste it into muby directly. I dont know what you are talking about? Leverage what? Ignoring what command? > I tried this, but this is when I ran into the above problem with ! .. > and so # wouldn't work either. What problem? Or rather - it all works fine with me? //Martin -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From zond at troja.ath.cx Wed Aug 2 14:43:10 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 2 Aug 2006 20:43:10 +0200 Subject: [Muby-talk] muby is on the map! In-Reply-To: <1e55af990608020913w369866bm5f684dd9e3d1034b@mail.gmail.com> References: <1e55af990608020913w369866bm5f684dd9e3d1034b@mail.gmail.com> Message-ID: <20060802184310.GB30167@troja.ath.cx> Cool! On Wed, Aug 02, 2006 at 11:13:34AM -0500, Sy Ali wrote: > muby now shows up as #2 on Google for "ruby mud client" =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God doesn't play dice. -- Albert Einstein ################################################################### From sy1234 at gmail.com Wed Aug 2 16:22:39 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 16:22:39 -0400 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060802184238.GA30167@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> Message-ID: <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> On 8/2/06, Martin Kihlgren wrote: > > I see the coding, but shell doesn't seem to be working from the > > commandline. I've tried it while my user scripting was absent. > > Works fine with me... For me, it just sends the !string to the server. > > Also, it seems almost trivial to leverage what you're doing, to add # > > to ignore the command. This would let users copy code with comments > > and paste it into muby directly. > > I dont know what you are talking about? Leverage what? Ignoring what > command? !shell command /muby command send this #ignore this From sy1234 at gmail.com Wed Aug 2 18:38:40 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 17:38:40 -0500 Subject: [Muby-talk] muby speed issues Message-ID: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> I have not been able to narrow down the speed issues very specifically. There have been times when it has ground to an amazingly slow speed. This is noticible when I leave it idle for a while. I think there is something wrong with remote triggers. I have experimented a lot, and I have been able to narrow it down to these triggers: conf.remote_triggers[/^You wake up from .* and stand up\.$/] = [nil] conf.remote_triggers[/^In your dreams\, or what\?$/] = [nil] conf.remote_triggers[/^You wake and stand up\.$/] = [nil] conf.remote_triggers[/^You are already standing\.$/] = [nil] conf.remote_triggers[/^You dream about being able to .*\.$/] = [nil] I am not able to narrow it down much further.. no one trigger is the problem.. and I tried random combinations to see if I could catch the problem. No luck. With this small set of examples, the slowdown is difficult to notice.. It's absolutely within one file of similar remote triggers, and something about those examples above is wrong.. when they are about 5x the number of triggers. I tested with the original procedures/etc and with [nil], which I believe is still correct syntax. I wonder if 50 random remote triggers would cause a similar slowdown.. I will check. From sy1234 at gmail.com Wed Aug 2 18:45:49 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 2 Aug 2006 17:45:49 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> Message-ID: <1e55af990608021545k1da0db0bpaa0f0cd161227708@mail.gmail.com> I got lucky! It's either the number of triggers or a particular type of trigger. I repeated this trigger 100 times in the attached file, and it is a HUGE impact on speed: conf.remote_triggers[/^You dream about being able to 1.*\.$/] = [nil] Again, I don't know what's going on: * I'm doing something fundamentally wrong with my coding? * The number of triggers is an issue? * There is a need to optimize muby? Maybe some sort of secondary remote triggers array needs to be kept internally, and this array is destroyed as its members fail to match the beginning part of the line? I'm not sure how it's done right now.. It seems as though muby should match "Y" as the first character, and if it's not the first character.. the rest of the line should be very quickly processed. Let me know how I can help with this.. -------------- next part -------------- A non-text attachment was scrubbed... Name: slowdown.rb Type: application/octet-stream Size: 7090 bytes Desc: not available Url : http://rubyforge.org/pipermail/muby-talk/attachments/20060802/b717478e/attachment.obj From zond at troja.ath.cx Thu Aug 3 03:54:35 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 09:54:35 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> Message-ID: <20060803075435.GA7708@troja.ath.cx> On Wed, Aug 02, 2006 at 04:22:39PM -0400, Sy Ali wrote: > On 8/2/06, Martin Kihlgren wrote: > > > I see the coding, but shell doesn't seem to be working from the > > > commandline. I've tried it while my user scripting was absent. > > > > Works fine with me... > > For me, it just sends the !string to the server. What is your conf.local_triggers when that happens? > > > Also, it seems almost trivial to leverage what you're doing, to add # > > > to ignore the command. This would let users copy code with comments > > > and paste it into muby directly. > > > > I dont know what you are talking about? Leverage what? Ignoring what > > command? > > !shell command > /muby command > send this > #ignore this Ah yes, that was a nice idea. Ill add # to the default local triggers as something to be ignored :) //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 03:56:54 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 09:56:54 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> Message-ID: <20060803075654.GB7708@troja.ath.cx> Yes, remote triggers is definitely a problem - they will _all_ be checked for each character from the server. Maybe I should give each remote trigger a switch that tells if it is supposed to be checked for each character or just for each line? Or build to sets of triggers, remote_line_triggers and remote_triggers or something like that? //Martin On Wed, Aug 02, 2006 at 05:38:40PM -0500, Sy Ali wrote: > I have not been able to narrow down the speed issues very > specifically. There have been times when it has ground to an > amazingly slow speed. This is noticible when I leave it idle for a > while. > > I think there is something wrong with remote triggers. I have > experimented a lot, and I have been able to narrow it down to these > triggers: > > > conf.remote_triggers[/^You wake up from .* and stand up\.$/] = [nil] > conf.remote_triggers[/^In your dreams\, or what\?$/] = [nil] > conf.remote_triggers[/^You wake and stand up\.$/] = [nil] > conf.remote_triggers[/^You are already standing\.$/] = [nil] > conf.remote_triggers[/^You dream about being able to .*\.$/] = [nil] > > > I am not able to narrow it down much further.. no one trigger is the > problem.. and I tried random combinations to see if I could catch the > problem. No luck. > > With this small set of examples, the slowdown is difficult to notice.. > It's absolutely within one file of similar remote triggers, and > something about those examples above is wrong.. when they are about 5x > the number of triggers. > > I tested with the original procedures/etc and with [nil], which I > believe is still correct syntax. > > > I wonder if 50 random remote triggers would cause a similar slowdown.. > I will check. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 03:58:43 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 09:58:43 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608021545k1da0db0bpaa0f0cd161227708@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <1e55af990608021545k1da0db0bpaa0f0cd161227708@mail.gmail.com> Message-ID: <20060803075843.GC7708@troja.ath.cx> On Wed, Aug 02, 2006 at 05:45:49PM -0500, Sy Ali wrote: > I got lucky! It's either the number of triggers or a particular type > of trigger. I repeated this trigger 100 times in the attached file, > and it is a HUGE impact on speed: > > conf.remote_triggers[/^You dream about being able to 1.*\.$/] = [nil] Strange, that regexp shouldnt be that inefficient... > Again, I don't know what's going on: > > * I'm doing something fundamentally wrong with my coding? > * The number of triggers is an issue? > * There is a need to optimize muby? Not that I can see. Or - does a 100 of another trigger do the same thing? > Maybe some sort of secondary remote triggers array needs to be kept > internally, and this array is destroyed as its members fail to match > the beginning part of the line? I'm not sure how it's done right > now.. > > It seems as though muby should match "Y" as the first character, and > if it's not the first character.. the rest of the line should be very > quickly processed. Yes, it ought to be :O Read my previous mail, and see if you can think of anything better :) > Let me know how I can help with this.. All ideas are welcome.. //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 04:01:37 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:01:37 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060803075435.GA7708@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> Message-ID: <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > On Wed, Aug 02, 2006 at 04:22:39PM -0400, Sy Ali wrote: > > On 8/2/06, Martin Kihlgren wrote: > > > > I see the coding, but shell doesn't seem to be working from the > > > > commandline. I've tried it while my user scripting was absent. > > > > > > Works fine with me... > > > > For me, it just sends the !string to the server. > > What is your conf.local_triggers when that happens? I have default settings, so the array is empty. Just now I tried deleting my mubyrc to have it recreated (maybe it's blanking the array out?) and I tried /conf.local_triggers = [] but neither are solving this. Now it seems that !command is simply ignored. From sy1234 at gmail.com Thu Aug 3 04:02:27 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:02:27 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> Message-ID: <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> On 8/3/06, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > On Wed, Aug 02, 2006 at 04:22:39PM -0400, Sy Ali wrote: > > > On 8/2/06, Martin Kihlgren wrote: > > > > > I see the coding, but shell doesn't seem to be working from the > > > > > commandline. I've tried it while my user scripting was absent. > > > > > > > > Works fine with me... > > > > > > For me, it just sends the !string to the server. > > > > What is your conf.local_triggers when that happens? > > I have default settings, so the array is empty. Just now I tried > deleting my mubyrc to have it recreated (maybe it's blanking the array > out?) and I tried /conf.local_triggers = [] but neither are solving > this. Now it seems that !command is simply ignored. Hmm.. it feels like emptying the array is the wrong thing to do. Maybe the default rc file is doing this, and that's now the wrong thing to do? From sy1234 at gmail.com Thu Aug 3 04:04:22 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:04:22 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <20060803075654.GB7708@troja.ath.cx> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> Message-ID: <1e55af990608030104y63d2b1a7rceb394505cc97e75@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > > Yes, remote triggers is definitely a problem - they will _all_ be > checked for each character from the server. > > Maybe I should give each remote trigger a switch that tells if it is > supposed to be checked for each character or just for each line? > > Or build to sets of triggers, remote_line_triggers and remote_triggers > or something like that? Or perhaps implement a "groups" feature, so that triggers can be bound to groups which have different features? With this functionality an entire group could be enabled/disabled or have other associated features. From zond at troja.ath.cx Thu Aug 3 04:06:02 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:06:02 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> Message-ID: <20060803080602.GA7866@troja.ath.cx> On Thu, Aug 03, 2006 at 03:01:37AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > On Wed, Aug 02, 2006 at 04:22:39PM -0400, Sy Ali wrote: > > > On 8/2/06, Martin Kihlgren wrote: > > > > > I see the coding, but shell doesn't seem to be working from the > > > > > commandline. I've tried it while my user scripting was absent. > > > > > > > > Works fine with me... > > > > > > For me, it just sends the !string to the server. > > > > What is your conf.local_triggers when that happens? > > I have default settings, so the array is empty. Just now I tried > deleting my mubyrc to have it recreated (maybe it's blanking the array > out?) and I tried /conf.local_triggers = [] but neither are solving > this. Now it seems that !command is simply ignored. Default settings is not with the array empty... If you recreate your mubyrc you will notice that both /, ! and # (the latest only in the version from minutes ago) are covered in local_triggers. //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 04:06:40 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:06:40 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <20060803075654.GB7708@troja.ath.cx> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> Message-ID: <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > Maybe I should give each remote trigger a switch that tells if it is > supposed to be checked for each character or just for each line? What are the advantages and disadvantages? What about processing per-word? If processing a trigger per-line, what does this mean for that trigger, or for other triggers? I don't think I understand the difference -- except for speed ;) I've been scripting with the assumption that triggers are always per-line. I do not yet need a trigger which can work across multiple lines. One day I probably will, but it will be for very strange scripting. =) From zond at troja.ath.cx Thu Aug 3 04:07:11 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:07:11 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> Message-ID: <20060803080711.GB7866@troja.ath.cx> On Thu, Aug 03, 2006 at 03:02:27AM -0500, Sy Ali wrote: > On 8/3/06, Sy Ali wrote: > > On 8/3/06, Martin Kihlgren wrote: > > > On Wed, Aug 02, 2006 at 04:22:39PM -0400, Sy Ali wrote: > > > > On 8/2/06, Martin Kihlgren wrote: > > > > > > I see the coding, but shell doesn't seem to be working from the > > > > > > commandline. I've tried it while my user scripting was absent. > > > > > > > > > > Works fine with me... > > > > > > > > For me, it just sends the !string to the server. > > > > > > What is your conf.local_triggers when that happens? > > > > I have default settings, so the array is empty. Just now I tried > > deleting my mubyrc to have it recreated (maybe it's blanking the array > > out?) and I tried /conf.local_triggers = [] but neither are solving > > this. Now it seems that !command is simply ignored. > > Hmm.. it feels like emptying the array is the wrong thing to do. > Maybe the default rc file is doing this, and that's now the wrong > thing to do? Yes, it should not be empty. -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 04:08:49 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:08:49 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608030104y63d2b1a7rceb394505cc97e75@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030104y63d2b1a7rceb394505cc97e75@mail.gmail.com> Message-ID: <20060803080849.GA8063@troja.ath.cx> On Thu, Aug 03, 2006 at 03:04:22AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > > > Yes, remote triggers is definitely a problem - they will _all_ be > > checked for each character from the server. > > > > Maybe I should give each remote trigger a switch that tells if it is > > supposed to be checked for each character or just for each line? > > > > Or build to sets of triggers, remote_line_triggers and remote_triggers > > or something like that? > > Or perhaps implement a "groups" feature, so that triggers can be bound > to groups which have different features? > > With this functionality an entire group could be enabled/disabled or > have other associated features. An interesting idea, but a bit complex. If you can give me examples of when you would actually need it perhaps. But all that can be implemented by the scripter him/herself if the scripter is proficient enough to actually need that kind of functionality, is what I feel. //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 04:11:01 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:11:01 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> Message-ID: <20060803081101.GB8063@troja.ath.cx> On Thu, Aug 03, 2006 at 03:06:40AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > Maybe I should give each remote trigger a switch that tells if it is > > supposed to be checked for each character or just for each line? > > What are the advantages and disadvantages? The triggers that are per line would not require checking for each character. And I think most triggers are meant to react per line. > What about processing per-word? Just a middle way, Im not sure its worth it.. > If processing a trigger per-line, what does this mean for that > trigger, or for other triggers? I don't think I understand the > difference -- except for speed ;) A prompt without newline would not be able to trigger a per-line trigger. A per-line trigger would not do its stuff until the line was complete, whereas a per-character trigger can react the second the character shows up. > I've been scripting with the assumption that triggers are always > per-line. I do not yet need a trigger which can work across multiple > lines. One day I probably will, but it will be for very strange > scripting. =) Across multiple lines is no trigger atm, you need to build a simple state machine to be able to do that now. Per character is the behaviour atm. //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 04:13:15 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:13:15 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060803080711.GB7866@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> <20060803080711.GB7866@troja.ath.cx> Message-ID: <1e55af990608030113x5f2b134ax4c9086daed622d98@mail.gmail.com> * delete mubyrc * delete mubyrc.d * start the latest dev version * try !ls no result. .. but when I switch to verbose mode, then I can see the result! So that was the answer. I disagree with this feature requiring verbose mode though. =/ From sy1234 at gmail.com Thu Aug 3 04:14:50 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:14:50 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <20060803080849.GA8063@troja.ath.cx> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030104y63d2b1a7rceb394505cc97e75@mail.gmail.com> <20060803080849.GA8063@troja.ath.cx> Message-ID: <1e55af990608030114j13b7d65fw260f1830188ef8c9@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: (re. groups) > An interesting idea, but a bit complex. If you can give me examples of > when you would actually need it perhaps. > > But all that can be implemented by the scripter him/herself if the > scripter is proficient enough to actually need that kind of > functionality, is what I feel. I agree. Keep the keys in a separate array, and then act on that array.. one by one you can work with the master list of triggers. Maybe when I want this feature I'll write it myself.. then if other users like it it might get merged with muby. =) From sy1234 at gmail.com Thu Aug 3 04:19:01 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 03:19:01 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <20060803081101.GB8063@troja.ath.cx> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> <20060803081101.GB8063@troja.ath.cx> Message-ID: <1e55af990608030119v133e49co6980c874c0d08839@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > Per character is the behaviour atm. Ok, what do you feel about this then: * Implement per-line triggers. * Change the default behaviour to per-line. * Keep per-character triggers (rename this feature). So perhaps there would be a remote_trigger_c or some such.. it would be programmed the same in user scripting, but would just be a different user method name. It also seems true that per-character local triggers aren't needed.. but perhaps there is very advanced functionality which we have not thought of (auto-completion?). Well.. per-character processing for local triggers is not a speed impact. I vote that it remains as-is. From zond at troja.ath.cx Thu Aug 3 04:39:51 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:39:51 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608030113x5f2b134ax4c9086daed622d98@mail.gmail.com> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <20060802075157.GA21930@troja.ath.cx> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> <20060803080711.GB7866@troja.ath.cx> <1e55af990608030113x5f2b134ax4c9086daed622d98@mail.gmail.com> Message-ID: <20060803083951.GA8197@troja.ath.cx> Ah! I see. I just changed default verbosity for the shell_command! functionality to be :info instead of :debug. (You have to have conf.show_level at least :info to see it - but all levels above (:warn and :error) are specifically for people who dont want to see anything anyway...) //Martin On Thu, Aug 03, 2006 at 03:13:15AM -0500, Sy Ali wrote: > * delete mubyrc > * delete mubyrc.d > * start the latest dev version > * try !ls > > no result. > > .. but when I switch to verbose mode, then I can see the result! So > that was the answer. > > I disagree with this feature requiring verbose mode though. =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 04:40:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:40:28 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608030114j13b7d65fw260f1830188ef8c9@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030104y63d2b1a7rceb394505cc97e75@mail.gmail.com> <20060803080849.GA8063@troja.ath.cx> <1e55af990608030114j13b7d65fw260f1830188ef8c9@mail.gmail.com> Message-ID: <20060803084028.GA8645@troja.ath.cx> Good idea :) On Thu, Aug 03, 2006 at 03:14:50AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > (re. groups) > > An interesting idea, but a bit complex. If you can give me examples of > > when you would actually need it perhaps. > > > > But all that can be implemented by the scripter him/herself if the > > scripter is proficient enough to actually need that kind of > > functionality, is what I feel. > > I agree. Keep the keys in a separate array, and then act on that > array.. one by one you can work with the master list of triggers. > > Maybe when I want this feature I'll write it myself.. then if other > users like it it might get merged with muby. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 04:54:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 10:54:12 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608030119v133e49co6980c874c0d08839@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> <20060803081101.GB8063@troja.ath.cx> <1e55af990608030119v133e49co6980c874c0d08839@mail.gmail.com> Message-ID: <20060803085412.GB8645@troja.ath.cx> On Thu, Aug 03, 2006 at 03:19:01AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > Per character is the behaviour atm. > > Ok, what do you feel about this then: > > * Implement per-line triggers. > * Change the default behaviour to per-line. > * Keep per-character triggers (rename this feature). Sounds like a good plan. I just commited it :) > So perhaps there would be a remote_trigger_c or some such.. it would > be programmed the same in user scripting, but would just be a > different user method name. > > It also seems true that per-character local triggers aren't needed.. > but perhaps there is very advanced functionality which we have not > thought of (auto-completion?). The local triggers all operate on newline today yes. But we have (of a kind) per character triggers in the key_commands hash. > Well.. per-character processing for local triggers is not a speed > impact. I vote that it remains as-is. As is means on newline, atm (for local triggers :) //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 06:30:18 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 05:30:18 -0500 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <20060803083951.GA8197@troja.ath.cx> References: <1e55af990608011756r65e3f531i3f51f1562ac19b76@mail.gmail.com> <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> <20060803080711.GB7866@troja.ath.cx> <1e55af990608030113x5f2b134ax4c9086daed622d98@mail.gmail.com> <20060803083951.GA8197@troja.ath.cx> Message-ID: <1e55af990608030330w38caad6al1d94c3dace712948@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > > Ah! I see. > > I just changed default verbosity for the shell_command! functionality > to be :info instead of :debug. > > (You have to have conf.show_level at least :info to see it - but all > levels above (:warn and :error) are specifically for people who dont > want to see anything anyway...) I see how you tied it together. I would argue that anything sent from the keyboard would respond in all circumstances.. but you're thinking at a lower level.. so that user scripting which calls the shell command will display appropriately. Interesting. From sy1234 at gmail.com Thu Aug 3 06:48:00 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 05:48:00 -0500 Subject: [Muby-talk] muby-0.6.1 released Message-ID: <1e55af990608030348y530dc026n2e43b1a58629e9fa@mail.gmail.com> Changelog: * Disconnect an existing connection before connecting to another server. * Do not allow scrolling back more than one page into the buffer, if there is nothing there to see. * Remote triggers are now processed per-line, as it is a significant speed improvement. * conf.remote_character_triggers was added for per-character remote triggers. o This is useful for matching against prompts which do not terminate with '10' (a return). * !command now executes 'command' on your computer. This is shell_command! o The display of the output is verbosity-dependant. o Yes, this means that you could have triggers which run software -- email you for a clan war, play music during a battle, etc. * /command are the traditional muby commands. This is usable in userspace with execute_command! * #string is ignored. This is ignore_command! o This means you can copy code and comments into the input line, and the comments are ignored. Download it: http://rubyforge.org/frs/download.php/12126/muby-0.6.1.tar.gz http://rubyforge.org/projects/muby/ http://jrandomhacker.info/Muby From sy1234 at gmail.com Thu Aug 3 06:49:49 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 05:49:49 -0500 Subject: [Muby-talk] muby speed issues In-Reply-To: <20060803085412.GB8645@troja.ath.cx> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> <20060803081101.GB8063@troja.ath.cx> <1e55af990608030119v133e49co6980c874c0d08839@mail.gmail.com> <20060803085412.GB8645@troja.ath.cx> Message-ID: <1e55af990608030349r1b4dc3fatc5efd929f973d7a8@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > On Thu, Aug 03, 2006 at 03:19:01AM -0500, Sy Ali wrote: > > On 8/3/06, Martin Kihlgren wrote: > > > Per character is the behaviour atm. > > > > Ok, what do you feel about this then: > > > > * Implement per-line triggers. > > * Change the default behaviour to per-line. > > * Keep per-character triggers (rename this feature). > > Sounds like a good plan. I just commited it :) And I made 0.6.1 in celebration. =) From sy1234 at gmail.com Thu Aug 3 06:57:38 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 05:57:38 -0500 Subject: [Muby-talk] Aardwolf script-pack Message-ID: <1e55af990608030357q26f38976x3810a84755521db6@mail.gmail.com> I want to avoid associated my userspace scripting too closely with the muby core code, and so I've begun releasing a companion script pack outside of the muby code. It's available in the same file repository, and will be released anew for every muby revision. If enough changes happen between revisions, then it'll get a letter to its revision. This scripting pack enhances the Aardwolf experience, and it acts as a major and fairly stable source of testing for muby features. I have my own scripting which is private. But when interesting scripts test ok, they usually get migrated to the Aardwolf pack. Users who have specific needs, even for other muds, can chat with me on the mailing list. All these files can be overridden or re-used for all kinds of purposes. Whlie everything works, some of the coding is sub-optimal to expert eyes. =) http://rubyforge.org/frs/?group_id=1969 From zond at troja.ath.cx Thu Aug 3 07:22:26 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 13:22:26 +0200 Subject: [Muby-talk] Really simple shell functionality In-Reply-To: <1e55af990608030330w38caad6al1d94c3dace712948@mail.gmail.com> References: <1e55af990608021001n168a856cl8280d3868036c610@mail.gmail.com> <20060802184238.GA30167@troja.ath.cx> <1e55af990608021322u2509c4f6q853941e40af39ee6@mail.gmail.com> <20060803075435.GA7708@troja.ath.cx> <1e55af990608030101t2feba96cn8f591fee8c7e2aa5@mail.gmail.com> <1e55af990608030102q697d1ae8k275799587a9737cb@mail.gmail.com> <20060803080711.GB7866@troja.ath.cx> <1e55af990608030113x5f2b134ax4c9086daed622d98@mail.gmail.com> <20060803083951.GA8197@troja.ath.cx> <1e55af990608030330w38caad6al1d94c3dace712948@mail.gmail.com> Message-ID: <20060803112226.GA9751@troja.ath.cx> On Thu, Aug 03, 2006 at 05:30:18AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > > > Ah! I see. > > > > I just changed default verbosity for the shell_command! functionality > > to be :info instead of :debug. > > > > (You have to have conf.show_level at least :info to see it - but all > > levels above (:warn and :error) are specifically for people who dont > > want to see anything anyway...) > > I see how you tied it together. I would argue that anything sent from > the keyboard would respond in all circumstances.. but you're thinking > at a lower level.. so that user scripting which calls the shell > command will display appropriately. Interesting. Well, yes - some people may want to be able to do shell stuff without seing any spam - and they will have set show_level to :warn, for example.. Also, in the scripting case. This debug-level like thing, show_level, is not perfect, but it makes it easy to control your verbosity. //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 07:23:43 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 13:23:43 +0200 Subject: [Muby-talk] muby speed issues In-Reply-To: <1e55af990608030349r1b4dc3fatc5efd929f973d7a8@mail.gmail.com> References: <1e55af990608021538w2c0e6cbeqb4216579c30ba53f@mail.gmail.com> <20060803075654.GB7708@troja.ath.cx> <1e55af990608030106u4cf35103k65722c671292eabf@mail.gmail.com> <20060803081101.GB8063@troja.ath.cx> <1e55af990608030119v133e49co6980c874c0d08839@mail.gmail.com> <20060803085412.GB8645@troja.ath.cx> <1e55af990608030349r1b4dc3fatc5efd929f973d7a8@mail.gmail.com> Message-ID: <20060803112343.GB9751@troja.ath.cx> weee :) On Thu, Aug 03, 2006 at 05:49:49AM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > On Thu, Aug 03, 2006 at 03:19:01AM -0500, Sy Ali wrote: > > > On 8/3/06, Martin Kihlgren wrote: > > > > Per character is the behaviour atm. > > > > > > Ok, what do you feel about this then: > > > > > > * Implement per-line triggers. > > > * Change the default behaviour to per-line. > > > * Keep per-character triggers (rename this feature). > > > > Sounds like a good plan. I just commited it :) > > And I made 0.6.1 in celebration. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 15:32:56 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 21:32:56 +0200 Subject: [Muby-talk] tab completion Message-ID: <20060803193256.GA16348@troja.ath.cx> Tab completion should work in the latest version! W00t! //Martin -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 16:11:10 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 15:11:10 -0500 Subject: [Muby-talk] tab completion In-Reply-To: <20060803193256.GA16348@troja.ath.cx> References: <20060803193256.GA16348@troja.ath.cx> Message-ID: <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > > Tab completion should work in the latest version! W00t! I'll wait until you're done hacking on it to try it. I see you're already working on some tweaks. Nice. =) From zond at troja.ath.cx Thu Aug 3 16:37:04 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 3 Aug 2006 22:37:04 +0200 Subject: [Muby-talk] tab completion In-Reply-To: <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> Message-ID: <20060803203703.GA16649@troja.ath.cx> And now I have added a history search function! Look in the changelog to see how it works. It is VERY nice :) Please, try them out to check for bugs I havent found! //Martin On Thu, Aug 03, 2006 at 03:11:10PM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > > > Tab completion should work in the latest version! W00t! > > I'll wait until you're done hacking on it to try it. I see you're > already working on some tweaks. Nice. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 18:02:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 17:02:59 -0500 Subject: [Muby-talk] tab completion In-Reply-To: <20060803203703.GA16649@troja.ath.cx> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> <20060803203703.GA16649@troja.ath.cx> Message-ID: <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > > And now I have added a history search function! Look in the changelog > to see how it works. It is VERY nice :) > > Please, try them out to check for bugs I havent found! Even when I remove all user files, I get this when I try to connect: NameError: uninitialized constant Muby::Completer From sy1234 at gmail.com Thu Aug 3 18:09:56 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 17:09:56 -0500 Subject: [Muby-talk] command execution - in a thread Message-ID: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> I'm trying to get a Thread.new in at the right point, so that I can run external commands like X applications, and still mud.. but I cannot figure out where this should be inserted. Martin, can you take a look? From zond at troja.ath.cx Thu Aug 3 18:25:50 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 00:25:50 +0200 Subject: [Muby-talk] tab completion In-Reply-To: <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> <20060803203703.GA16649@troja.ath.cx> <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> Message-ID: <20060803222550.GA17744@troja.ath.cx> Ehm, embarrasing... I forgot to add the file to svn. Now I have, try again :) //Martin On Thu, Aug 03, 2006 at 05:02:59PM -0500, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > > > And now I have added a history search function! Look in the changelog > > to see how it works. It is VERY nice :) > > > > Please, try them out to check for bugs I havent found! > > Even when I remove all user files, I get this when I try to connect: > > NameError: uninitialized constant Muby::Completer > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From zond at troja.ath.cx Thu Aug 3 18:26:24 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 00:26:24 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> Message-ID: <20060803222624.GB17744@troja.ath.cx> What exactly is it that you want to do? :O //Martin On Thu, Aug 03, 2006 at 05:09:56PM -0500, Sy Ali wrote: > I'm trying to get a Thread.new in at the right point, so that I can > run external commands like X applications, and still mud.. but I > cannot figure out where this should be inserted. Martin, can you take > a look? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 19:05:03 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 18:05:03 -0500 Subject: [Muby-talk] tab completion In-Reply-To: <20060803222550.GA17744@troja.ath.cx> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> <20060803203703.GA16649@troja.ath.cx> <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> <20060803222550.GA17744@troja.ath.cx> Message-ID: <1e55af990608031605u37f1ecaet9ab20dc1bcf85052@mail.gmail.com> On 8/3/06, Martin Kihlgren wrote: > > Ehm, embarrasing... > > I forgot to add the file to svn. > > Now I have, try again :) I get the same error. From sy1234 at gmail.com Thu Aug 3 19:05:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 18:05:46 -0500 Subject: [Muby-talk] tab completion In-Reply-To: <1e55af990608031605u37f1ecaet9ab20dc1bcf85052@mail.gmail.com> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> <20060803203703.GA16649@troja.ath.cx> <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> <20060803222550.GA17744@troja.ath.cx> <1e55af990608031605u37f1ecaet9ab20dc1bcf85052@mail.gmail.com> Message-ID: <1e55af990608031605h54dd32c8xe2bcf3016eff0e16@mail.gmail.com> On 8/3/06, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > > > > Ehm, embarrasing... > > > > I forgot to add the file to svn. > > > > Now I have, try again :) > > I get the same error. Nevermind, I have it working. =) From zond at troja.ath.cx Thu Aug 3 19:19:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 01:19:12 +0200 Subject: [Muby-talk] tab completion In-Reply-To: <1e55af990608031605h54dd32c8xe2bcf3016eff0e16@mail.gmail.com> References: <20060803193256.GA16348@troja.ath.cx> <1e55af990608031311q369fd6f4v93365135434e97ba@mail.gmail.com> <20060803203703.GA16649@troja.ath.cx> <1e55af990608031502w2ccc1f8cx3f74b623345f3f62@mail.gmail.com> <20060803222550.GA17744@troja.ath.cx> <1e55af990608031605u37f1ecaet9ab20dc1bcf85052@mail.gmail.com> <1e55af990608031605h54dd32c8xe2bcf3016eff0e16@mail.gmail.com> Message-ID: <20060803231912.GA19151@troja.ath.cx> :) On Thu, Aug 03, 2006 at 06:05:46PM -0500, Sy Ali wrote: > On 8/3/06, Sy Ali wrote: > > On 8/3/06, Martin Kihlgren wrote: > > > > > > Ehm, embarrasing... > > > > > > I forgot to add the file to svn. > > > > > > Now I have, try again :) > > > > I get the same error. > > Nevermind, I have it working. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Only those who leisurely approach that which the masses are busy about can be busy about that which the masses take leisurely. -- Lao Tsu ################################################################### From sy1234 at gmail.com Thu Aug 3 19:49:30 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 3 Aug 2006 18:49:30 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060803222624.GB17744@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> Message-ID: <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> Launch any number of graphical applications. !xmms launches xmms. Then hangs muby. In a thread, I could keep using muby. On 8/3/06, Martin Kihlgren wrote: > > What exactly is it that you want to do? :O > > //Martin > > On Thu, Aug 03, 2006 at 05:09:56PM -0500, Sy Ali wrote: > > I'm trying to get a Thread.new in at the right point, so that I can > > run external commands like X applications, and still mud.. but I > > cannot figure out where this should be inserted. Martin, can you take > > a look? > > _______________________________________________ > > muby-talk mailing list > > muby-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/muby-talk > > http://rubyforge.org/projects/muby/ > > -- > ################################################################### > Only those who leisurely approach that which the masses are busy about > can be busy about that which the masses take leisurely. > -- Lao Tsu > ################################################################### > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > From zond at troja.ath.cx Fri Aug 4 03:59:03 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 09:59:03 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> Message-ID: <20060804075903.GA26359@troja.ath.cx> Try /Thread.new do system("xmms") end might work (havent tested) //Martin On Thu, Aug 03, 2006 at 06:49:30PM -0500, Sy Ali wrote: > Launch any number of graphical applications. > > !xmms > > launches xmms. Then hangs muby. In a thread, I could keep using muby. > > > On 8/3/06, Martin Kihlgren wrote: > > > > What exactly is it that you want to do? :O > > > > //Martin > > > > On Thu, Aug 03, 2006 at 05:09:56PM -0500, Sy Ali wrote: > > > I'm trying to get a Thread.new in at the right point, so that I can > > > run external commands like X applications, and still mud.. but I > > > cannot figure out where this should be inserted. Martin, can you take > > > a look? > > > _______________________________________________ > > > muby-talk mailing list > > > muby-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/muby-talk > > > http://rubyforge.org/projects/muby/ > > > > -- > > ################################################################### > > Only those who leisurely approach that which the masses are busy about > > can be busy about that which the masses take leisurely. > > -- Lao Tsu > > ################################################################### > > _______________________________________________ > > 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/ -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 05:28:35 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 04:28:35 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804075903.GA26359@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> Message-ID: <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> On 8/4/06, Martin Kihlgren wrote: > /Thread.new do system("xmms") end > > might work (havent tested) Yes, that works. So I can eaily make a user-wrapper which does this by default. I'd still recommend this functionality by default. It's kindof neat to be able to do a huge ls -alR and keep mudding while the text comes in. ;) Or maybe there needs to be a toggle for it? =/ From zond at troja.ath.cx Fri Aug 4 06:48:09 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 12:48:09 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> Message-ID: <20060804104809.GA26582@troja.ath.cx> Hm, im a bit sceptical... starting threads ought to be explicit... But - apart from the screen resize thing, what other features do you think are most important to get implemented? //Martin On Fri, Aug 04, 2006 at 04:28:35AM -0500, Sy Ali wrote: > On 8/4/06, Martin Kihlgren wrote: > > /Thread.new do system("xmms") end > > > > might work (havent tested) > > Yes, that works. So I can eaily make a user-wrapper which does this by default. > > I'd still recommend this functionality by default. It's kindof neat > to be able to do a huge ls -alR and keep mudding while the text comes > in. ;) > > Or maybe there needs to be a toggle for it? =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From zond at troja.ath.cx Fri Aug 4 06:55:34 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 12:55:34 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> Message-ID: <20060804105534.GA28083@troja.ath.cx> Btw, why dont you put your aardmud code in the contrib directory? I think it would fit just fine there :O //Martin On Fri, Aug 04, 2006 at 04:28:35AM -0500, Sy Ali wrote: > On 8/4/06, Martin Kihlgren wrote: > > /Thread.new do system("xmms") end > > > > might work (havent tested) > > Yes, that works. So I can eaily make a user-wrapper which does this by default. > > I'd still recommend this functionality by default. It's kindof neat > to be able to do a huge ls -alR and keep mudding while the text comes > in. ;) > > Or maybe there needs to be a toggle for it? =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 08:57:12 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 07:57:12 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804105534.GA28083@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804105534.GA28083@troja.ath.cx> Message-ID: <1e55af990608040557o1d2adf8dyf3f98efcc43df38d@mail.gmail.com> On 8/4/06, Martin Kihlgren wrote: > > Btw, why dont you put your aardmud code in the contrib directory? I > think it would fit just fine there :O Because I was convinced I was introducing bugs. =) Ok, I'll do this soon. From sy1234 at gmail.com Fri Aug 4 09:20:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 08:20:59 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804104809.GA26582@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804104809.GA26582@troja.ath.cx> Message-ID: <1e55af990608040620gcf504f1t4f0ee240ac27d8f4@mail.gmail.com> On 8/4/06, Martin Kihlgren wrote: > Hm, im a bit sceptical... starting threads ought to be explicit... > > But - apart from the screen resize thing, what other features do you > think are most important to get implemented? Ok, I can see how new threads could be considered "risky".. --+ There are a couple of things which I don't know are possible, and may require a lot of thinking: * Be able to save user-variables between sessions. * Be able to undo user scripting while reloading their files. The longer muby is in use, the more messy the user's scripting can become. Lots of experimentation can make triggers and such, but those are easy to clean up. However, variables and methods are mysterious things. My coding is has very serious issues: * It's "flat", because I don't yet understand OO coding. =) * It uses global variables. If user scripting were done in a "userspace" somehow, then I think it would be simple to kill methods and variables in that space. Otherwise, I would be implementing something similar to your conf. to get/set variables.. What are your thoughts on my dillema? From zond at troja.ath.cx Fri Aug 4 09:25:48 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 15:25:48 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608040557o1d2adf8dyf3f98efcc43df38d@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804105534.GA28083@troja.ath.cx> <1e55af990608040557o1d2adf8dyf3f98efcc43df38d@mail.gmail.com> Message-ID: <20060804132548.GA28378@troja.ath.cx> But you are allowed to do that in the contrib directory :D On Fri, Aug 04, 2006 at 07:57:12AM -0500, Sy Ali wrote: > On 8/4/06, Martin Kihlgren wrote: > > > > Btw, why dont you put your aardmud code in the contrib directory? I > > think it would fit just fine there :O > > Because I was convinced I was introducing bugs. =) > > Ok, I'll do this soon. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 09:28:58 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 08:28:58 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804132548.GA28378@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804105534.GA28083@troja.ath.cx> <1e55af990608040557o1d2adf8dyf3f98efcc43df38d@mail.gmail.com> <20060804132548.GA28378@troja.ath.cx> Message-ID: <1e55af990608040628k2e4e2190kfc04878a54d94bc7@mail.gmail.com> > On Fri, Aug 04, 2006 at 07:57:12AM -0500, Sy Ali wrote: > > On 8/4/06, Martin Kihlgren wrote: > > > > > > Btw, why dont you put your aardmud code in the contrib directory? I > > > think it would fit just fine there :O > > > > Because I was convinced I was introducing bugs. =) > > > > Ok, I'll do this soon. On 8/4/06, Martin Kihlgren wrote: > > But you are allowed to do that in the contrib directory :D Yeah, ok. I'm recovering from some cold/flu illness. I'll get back into things real soon. =) From zond at troja.ath.cx Fri Aug 4 09:29:01 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 15:29:01 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608040620gcf504f1t4f0ee240ac27d8f4@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804104809.GA26582@troja.ath.cx> <1e55af990608040620gcf504f1t4f0ee240ac27d8f4@mail.gmail.com> Message-ID: <20060804132900.GB28378@troja.ath.cx> On Fri, Aug 04, 2006 at 08:20:59AM -0500, Sy Ali wrote: > There are a couple of things which I don't know are possible, and may > require a lot of thinking: > > * Be able to save user-variables between sessions. The conf variables are easily saved, I have prepared the Configuration class for that. The rest are not so easy however. > * Be able to undo user scripting while reloading their files. Really hard. All methods and classes with the same name will be overwritten, but deleting old stuff is hard. You have to find all methods and variabels and undef or nil them. > The longer muby is in use, the more messy the user's scripting can > become. Lots of experimentation can make triggers and such, but those > are easy to clean up. > > However, variables and methods are mysterious things. My coding is > has very serious issues: > > * It's "flat", because I don't yet understand OO coding. =) > * It uses global variables. > > If user scripting were done in a "userspace" somehow, then I think it > would be simple to kill methods and variables in that space. > > Otherwise, I would be implementing something similar to your conf. to > get/set variables.. > > What are your thoughts on my dillema? Oh, I dont see any golden hammer. I think you have to learn to understand OO and then see what part of it can solve your problems in the best way. Give me an example of some piece of code or data that you want to be able to 'reload'? //Martin -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 09:42:18 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 08:42:18 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804132900.GB28378@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804104809.GA26582@troja.ath.cx> <1e55af990608040620gcf504f1t4f0ee240ac27d8f4@mail.gmail.com> <20060804132900.GB28378@troja.ath.cx> Message-ID: <1e55af990608040642v5dd710fcnf8845fbab6f4c5ca@mail.gmail.com> > > * Be able to undo user scripting while reloading their files. > > Really hard. All methods and classes with the same name will be > overwritten, but deleting old stuff is hard. You have to find all > methods and variabels and undef or nil them. Is it possible to do this to all non-namespace items? This way the muby code code is safe, but user scripting is destroyed. Then reloading the user scripting could be done. > Give me an example of some piece of code or data that you want to be > able to 'reload'? it's simple.. def test # something end ok, I use muby for a while.. I use this method for a while. I find a bug. def test # something else end Now I reload user scripts. This works well, until I rename it: def renamed # something else end Now I've got 'test' floating around in userspace taking up space. This is also true with variables. Neither is a bad thing though.. so maybe they're not worth spending time on. Ok, that's simple.. but what about triggers? If I experiment a lot, I could end up with different triggers which all fire off together.. that's very messy. But It's trivial to have my user-scripting detect a reload and destroy all triggers before reloading. Well.. I guess I can solve the real problem here on my own. =) From zond at troja.ath.cx Fri Aug 4 09:55:03 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 15:55:03 +0200 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <1e55af990608040642v5dd710fcnf8845fbab6f4c5ca@mail.gmail.com> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804104809.GA26582@troja.ath.cx> <1e55af990608040620gcf504f1t4f0ee240ac27d8f4@mail.gmail.com> <20060804132900.GB28378@troja.ath.cx> <1e55af990608040642v5dd710fcnf8845fbab6f4c5ca@mail.gmail.com> Message-ID: <20060804135503.GA30128@troja.ath.cx> On Fri, Aug 04, 2006 at 08:42:18AM -0500, Sy Ali wrote: > > > * Be able to undo user scripting while reloading their files. > > > > Really hard. All methods and classes with the same name will be > > overwritten, but deleting old stuff is hard. You have to find all > > methods and variabels and undef or nil them. > > Is it possible to do this to all non-namespace items? This way the > muby code code is safe, but user scripting is destroyed. Then > reloading the user scripting could be done. There is actually no non-namespace names. If you dont mention the namespace, it is assumed to be the namespace you are in at the moment, which in your case is probably Object, which is the superclass of all other classes. What you could do, if you want to make sure you clear something out, is to define all code as methods in a class, and all data as instance or class variables in a class. Then (if you dont add or change name for methods in the class in runtime) all code for that class will be overridden when you load it again. You can also iterate over all instance and class variables in that class and reset them to nil (which is equal to never having set them). > > Give me an example of some piece of code or data that you want to be > > able to 'reload'? > > it's simple.. > > def test > # something > end > > ok, I use muby for a while.. I use this method for a while. I find a bug. > > def test > # something else > end > > Now I reload user scripts. This works well, until I rename it: > > def renamed > # something else > end > > Now I've got 'test' floating around in userspace taking up space. > This is also true with variables. Neither is a bad thing though.. so > maybe they're not worth spending time on. You can undef it, of course, but its hard to know exactly what to undef... > Ok, that's simple.. but what about triggers? If I experiment a lot, I > could end up with different triggers which all fire off together.. > that's very messy. But It's trivial to have my user-scripting detect > a reload and destroy all triggers before reloading. > > Well.. I guess I can solve the real problem here on my own. =) Ya, just clearing the triggers is pretty easy. I try to keep my scripting in the files, so that a reload will redefine them all, and in worst case I can just restart muby. But yes, its a tricky problem. And yes, you can probably solve most of the problems on your own :) //Martin -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 10:33:47 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 09:33:47 -0500 Subject: [Muby-talk] GUI version? Message-ID: <1e55af990608040733m7ce194f4t7d583d4869d52ab2@mail.gmail.com> How difficult would it be to persue a GTK or other GUI frontend? The scroll speed on a GUI app is much better. From zond at troja.ath.cx Fri Aug 4 11:16:47 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 4 Aug 2006 17:16:47 +0200 Subject: [Muby-talk] GUI version? In-Reply-To: <1e55af990608040733m7ce194f4t7d583d4869d52ab2@mail.gmail.com> References: <1e55af990608040733m7ce194f4t7d583d4869d52ab2@mail.gmail.com> Message-ID: <20060804151647.GA30407@troja.ath.cx> On Fri, Aug 04, 2006 at 09:33:47AM -0500, Sy Ali wrote: > How difficult would it be to persue a GTK or other GUI frontend? > > The scroll speed on a GUI app is much better. Is it? I have not experienced anything like that... and I chose ncurses as a basis to not have any gui - i wanted a system that worked perfectly fine using telnet or ssh, and fit in screen. What would you have in mind with a gui that would be better than what there is now? //Martin -- ################################################################### echo "ICK, NOTHING WORKED!!! You may have to diddle the includes.";; -- Larry Wall in Configure from the perl distribution ################################################################### From sy1234 at gmail.com Fri Aug 4 12:06:11 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 11:06:11 -0500 Subject: [Muby-talk] GUI version? In-Reply-To: <20060804151647.GA30407@troja.ath.cx> References: <1e55af990608040733m7ce194f4t7d583d4869d52ab2@mail.gmail.com> <20060804151647.GA30407@troja.ath.cx> Message-ID: <1e55af990608040906x6a4ecc37qe5b3c808507303c3@mail.gmail.com> On 8/4/06, Martin Kihlgren wrote: > On Fri, Aug 04, 2006 at 09:33:47AM -0500, Sy Ali wrote: > > How difficult would it be to persue a GTK or other GUI frontend? > > > > The scroll speed on a GUI app is much better. > > Is it? I have not experienced anything like that... and I chose > ncurses as a basis to not have any gui - i wanted a system that worked > perfectly fine using telnet or ssh, and fit in screen. > > What would you have in mind with a gui that would be better than what > there is now? Well, the only thing I could see a GUI app being better with, functionally speaking, is with something like a map that can be clicked on. But this isn't something I care about myself. I agree with the value of keeping it simple. I wonder if I ought to check out something other than xterm, to see if I can get some more speed that way. From sy1234 at gmail.com Fri Aug 4 12:07:58 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 4 Aug 2006 11:07:58 -0500 Subject: [Muby-talk] command execution - in a thread In-Reply-To: <20060804104809.GA26582@troja.ath.cx> References: <1e55af990608031509j17df51f3q9cc4434bba8ddb2@mail.gmail.com> <20060803222624.GB17744@troja.ath.cx> <1e55af990608031649g12a3654eva32698332c94060a@mail.gmail.com> <20060804075903.GA26359@troja.ath.cx> <1e55af990608040228v1614059doc615360a138f3ee8@mail.gmail.com> <20060804104809.GA26582@troja.ath.cx> Message-ID: <1e55af990608040907w247b06c0u47fb5c9223d7f9fb@mail.gmail.com> On 8/4/06, Martin Kihlgren wrote: > But - apart from the screen resize thing, what other features do you > think are most important to get implemented? I still can't think of anything good. I need to convert more of my code over to muby, but I haven't the energy right now. While that stuff is being done, I usually run into all kinds of strange issues and ideas. =) From sy1234 at gmail.com Sat Aug 5 07:23:56 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 5 Aug 2006 06:23:56 -0500 Subject: [Muby-talk] appending to conf.key_commands Message-ID: <1e55af990608050423we5cd9adla73fdf3e5ef9c694@mail.gmail.com> How would I append to conf.key_commands instead of completely redefining all of it? This won't work: conf.key_commands.merge!({ 265=>:f1 }) Ideas? From zond at troja.ath.cx Sat Aug 5 07:24:45 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 5 Aug 2006 13:24:45 +0200 Subject: [Muby-talk] appending to conf.key_commands In-Reply-To: <1e55af990608050423we5cd9adla73fdf3e5ef9c694@mail.gmail.com> References: <1e55af990608050423we5cd9adla73fdf3e5ef9c694@mail.gmail.com> Message-ID: <20060805112445.GA12494@troja.ath.cx> conf.key_commands[265] = :f1 On Sat, Aug 05, 2006 at 06:23:56AM -0500, Sy Ali wrote: > How would I append to conf.key_commands instead of completely > redefining all of it? > > This won't work: > > conf.key_commands.merge!({ 265=>:f1 }) > > Ideas? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### I have the power to HALT PRODUCTION on all TEENAGE SEX COMEDIES!! ################################################################### From zond at troja.ath.cx Sat Aug 5 08:04:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 5 Aug 2006 14:04:28 +0200 Subject: [Muby-talk] RMUD Message-ID: <20060805120428.GA12772@troja.ath.cx> Btw, have you looked at http://rubyforge.org/projects/rmud/ ? Can we learn anything from that project that we want to implement? I am kind of interested in the syntax to configure it: remote_trigger(/^trigger string$/) do do_fancy_stuff end Is this better than what we have today? conf.remote_triggers[/^trigger string$] = Proc do do_fancy_stuff end What we could not do with RMUDs syntax is using :symbols or "strings" instead of Procs for the triggers and stuff. //Martin -- ################################################################### I have the power to HALT PRODUCTION on all TEENAGE SEX COMEDIES!! ################################################################### From sy1234 at gmail.com Sun Aug 6 04:09:30 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Aug 2006 03:09:30 -0500 Subject: [Muby-talk] RMUD In-Reply-To: <20060805120428.GA12772@troja.ath.cx> References: <20060805120428.GA12772@troja.ath.cx> Message-ID: <1e55af990608060109y444feeacpdd0246508b4afda4@mail.gmail.com> On 8/5/06, Martin Kihlgren wrote: > > Btw, have you looked at http://rubyforge.org/projects/rmud/ ? > > Can we learn anything from that project that we want to implement? I > am kind of interested in the syntax to configure it: There's always something to learn, but rmud has one release from several months ago and no files in SVN.. so perhaps muby is more mature. There is also vwmc: http://jrandomhacker.info/Vwmc http://vwmclient.rubyforge.org Ondrej Bilka made an unreleased and incomplete "nanofugue". He emailed me about the possibility of working together with muby, and I've asked him to join the list and discuss it. > remote_trigger(/^trigger string$/) do > do_fancy_stuff > end > > Is this better than what we have today? > > conf.remote_triggers[/^trigger string$] = Proc do > do_fancy_stuff > end I don't see the difference. For a user, they only care about two situations: * Defining what a trigger does right then and there. This keeps the code clean. * Defining what a trigger does as re-usable code. This means that an alias, a trigger and whatever other code can re-use the same code. I'm a bit challenged at this because of issues of working with parameters and MatchData and such, but it's still ok. Now, for a programmer perhaps the perspective is different, but in my case I like a simplified interface to the client and then I do my own scripting which can get as complecated as I want.. all i need access to are variables and "situational reports" from the client -- trigger responses, variable updates, timing, etc. > What we could not do with RMUDs syntax is using :symbols or "strings" > instead of Procs for the triggers and stuff. I haven't done enough work to know if muby's more flexible syntax is valuable or not.. I haven't used strings yet, but I use symbols _extensively_. From zond at troja.ath.cx Sun Aug 6 06:07:52 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 6 Aug 2006 12:07:52 +0200 Subject: [Muby-talk] RMUD In-Reply-To: <1e55af990608060109y444feeacpdd0246508b4afda4@mail.gmail.com> References: <20060805120428.GA12772@troja.ath.cx> <1e55af990608060109y444feeacpdd0246508b4afda4@mail.gmail.com> Message-ID: <20060806100752.GA16383@troja.ath.cx> On Sun, Aug 06, 2006 at 03:09:30AM -0500, Sy Ali wrote: > On 8/5/06, Martin Kihlgren wrote: > > > > Btw, have you looked at http://rubyforge.org/projects/rmud/ ? > > > > Can we learn anything from that project that we want to implement? I > > am kind of interested in the syntax to configure it: > > There's always something to learn, but rmud has one release from > several months ago and no files in SVN.. so perhaps muby is more > mature. Yes, it seems to be more mature - but good features are good features :) > There is also vwmc: > http://jrandomhacker.info/Vwmc > http://vwmclient.rubyforge.org > > Ondrej Bilka made an unreleased and incomplete > "nanofugue". He emailed me about the possibility of working together > with muby, and I've asked him to join the list and discuss it. Ah, good idea :) I wonder what we can do for each other though. > > remote_trigger(/^trigger string$/) do > > do_fancy_stuff > > end > > > > Is this better than what we have today? > > > > conf.remote_triggers[/^trigger string$] = Proc do > > do_fancy_stuff > > end > > I don't see the difference. For a user, they only care about two situations: > * Defining what a trigger does right then and there. This keeps the code clean. > * Defining what a trigger does as re-usable code. This means that an > alias, a trigger and whatever other code can re-use the same code. > I'm a bit challenged at this because of issues of working with > parameters and MatchData and such, but it's still ok. Well, the syntax of RMUD seems to have gotten rid of the parameters etc, but that cost them a lot of scoping. I know you dont feel really comfortable with scoping, but one day youll thank me :) > Now, for a programmer perhaps the perspective is different, but in my > case I like a simplified interface to the client and then I do my own > scripting which can get as complecated as I want.. all i need access > to are variables and "situational reports" from the client -- trigger > responses, variable updates, timing, etc. Yes, true. Well, if you feel comfortable with what muby has to offer, then I guess its ok. > > What we could not do with RMUDs syntax is using :symbols or "strings" > > instead of Procs for the triggers and stuff. > > I haven't done enough work to know if muby's more flexible syntax is > valuable or not.. I haven't used strings yet, but I use symbols > _extensively_. Ok :) //Martin -- ################################################################### strategy, n.: A comprehensive plan of inaction. ################################################################### From sy1234 at gmail.com Sun Aug 6 10:41:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Aug 2006 09:41:59 -0500 Subject: [Muby-talk] weird message when scrolling (solved in 0.6.1) Message-ID: <1e55af990608060741k1db4d0c8u2fba4ca57790fd8c@mail.gmail.com> Just a quick report.. I think I mentioned earlier that I was getting a message anytime I would pageup and then pagedown.. that message has gone away in 0.6.1. The message was: NoMethodError: undefined method `setMessageLine' for nil:NilClass From sy1234 at gmail.com Sun Aug 6 12:05:41 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Aug 2006 11:05:41 -0500 Subject: [Muby-talk] muby the cause of massive drive-thrashing? Message-ID: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> I had this happen once before. I woke to see my machine was locked and was just doing hard drive operations of some sort. I powered it down after a number of minutes. This has happened once more, while I was using muby. I was able to terminate muby and the issue cleared up almost immediately. I was not running any other notible process. Before, I thought it was bittorrent, but that wasn't running now. I checked /var/log/messages and there are no messages during this time. There was a firewall cron job running earlier, but I don't believe this was caused by it. Perhaps it does connection logging and this is what caused all of this? I have not directly edited the mubyrc file, I am merely overriding items in user scripting (like the keys). Any ideas? I'm not familiar with any xterm-specific logging or other issues, and my MCCP proxy isn't set up to log. muby by default does not do logging, and I have not overridden those settings. This could be ruby's "garbage collection" at work.. but I'm not sure. I don't know if this is a real issue or not.. I'm going to keep an eye on it. From zond at troja.ath.cx Sun Aug 6 18:57:41 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 00:57:41 +0200 Subject: [Muby-talk] weird message when scrolling (solved in 0.6.1) In-Reply-To: <1e55af990608060741k1db4d0c8u2fba4ca57790fd8c@mail.gmail.com> References: <1e55af990608060741k1db4d0c8u2fba4ca57790fd8c@mail.gmail.com> Message-ID: <20060806225741.GA23950@troja.ath.cx> That was an old bugfix yes. On Sun, Aug 06, 2006 at 09:41:59AM -0500, Sy Ali wrote: > Just a quick report.. I think I mentioned earlier that I was getting a > message anytime I would pageup and then pagedown.. that message has > gone away in 0.6.1. The message was: > > NoMethodError: undefined method `setMessageLine' for nil:NilClass > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### strategy, n.: A comprehensive plan of inaction. ################################################################### From zond at troja.ath.cx Sun Aug 6 18:59:07 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 00:59:07 +0200 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> Message-ID: <20060806225907.GB23950@troja.ath.cx> Strange :O I have noticed that at times when the connection is laggy muby seems to take up all available system resources, but as soon as the connection clears up again, everything is fine. I have no idea why.. Perhaps this is related? //Martin On Sun, Aug 06, 2006 at 11:05:41AM -0500, Sy Ali wrote: > I had this happen once before. I woke to see my machine was locked > and was just doing hard drive operations of some sort. I powered it > down after a number of minutes. > > This has happened once more, while I was using muby. I was able to > terminate muby and the issue cleared up almost immediately. I was not > running any other notible process. Before, I thought it was > bittorrent, but that wasn't running now. > > I checked /var/log/messages and there are no messages during this > time. There was a firewall cron job running earlier, but I don't > believe this was caused by it. Perhaps it does connection logging and > this is what caused all of this? > > I have not directly edited the mubyrc file, I am merely overriding > items in user scripting (like the keys). > > > Any ideas? I'm not familiar with any xterm-specific logging or other > issues, and my MCCP proxy isn't set up to log. muby by default does > not do logging, and I have not overridden those settings. > > > This could be ruby's "garbage collection" at work.. but I'm not sure. > > I don't know if this is a real issue or not.. I'm going to keep an eye on it. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### strategy, n.: A comprehensive plan of inaction. ################################################################### From sy1234 at gmail.com Sun Aug 6 20:01:43 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Aug 2006 19:01:43 -0500 Subject: [Muby-talk] Accessing command history Message-ID: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> I've been playing, and I can't see a way to access the history of past commands. I can see bits and pieces, but I'm not sure what to do to read the past commands, or to modify or re-execute one of them. Ideas? From sy1234 at gmail.com Sun Aug 6 20:14:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 6 Aug 2006 19:14:51 -0500 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <20060806225907.GB23950@troja.ath.cx> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> <20060806225907.GB23950@troja.ath.cx> Message-ID: <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> On 8/6/06, Martin Kihlgren wrote: > > Strange :O > > I have noticed that at times when the connection is laggy muby seems > to take up all available system resources, but as soon as the > connection clears up again, everything is fine. I have no idea why.. > > Perhaps this is related? My intuition says it's something low-level. Maybe the way it's writing to the display? Maybe ruby is constantly polling the connection, and it gets frustrated sometimes? Maybe some link between the connection, buffer and display? Is muby doing something while it's waiting for additional input? Well it's all theory now.. maybe what I should do is wrap muby with 'nice'? I will if this happens again. From zond at troja.ath.cx Mon Aug 7 03:54:21 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 09:54:21 +0200 Subject: [Muby-talk] Accessing command history In-Reply-To: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> Message-ID: <20060807075421.GA31852@troja.ath.cx> I dont understand you question, I think.. But this is how it is now: There are two commands, by default tied to arrow up and arrow down, that makes you go up and down through history. There is one command, by default tied to control-r, that changes your prompt so that you can start typing and it will find a history command that matches what you type. If you press control-r again it will return to normal. //Martin On Sun, Aug 06, 2006 at 07:01:43PM -0500, Sy Ali wrote: > I've been playing, and I can't see a way to access the history of past > commands. I can see bits and pieces, but I'm not sure what to do to > read the past commands, or to modify or re-execute one of them. > > Ideas? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Your true value depends entirely on what you are compared with. ################################################################### From zond at troja.ath.cx Mon Aug 7 03:56:43 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 09:56:43 +0200 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> <20060806225907.GB23950@troja.ath.cx> <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> Message-ID: <20060807075643.GB31852@troja.ath.cx> It is surely low level, but the only thing that sounds logical is the reading from the connection, and that is wrapped in a select, so that shouldnt be a problem :O Strange. On Sun, Aug 06, 2006 at 07:14:51PM -0500, Sy Ali wrote: > On 8/6/06, Martin Kihlgren wrote: > > > > Strange :O > > > > I have noticed that at times when the connection is laggy muby seems > > to take up all available system resources, but as soon as the > > connection clears up again, everything is fine. I have no idea why.. > > > > Perhaps this is related? > > My intuition says it's something low-level. Maybe the way it's > writing to the display? Maybe ruby is constantly polling the > connection, and it gets frustrated sometimes? Maybe some link between > the connection, buffer and display? > > Is muby doing something while it's waiting for additional input? > > Well it's all theory now.. maybe what I should do is wrap muby with > 'nice'? I will if this happens again. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Your true value depends entirely on what you are compared with. ################################################################### From sy1234 at gmail.com Mon Aug 7 05:12:33 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 7 Aug 2006 04:12:33 -0500 Subject: [Muby-talk] Accessing command history In-Reply-To: <20060807075421.GA31852@troja.ath.cx> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> <20060807075421.GA31852@troja.ath.cx> Message-ID: <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> > On Sun, Aug 06, 2006 at 07:01:43PM -0500, Sy Ali wrote: > > I've been playing, and I can't see a way to access the history of past > > commands. I can see bits and pieces, but I'm not sure what to do to > > read the past commands, or to modify or re-execute one of them. On 8/7/06, Martin Kihlgren wrote: > > I dont understand you question, I think.. > > But this is how it is now: > > There are two commands, by default tied to arrow up and arrow down, > that makes you go up and down through history. > > There is one command, by default tied to control-r, that changes your > prompt so that you can start typing and it will find a history command > that matches what you type. If you press control-r again it will > return to normal. Those are tools for the user. How can user scripting access the history of commands? I'm trying to write a simple trigger which will repeat the last command if I was AFK while trying it: > say hi You cannot use this command while AFK (trigger: send afk, repeat last command) You return from AFK mode. You say "hi" From zond at troja.ath.cx Mon Aug 7 05:28:54 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 11:28:54 +0200 Subject: [Muby-talk] Accessing command history In-Reply-To: <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> <20060807075421.GA31852@troja.ath.cx> <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> Message-ID: <20060807092854.GA1778@troja.ath.cx> Ah... well, you couldnt :) But now you can! InputWindow now has a method called history that will return the history buffer. //Martin On Mon, Aug 07, 2006 at 04:12:33AM -0500, Sy Ali wrote: > > On Sun, Aug 06, 2006 at 07:01:43PM -0500, Sy Ali wrote: > > > I've been playing, and I can't see a way to access the history of past > > > commands. I can see bits and pieces, but I'm not sure what to do to > > > read the past commands, or to modify or re-execute one of them. > > On 8/7/06, Martin Kihlgren wrote: > > > > I dont understand you question, I think.. > > > > But this is how it is now: > > > > There are two commands, by default tied to arrow up and arrow down, > > that makes you go up and down through history. > > > > There is one command, by default tied to control-r, that changes your > > prompt so that you can start typing and it will find a history command > > that matches what you type. If you press control-r again it will > > return to normal. > > Those are tools for the user. How can user scripting access the > history of commands? > > I'm trying to write a simple trigger which will repeat the last > command if I was AFK while trying it: > > > say hi > You cannot use this command while AFK > (trigger: send afk, repeat last command) > You return from AFK mode. > You say "hi" > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Your true value depends entirely on what you are compared with. ################################################################### From sy1234 at gmail.com Mon Aug 7 06:21:01 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 7 Aug 2006 05:21:01 -0500 Subject: [Muby-talk] Accessing command history In-Reply-To: <20060807092854.GA1778@troja.ath.cx> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> <20060807075421.GA31852@troja.ath.cx> <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> <20060807092854.GA1778@troja.ath.cx> Message-ID: <1e55af990608070321r4bfa9225vd80a15344f7a7fa1@mail.gmail.com> On 8/7/06, Martin Kihlgren wrote: > > Ah... well, you couldnt :) > > But now you can! > > InputWindow now has a method called history that will return the > history buffer. Aha, I knew it was simple to add. A quick question. Why does #1 fail, when #2 works? 1) conf.remote_triggers[trigger] = Proc.new do # stuff print history[-1] end => NameError: undefined local variable or method `history' for main:Object 2) conf.remote_triggers[trigger] = :trigger def trigger # stuff print history[-1] end => prints the last command From zond at troja.ath.cx Mon Aug 7 06:57:09 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 7 Aug 2006 12:57:09 +0200 Subject: [Muby-talk] Accessing command history In-Reply-To: <1e55af990608070321r4bfa9225vd80a15344f7a7fa1@mail.gmail.com> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> <20060807075421.GA31852@troja.ath.cx> <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> <20060807092854.GA1778@troja.ath.cx> <1e55af990608070321r4bfa9225vd80a15344f7a7fa1@mail.gmail.com> Message-ID: <20060807105709.GA2014@troja.ath.cx> Because the "trigger" method in example #2 is defined on class Object, and since ALL classes inherit Object even InputWindow will get the "trigger" method. And since the symbols in the trigger hash will be translated to methods in the InputWindow the "trigger" method will be found. And the "print" command will evaluate properly as the "print" method in InputWindow. But in the first example, the Proc wont know about the "print" method in InputWindow, since the Proc has its own namespace. //Martin On Mon, Aug 07, 2006 at 05:21:01AM -0500, Sy Ali wrote: > On 8/7/06, Martin Kihlgren wrote: > > > > Ah... well, you couldnt :) > > > > But now you can! > > > > InputWindow now has a method called history that will return the > > history buffer. > > Aha, I knew it was simple to add. > > > A quick question. Why does #1 fail, when #2 works? > > 1) > > conf.remote_triggers[trigger] = Proc.new do > # stuff > print history[-1] > end > > => NameError: undefined local variable or method `history' for main:Object > > 2) > > conf.remote_triggers[trigger] = :trigger > def trigger > # stuff > print history[-1] > end > > => prints the last command > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Your true value depends entirely on what you are compared with. ################################################################### From sy1234 at gmail.com Mon Aug 7 09:50:33 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 7 Aug 2006 08:50:33 -0500 Subject: [Muby-talk] Accessing command history In-Reply-To: <20060807105709.GA2014@troja.ath.cx> References: <1e55af990608061701k48c73c9cj91be20e079dba968@mail.gmail.com> <20060807075421.GA31852@troja.ath.cx> <1e55af990608070212k74d361aav1a51361ba5510319@mail.gmail.com> <20060807092854.GA1778@troja.ath.cx> <1e55af990608070321r4bfa9225vd80a15344f7a7fa1@mail.gmail.com> <20060807105709.GA2014@troja.ath.cx> Message-ID: <1e55af990608070650t13a92a60g6234d2a0eca8e95@mail.gmail.com> On 8/7/06, Martin Kihlgren wrote: > > Because the "trigger" method in example #2 is defined on class Object, > and since ALL classes inherit Object even InputWindow will get the > "trigger" method. > > And since the symbols in the trigger hash will be translated to > methods in the InputWindow the "trigger" method will be found. And the > "print" command will evaluate properly as the "print" method in > InputWindow. > > But in the first example, the Proc wont know about the "print" method > in InputWindow, since the Proc has its own namespace. Aah, so this is why I needed to create my own 'print' and 'write' command for my own internal use. I think I understand a little better now.. I can think of a way to make things a little easier. I'll do a bit of playing later. From sy1234 at gmail.com Wed Aug 9 20:38:11 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 9 Aug 2006 19:38:11 -0500 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <20060807075643.GB31852@troja.ath.cx> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> <20060806225907.GB23950@troja.ath.cx> <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> <20060807075643.GB31852@troja.ath.cx> Message-ID: <1e55af990608091738q93f7ef1qb3ae3682ab56a017@mail.gmail.com> With some more experimentation, the problem persists. It seems to happen during times of heightened drive activity. With a nice of 5, this drive thrashing period will occasionally let muby print out a line.. but I'm unable to do most things, like close or kill a window.. so I have to abort X to get out. I'll try a nice of 10.. although it seems that muby has more and more difficulty printing to the screen when it is niced higher. A nice of 20 makes muby very slow. My machine isn't particularly old.. the cause may be my use of EncFS, and encrypted filesystem. That does eat up a lot of cpu cycles and make disk operations odd at times. I could try placing muby in an unencrypted space. From sy1234 at gmail.com Wed Aug 9 20:42:29 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 9 Aug 2006 19:42:29 -0500 Subject: [Muby-talk] making the best of control-r Message-ID: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> The commandline matching feature is pretty interesting, but it's not as usable as it could be. For example. If I have two recent commands, cough and cry.. and I type c^r (c with control-r) .. I see my last command beginning with a c. How do I navigate to the second-last match? How do I see the list of possible matches? I'm not particularly interested in seeing the list.. but I am more interested in being able to cycle between the matches. Also, how useful do you think wildcards would be? example: c?y^r matches 'cry' From sy1234 at gmail.com Wed Aug 9 20:44:01 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 9 Aug 2006 19:44:01 -0500 Subject: [Muby-talk] scrollback and pausing i/o Message-ID: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> Pausing i/o is a bad idea imo. It's very strange to scroll back for a moment and then come back to realise that any number of things may have happened.. From zond at troja.ath.cx Thu Aug 10 04:39:38 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 10:39:38 +0200 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <1e55af990608091738q93f7ef1qb3ae3682ab56a017@mail.gmail.com> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> <20060806225907.GB23950@troja.ath.cx> <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> <20060807075643.GB31852@troja.ath.cx> <1e55af990608091738q93f7ef1qb3ae3682ab56a017@mail.gmail.com> Message-ID: <20060810083938.GD21052@troja.ath.cx> Muby really shouldnt have any drive access at all if you turn off all logging... Most strange. //Martin On Wed, Aug 09, 2006 at 07:38:11PM -0500, Sy Ali wrote: > With some more experimentation, the problem persists. It seems to > happen during times of heightened drive activity. > > With a nice of 5, this drive thrashing period will occasionally let > muby print out a line.. but I'm unable to do most things, like close > or kill a window.. so I have to abort X to get out. > > I'll try a nice of 10.. although it seems that muby has more and more > difficulty printing to the screen when it is niced higher. A nice of > 20 makes muby very slow. > > My machine isn't particularly old.. the cause may be my use of EncFS, > and encrypted filesystem. That does eat up a lot of cpu cycles and > make disk operations odd at times. > > I could try placing muby in an unencrypted space. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From zond at troja.ath.cx Thu Aug 10 04:41:30 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 10:41:30 +0200 Subject: [Muby-talk] making the best of control-r In-Reply-To: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> Message-ID: <20060810084130.GE21052@troja.ath.cx> I will think on this, but at the moment you just have to enter all the chars needed to jump past the first match... //Martin On Wed, Aug 09, 2006 at 07:42:29PM -0500, Sy Ali wrote: > The commandline matching feature is pretty interesting, but it's not > as usable as it could be. > > For example. If I have two recent commands, cough and cry.. and I > type c^r (c with control-r) .. I see my last command beginning with a > c. How do I navigate to the second-last match? How do I see the list > of possible matches? > > I'm not particularly interested in seeing the list.. but I am more > interested in being able to cycle between the matches. > > > Also, how useful do you think wildcards would be? > > example: c?y^r matches 'cry' > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From zond at troja.ath.cx Thu Aug 10 04:42:53 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 10:42:53 +0200 Subject: [Muby-talk] scrollback and pausing i/o In-Reply-To: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> References: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> Message-ID: <20060810084253.GF21052@troja.ath.cx> So, what would you suggest? That you cant scroll back while data is coming from the server? I have no better idea atm, but if you do, please tell me :) //Martin On Wed, Aug 09, 2006 at 07:44:01PM -0500, Sy Ali wrote: > Pausing i/o is a bad idea imo. It's very strange to scroll back for a > moment and then come back to realise that any number of things may > have happened.. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From zond at troja.ath.cx Thu Aug 10 08:29:42 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 14:29:42 +0200 Subject: [Muby-talk] making the best of control-r In-Reply-To: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> Message-ID: <20060810122942.GA23770@troja.ath.cx> Ok! Now you can do arrow-up and arrow-down from within the history search. Also - the history search is done using regular expressions isntead of exact string match. //Martin On Wed, Aug 09, 2006 at 07:42:29PM -0500, Sy Ali wrote: > The commandline matching feature is pretty interesting, but it's not > as usable as it could be. > > For example. If I have two recent commands, cough and cry.. and I > type c^r (c with control-r) .. I see my last command beginning with a > c. How do I navigate to the second-last match? How do I see the list > of possible matches? > > I'm not particularly interested in seeing the list.. but I am more > interested in being able to cycle between the matches. > > > Also, how useful do you think wildcards would be? > > example: c?y^r matches 'cry' > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From sy1234 at gmail.com Thu Aug 10 11:55:39 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 10 Aug 2006 10:55:39 -0500 Subject: [Muby-talk] muby the cause of massive drive-thrashing? In-Reply-To: <20060810083938.GD21052@troja.ath.cx> References: <1e55af990608060905i165b0970qe24c9f3196861cbf@mail.gmail.com> <20060806225907.GB23950@troja.ath.cx> <1e55af990608061714q31f251cco5818eab1f25c805@mail.gmail.com> <20060807075643.GB31852@troja.ath.cx> <1e55af990608091738q93f7ef1qb3ae3682ab56a017@mail.gmail.com> <20060810083938.GD21052@troja.ath.cx> Message-ID: <1e55af990608100855t5106b41aq41c7b2923db12c20@mail.gmail.com> On 8/10/06, Martin Kihlgren wrote: > > Muby really shouldnt have any drive access at all if you turn off all > logging... > > Most strange. Indeed. Even with a nice of 5 it'll lock up. I'm trying 10 now. I wonder what would happen if I move it into a ram drive. It's definitely dependant on the disk access of other software though. I had it happen to me once more when I was switching virtual desktops.. it did some normal drive grinding and then got locked up doing disk operations. I still think it's the encfs + muby combination doing it somehow. From sy1234 at gmail.com Thu Aug 10 11:59:06 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 10 Aug 2006 10:59:06 -0500 Subject: [Muby-talk] making the best of control-r In-Reply-To: <20060810122942.GA23770@troja.ath.cx> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> <20060810122942.GA23770@troja.ath.cx> Message-ID: <1e55af990608100859w25ff6300k1111980cd86ddc0c@mail.gmail.com> On 8/10/06, Martin Kihlgren wrote: > Now you can do arrow-up and arrow-down from within the history search. Woohoo! > Also - the history search is done using regular expressions isntead of > exact string match. Can you give me an example? I'm not sure I understand how it works.. From sy1234 at gmail.com Thu Aug 10 12:00:53 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 10 Aug 2006 11:00:53 -0500 Subject: [Muby-talk] scrollback and pausing i/o In-Reply-To: <20060810084253.GF21052@troja.ath.cx> References: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> <20060810084253.GF21052@troja.ath.cx> Message-ID: <1e55af990608100900o6448f06eg8b2db97f35979f1@mail.gmail.com> > On Wed, Aug 09, 2006 at 07:44:01PM -0500, Sy Ali wrote: > > Pausing i/o is a bad idea imo. It's very strange to scroll back for a > > moment and then come back to realise that any number of things may > > have happened.. On 8/10/06, Martin Kihlgren wrote: > > So, what would you suggest? That you cant scroll back while data is > coming from the server? I have no better idea atm, but if you do, > please tell me :) The only solution I can see is to allow scrollback, but silently put more data in the buffer, so that it takes more pagedowns to get to the most recent text. Also, if a person types any key (other than scrollup/down) they should be put back into 'normal view'. From zond at troja.ath.cx Thu Aug 10 17:08:19 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 23:08:19 +0200 Subject: [Muby-talk] making the best of control-r In-Reply-To: <1e55af990608100859w25ff6300k1111980cd86ddc0c@mail.gmail.com> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> <20060810122942.GA23770@troja.ath.cx> <1e55af990608100859w25ff6300k1111980cd86ddc0c@mail.gmail.com> Message-ID: <20060810210818.GA30372@troja.ath.cx> How do you mean? If you write c.*h it will match anything that contains a c and h in sequence, with anything in between. (I admit, when I wrote the mail to you about it I had forgotten to commit the regexp-match-thing, but I commited it before I got this mail from you :) //Martin On Thu, Aug 10, 2006 at 10:59:06AM -0500, Sy Ali wrote: > On 8/10/06, Martin Kihlgren wrote: > > Now you can do arrow-up and arrow-down from within the history search. > > Woohoo! > > > > Also - the history search is done using regular expressions isntead of > > exact string match. > > Can you give me an example? I'm not sure I understand how it works.. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From zond at troja.ath.cx Thu Aug 10 17:09:43 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 10 Aug 2006 23:09:43 +0200 Subject: [Muby-talk] scrollback and pausing i/o In-Reply-To: <1e55af990608100900o6448f06eg8b2db97f35979f1@mail.gmail.com> References: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> <20060810084253.GF21052@troja.ath.cx> <1e55af990608100900o6448f06eg8b2db97f35979f1@mail.gmail.com> Message-ID: <20060810210943.GB30372@troja.ath.cx> Well, the input from the server doesnt DISAPPEAR just becase I/O is paused - it gets stored in a buffer that gets printed out once you scroll down to the bottom again... But the key-thing, its easy to do, but is it necessary? Its easy to scroll down again... //Martin On Thu, Aug 10, 2006 at 11:00:53AM -0500, Sy Ali wrote: > > On Wed, Aug 09, 2006 at 07:44:01PM -0500, Sy Ali wrote: > > > Pausing i/o is a bad idea imo. It's very strange to scroll back for a > > > moment and then come back to realise that any number of things may > > > have happened.. > > On 8/10/06, Martin Kihlgren wrote: > > > > So, what would you suggest? That you cant scroll back while data is > > coming from the server? I have no better idea atm, but if you do, > > please tell me :) > > The only solution I can see is to allow scrollback, but silently put > more data in the buffer, so that it takes more pagedowns to get to the > most recent text. > > Also, if a person types any key (other than scrollup/down) they should > be put back into 'normal view'. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From sy1234 at gmail.com Thu Aug 10 18:13:16 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 10 Aug 2006 17:13:16 -0500 Subject: [Muby-talk] making the best of control-r In-Reply-To: <20060810210818.GA30372@troja.ath.cx> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> <20060810122942.GA23770@troja.ath.cx> <1e55af990608100859w25ff6300k1111980cd86ddc0c@mail.gmail.com> <20060810210818.GA30372@troja.ath.cx> Message-ID: <1e55af990608101513w66e9ef9eve7c265d3490ed9e@mail.gmail.com> On 8/10/06, Martin Kihlgren wrote: > > How do you mean? > > If you write c.*h it will match anything that contains a c and h in > sequence, with anything in between. > > (I admit, when I wrote the mail to you about it I had forgotten to > commit the regexp-match-thing, but I commited it before I got this > mail from you :) Oh I get it.. I was using filename-style pattern matching, not regex! Haha. From sy1234 at gmail.com Thu Aug 10 18:15:24 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 10 Aug 2006 17:15:24 -0500 Subject: [Muby-talk] scrollback and pausing i/o In-Reply-To: <20060810210943.GB30372@troja.ath.cx> References: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> <20060810084253.GF21052@troja.ath.cx> <1e55af990608100900o6448f06eg8b2db97f35979f1@mail.gmail.com> <20060810210943.GB30372@troja.ath.cx> Message-ID: <1e55af990608101515n281eb977wd896258269ed7f2@mail.gmail.com> On 8/10/06, Martin Kihlgren wrote: > > Well, the input from the server doesnt DISAPPEAR just becase I/O is > paused - it gets stored in a buffer that gets printed out once you > scroll down to the bottom again... > > But the key-thing, its easy to do, but is it necessary? Its easy to > scroll down again... Strange.. I could swear that all additional text gets swallowed up and does not get reported. So I begin a complex action.. scroll back into the buffer, then scroll down and I never see the results of my complex action. From zond at troja.ath.cx Thu Aug 10 18:25:56 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 11 Aug 2006 00:25:56 +0200 Subject: [Muby-talk] making the best of control-r In-Reply-To: <1e55af990608101513w66e9ef9eve7c265d3490ed9e@mail.gmail.com> References: <1e55af990608091742w2c3e6762le22cdcde25aa8b6a@mail.gmail.com> <20060810122942.GA23770@troja.ath.cx> <1e55af990608100859w25ff6300k1111980cd86ddc0c@mail.gmail.com> <20060810210818.GA30372@troja.ath.cx> <1e55af990608101513w66e9ef9eve7c265d3490ed9e@mail.gmail.com> Message-ID: <20060810222556.GA31036@troja.ath.cx> :) On Thu, Aug 10, 2006 at 05:13:16PM -0500, Sy Ali wrote: > On 8/10/06, Martin Kihlgren wrote: > > > > How do you mean? > > > > If you write c.*h it will match anything that contains a c and h in > > sequence, with anything in between. > > > > (I admit, when I wrote the mail to you about it I had forgotten to > > commit the regexp-match-thing, but I commited it before I got this > > mail from you :) > > Oh I get it.. I was using filename-style pattern matching, not regex! Haha. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From zond at troja.ath.cx Thu Aug 10 18:29:55 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 11 Aug 2006 00:29:55 +0200 Subject: [Muby-talk] scrollback and pausing i/o In-Reply-To: <1e55af990608101515n281eb977wd896258269ed7f2@mail.gmail.com> References: <1e55af990608091744j4e870359p4eca19386d895298@mail.gmail.com> <20060810084253.GF21052@troja.ath.cx> <1e55af990608100900o6448f06eg8b2db97f35979f1@mail.gmail.com> <20060810210943.GB30372@troja.ath.cx> <1e55af990608101515n281eb977wd896258269ed7f2@mail.gmail.com> Message-ID: <20060810222955.GB31036@troja.ath.cx> Ah. Bug identified and fixed :) Now it acts as it was supposed to - the @waitBuffer is filled while I/O is paused, and gets printed when I/O is started again. //Martin On Thu, Aug 10, 2006 at 05:15:24PM -0500, Sy Ali wrote: > On 8/10/06, Martin Kihlgren wrote: > > > > Well, the input from the server doesnt DISAPPEAR just becase I/O is > > paused - it gets stored in a buffer that gets printed out once you > > scroll down to the bottom again... > > > > But the key-thing, its easy to do, but is it necessary? Its easy to > > scroll down again... > > Strange.. I could swear that all additional text gets swallowed up and > does not get reported. So I begin a complex action.. scroll back into > the buffer, then scroll down and I never see the results of my complex > action. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Here lies my wife: her let her lie! Now she's at rest, and so am I. -- John Dryden, epitaph intended for his wife ################################################################### From sy1234 at gmail.com Fri Aug 11 07:03:20 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 11 Aug 2006 06:03:20 -0500 Subject: [Muby-talk] control-r - division by zero and crashes Message-ID: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> I've noticed that I will sometimes get division by zero or muby will exit (with the delay) when I use the history matching features. When I attempt to match a string which does not exist in history, I will immediately get and error: astringwhichdoesnotexistinhistory^r => ZeroDivisionError: divided by 0 But I've also seen this with input which should be valid. If I "push my luck" too much it'll kill muby. From zond at troja.ath.cx Fri Aug 11 08:13:50 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 11 Aug 2006 14:13:50 +0200 Subject: [Muby-talk] control-r - division by zero and crashes In-Reply-To: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> References: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> Message-ID: <20060811121350.GA8152@troja.ath.cx> Bug identified and fixed :) //Martin On Fri, Aug 11, 2006 at 06:03:20AM -0500, Sy Ali wrote: > I've noticed that I will sometimes get division by zero or muby will > exit (with the delay) when I use the history matching features. > > When I attempt to match a string which does not exist in history, I > will immediately get and error: > > astringwhichdoesnotexistinhistory^r > => ZeroDivisionError: divided by 0 > > But I've also seen this with input which should be valid. If I "push > my luck" too much it'll kill muby. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God created a few perfect heads. The rest he covered with hair. ################################################################### From zond at troja.ath.cx Fri Aug 11 10:30:02 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 11 Aug 2006 16:30:02 +0200 Subject: [Muby-talk] control-r - division by zero and crashes In-Reply-To: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> References: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> Message-ID: <20060811143002.GA11518@troja.ath.cx> Btw, it might interest you that I have commited my current script (very small as it is) for the hell.game-host.org:7777 mud.. //Martin On Fri, Aug 11, 2006 at 06:03:20AM -0500, Sy Ali wrote: > I've noticed that I will sometimes get division by zero or muby will > exit (with the delay) when I use the history matching features. > > When I attempt to match a string which does not exist in history, I > will immediately get and error: > > astringwhichdoesnotexistinhistory^r > => ZeroDivisionError: divided by 0 > > But I've also seen this with input which should be valid. If I "push > my luck" too much it'll kill muby. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### God created a few perfect heads. The rest he covered with hair. ################################################################### From sy1234 at gmail.com Fri Aug 11 16:30:50 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 11 Aug 2006 15:30:50 -0500 Subject: [Muby-talk] control-r - division by zero and crashes In-Reply-To: <20060811143002.GA11518@troja.ath.cx> References: <1e55af990608110403h8090429mc339029e8d825962@mail.gmail.com> <20060811143002.GA11518@troja.ath.cx> Message-ID: <1e55af990608111330l6d5a6c68seb0f1f2a35dbe1d5@mail.gmail.com> On 8/11/06, Martin Kihlgren wrote: > > Btw, it might interest you that I have commited my current script > (very small as it is) for the hell.game-host.org:7777 mud.. I'll definitely take a look. =) From sy1234 at gmail.com Mon Aug 14 13:11:34 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 14 Aug 2006 12:11:34 -0500 Subject: [Muby-talk] muby-0.6.2 has been released Message-ID: <1e55af990608141011p5eae28afl78e5bf6cdbb52d52@mail.gmail.com> http://jrandomhacker.info/Muby http://rubyforge.org/projects/muby/ Download: http://rubyforge.org/frs/download.php/12409/muby-0.6.2.tar.gz * IO pausing while viewing the scrollback buffer had a bug that ate text. Fixed. * history was added, to give user scripting access to the last typed or output commands. * Pressing Tab will guess at the rest of the text, based on a set of words the user has provided, the command log (optionally) and the most recently seen text from the server (optionally). * Pressing Control-R will start/stop a mode where typed text will perform an autocomplete based on the user's recent typing history. o Pressing up/down will let you navigate through the matches. o Regular expressions are usable with this mode. * Sy's Aardwolf-specific scripting has been included in the contrib/aardmud.org_4000 directory. * Martin's Zond-specific scripting has been included in the contrib/zond directory. From sy1234 at gmail.com Tue Aug 15 15:27:48 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 15 Aug 2006 15:27:48 -0400 Subject: [Muby-talk] bug with printing - text appears in the input area Message-ID: <1e55af990608151227o61babf7s94a4ff30c1a4428a@mail.gmail.com> When using print, the cursor should go up to the output area. I often have print statements appear in the user input area. It's messy. =) From sy1234 at gmail.com Fri Aug 18 00:14:53 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 17 Aug 2006 23:14:53 -0500 Subject: [Muby-talk] Threads intertwined with regular code Message-ID: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> I played with intermingling threads with logic with global variables with methods.. all mixed together. It's working as-expected! It's like magic! Tcl couldn't do this sort of thing.. at least I never figured it out. When one bit of code updated a global variable, it was "lost" to other parts of the code.. it really annoyed me. Ruby doesn't seem to have any issues with my doing some very strange things. From sy1234 at gmail.com Sat Aug 19 15:03:05 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 19 Aug 2006 14:03:05 -0500 Subject: [Muby-talk] bug with printing - text appears in the input area In-Reply-To: <1e55af990608151227o61babf7s94a4ff30c1a4428a@mail.gmail.com> References: <1e55af990608151227o61babf7s94a4ff30c1a4428a@mail.gmail.com> Message-ID: <1e55af990608191203x26acf297h63c0e3c12a6cc210@mail.gmail.com> On 8/15/06, Sy Ali wrote: > When using print, the cursor should go up to the output area. I often > have print statements appear in the user input area. It's messy. =) Hmm. I wonder if this is because my scripting is somehow using the default "print" functionality from ruby, and not the one supplied by muby. =/ From sy1234 at gmail.com Sat Aug 19 19:50:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 19 Aug 2006 18:50:51 -0500 Subject: [Muby-talk] groups of triggers (was: muby speed issues) Message-ID: <1e55af990608191650l158f6acfp68cd13cf9163f2fd@mail.gmail.com> On 8/3/06, Sy Ali wrote: > On 8/3/06, Martin Kihlgren wrote: > (re. groups) > > An interesting idea, but a bit complex. If you can give me examples of > > when you would actually need it perhaps. > > > > But all that can be implemented by the scripter him/herself if the > > scripter is proficient enough to actually need that kind of > > functionality, is what I feel. > > I agree. Keep the keys in a separate array, and then act on that > array.. one by one you can work with the master list of triggers. > > Maybe when I want this feature I'll write it myself.. then if other > users like it it might get merged with muby. =) I can see a way to implement this, but the very easy way eludes me. groups = [] conf.remote_triggers[/^\| Names : (.+)\|$/] = Proc.new do |inwin, outwin, match| @names = match[1].rstrip groups << match[0] end then I could delete it with: group.each { |i| conf.remote_triggers.delete(i) } However, match[0] is not what I want. Is there a way to easily refer to the regex itself? --+ I tried wrapping things into a couple of helpers, and I came up with this: $trigger_groups = {} def group_remote_trigger(group, regex, actions) conf.remote_triggers[regex] = Proc.new do |inwin, outwin, match| actions end $trigger_groups.merge!({group => regex}) pprint $trigger_groups.inspect end def group_remote_trigger_delete_all(group) $trigger_groups[group].each { |i| pprint i.inspect conf.remote_triggers.delete(i) $trigger_groups.delete(group) } end I can use this with: /group_remote_trigger("test", '^test$', "some action") /group_remote_trigger_delete_all("test") The problem is that "some action" cannot do what I want. If I put a command there, it is immediately executed when /group_remote_trigger() is first used. So close yet so far! =/ From zond at troja.ath.cx Mon Aug 21 08:06:34 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 21 Aug 2006 14:06:34 +0200 Subject: [Muby-talk] away Message-ID: <20060821114712.GA8229@snort.ath.cx> Im sorry that I was away for a week now, if you tried to reach me. Ive had a sort of hardware armageddon at home, and have now reinstalled my home machine completely... //Martin -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From zond at troja.ath.cx Mon Aug 21 08:14:25 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 21 Aug 2006 14:14:25 +0200 Subject: [Muby-talk] bug with printing - text appears in the input area In-Reply-To: <1e55af990608191203x26acf297h63c0e3c12a6cc210@mail.gmail.com> References: <1e55af990608151227o61babf7s94a4ff30c1a4428a@mail.gmail.com> <1e55af990608191203x26acf297h63c0e3c12a6cc210@mail.gmail.com> Message-ID: <20060821121403.GB8229@snort.ath.cx> Yes, this is probably the case :) On Sat, Aug 19, 2006 at 02:03:05PM -0500, Sy Ali wrote: > On 8/15/06, Sy Ali wrote: > > When using print, the cursor should go up to the output area. I often > > have print statements appear in the user input area. It's messy. =) > > Hmm. I wonder if this is because my scripting is somehow using the > default "print" functionality from ruby, and not the one supplied by > muby. =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From zond at troja.ath.cx Mon Aug 21 08:34:36 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 21 Aug 2006 14:34:36 +0200 Subject: [Muby-talk] groups of triggers (was: muby speed issues) In-Reply-To: <1e55af990608191650l158f6acfp68cd13cf9163f2fd@mail.gmail.com> References: <1e55af990608191650l158f6acfp68cd13cf9163f2fd@mail.gmail.com> Message-ID: <20060821123434.GE8229@snort.ath.cx> Perhaps the .mubyrc I have commited provides some help? There I name a few regular expressions, and remove them from the trigger hash when they are run. Otherwise, explain your need more? Im not sure I understand. //Martin On Sat, Aug 19, 2006 at 06:50:51PM -0500, Sy Ali wrote: > On 8/3/06, Sy Ali wrote: > > On 8/3/06, Martin Kihlgren wrote: > > (re. groups) > > > An interesting idea, but a bit complex. If you can give me examples of > > > when you would actually need it perhaps. > > > > > > But all that can be implemented by the scripter him/herself if the > > > scripter is proficient enough to actually need that kind of > > > functionality, is what I feel. > > > > I agree. Keep the keys in a separate array, and then act on that > > array.. one by one you can work with the master list of triggers. > > > > Maybe when I want this feature I'll write it myself.. then if other > > users like it it might get merged with muby. =) > > I can see a way to implement this, but the very easy way eludes me. > > groups = [] > conf.remote_triggers[/^\| Names : (.+)\|$/] = Proc.new do |inwin, > outwin, match| > @names = match[1].rstrip > groups << match[0] > end > > then I could delete it with: > group.each { |i| > conf.remote_triggers.delete(i) > } > > However, match[0] is not what I want. Is there a way to easily refer > to the regex itself? > > --+ > > I tried wrapping things into a couple of helpers, and I came up with this: > > $trigger_groups = {} > def group_remote_trigger(group, regex, actions) > conf.remote_triggers[regex] = Proc.new do |inwin, outwin, match| actions end > $trigger_groups.merge!({group => regex}) > pprint $trigger_groups.inspect > end > > def group_remote_trigger_delete_all(group) > $trigger_groups[group].each { |i| > pprint i.inspect > conf.remote_triggers.delete(i) > $trigger_groups.delete(group) > } > end > > I can use this with: > /group_remote_trigger("test", '^test$', "some action") > /group_remote_trigger_delete_all("test") > > The problem is that "some action" cannot do what I want. If I put a > command there, it is immediately executed when /group_remote_trigger() > is first used. > > So close yet so far! =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From zond at troja.ath.cx Mon Aug 21 08:27:42 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 21 Aug 2006 14:27:42 +0200 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> Message-ID: <20060821122739.GC8229@snort.ath.cx> Of course :) There are reasons I started out creating muby :) //Martin On Thu, Aug 17, 2006 at 11:14:53PM -0500, Sy Ali wrote: > I played with intermingling threads with logic with global variables > with methods.. all mixed together. It's working as-expected! It's > like magic! > > Tcl couldn't do this sort of thing.. at least I never figured it out. > When one bit of code updated a global variable, it was "lost" to other > parts of the code.. it really annoyed me. > > Ruby doesn't seem to have any issues with my doing some very strange things. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From sy1234 at gmail.com Tue Aug 22 12:32:20 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 12:32:20 -0400 Subject: [Muby-talk] away In-Reply-To: <20060821114712.GA8229@snort.ath.cx> References: <20060821114712.GA8229@snort.ath.cx> Message-ID: <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> On 8/21/06, Martin Kihlgren wrote: > Im sorry that I was away for a week now, if you tried to reach me. Ive > had a sort of hardware armageddon at home, and have now reinstalled my > home machine completely... I just figured you were busy with work/life. =) I may do something similar, as a new release of my distribution is out and it justifies a reinstall vs. just updating, which has caused some problems. From wccrawford at gmail.com Tue Aug 22 12:52:12 2006 From: wccrawford at gmail.com (William Crawford) Date: Tue, 22 Aug 2006 12:52:12 -0400 Subject: [Muby-talk] away In-Reply-To: <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> Message-ID: <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> Welcome back, Martin! I've been talking to Sy about Muby and a mud proxy I've been working on. I had originally decided to write the mud proxy and then maybe alter some of its code into a user add-on to Muby. Now I think I might just keep the proxy code seperate and write scripts in Muby to filter the raw output. (My proxy code is released under the BSD license and on Ruby Forge, but I'm not ready to brag on it quite yet... It needs a lot of polish.) The MUD (DragonRealms) has 2 different proprietary ouput protocols. Both of them are very hard on a players eyes when playing through telnet. My project is to create a proxy to allow any client to connect as if it were a normal mud. I've got login and raw throughput working. My questions about Muby: 1) Do you plan to allow multiple output windows? This game has a ton of information that comes at you at once... The room, a distant/familiar vision, a global chat (thoughts, actually) and more. All the proprietary clients seperate this mess into different windows. But I want a text-only client, and that means ncurses. I would love to see Muby have windows be createable/modifyable by user-created scripts. 2) Do you plan to allow multiple connections in 1 client? I could have the proxy I'm writing do the stream splitting (and probably will, regardless of Muby's plans) and just connect multiple times. It'd be easier with a single client, but multiple clients could be dealt with, if need be. When I say 'plan' I don't mean 'in the next 2 days' or anything... I just want to know if Muby's direction is compatible with my needs or not. I'm sure I could eventually add this functionality as user scripts, since Ruby is so flexible, but life would be much more pleasant if it was supported natively. Thanks! William Crawford On 8/22/06, Sy Ali wrote: > > On 8/21/06, Martin Kihlgren wrote: > > Im sorry that I was away for a week now, if you tried to reach me. Ive > > had a sort of hardware armageddon at home, and have now reinstalled my > > home machine completely... > > I just figured you were busy with work/life. =) > > I may do something similar, as a new release of my distribution is out > and it justifies a reinstall vs. just updating, which has caused some > problems. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060822/3468f855/attachment.html From zond at troja.ath.cx Tue Aug 22 13:06:05 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 22 Aug 2006 19:06:05 +0200 Subject: [Muby-talk] away In-Reply-To: <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> Message-ID: <20060822170605.GA31278@troja.ath.cx> Ah, yes, I know about the update hassle :O Fortunately debian doesnt even require me to update - I just update the components as they come along :) //Martin On Tue, Aug 22, 2006 at 12:32:20PM -0400, Sy Ali wrote: > On 8/21/06, Martin Kihlgren wrote: > > Im sorry that I was away for a week now, if you tried to reach me. Ive > > had a sort of hardware armageddon at home, and have now reinstalled my > > home machine completely... > > I just figured you were busy with work/life. =) > > I may do something similar, as a new release of my distribution is out > and it justifies a reinstall vs. just updating, which has caused some > problems. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From sy1234 at gmail.com Tue Aug 22 13:26:53 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 13:26:53 -0400 Subject: [Muby-talk] away In-Reply-To: <20060822170605.GA31278@troja.ath.cx> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <20060822170605.GA31278@troja.ath.cx> Message-ID: <1e55af990608221026q35721460m15499fd587312a82@mail.gmail.com> > On Tue, Aug 22, 2006 at 12:32:20PM -0400, Sy Ali wrote: > > I may do something similar, as a new release of my distribution is out > > and it justifies a reinstall vs. just updating, which has caused some > > problems. On 8/22/06, Martin Kihlgren wrote: > > Ah, yes, I know about the update hassle :O > > Fortunately debian doesnt even require me to update - I just update > the components as they come along :) Well.. my distro is still beta, and they just did some serious KDE updating, which updates all the libraries and applications.. and so it's a mess to update in pieces right now. I actually survived an update.. I'm not even sure how. =) From zond at troja.ath.cx Tue Aug 22 13:38:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 22 Aug 2006 19:38:18 +0200 Subject: [Muby-talk] away In-Reply-To: <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> Message-ID: <20060822173818.GA2477@troja.ath.cx> On Tue, Aug 22, 2006 at 12:52:12PM -0400, William Crawford wrote: > Welcome back, Martin! Thank you William :) > I've been talking to Sy about Muby and a mud proxy I've been working on. I > had originally decided to write the mud proxy and then maybe alter some of > its code into a user add-on to Muby. Now I think I might just keep the > proxy code seperate and write scripts in Muby to filter the raw output. (My > proxy code is released under the BSD license and on Ruby Forge, but I'm not > ready to brag on it quite yet... It needs a lot of polish.) Sounds cool though :) > The MUD (DragonRealms) has 2 different proprietary ouput protocols. Both of > them are very hard on a players eyes when playing through telnet. My > project is to create a proxy to allow any client to connect as if it were a > normal mud. I've got login and raw throughput working. Ah, I wanted to connect to that MUD, but the proprietary protocols stopped me :/ Now I play HELL instead (http://hell.game-host.org) :O > My questions about Muby: > > 1) Do you plan to allow multiple output windows? This game has a ton of > information that comes at you at once... The room, a distant/familiar > vision, a global chat (thoughts, actually) and more. All the proprietary > clients seperate this mess into different windows. But I want a text-only > client, and that means ncurses. I would love to see Muby have windows be > createable/modifyable by user-created scripts. Yes, Sy wanted it from the beginning, and its basically my own lazyness that stopped it from happening. But yes, it shouldnt be difficult, just horrible to mess with the ncurses code again :.( So I guess you can say its planned, but I havent decided when to do it yet. Maybe Im waiting for a wizard to do it for me :) > 2) Do you plan to allow multiple connections in 1 client? I could have the > proxy I'm writing do the stream splitting (and probably will, regardless of > Muby's plans) and just connect multiple times. It'd be easier with a single > client, but multiple clients could be dealt with, if need be. Well yes, we had that before, but neither me nor Sy could think of a reason to keep it, so I removed it. If you can give me a proper usecase where its needed, and tell me exactly what it is you require it for, then I guess it should be easy to put it back, and create it to suit your needs. > When I say 'plan' I don't mean 'in the next 2 days' or anything... I just > want to know if Muby's direction is compatible with my needs or not. I'm > sure I could eventually add this functionality as user scripts, since Ruby > is so flexible, but life would be much more pleasant if it was supported > natively. I understand :) I hope I answered your question satisfactorily, a bit tentative perhaps... regards, //Martin > Thanks! > > William Crawford > > On 8/22/06, Sy Ali wrote: > > > >On 8/21/06, Martin Kihlgren wrote: > >> Im sorry that I was away for a week now, if you tried to reach me. Ive > >> had a sort of hardware armageddon at home, and have now reinstalled my > >> home machine completely... > > > >I just figured you were busy with work/life. =) > > > >I may do something similar, as a new release of my distribution is out > >and it justifies a reinstall vs. just updating, which has caused some > >problems. > >_______________________________________________ > >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/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From sy1234 at gmail.com Tue Aug 22 13:39:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 13:39:07 -0400 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <20060821122739.GC8229@snort.ath.cx> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> Message-ID: <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> > On Thu, Aug 17, 2006 at 11:14:53PM -0500, Sy Ali wrote: > > I played with intermingling threads with logic with global variables > > with methods.. all mixed together. It's working as-expected! It's > > like magic! > > > > Tcl couldn't do this sort of thing.. at least I never figured it out. > > When one bit of code updated a global variable, it was "lost" to other > > parts of the code.. it really annoyed me. > > > > Ruby doesn't seem to have any issues with my doing some very strange things. On 8/21/06, Martin Kihlgren wrote: > > Of course :) There are reasons I started out creating muby :) This makes me think of a new feature idea.. Spawn a thread, which sleeps for a certain amount of time and then executes a block of code. I think it would be easy to program.. but I'm not sure how useful it would be yet.. But I think I'd want to be able to communicate with that sleeping block of code sometimes. At least to remember the thread id so I can kill it. Maybe I'll play with threads a little when I have some spare time. I just fixed my code.. it was running horribly horribly slow at work. So I'm thinking of some new ideas.. =) From sy1234 at gmail.com Tue Aug 22 13:41:14 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 13:41:14 -0400 Subject: [Muby-talk] groups of triggers (was: muby speed issues) In-Reply-To: <20060821123434.GE8229@snort.ath.cx> References: <1e55af990608191650l158f6acfp68cd13cf9163f2fd@mail.gmail.com> <20060821123434.GE8229@snort.ath.cx> Message-ID: <1e55af990608221041wc93281fwa30f9d81417b6e56@mail.gmail.com> On 8/21/06, Martin Kihlgren wrote: > Perhaps the .mubyrc I have commited provides some help? There I name a > few regular expressions, and remove them from the trigger hash when > they are run. I'll take a look! From zond at troja.ath.cx Tue Aug 22 13:54:43 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 22 Aug 2006 19:54:43 +0200 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> Message-ID: <20060822175437.GA13263@troja.ath.cx> Again, look at my example mubyrc - I store thread ids just to be able to kill them later.. :) //Martin On Tue, Aug 22, 2006 at 01:39:07PM -0400, Sy Ali wrote: > > On Thu, Aug 17, 2006 at 11:14:53PM -0500, Sy Ali wrote: > > > I played with intermingling threads with logic with global variables > > > with methods.. all mixed together. It's working as-expected! It's > > > like magic! > > > > > > Tcl couldn't do this sort of thing.. at least I never figured it out. > > > When one bit of code updated a global variable, it was "lost" to other > > > parts of the code.. it really annoyed me. > > > > > > Ruby doesn't seem to have any issues with my doing some very strange things. > > On 8/21/06, Martin Kihlgren wrote: > > > > Of course :) There are reasons I started out creating muby :) > > This makes me think of a new feature idea.. > > Spawn a thread, which sleeps for a certain amount of time and then > executes a block of code. > > I think it would be easy to program.. but I'm not sure how useful it > would be yet.. > > But I think I'd want to be able to communicate with that sleeping > block of code sometimes. At least to remember the thread id so I can > kill it. Maybe I'll play with threads a little when I have some spare > time. > > I just fixed my code.. it was running horribly horribly slow at work. > So I'm thinking of some new ideas.. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From wccrawford at gmail.com Tue Aug 22 14:05:17 2006 From: wccrawford at gmail.com (William Crawford) Date: Tue, 22 Aug 2006 14:05:17 -0400 Subject: [Muby-talk] away In-Reply-To: <20060822173818.GA2477@troja.ath.cx> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> Message-ID: <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> On 8/22/06, Martin Kihlgren wrote: > > > Ah, I wanted to connect to that MUD, but the proprietary protocols > stopped me :/ It's the only MUD that's managed to hold my interest for more than a week. And I've played it off and on for around 7-8 years. My only complaints are that it isn't free, and the GMs sometimes make REALLY stupid rulings. I usually take a 'vacation' when they do and come back a few months to a year later. > > My questions about Muby: > > > > 1) Do you plan to allow multiple output windows? This game has a ton > of > > information that comes at you at once... The room, a distant/familiar > > vision, a global chat (thoughts, actually) and more. All the > proprietary > > clients seperate this mess into different windows. But I want a > text-only > > client, and that means ncurses. I would love to see Muby have windows > be > > createable/modifyable by user-created scripts. > > Yes, Sy wanted it from the beginning, and its basically my own > lazyness that stopped it from happening. But yes, it shouldnt be > difficult, just horrible to mess with the ncurses code again :.( > > So I guess you can say its planned, but I havent decided when to do it > yet. Maybe Im waiting for a wizard to do it for me :) Yeah, Sy said the ncurses stuff was a nightmare. As I find some time (hah!) I may look into it and see what can be done. > 2) Do you plan to allow multiple connections in 1 client? I could have > the > > proxy I'm writing do the stream splitting (and probably will, regardless > of > > Muby's plans) and just connect multiple times. It'd be easier with a > single > > client, but multiple clients could be dealt with, if need be. > > Well yes, we had that before, but neither me nor Sy could think of a > reason to keep it, so I removed it. If you can give me a proper > usecase where its needed, and tell me exactly what it is you require > it for, then I guess it should be easy to put it back, and create it > to suit your needs. Well, 2 reasons. The first is that I could write my proxy to do the stream seperating and just have the mud client do the display. The client would actually connect to my proxy multiple times, sending an identifier to specify which stream each time. (I've kind of got this all worked out in my head, but nothing on paper yet.) The other is that I sometimes play multiple characters. I could use 2 clients, but I really should be able to see both at once to react properly. (It's a RP-enforced mud.) Ideally, each connection would have both shared and seperate triggers. I think I'd far prefer the multiple windows method over the multiple connections, if I had to pick between them. I hope I answered your question satisfactorily, a bit tentative perhaps... > I've found that very little is concrete any more, especially on open source projects :) I always try to be very careful not to even hint of something I won't deliver, for whatever reason, so I completely understand. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060822/33ed0088/attachment.html From zond at troja.ath.cx Tue Aug 22 14:44:19 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 22 Aug 2006 20:44:19 +0200 Subject: [Muby-talk] away In-Reply-To: <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> Message-ID: <20060822184419.GA27366@troja.ath.cx> On Tue, Aug 22, 2006 at 02:05:17PM -0400, William Crawford wrote: > > It's the only MUD that's managed to hold my interest for more than a week. > And I've played it off and on for around 7-8 years. My only complaints are > that it isn't free, and the GMs sometimes make REALLY stupid rulings. I > usually take a 'vacation' when they do and come back a few months to a year > later. Yes, it sounded interesting :) But Hell seemed to have all it had, except the size, and it is free and completely non-politically-correct. > Yeah, Sy said the ncurses stuff was a nightmare. As I find some time > (hah!) I may look into it and see what can be done. Lets hope! > >Well yes, we had that before, but neither me nor Sy could think of a > >reason to keep it, so I removed it. If you can give me a proper > >usecase where its needed, and tell me exactly what it is you require > >it for, then I guess it should be easy to put it back, and create it > >to suit your needs. > > Well, 2 reasons. The first is that I could write my proxy to do the stream > seperating and just have the mud client do the display. The client would > actually connect to my proxy multiple times, sending an identifier to > specify which stream each time. (I've kind of got this all worked out in my > head, but nothing on paper yet.) Ah, that sounds pretty complex :O I guess it has to be better defined :) > The other is that I sometimes play multiple characters. I could use 2 > clients, but I really should be able to see both at once to react properly. > (It's a RP-enforced mud.) But you could use screen and just have two instances running for that! > Ideally, each connection would have both shared and seperate triggers. Ugh :O Very special cases here... > I think I'd far prefer the multiple windows method over the multiple > connections, if I had to pick between them. Hm, I prefer multiple screens :) Its hard to make a generic and good solution that covers these very special cases... perhaps the best would be if we added multiple windows and then let you send special info to them in user scripting... Perhaps we could bind connections to windows, that sounds interesting and may solve lots of issues. Generally, this needs more thought.. //Martin -- ################################################################### The goal of Computer Science is to build something that will last at least until we've finished building it. ################################################################### From wccrawford at gmail.com Tue Aug 22 15:52:23 2006 From: wccrawford at gmail.com (William Crawford) Date: Tue, 22 Aug 2006 15:52:23 -0400 Subject: [Muby-talk] away In-Reply-To: <20060822184419.GA27366@troja.ath.cx> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> <20060822184419.GA27366@troja.ath.cx> Message-ID: <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> Wait, does screen allow windowing? I've only ever used it for switching between 'screens'.. if it lets you tile them... OMG. Now I'm ticked that it's my Mom's birthday and I'm trapped away from a linux machine for... hours... -cries- If we had multiple connections, 1 window per connection and triggers specific to each connection... I could make everything else happen from that. I personally, if I had time/etc, would make a hashtable of windows and a hashtable of connections. If the name of the connection (also the key for the connection hash) matches a key in the hashtable of windows, output to that window by default. If something (script or connection) tries to write a window that doesn't exist, create a window to match and store it in the hashtable. This would allow the user as many windows as they like, named whatever they want... possibly even shared between connections, depending on how they did it. Muby doesn't have to care why it's writing to each window, just that it does. You'd need some way for users (or scripts) to set the location and size of each window... Possibly as static sizes, or percentages of the screen size, etc. ncurses can handle most of that, I believe, as well as the inevitable overlap. (Which is another good thing.) I'm obviously a huge fan of hashtables, as I'd have another one for arrays of triggers for each connection... and possibly another array of triggers for all connections. (I'm not entirely sure that's a good idea, after all, though.) Obviously, you have to name each connection, and you can't name 2 connections the same thing. But those are pretty easy to deal with, no? On 8/22/06, Martin Kihlgren wrote: > > On Tue, Aug 22, 2006 at 02:05:17PM -0400, William Crawford wrote: > > > > It's the only MUD that's managed to hold my interest for more than a > week. > > And I've played it off and on for around 7-8 years. My only complaints > are > > that it isn't free, and the GMs sometimes make REALLY stupid rulings. I > > usually take a 'vacation' when they do and come back a few months to a > year > > later. > > Yes, it sounded interesting :) But Hell seemed to have all it had, > except the size, and it is free and completely non-politically-correct. > > > Yeah, Sy said the ncurses stuff was a nightmare. As I find some time > > (hah!) I may look into it and see what can be done. > > Lets hope! > > > >Well yes, we had that before, but neither me nor Sy could think of a > > >reason to keep it, so I removed it. If you can give me a proper > > >usecase where its needed, and tell me exactly what it is you require > > >it for, then I guess it should be easy to put it back, and create it > > >to suit your needs. > > > > Well, 2 reasons. The first is that I could write my proxy to do the > stream > > seperating and just have the mud client do the display. The client > would > > actually connect to my proxy multiple times, sending an identifier to > > specify which stream each time. (I've kind of got this all worked out > in my > > head, but nothing on paper yet.) > > Ah, that sounds pretty complex :O I guess it has to be better defined :) > > > The other is that I sometimes play multiple characters. I could use 2 > > clients, but I really should be able to see both at once to react > properly. > > (It's a RP-enforced mud.) > > But you could use screen and just have two instances running for that! > > > Ideally, each connection would have both shared and seperate triggers. > > Ugh :O Very special cases here... > > > I think I'd far prefer the multiple windows method over the multiple > > connections, if I had to pick between them. > > Hm, I prefer multiple screens :) > > Its hard to make a generic and good solution that covers these very > special cases... perhaps the best would be if we added multiple > windows and then let you send special info to them in user > scripting... Perhaps we could bind connections to windows, that sounds > interesting and may solve lots of issues. > > Generally, this needs more thought.. > > //Martin > > -- > ################################################################### > The goal of Computer Science is to build something that will last at > least until we've finished building it. > ################################################################### > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060822/848d8f20/attachment.html From sy1234 at gmail.com Tue Aug 22 17:29:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 17:29:46 -0400 Subject: [Muby-talk] away In-Reply-To: <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> <20060822184419.GA27366@troja.ath.cx> <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> Message-ID: <1e55af990608221429t3f857e89t2174469adba3e6e6@mail.gmail.com> On 8/22/06, William Crawford wrote: > Wait, does screen allow windowing? I've only ever used it for switching > between 'screens'.. if it lets you tile them... OMG. Now I'm ticked that > it's my Mom's birthday and I'm trapped away from a linux machine for... > hours... -cries- Then the question becomes how would you make two Ruby processes talk to oneanother. If this were easier to do than making multiple connections _within_ muby, then that would be an answer. The way muby used to do multiple connections seems to be extendable to what you're thinking about though.. For multiplaying, it would be a definite advantage to be able to have the two sessions talking to oneanother. From sy1234 at gmail.com Tue Aug 22 17:30:34 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 22 Aug 2006 17:30:34 -0400 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <20060822175437.GA13263@troja.ath.cx> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> Message-ID: <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> On 8/22/06, Martin Kihlgren wrote: > > Again, look at my example mubyrc - I store thread ids just to be able > to kill them later.. Wow. Ok, I've got some learning to do. =) From wccrawford at gmail.com Tue Aug 22 17:57:48 2006 From: wccrawford at gmail.com (William Crawford) Date: Tue, 22 Aug 2006 17:57:48 -0400 Subject: [Muby-talk] away In-Reply-To: <1e55af990608221429t3f857e89t2174469adba3e6e6@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> <20060822184419.GA27366@troja.ath.cx> <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> <1e55af990608221429t3f857e89t2174469adba3e6e6@mail.gmail.com> Message-ID: <1b4784dd0608221457m5c9ad76dm1761468588d2d88e@mail.gmail.com> On 8/22/06, Sy Ali wrote: > > On 8/22/06, William Crawford wrote: > > Wait, does screen allow windowing? I've only ever used it for switching > > between 'screens'.. if it lets you tile them... OMG. Now I'm ticked > that > > it's my Mom's birthday and I'm trapped away from a linux machine for... > > hours... -cries- > > Then the question becomes how would you make two Ruby processes talk > to oneanother. If this were easier to do than making multiple > connections _within_ muby, then that would be an answer. If I used 2 clients with screen, they couldn't talk to each other. Having both connections inside the same in the same client instance would obviously be better for scripting reasons, but I'm a flexible guy. The way muby used to do multiple connections seems to be extendable to > what you're thinking about though.. > > For multiplaying, it would be a definite advantage to be able to have > the two sessions talking to oneanother. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060822/06b22e91/attachment.html From zond at troja.ath.cx Tue Aug 22 20:02:48 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 23 Aug 2006 02:02:48 +0200 Subject: [Muby-talk] away In-Reply-To: <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> <20060822184419.GA27366@troja.ath.cx> <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> Message-ID: <20060823000248.GA28005@troja.ath.cx> On Tue, Aug 22, 2006 at 03:52:23PM -0400, William Crawford wrote: > Wait, does screen allow windowing? I've only ever used it for switching > between 'screens'.. if it lets you tile them... OMG. Now I'm ticked that > it's my Mom's birthday and I'm trapped away from a linux machine for... > hours... -cries- I am no expert at screen, but I have seen it done... > If we had multiple connections, 1 window per connection and triggers > specific to each connection... I could make everything else happen from > that. Yes I guess. > I personally, if I had time/etc, would make a hashtable of windows and a [snip] > connections the same thing. But those are pretty easy to deal with, no? I am not alltogether certain that is the way I would do it, but I agree with the general principle. The problem is flexible window management, which is really hard with ncurses (if I understand it correctly). //Martin > On 8/22/06, Martin Kihlgren wrote: > > > >On Tue, Aug 22, 2006 at 02:05:17PM -0400, William Crawford wrote: > >> > >> It's the only MUD that's managed to hold my interest for more than a > >week. > >> And I've played it off and on for around 7-8 years. My only complaints > >are > >> that it isn't free, and the GMs sometimes make REALLY stupid rulings. I > >> usually take a 'vacation' when they do and come back a few months to a > >year > >> later. > > > >Yes, it sounded interesting :) But Hell seemed to have all it had, > >except the size, and it is free and completely non-politically-correct. > > > >> Yeah, Sy said the ncurses stuff was a nightmare. As I find some time > >> (hah!) I may look into it and see what can be done. > > > >Lets hope! > > > >> >Well yes, we had that before, but neither me nor Sy could think of a > >> >reason to keep it, so I removed it. If you can give me a proper > >> >usecase where its needed, and tell me exactly what it is you require > >> >it for, then I guess it should be easy to put it back, and create it > >> >to suit your needs. > >> > >> Well, 2 reasons. The first is that I could write my proxy to do the > >stream > >> seperating and just have the mud client do the display. The client > >would > >> actually connect to my proxy multiple times, sending an identifier to > >> specify which stream each time. (I've kind of got this all worked out > >in my > >> head, but nothing on paper yet.) > > > >Ah, that sounds pretty complex :O I guess it has to be better defined :) > > > >> The other is that I sometimes play multiple characters. I could use 2 > >> clients, but I really should be able to see both at once to react > >properly. > >> (It's a RP-enforced mud.) > > > >But you could use screen and just have two instances running for that! > > > >> Ideally, each connection would have both shared and seperate triggers. > > > >Ugh :O Very special cases here... > > > >> I think I'd far prefer the multiple windows method over the multiple > >> connections, if I had to pick between them. > > > >Hm, I prefer multiple screens :) > > > >Its hard to make a generic and good solution that covers these very > >special cases... perhaps the best would be if we added multiple > >windows and then let you send special info to them in user > >scripting... Perhaps we could bind connections to windows, that sounds > >interesting and may solve lots of issues. > > > >Generally, this needs more thought.. > > > >//Martin > > > >-- > >################################################################### > >The goal of Computer Science is to build something that will last at > >least until we've finished building it. > >################################################################### > >_______________________________________________ > >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/ -- ################################################################### wow, I think I just used libtool to solve a problem -- somebody help me! :> xtifr, STEP AWAY FROM THE KEYBOARD ################################################################### From zond at troja.ath.cx Tue Aug 22 20:04:26 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 23 Aug 2006 02:04:26 +0200 Subject: [Muby-talk] away In-Reply-To: <1b4784dd0608221457m5c9ad76dm1761468588d2d88e@mail.gmail.com> References: <20060821114712.GA8229@snort.ath.cx> <1e55af990608220932u125ab248q64d887f61ad168a5@mail.gmail.com> <1b4784dd0608220952o4c39371bn260bc515251630ec@mail.gmail.com> <20060822173818.GA2477@troja.ath.cx> <1b4784dd0608221105p58356c6fo3e53fd2ed3205bcf@mail.gmail.com> <20060822184419.GA27366@troja.ath.cx> <1b4784dd0608221252x2b5bdb06v9265a339ce935d56@mail.gmail.com> <1e55af990608221429t3f857e89t2174469adba3e6e6@mail.gmail.com> <1b4784dd0608221457m5c9ad76dm1761468588d2d88e@mail.gmail.com> Message-ID: <20060823000425.GB28005@troja.ath.cx> On Tue, Aug 22, 2006 at 05:57:48PM -0400, William Crawford wrote: > On 8/22/06, Sy Ali wrote: > > > >On 8/22/06, William Crawford wrote: > >> Wait, does screen allow windowing? I've only ever used it for switching > >> between 'screens'.. if it lets you tile them... OMG. Now I'm ticked > >that > >> it's my Mom's birthday and I'm trapped away from a linux machine for... > >> hours... -cries- > > > >Then the question becomes how would you make two Ruby processes talk > >to oneanother. If this were easier to do than making multiple > >connections _within_ muby, then that would be an answer. > > > If I used 2 clients with screen, they couldn't talk to each other. Having > both connections inside the same in the same client instance would obviously > be better for scripting reasons, but I'm a flexible guy. As a matter of fact, it IS quite easy to get different ruby processes to talk to each other. DRb is probably the easiest way, but there may be other ways to do IPC in ruby. DRb would have the advantage that we could actually syncronize muby processes across completely different machines even, though :) > >The way muby used to do multiple connections seems to be extendable to > >what you're thinking about though.. > > > >For multiplaying, it would be a definite advantage to be able to have > >the two sessions talking to oneanother. > >_______________________________________________ > >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/ -- ################################################################### wow, I think I just used libtool to solve a problem -- somebody help me! :> xtifr, STEP AWAY FROM THE KEYBOARD ################################################################### From sy1234 at gmail.com Wed Aug 23 02:05:08 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 23 Aug 2006 01:05:08 -0500 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> Message-ID: <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> Ok, I can see how threads work. I can't figure out how to resurrect a dead thread, or wake a sleeping one.. but I'm onto the right track. It also looks like thread grouping might do the trigger grouping I mentioned earlier. I need to play a lot more.. =/ From zond at troja.ath.cx Wed Aug 23 03:20:31 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 23 Aug 2006 09:20:31 +0200 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> Message-ID: <20060823072031.GA32639@troja.ath.cx> You cant resurrect a dead one. You may be able to wake a sleeping one with an interrupt, but you could just as well let it sleep for short intervals, and check a variable between each sleep. That way you could signal it to wake up by setting the variable to something. //Martin On Wed, Aug 23, 2006 at 01:05:08AM -0500, Sy Ali wrote: > Ok, I can see how threads work. > > I can't figure out how to resurrect a dead thread, or wake a sleeping > one.. but I'm onto the right track. > > It also looks like thread grouping might do the trigger grouping I > mentioned earlier. > > I need to play a lot more.. =/ > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### I have a very firm grasp on reality! I can reach out and strangle it any time! ################################################################### From sy1234 at gmail.com Wed Aug 23 06:16:13 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 23 Aug 2006 05:16:13 -0500 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <20060823072031.GA32639@troja.ath.cx> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> <20060823072031.GA32639@troja.ath.cx> Message-ID: <1e55af990608230316t6b117169qb14360dc5a75d83e@mail.gmail.com> On 8/23/06, Martin Kihlgren wrote: > > You cant resurrect a dead one. You may be able to wake a sleeping one > with an interrupt, but you could just as well let it sleep for short > intervals, and check a variable between each sleep. That way you could > signal it to wake up by setting the variable to something. I tried something like that, but my way wasn't working. I need to experiment some more.. From zond at troja.ath.cx Wed Aug 23 06:33:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Wed, 23 Aug 2006 12:33:28 +0200 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <1e55af990608230316t6b117169qb14360dc5a75d83e@mail.gmail.com> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> <20060823072031.GA32639@troja.ath.cx> <1e55af990608230316t6b117169qb14360dc5a75d83e@mail.gmail.com> Message-ID: <20060823103328.GA818@troja.ath.cx> You could also use locks instead of sleeping to get your thread sleeping, then you just unlock the lock and the thread will run again. See http://www.ruby-doc.org/stdlib/libdoc/thread/rdoc/classes/Mutex.html //Martin On Wed, Aug 23, 2006 at 05:16:13AM -0500, Sy Ali wrote: > On 8/23/06, Martin Kihlgren wrote: > > > > You cant resurrect a dead one. You may be able to wake a sleeping one > > with an interrupt, but you could just as well let it sleep for short > > intervals, and check a variable between each sleep. That way you could > > signal it to wake up by setting the variable to something. > > I tried something like that, but my way wasn't working. I need to > experiment some more.. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### I have a very firm grasp on reality! I can reach out and strangle it any time! ################################################################### From sy1234 at gmail.com Wed Aug 23 06:40:40 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 23 Aug 2006 05:40:40 -0500 Subject: [Muby-talk] Threads intertwined with regular code In-Reply-To: <20060823103328.GA818@troja.ath.cx> References: <1e55af990608172114p1e39989u9a9cfad3c90ae116@mail.gmail.com> <20060821122739.GC8229@snort.ath.cx> <1e55af990608221039y755cc29ah31142ea66e67c209@mail.gmail.com> <20060822175437.GA13263@troja.ath.cx> <1e55af990608221430u3ae91b7fld335ebbe5fdbb413@mail.gmail.com> <1e55af990608222305q6a28b7d3s22e5fc9a34e4293@mail.gmail.com> <20060823072031.GA32639@troja.ath.cx> <1e55af990608230316t6b117169qb14360dc5a75d83e@mail.gmail.com> <20060823103328.GA818@troja.ath.cx> Message-ID: <1e55af990608230340qf978df3j976076759c2cf6f6@mail.gmail.com> On 8/23/06, Martin Kihlgren wrote: > > You could also use locks instead of sleeping to get your thread > sleeping, then you just unlock the lock and the thread will run again. > > See http://www.ruby-doc.org/stdlib/libdoc/thread/rdoc/classes/Mutex.html Oh yeah.. I wondered about that. I'll try that. From sy1234 at gmail.com Wed Aug 23 21:52:57 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 23 Aug 2006 20:52:57 -0500 Subject: [Muby-talk] Temporarily disabling triggers? Message-ID: <1e55af990608231852m6528b6d6p9d17751f15a6634c@mail.gmail.com> Is there a good way of temporarily disabling triggers? The only one I can think of is to cycle through all triggers, copying them to another array or hash and then delete them all. Then to re-enable I would copy the triggers back from that temporary variable. Is this a sensible thing to do? From zond at troja.ath.cx Thu Aug 24 04:05:38 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 24 Aug 2006 10:05:38 +0200 Subject: [Muby-talk] Temporarily disabling triggers? In-Reply-To: <1e55af990608231852m6528b6d6p9d17751f15a6634c@mail.gmail.com> References: <1e55af990608231852m6528b6d6p9d17751f15a6634c@mail.gmail.com> Message-ID: <20060824080537.GA10848@troja.ath.cx> I have done it by copying conf.remote_triggers to a temporary variable, then setting it to {}. Basically what you did, except I dont have to cycle any :) Then when I want them back, I just copy back to conf.remote_triggers again. //Martin On Wed, Aug 23, 2006 at 08:52:57PM -0500, Sy Ali wrote: > Is there a good way of temporarily disabling triggers? > > The only one I can think of is to cycle through all triggers, copying > them to another array or hash and then delete them all. Then to > re-enable I would copy the triggers back from that temporary variable. > > Is this a sensible thing to do? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### The early bird gets the coffee left over from the night before. ################################################################### From sy1234 at gmail.com Thu Aug 24 13:40:45 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 24 Aug 2006 12:40:45 -0500 Subject: [Muby-talk] Temporarily disabling triggers? In-Reply-To: <20060824080537.GA10848@troja.ath.cx> References: <1e55af990608231852m6528b6d6p9d17751f15a6634c@mail.gmail.com> <20060824080537.GA10848@troja.ath.cx> Message-ID: <1e55af990608241040mebc0370s445634f5cff93144@mail.gmail.com> On 8/24/06, Martin Kihlgren wrote: > > I have done it by copying conf.remote_triggers to a temporary > variable, then setting it to {}. > > Basically what you did, except I dont have to cycle any :) > > Then when I want them back, I just copy back to conf.remote_triggers > again. Aah, that's a much more straightforward idea. I implemented something like that, but I wrapped it around another where I can now specify how many prompts-worth of trigger-disabling I want to do. This lets me read notes without having them draw out my triggers. =) And it was so easy to program too!