From sy1234 at gmail.com Mon Jul 24 20:37:48 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 24 Jul 2006 19:37:48 -0500 Subject: [Muby-talk] triggers are set off twice Message-ID: <1e55af990607241737x75c8c4afj23eb47c6a2d25d86@mail.gmail.com> Ok, what gives? React to "trigger" by echoing the current time: $REMOTETRIGGERS["^trigger$"] = Proc.new do echo Time.new end OutputWindow.print.print triggerMon Jul 24 20:33:59 CDT 2006 OutputWindow.print.print 0 InputWindow.output.print OutputWindow.print.print OutputWindow.print.print Mon Jul 24 20:33:59 CDT 2006 OutputWindow.print.print 0 InputWindow.output.print OutputWindow.print.print OutputWindow.print.print What the heck?! I've tried the obvious variations, but they all act in the same way. From shaun.biggs at gmail.com Tue Jul 25 11:35:09 2006 From: shaun.biggs at gmail.com (shaun biggs) Date: Tue, 25 Jul 2006 10:35:09 -0500 Subject: [Muby-talk] It doesn't go Message-ID: <6cfe85340607250835m6feb3aafgb4d1e49080e59b9a@mail.gmail.com> Good morning. This is Balaam from Aardwolf. I just tried to get muby to run on my computer, but it had some issues. #ruby muby.rb ncurses is required, but failed to load. I just installed the ncurses library through gem, so I don't see why it wouldn't work. I'm not exactly the most familiar person with ruby though, so any input would be helpful. Running Gentoo, with ruby 1.8.3 and gem 0.8.11 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060725/0eb5d54b/attachment.html From sy1234 at gmail.com Tue Jul 25 15:27:36 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 15:27:36 -0400 Subject: [Muby-talk] It doesn't go Message-ID: <1e55af990607251227pe15888bibfa26fb469779955@mail.gmail.com> Sorry I couldn't respond earlier. It seems that the mailing list is grumpy and might not be working properly. I understand what the problem is. There is no gem-handling in the application yet. I know how to get it working and I'll be able to fix it a little later this evening when I get home from work. Unfortunately, testing will be a bit annoying, as I cannot properly install the ncurses gem. I'll email you a replacement application when I've done what I think will work. =) ---------------- Tue Jul 25 11:35:09 EDT 2006 Good morning. This is Balaam from Aardwolf. I just tried to get muby to run on my computer, but it had some issues. #ruby muby.rb ncurses is required, but failed to load. I just installed the ncurses library through gem, so I don't see why it wouldn't work. I'm not exactly the most familiar person with ruby though, so any input would be helpful. Running Gentoo, with ruby 1.8.3 and gem 0.8.11 From sy1234 at gmail.com Tue Jul 25 16:10:53 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 16:10:53 -0400 Subject: [Muby-talk] test Message-ID: <1e55af990607251310y52727419wb68c6605dda9a787@mail.gmail.com> testing the reply-to field.. it seems that mailman have insane defaults.. From sy1234 at gmail.com Tue Jul 25 16:16:57 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 16:16:57 -0400 Subject: [Muby-talk] test In-Reply-To: <1e55af990607251310y52727419wb68c6605dda9a787@mail.gmail.com> References: <1e55af990607251310y52727419wb68c6605dda9a787@mail.gmail.com> Message-ID: <1e55af990607251316t135e9907x9278dfb06898ba2c@mail.gmail.com> Ok, I have done a "bad thing" and forced the reply-to address to be the list. This might annoy some people who have broken clients or insane preferences, but it's very convenient for the rest of the universe. Also, the archives are WAY faster than the mailing list.. it seems that there is a big big delay with the mailing list (several hours) where the archives are mostly instant. http://rubyforge.org/pipermail/muby-talk/ On 7/25/06, Sy Ali wrote: > testing the reply-to field.. it seems that mailman have insane defaults.. > From zond at troja.ath.cx Tue Jul 25 16:43:02 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Tue, 25 Jul 2006 22:43:02 +0200 Subject: [Muby-talk] It doesn't go Message-ID: <20060725204302.GC29984@troja.ath.cx> True, no gem handling at all atm - I installed the ruby-ncurses-lib separately to begin with. But it sounds like Sy is gonna fix it. If you want to try it in the mean time, you may have luck if you add: ------------- require 'rubygems' require_gem 'ncurses' ------------- instead of: ------------- requireload 'ncurses' ------------- in muby.rb. At least I _think_ that should work. Not tested it though.. //Martin On Tue, Jul 25, 2006 at 03:27:36PM -0400, Sy Ali wrote: > Sorry I couldn't respond earlier. It seems that the mailing list is > grumpy and might not be working properly. > > I understand what the problem is. There is no gem-handling in the > application yet. I know how to get it working and I'll be able to fix > it a little later this evening when I get home from work. > > Unfortunately, testing will be a bit annoying, as I cannot properly > install the ncurses gem. I'll email you a replacement application > when I've done what I think will work. =) > > > ---------------- > Tue Jul 25 11:35:09 EDT 2006 > > Good morning. This is Balaam from Aardwolf. I just tried to get muby to > run on my computer, but it had some issues. > > #ruby muby.rb > ncurses is required, but failed to load. > > I just installed the ncurses library through gem, so I don't see why it > wouldn't work. I'm not exactly the most familiar person with ruby though, > so any input would be helpful. > > Running Gentoo, with ruby 1.8.3 and gem 0.8.11 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### It is amazing how complete is the delusion that beauty is goodness. ################################################################### From sy1234 at gmail.com Tue Jul 25 18:04:49 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 17:04:49 -0500 Subject: [Muby-talk] It doesn't go In-Reply-To: <20060725204302.GC29984@troja.ath.cx> References: <20060725204302.GC29984@troja.ath.cx> Message-ID: <1e55af990607251504r43c8d350o37ee8b88678fcda1@mail.gmail.com> Attached is a muby snapshot which includes an intelligent fix for the rubygems issue. It was on my hitlist of things to do, if not on my forward-facing notes, it did have a comment in the code. =) -------------- next part -------------- A non-text attachment was scrubbed... Name: muby-.tar.gz Type: application/x-gzip Size: 26150 bytes Desc: not available Url : http://rubyforge.org/pipermail/muby-talk/attachments/20060725/f6d48603/attachment-0001.gz From sy1234 at gmail.com Tue Jul 25 21:02:31 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 20:02:31 -0500 Subject: [Muby-talk] gagging seems broken Message-ID: <1e55af990607251802q2a1572es9eac31d31a43d125@mail.gmail.com> /$GAGS.push("uniquestring") ; write "echo uniquestring something" => 20:58:53 InputWindow.output.print /write "echo uniquestring something" 20:58:53 InputWindow.output.print echo uniquestring something 20:58:53 InputWindow.output.print 20:58:53 OutputWindow.print.print uniquestrin Something's definitely not right. So now it's triggers and gags which aren't working. I'm going to be testing everything else that's obvious. From sy1234 at gmail.com Tue Jul 25 22:07:56 2006 From: sy1234 at gmail.com (Sy Ali) Date: Tue, 25 Jul 2006 21:07:56 -0500 Subject: [Muby-talk] muby status Message-ID: <1e55af990607251907v2a68f3afp3405e7fa7c017816@mail.gmail.com> I'm also sending directly to you, since I still don't trust the mailing list. http://jrandomhacker.info/Muby/bugs_list_and_changelog#0.5.1 Gagging and triggers are horribly broken. I tested 0.5.1 to reproduce the issues, and created some manual test cases. I haven't the skill to understand what's going on with the internals.. I don't think I have a hope in heck to fix these problems. Do you remember these features ever working for you? The code and comments all seem to suggest that it works fine for you. From shaun.biggs at gmail.com Wed Jul 26 11:21:03 2006 From: shaun.biggs at gmail.com (shaun biggs) Date: Wed, 26 Jul 2006 10:21:03 -0500 Subject: [Muby-talk] Redrawing the screen Message-ID: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> I'm currently using an old computer, and I'm noticing that the screen draws quite slowly. It appears to be drawing each character individually instead of one line at a time. Also if I get large amounts of data ("rank 1" on Aardwolf, for example is 500 lines), then the client just drops connetion. Probably something due to the slow redraw and not being able to process the rest of the mud's input. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/muby-talk/attachments/20060726/6aa25206/attachment.html From sy1234 at gmail.com Wed Jul 26 12:07:41 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 11:07:41 -0500 Subject: [Muby-talk] Redrawing the screen In-Reply-To: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> References: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> Message-ID: <1e55af990607260907udc64a41x3b0a5159a02943a0@mail.gmail.com> On 7/26/06, shaun biggs wrote: > I'm currently using an old computer, and I'm noticing that the screen draws > quite slowly. It appears to be drawing each character individually instead > of one line at a time. I assume that the rubygems fix worked. I'll make a point to package up a new release. Yes, input is indeed received character-by-character. This is to facilitate matching. I suspect that some gutting would need to happen to allow line-by-line matching. I'll make a note of it. See also: http://jrandomhacker.info/Muby/wish_list#Speed_Improvements > Also if I get large amounts of data ("rank 1" on Aardwolf, for example is > 500 lines), then the client just drops connetion. Probably something due to > the slow redraw and not being able to process the rest of the mud's input. I noticed the connection dropping issue before. I've seen this with another client (mmucl), with the continent map before MCCP was required to view it. I wonder if an MCCP proxy would help with muby's disconnections. My own brief MCCP proxy experiments haven't worked yet.. it's definitely a problem to solve. Maybe I'm just using the wrong program. =) From sy1234 at gmail.com Wed Jul 26 12:50:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 11:50:07 -0500 Subject: [Muby-talk] [ANN] 0.5.4 Released Message-ID: <1e55af990607260950u7d2cfc2dra7482d4e293990e1@mail.gmail.com> Changes: * Intelligent rubygems and ncurses gem use. ** It's a fallback, if ncurses isn't installed the traditional way. I'd do it the other way around, but somehow I like it this way. * Implemented a welcome procedure. ** Right now it displays the help text. Later, it will be a setup wizard and tutorial. * Cleaned up the help concept. * Re-instated the version number report on startup, now that I understand how things work. * Implemented an auto-loading user directory. ** Many scripters will have lots of files in their user directory, so this makes their lives a lot easier. * Implemented intelligent rc-file detection and loading. ** The list, in order of priority, is: $RC_FILE ~/.mubyrc ~/mubyrc * Created a docs directory. ** There's nothing much to see yet. ** One day there will be a complete help application. * Chopped files apart, and migrated the results to the lib directory. From sy1234 at gmail.com Wed Jul 26 12:51:19 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 11:51:19 -0500 Subject: [Muby-talk] Redrawing the screen In-Reply-To: <1e55af990607260907udc64a41x3b0a5159a02943a0@mail.gmail.com> References: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> <1e55af990607260907udc64a41x3b0a5159a02943a0@mail.gmail.com> Message-ID: <1e55af990607260951yc039e77jb199f6e6f8c391b3@mail.gmail.com> On 7/26/06, Sy Ali wrote: > I assume that the rubygems fix worked. I'll make a point to package > up a new release. I released 0.5.4 .. thanks for testing the rubygems issue. I'll continue working on my other tasks. =) From sy1234 at gmail.com Wed Jul 26 17:51:33 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 16:51:33 -0500 Subject: [Muby-talk] Redrawing the screen In-Reply-To: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> References: <6cfe85340607260821g59471404y5a56a629a606c757@mail.gmail.com> Message-ID: <1e55af990607261451i3450ad5eo1ce903da56d712a7@mail.gmail.com> On 7/26/06, shaun biggs wrote: > Also if I get large amounts of data ("rank 1" on Aardwolf, for example is > 500 lines), then the client just drops connetion. Probably something due to > the slow redraw and not being able to process the rest of the mud's input. I have confirmed that this is resolved by using an MCCP proxy. I am using MudProxy: http://www.mudproxy.dk My config.ini is: MudHost aardmud.org MudPort 4010 ProxyPort 9009 Verbose No - does nothing yet Gagging Yes ServerMode No GagFile gag.txt LogFile log.txt Escape ## I launch proxy and within muby I use this: /$INPUTWINDOW.connect("Aardwolf", "127.0.0.1", 9009 It has been tested against a 397-player "who" listing. From sy1234 at gmail.com Wed Jul 26 22:59:24 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 21:59:24 -0500 Subject: [Muby-talk] regexp triggers - once per line Message-ID: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> You mention that each regexp can trigger only once per line now. This might be a bad idea, since complex scripting would rely on being able to match several parts of the same line. Maybe you should undo that safety, and we can force users to get used to making proper triggers. I'll need to figure out better docs to explain how though. From sy1234 at gmail.com Wed Jul 26 23:34:21 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 22:34:21 -0500 Subject: [Muby-talk] Update Message-ID: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> * The output of something like /echo variable should be in the main window, not in the input area. ** /echo? What is that? :) But anything you @outputWindow.print will show up in the main window, so what is the issue here? .. scripting iwth @outputWindow is silly. 'echo' is the term used in many places. =) --- Although connect was simplified, it is not available in user-scripting: $STARTUP << Proc.new do connect("127.0.0.1", 9009) end I would say that just about all of the interesting features need to be the same for /command vs having the item in scripting. Is there an easy way to do this? ---- Substitution seems to be broken now. It's probably because my stupid /sub feature is hackish, and the code it relies on got tidied up. /sub "substitution", "working" echo substitution works 23:20:28 InputWindow.output.print echo substitution works 23:20:28 InputWindow.output.print working0 23:20:29 InputWindow.output.print 23:20:29 OutputWindow.print.print substitution works 23:20:29 OutputWindow.print.print (prompt line 1) 23:20:29 OutputWindow.print.print (prompt line 2) 23:20:29 OutputWindow.print.print ---- Remote triggers are tested and seem to be working fine. .. I'm still goofing around. From sy1234 at gmail.com Wed Jul 26 23:43:57 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 22:43:57 -0500 Subject: [Muby-talk] It doesn't go In-Reply-To: <6cfe85340607262020nbe6bbf5k3da897c7d405fc39@mail.gmail.com> References: <20060725204302.GC29984@troja.ath.cx> <1e55af990607251504r43c8d350o37ee8b88678fcda1@mail.gmail.com> <6cfe85340607262020nbe6bbf5k3da897c7d405fc39@mail.gmail.com> Message-ID: <1e55af990607262043q4006ce55j39d35f330fbe4728@mail.gmail.com> On 7/26/06, shaun biggs wrote: > I had just changed up a few lines of code in there. In > muby_configuration.rb I made it this: Thanks for your help. I was fiddling around until I realised that I had a broken ncurses gem which was causing trouble! =) I've made the changes.. hopefully nobody else will have ncurses issues. From zond at troja.ath.cx Thu Jul 27 00:12:49 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 06:12:49 +0200 Subject: [Muby-talk] regexp triggers - once per line In-Reply-To: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> References: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> Message-ID: <20060727041249.GA13347@troja.ath.cx> EACH regexp can trigger only once per line, if you have several regular expressions they can all match on the same line. What is proper triggers? I have never seen triggers with better capabilities than these? //Martin On Wed, Jul 26, 2006 at 09:59:24PM -0500, Sy Ali wrote: > You mention that each regexp can trigger only once per line now. > > This might be a bad idea, since complex scripting would rely on being > able to match several parts of the same line. > > Maybe you should undo that safety, and we can force users to get used > to making proper triggers. I'll need to figure out better docs to > explain how though. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 00:29:26 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 23:29:26 -0500 Subject: [Muby-talk] regexp triggers - once per line In-Reply-To: <20060727041249.GA13347@troja.ath.cx> References: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> <20060727041249.GA13347@troja.ath.cx> Message-ID: <1e55af990607262129o6048123ev4d53307f0994f3ba@mail.gmail.com> On 7/26/06, Martin Kihlgren wrote: > EACH regexp can trigger only once per line, if you have several > regular expressions they can all match on the same line. Oh, I understand. Perhaps it's not as difficult as I thought. So the advanced user would make multiple triggers. I hope this is easy to do. If a user wanted to count the number of times they saw the letter 'a'.. they could put in a trigger to increment a variable.. but they would have to have at least 1x(screen width) triggers to do it? Hrm. ;) From sy1234 at gmail.com Thu Jul 27 00:29:26 2006 From: sy1234 at gmail.com (Sy Ali) Date: Wed, 26 Jul 2006 23:29:26 -0500 Subject: [Muby-talk] regexp triggers - once per line In-Reply-To: <20060727041249.GA13347@troja.ath.cx> References: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> <20060727041249.GA13347@troja.ath.cx> Message-ID: <1e55af990607262129o6048123ev4d53307f0994f3ba@mail.gmail.com> On 7/26/06, Martin Kihlgren wrote: > EACH regexp can trigger only once per line, if you have several > regular expressions they can all match on the same line. Oh, I understand. Perhaps it's not as difficult as I thought. So the advanced user would make multiple triggers. I hope this is easy to do. If a user wanted to count the number of times they saw the letter 'a'.. they could put in a trigger to increment a variable.. but they would have to have at least 1x(screen width) triggers to do it? Hrm. ;) From zond at troja.ath.cx Thu Jul 27 01:07:34 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 07:07:34 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> Message-ID: <20060727050734.GB13347@troja.ath.cx> On Wed, Jul 26, 2006 at 10:34:21PM -0500, Sy Ali wrote: > * The output of something like /echo variable should be in the main > window, not in the input area. > ** /echo? What is that? :) But anything you @outputWindow.print will > show up in the main window, so what is the issue here? > > .. scripting iwth @outputWindow is silly. 'echo' is the term used in > many places. =) The reason I created this client was to use ruby for scripting, so I am quite happy having to mention what should echo etc, but I guess a few shortcuts along the lines of echo and echon are ok :) > --- > > Although connect was simplified, it is not available in user-scripting: > > $STARTUP << Proc.new do > connect("127.0.0.1", 9009) > end > > I would say that just about all of the interesting features need to be > the same for /command vs having the item in scripting. Is there an > easy way to do this? Well, there are ways - but why? As I said, you have to be prepared that the scripting has the features of ruby when you start scripting in ruby, so to speak. > ---- > > Substitution seems to be broken now. It's probably because my stupid > /sub feature is hackish, and the code it relies on got tidied up. > > /sub "substitution", "working" > echo substitution works > > 23:20:28 InputWindow.output.print echo substitution works > 23:20:28 InputWindow.output.print working0 > 23:20:29 InputWindow.output.print > 23:20:29 OutputWindow.print.print substitution works > 23:20:29 OutputWindow.print.print (prompt line 1) > 23:20:29 OutputWindow.print.print (prompt line 2) > 23:20:29 OutputWindow.print.print Your /sub feature creates a remote trigger, which will only be run when you get data from the remote end, not from your own end. A /sub in the current (and more or less working) version consists of a $GAG and a $REMOTETRIGGER, having the same regular expressions, where the trigger prints what it sees. //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 01:14:39 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 07:14:39 +0200 Subject: [Muby-talk] regexp triggers - once per line In-Reply-To: <1e55af990607262129o6048123ev4d53307f0994f3ba@mail.gmail.com> References: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> <20060727041249.GA13347@troja.ath.cx> <1e55af990607262129o6048123ev4d53307f0994f3ba@mail.gmail.com> Message-ID: <20060727051439.GC13347@troja.ath.cx> On Wed, Jul 26, 2006 at 11:29:26PM -0500, Sy Ali wrote: > On 7/26/06, Martin Kihlgren wrote: > > EACH regexp can trigger only once per line, if you have several > > regular expressions they can all match on the same line. > > Oh, I understand. Perhaps it's not as difficult as I thought. > > So the advanced user would make multiple triggers. I hope this is easy to do. As easy as making only one I guess. > If a user wanted to count the number of times they saw the letter > 'a'.. they could put in a trigger to increment a variable.. but they > would have to have at least 1x(screen width) triggers to do it? Hrm. > ;) I wouldnt do that... :) I would do $REMOTETRIGGERS[/.*\n/m] = Proc.new do |inwin, outwin, match| outwin.print("we have #{match[0].split(//).select do |c| c == "a" end.size} j's") end which would output the number of 'a' we got from the remote end each time we see a newline. :D //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 01:17:54 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 07:17:54 +0200 Subject: [Muby-talk] newlines Message-ID: <20060727051754.GA18572@troja.ath.cx> Btw, I have cleaned up all the linebreaks in the code, so that we get what we need and no more. The output window should be prettier now. //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 04:31:21 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 10:31:21 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> Message-ID: <20060727083121.GA19331@troja.ath.cx> I like your cce work, even though I think it looks a bit messy atm. I would like to remove all Ncurses handling of colors, and let Ncurses do only windows and stuff. To do this I would like to refactor the cce code a bit, and use it for both detecting colors in Connection, and creating colors in Style. Would you mind if I ripped the guts out of your cce? :D This is a major rework, but I think its worth it to get all colors working properly :) //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 10:28:57 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:28:57 -0400 Subject: [Muby-talk] regexp triggers - once per line In-Reply-To: <20060727051439.GC13347@troja.ath.cx> References: <1e55af990607261959t5d0bc2ctdb288bff70ab0758@mail.gmail.com> <20060727041249.GA13347@troja.ath.cx> <1e55af990607262129o6048123ev4d53307f0994f3ba@mail.gmail.com> <20060727051439.GC13347@troja.ath.cx> Message-ID: <1e55af990607270728g10049393oac03a6ee1d5e7c75@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > $REMOTETRIGGERS[/.*\n/m] = Proc.new do |inwin, outwin, match| outwin.print("we have #{match[0].split(//).select do |c| c == "a" end.size} j's") end > > which would output the number of 'a' we got from the remote end each > time we see a newline. Crazy! From sy1234 at gmail.com Thu Jul 27 10:35:45 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:35:45 -0400 Subject: [Muby-talk] newlines In-Reply-To: <20060727051754.GA18572@troja.ath.cx> References: <20060727051754.GA18572@troja.ath.cx> Message-ID: <1e55af990607270735s2fd8a8a4t622d393184114c65@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > Btw, I have cleaned up all the linebreaks in the code, so that we get > what we need and no more. > > The output window should be prettier now. Oh, you're right.. it's doing a much more consistant screen update for each pageful of text. Now the only issue with screen updates is the slowness-blur when receiving a lot of text all at once. Not that anyone can read that anyways. ;) From sy1234 at gmail.com Thu Jul 27 10:42:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:42:07 -0400 Subject: [Muby-talk] Update In-Reply-To: <20060727050734.GB13347@troja.ath.cx> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727050734.GB13347@troja.ath.cx> Message-ID: <1e55af990607270742yc8d94b3meb48972d2cca03dc@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > > .. scripting iwth @outputWindow is silly. 'echo' is the term used in > > many places. =) > > The reason I created this client was to use ruby for scripting, so I > am quite happy having to mention what should echo etc, but I guess a > few shortcuts along the lines of echo and echon are ok :) > > I would say that just about all of the interesting features need to be > > the same for /command vs having the item in scripting. Is there an > > easy way to do this? > > Well, there are ways - but why? As I said, you have to be prepared > that the scripting has the features of ruby when you start scripting > in ruby, so to speak. I know it's annoying to maintain, but for beginning scripters, having easier shortcuts for the common actions would make life a lot easier. I would be happy to maintain two sets of documentation.. to describe things the simple way, and then to reveal the true power of pure Ruby scripting. .. not that I know it .. yet. ;) > Your /sub feature creates a remote trigger, which will only be run > when you get data from the remote end, not from your own end. > > A /sub in the current (and more or less working) version consists of a > $GAG and a $REMOTETRIGGER, having the same regular expressions, where > the trigger prints what it sees. So I would have to have the substitution do this: * gag the entire line * capture the entire line * build a new line * output a new line Would this work as expected? Imagine receiving a screenful of text. Would I get it all, minus the gagged line, and *then* get the replacement line sometime later? From zond at troja.ath.cx Thu Jul 27 10:46:27 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 16:46:27 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270742yc8d94b3meb48972d2cca03dc@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727050734.GB13347@troja.ath.cx> <1e55af990607270742yc8d94b3meb48972d2cca03dc@mail.gmail.com> Message-ID: <20060727144627.GC24596@troja.ath.cx> On Thu, Jul 27, 2006 at 10:42:07AM -0400, Sy Ali wrote: > I know it's annoying to maintain, but for beginning scripters, having > easier shortcuts for the common actions would make life a lot easier. > > I would be happy to maintain two sets of documentation.. to describe > things the simple way, and then to reveal the true power of pure Ruby > scripting. .. not that I know it .. yet. ;) Well, feel free :) > So I would have to have the substitution do this: > * gag the entire line > * capture the entire line > * build a new line > * output a new line > > Would this work as expected? Yes, should do. If it is too inconvenient I can allways add a specific array, lets call it $SUBSTITUTIONS that only does substitutions :) > Imagine receiving a screenful of text. Would I get it all, minus the > gagged line, and *then* get the replacement line sometime later? The triggers react immediately, so no, you would get it directly. //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 10:47:05 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:47:05 -0400 Subject: [Muby-talk] Update In-Reply-To: <20060727083121.GA19331@troja.ath.cx> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> Message-ID: <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > > I like your cce work, even though I think it looks a bit messy atm. Oh yeah it's messy. I still don't totally grasp the structures of programming. I made it, then remade it twice to break it apart into mini-objects.. this way it becomes really hackable for all kinds of weird future uses. > I would like to remove all Ncurses handling of colors, and let Ncurses > do only windows and stuff. To do this I would like to refactor the cce > code a bit, and use it for both detecting colors in Connection, and > creating colors in Style. Why don't we handle the ansi colour manually? It is a known standard which we can rely on.. There are also some good colour libraries. > Would you mind if I ripped the guts out of your cce? :D > > This is a major rework, but I think its worth it to get all colors > working properly :) Go ahead. I normally design stuff like that as a black box.. as long as it acts in the right way it doesn't matter how it works. Keep in mind the wierd issues with. * Receiving only a colour code. * Receiving only text. * Receiving multiple colour codes back-to-back. * Accepting or rejecting invalid codes. One day, I would also like to add a feature to automatically black-out any items which have an invalid code. Some other features can get added in, for background colours, blink tags and such. You may also like to review my early colour codes script: http://jrandomhacker.info/TRN_-_Projects/colourcodes From sy1234 at gmail.com Thu Jul 27 10:48:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:48:59 -0400 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> Message-ID: <1e55af990607270748o55c65cd7pfdd8dca27b2128d2@mail.gmail.com> Regarding removing ncurses for colours.. the one cool feature it provides is that it can be relied upon to figure out what the current colour codes are. It would be useful for modifying cce to provide an "invisible code" which makes the following text the appropriate foreground colour to make it hidden. hrm.. lots of ideas. From zond at troja.ath.cx Thu Jul 27 10:55:06 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 16:55:06 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> Message-ID: <20060727145506.GA24816@troja.ath.cx> On Thu, Jul 27, 2006 at 10:47:05AM -0400, Sy Ali wrote: > Why don't we handle the ansi colour manually? It is a known standard > which we can rely on.. There are also some good colour libraries. That is what I meant - Ill let the Style class encapsulate not the Ncurses color handling, but a home-made color handling along the lines of your cce file. > Go ahead. I normally design stuff like that as a black box.. as long > as it acts in the right way it doesn't matter how it works. > > Keep in mind the wierd issues with. > * Receiving only a colour code. > * Receiving only text. > * Receiving multiple colour codes back-to-back. > * Accepting or rejecting invalid codes. Mm, I wont guarantee backwards compatibility... I intend to simplify the whole deal, so that its the same method for printing with and without colors all the way. There shouldnt be one print and one cce, for example. > One day, I would also like to add a feature to automatically black-out > any items which have an invalid code. > > Some other features can get added in, for background colours, blink > tags and such. > > You may also like to review my early colour codes script: > http://jrandomhacker.info/TRN_-_Projects/colourcodes Ah, well, thats not really necessary I think - we can just collect the codes, and show them to the user when we want to. Its much nicer to not even try to understand the codes more than "that they are codes", so to speak. Printing codes will require that we actually know them, however, but that is a simpler deal than having to parse all codes. //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 10:58:40 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 10:58:40 -0400 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270748o55c65cd7pfdd8dca27b2128d2@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> <1e55af990607270748o55c65cd7pfdd8dca27b2128d2@mail.gmail.com> Message-ID: <1e55af990607270758k1a7c13fcj7fc9858de9c114b6@mail.gmail.com> On 7/27/06, Sy Ali wrote: > Regarding removing ncurses for colours.. the one cool feature it > provides is that it can be relied upon to figure out what the current > colour codes are. I guess it could be tracked internally.. if we held all the keys to all the locks.. we see all keyboard input and process it.. we see all server output and process it. Hmm. Ooh.. I already see ways to have the colours processed in different ways. Ok, I'll let you play with that stuff. I'll work on my current todo list and scripting adventures. I'm porting a HUGE amount of scripting from a tcl-based language into ruby/muby. It'll discover all sorts of neat tricks, limitations and bugs. Plus it'll expand the official docs quite a lot.. and maybe help some new programmers out (like me) From sy1234 at gmail.com Thu Jul 27 11:02:30 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 11:02:30 -0400 Subject: [Muby-talk] Update In-Reply-To: <20060727144627.GC24596@troja.ath.cx> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727050734.GB13347@troja.ath.cx> <1e55af990607270742yc8d94b3meb48972d2cca03dc@mail.gmail.com> <20060727144627.GC24596@troja.ath.cx> Message-ID: <1e55af990607270802p37fba1f7l1e5bac7cd6a5639a@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > On Thu, Jul 27, 2006 at 10:42:07AM -0400, Sy Ali wrote: > > I know it's annoying to maintain, but for beginning scripters, having > > easier shortcuts for the common actions would make life a lot easier. > > > > I would be happy to maintain two sets of documentation.. to describe > > things the simple way, and then to reveal the true power of pure Ruby > > scripting. .. not that I know it .. yet. ;) > > Well, feel free :) Ok, but I still need help understanding how to make the shortcuts. I seem to be putting this sort of thing in the wrong place or building it the wrong way. > > So I would have to have the substitution do this: > Yes, should do. If it is too inconvenient I can allways add a specific > array, lets call it $SUBSTITUTIONS that only does substitutions :) Let's avoid it, to re-use code properly and also demonstrate in-code what is possible. > The triggers react immediately, so no, you would get it directly. That's so awesome. This is my new afternoon project. From sy1234 at gmail.com Thu Jul 27 11:04:06 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 11:04:06 -0400 Subject: [Muby-talk] Update In-Reply-To: <20060727145506.GA24816@troja.ath.cx> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> <20060727145506.GA24816@troja.ath.cx> Message-ID: <1e55af990607270804i77f3f016x219f502c8b3970fa@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: (re. cce rewriting) > Mm, I wont guarantee backwards compatibility... I intend to simplify > the whole deal, so that its the same method for printing with and > without colors all the way. There shouldnt be one print and one cce, > for example. as long as my test case continues to work, I'm happy. =) > Ah, well, thats not really necessary I think - we can just collect the > codes, and show them to the user when we want to. Its much nicer to > not even try to understand the codes more than "that they are codes", > so to speak. Printing codes will require that we actually know them, > however, but that is a simpler deal than having to parse all codes. I think maybe you understand my goal better than I did when I was hacking around yesterday. =) From zond at troja.ath.cx Thu Jul 27 11:05:57 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 17:05:57 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270758k1a7c13fcj7fc9858de9c114b6@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> <1e55af990607270748o55c65cd7pfdd8dca27b2128d2@mail.gmail.com> <1e55af990607270758k1a7c13fcj7fc9858de9c114b6@mail.gmail.com> Message-ID: <20060727150557.GA24943@troja.ath.cx> On Thu, Jul 27, 2006 at 10:58:40AM -0400, Sy Ali wrote: > On 7/27/06, Sy Ali wrote: > > Regarding removing ncurses for colours.. the one cool feature it > > provides is that it can be relied upon to figure out what the current > > colour codes are. > > I guess it could be tracked internally.. if we held all the keys to > all the locks.. we see all keyboard input and process it.. we see all > server output and process it. Hmm. > > Ooh.. I already see ways to have the colours processed in different > ways. Ok, I'll let you play with that stuff. I'll work on my current > todo list and scripting adventures. Yes please, no huge rewrites without me please :) > I'm porting a HUGE amount of scripting from a tcl-based language into > ruby/muby. It'll discover all sorts of neat tricks, limitations and > bugs. Plus it'll expand the official docs quite a lot.. and maybe > help some new programmers out (like me) Great :) //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 11:06:39 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 17:06:39 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270804i77f3f016x219f502c8b3970fa@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727083121.GA19331@troja.ath.cx> <1e55af990607270747x3fc273c5w72b94fe1c4e31daa@mail.gmail.com> <20060727145506.GA24816@troja.ath.cx> <1e55af990607270804i77f3f016x219f502c8b3970fa@mail.gmail.com> Message-ID: <20060727150638.GB24943@troja.ath.cx> On Thu, Jul 27, 2006 at 11:04:06AM -0400, Sy Ali wrote: > On 7/27/06, Martin Kihlgren wrote: > (re. cce rewriting) > > Mm, I wont guarantee backwards compatibility... I intend to simplify > > the whole deal, so that its the same method for printing with and > > without colors all the way. There shouldnt be one print and one cce, > > for example. > > as long as my test case continues to work, I'm happy. =) I wont guarantee that, but Ill try :) > > Ah, well, thats not really necessary I think - we can just collect the > > codes, and show them to the user when we want to. Its much nicer to > > not even try to understand the codes more than "that they are codes", > > so to speak. Printing codes will require that we actually know them, > > however, but that is a simpler deal than having to parse all codes. > > I think maybe you understand my goal better than I did when I was > hacking around yesterday. =) Oh, probably not, but I understand code :D //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 11:08:34 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 17:08:34 +0200 Subject: [Muby-talk] Update In-Reply-To: <1e55af990607270802p37fba1f7l1e5bac7cd6a5639a@mail.gmail.com> References: <1e55af990607262034g49933750r47108bbe32878070@mail.gmail.com> <20060727050734.GB13347@troja.ath.cx> <1e55af990607270742yc8d94b3meb48972d2cca03dc@mail.gmail.com> <20060727144627.GC24596@troja.ath.cx> <1e55af990607270802p37fba1f7l1e5bac7cd6a5639a@mail.gmail.com> Message-ID: <20060727150834.GC24943@troja.ath.cx> On Thu, Jul 27, 2006 at 11:02:30AM -0400, Sy Ali wrote: > Ok, but I still need help understanding how to make the shortcuts. I > seem to be putting this sort of thing in the wrong place or building > it the wrong way. I think I will look at the commands, and maybe put them in a separate module or something, so that they dont pollute the InputWindow so much. > > > So I would have to have the substitution do this: > > Yes, should do. If it is too inconvenient I can allways add a specific > > array, lets call it $SUBSTITUTIONS that only does substitutions :) > > Let's avoid it, to re-use code properly and also demonstrate in-code > what is possible. Well, if the reuse is too cumbersome its valid to create a new feature... but if it is good enough for you then lets keep it :) > > The triggers react immediately, so no, you would get it directly. > > That's so awesome. This is my new afternoon project. Great :) //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 12:15:41 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 11:15:41 -0500 Subject: [Muby-talk] Substitutions Message-ID: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > > > > So I would have to have the substitution do this: > > > Yes, should do. If it is too inconvenient I can allways add a specific > > > array, lets call it $SUBSTITUTIONS that only does substitutions :) > > > > Let's avoid it, to re-use code properly and also demonstrate in-code > > what is possible. > > Well, if the reuse is too cumbersome its valid to create a new > feature... but if it is good enough for you then lets keep it :) Ok, so it seems that I've run into some issues. If I were to gag an entire line, capture it with a trigger and then echo out a replacement.. how in the heck do I capture the appropriate colours and echo them back out? If I followed-through with my idea, I would get this: colourful MATCH colourful text => plain REPLACE plain text From sy1234 at gmail.com Thu Jul 27 12:18:01 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 11:18:01 -0500 Subject: [Muby-talk] Gagging Message-ID: <1e55af990607270918s70a322ffp9cfc159d38945df8@mail.gmail.com> Gagging gags the entire. Gagging should accept a regex and respect it accordingly. This way a person can gag specific text. Does gagging take precidence over logging? From sy1234 at gmail.com Thu Jul 27 12:47:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 11:47:07 -0500 Subject: [Muby-talk] aliases (local triggers) seem broken Message-ID: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> aka "local triggers" * I cannot make a method called "alias", because it's reserved =/ but that's not the issue. I see that the text from the keyboard gets sent anyway: /$LOCALTRIGGERS[/^echo test$/] = Proc.new do $INPUTWINDOW.send "echo hehu" end echo test => echo hehu (prompt) => echo test (prompt) I think you mentioned something about this earlier.. but I can't remember what it was. I would think that the regex is good. From sy1234 at gmail.com Thu Jul 27 13:54:25 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 12:54:25 -0500 Subject: [Muby-talk] muby-0.5.5 released Message-ID: <1e55af990607271054t2a7ce70o591d98c20ef0bc4a@mail.gmail.com> I went through the docs to so some pruning and updating. It should be in better condition now. CHANGELOG: * send and write both work to send things to the remote server. * Screen updating has been further-improved and is smoother. * The different sorts of verbosity settings have been wrapped into one verbosity concept. * reload will automatically reload the entire application (all classes) and then the user config. o It's not smart enough to forget user variables etc, yet. * Will write more than one character at a time in outputwindow. * Will read as much as possible from socket before flushing if $FLUSH == true. This means that $GAGS will work even with $FLUSH=true, and you dont have to add $NONGAGS for the prompts you wish to see if you have $FLUSH=false just to be able to $GAG the prompts you _dont_ want to see. It also (I think) makes the client a bit faster. * Trigger Procs now take 3 arguments instead of one. They are: o inputwindow, outputwindow, match for remote and local triggers o inputwindow, outputwindow for startup and shutdown procs o inputwindow, outputwindow, keycode for keycommand procs * Multiple connections are no longer supported. o Connection handles were removed. o Either a user opens multiple terminals (xterm, rxvt, etc) or use screen. o Multiple configuration files would need to be fleshed out a fair bit, to make this easier for a user to do. * fake_connect was created to fake a telnet server. o The only known difference between this and actual real data from a connection is that there will never be a flushing of data if you fake_send a string without newline at the end - it will simply not show up until you send a newline. * fake_send and fake_write were created to pretend to receive text from a server. o It still needs to be improved, to allow colour. * quit was added, for those who are uncomfortable with C-c. * disconnect was added. o This is especially useful in cases where one's proxy leaves the connection open. * The #!> cookie was added in muby.rb to use /usr/bin/env instead of /usr/bin/ruby o This enables more varied systems to use muby without modification. * Internal code changes are beginning to simplify things: $INPUTWINDOW.connect("Aardwolf", "127.0.0.1", 9009) => $INPUTWINDOW.connect("127.0.0.1", 9009) connect("127.0.0.1", 9009) The first option is good anywhere. The second option is only available at the commandline. If you have old code, expect errors like these: 22:48:20 wrong number of arguments (3 for 2) /home/user/muby/sy.rb:33:in `connect' * A very heavily modified version of Sy's colour codes script was created. It even works! Wooh! Now you can echo text in colour VERY easily: o cce("@R RED @r red @G GREEN @g green @B BLUE @b blue @C CYAN @c cyan @M MAGENTA @m magenta @Y YELLOW @y yellow @W WHITE @w white\n\n") o This functionality will be even more heavily modified in the future! From zond at troja.ath.cx Thu Jul 27 16:10:05 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 22:10:05 +0200 Subject: [Muby-talk] Substitutions In-Reply-To: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> Message-ID: <20060727201005.GA28125@troja.ath.cx> On Thu, Jul 27, 2006 at 11:15:41AM -0500, Sy Ali wrote: > Ok, so it seems that I've run into some issues. > > If I were to gag an entire line, capture it with a trigger and then > echo out a replacement.. how in the heck do I capture the appropriate > colours and echo them back out? > > If I followed-through with my idea, I would get this: > > colourful MATCH colourful text > => > plain REPLACE plain text Well, if you think its essential to match on colors, I guess it can be added. But is it really necessary? I never felt the need when I was scripting away :O //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 16:11:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 22:11:18 +0200 Subject: [Muby-talk] Gagging In-Reply-To: <1e55af990607270918s70a322ffp9cfc159d38945df8@mail.gmail.com> References: <1e55af990607270918s70a322ffp9cfc159d38945df8@mail.gmail.com> Message-ID: <20060727201118.GB28125@troja.ath.cx> Hm, that sounds like substitution. As I said, I can add a $SUBSTITUTIONS list or something, that does this easily :) No, gagging should not affect logging (should not, I dont know off the top of my head). //Martin On Thu, Jul 27, 2006 at 11:18:01AM -0500, Sy Ali wrote: > Gagging gags the entire. Gagging should accept a regex and respect it > accordingly. > > This way a person can gag specific text. > > Does gagging take precidence over logging? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From zond at troja.ath.cx Thu Jul 27 16:21:32 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Thu, 27 Jul 2006 22:21:32 +0200 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> Message-ID: <20060727202132.GC28125@troja.ath.cx> On Thu, Jul 27, 2006 at 11:47:07AM -0500, Sy Ali wrote: > aka "local triggers" > > * I cannot make a method called "alias", because it's reserved =/ Nope :) > but that's not the issue. I see that the text from the keyboard gets > sent anyway: > > > /$LOCALTRIGGERS[/^echo test$/] = Proc.new do $INPUTWINDOW.send "echo hehu" end > echo test > > => > echo hehu > (prompt) > => > echo test > (prompt) > > > I think you mentioned something about this earlier.. but I can't > remember what it was. I would think that the regex is good. I realized that in my strive to make the triggers and linebreaks behave in an organized manner, I made the LOCALTRIGGERS behave like the REMOTETRIGGERS, ie _not_ gag the line from being sent (since the REMOTETRIGGERS dont gag the line from being shown). This was however a mistake, since its obviously something we want - the ability to create commands that do stuff but doesnt get sent. So - now I have added a feature that makes the LOCALTRIGGERS gag the line from being sent if the Proc returns false. The line is sent if the Proc returns true. //Martin -- ################################################################### Sometimes when you look into his eyes you get the feeling that someone else is driving. -- David Letterman ################################################################### From sy1234 at gmail.com Thu Jul 27 18:19:58 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 17:19:58 -0500 Subject: [Muby-talk] Substitutions In-Reply-To: <20060727201005.GA28125@troja.ath.cx> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> <20060727201005.GA28125@troja.ath.cx> Message-ID: <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > On Thu, Jul 27, 2006 at 11:15:41AM -0500, Sy Ali wrote: > > Ok, so it seems that I've run into some issues. > > > > If I were to gag an entire line, capture it with a trigger and then > > echo out a replacement.. how in the heck do I capture the appropriate > > colours and echo them back out? > > > > If I followed-through with my idea, I would get this: > > > > colourful MATCH colourful text > > => > > plain REPLACE plain text > > Well, if you think its essential to match on colors, I guess it can be > added. But is it really necessary? I never felt the need when I was > scripting away :O Matching on colours isn't what's important.. the substitution concept is dead in the water if it uses plain gagging. I propose two things: * An easier substitute method, to be done sooner. * Matching colours, to be done some time in the distant future. ;) Working with colours is totally unimportant in my opinion.. it's just a cool feature. Substitutions which work without affecting everything else on the line is more important. From sy1234 at gmail.com Thu Jul 27 18:21:25 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 17:21:25 -0500 Subject: [Muby-talk] Gagging In-Reply-To: <20060727201118.GB28125@troja.ath.cx> References: <1e55af990607270918s70a322ffp9cfc159d38945df8@mail.gmail.com> <20060727201118.GB28125@troja.ath.cx> Message-ID: <1e55af990607271521q7169c53agc7a5dc0292c0ab77@mail.gmail.com> > On Thu, Jul 27, 2006 at 11:18:01AM -0500, Sy Ali wrote: > > Gagging gags the entire. Gagging should accept a regex and respect it > > accordingly. > > > > This way a person can gag specific text. On 7/27/06, Martin Kihlgren wrote: > > Hm, that sounds like substitution. As I said, I can add a > $SUBSTITUTIONS list or something, that does this easily :) After thinking about the other solution.. I think making $SUBSTITUTIONS is the way to go. From sy1234 at gmail.com Thu Jul 27 18:24:21 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 17:24:21 -0500 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <20060727202132.GC28125@troja.ath.cx> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> <20060727202132.GC28125@troja.ath.cx> Message-ID: <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> On 7/27/06, Martin Kihlgren wrote: > So - now I have added a feature that makes the LOCALTRIGGERS gag the > line from being sent if the Proc returns false. The line is sent if > the Proc returns true. I saw the code changes.. now I understand. It was a one-line fix to have my hackish /sub helper use this feature. Nice. From sy1234 at gmail.com Thu Jul 27 18:39:16 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 17:39:16 -0500 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> <20060727202132.GC28125@troja.ath.cx> <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> Message-ID: <1e55af990607271539p5d0b0c5ch94e41d55d4332a32@mail.gmail.com> On 7/27/06, Sy Ali wrote: > On 7/27/06, Martin Kihlgren wrote: > > So - now I have added a feature that makes the LOCALTRIGGERS gag the > > line from being sent if the Proc returns false. The line is sent if > > the Proc returns true. > > I saw the code changes.. now I understand. It was a one-line fix to > have my hackish /sub helper use this feature. Nice. The fix is in, although I wouldn't have required false be returned.. I'd only look for true to echo and don't echo by default.. or perhaps strictly honour $SHOW? =/ Well, it's not important right now.. thanks for the fix. From sy1234 at gmail.com Thu Jul 27 19:34:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 18:34:07 -0500 Subject: [Muby-talk] $FAKE_SERVER? Message-ID: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> Why not implement $FAKE_SERVER, so that when it's true, all send commands automatically use fake_send This way I could design documentation and test cases which don't rely on being connected to a real mud. From sy1234 at gmail.com Thu Jul 27 20:45:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Thu, 27 Jul 2006 19:45:07 -0500 Subject: [Muby-talk] remote triggers seem to be broken Message-ID: <1e55af990607271745x1efe0b7fxa965862bb29249d2@mail.gmail.com> Now that triggers are rearranged.. I need examples of their use. How come this works: /$REMOTETRIGGERS["^(.+)ATEST7$"] = Proc.new do |inwin, outwin, match| write "echo " + match[1] end echo some ATEST7 => some But this does not: $REMOTETRIGGERS["^You disappear into the void.$"] = Proc.new do |inwin, outwin, match| write "echo test" end echo You disappear into the void. => 20:31:28 undefined method `write' for main:Object /home/user/muby/sy.rb:28 ./lib/inputwindow.rb:199:in `execute' ./lib/connection.rb:95:in `trigger' ./lib/connection.rb:86:in `trigger' ./lib/connection.rb:249:in `manage_buffers' ./lib/connection.rb:216:in `handle' ./lib/connection.rb:228:in `listen' ./lib/connection.rb:24:in `initialize' ./lib/connection.rb:22:in `initialize' ./lib/inputwindow.rb:138:in `connect' /home/user/muby/sy.rb:17 ./lib/inputwindow.rb:201:in `execute' ./lib/inputwindow.rb:263:in `process' ./lib/inputwindow.rb:262:in `process' ./muby.rb:167You disappear into the void. Again, I don't understand the wierd scope stuff.. I know that write is hidden in another file somewhere.. but I don't understand why it works in one case and not in the other, just because I don't use match[1] in one case.. which I don't want to use. I've tried all kinds of variations.. breaking down my trigger and building it back up again.. Argh. I'm not sure how to use what's working.. maybe I should wait until things stabilize before running off to explore features? From zond at troja.ath.cx Fri Jul 28 04:15:50 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 10:15:50 +0200 Subject: [Muby-talk] Substitutions In-Reply-To: <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> <20060727201005.GA28125@troja.ath.cx> <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> Message-ID: <20060728081550.GA4644@troja.ath.cx> On Thu, Jul 27, 2006 at 05:19:58PM -0500, Sy Ali wrote: > On 7/27/06, Martin Kihlgren wrote: > > Well, if you think its essential to match on colors, I guess it can be > > added. But is it really necessary? I never felt the need when I was > > scripting away :O > > Matching on colours isn't what's important.. the substitution concept > is dead in the water if it uses plain gagging. > > I propose two things: > > * An easier substitute method, to be done sooner. > * Matching colours, to be done some time in the distant future. ;) > > Working with colours is totally unimportant in my opinion.. it's just > a cool feature. Substitutions which work without affecting everything > else on the line is more important. The following method would do substitutes atm: def sub(text, replacement) $GAGS << /text/ $REMOTETRIGGERS[/(.*)#{text}(.*)/] = Proc.new do (inwin, outwin, match) outwin.print("#{match[1]}#{replacement}#{match[2]}") end (Its untested, but the theory is sound :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 04:16:28 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 10:16:28 +0200 Subject: [Muby-talk] Gagging In-Reply-To: <1e55af990607271521q7169c53agc7a5dc0292c0ab77@mail.gmail.com> References: <1e55af990607270918s70a322ffp9cfc159d38945df8@mail.gmail.com> <20060727201118.GB28125@troja.ath.cx> <1e55af990607271521q7169c53agc7a5dc0292c0ab77@mail.gmail.com> Message-ID: <20060728081628.GB4644@troja.ath.cx> On Thu, Jul 27, 2006 at 05:21:25PM -0500, Sy Ali wrote: > On 7/27/06, Martin Kihlgren wrote: > > > > Hm, that sounds like substitution. As I said, I can add a > > $SUBSTITUTIONS list or something, that does this easily :) > > After thinking about the other solution.. I think making > $SUBSTITUTIONS is the way to go. Well yes, the example I did in my last mail isnt all that obvious, so I sort of agree. //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 04:18:03 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 10:18:03 +0200 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <1e55af990607271539p5d0b0c5ch94e41d55d4332a32@mail.gmail.com> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> <20060727202132.GC28125@troja.ath.cx> <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> <1e55af990607271539p5d0b0c5ch94e41d55d4332a32@mail.gmail.com> Message-ID: <20060728081803.GC4644@troja.ath.cx> On Thu, Jul 27, 2006 at 05:39:16PM -0500, Sy Ali wrote: > On 7/27/06, Sy Ali wrote: > > I saw the code changes.. now I understand. It was a one-line fix to > > have my hackish /sub helper use this feature. Nice. > > The fix is in, although I wouldn't have required false be returned.. > I'd only look for true to echo and don't echo by default.. or perhaps > strictly honour $SHOW? =/ > > Well, it's not important right now.. thanks for the fix. Well, that what it does :) The problem is that most any object is considered to be 'true', only nil and false are actually false. //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 04:20:17 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 10:20:17 +0200 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> Message-ID: <20060728082017.GD4644@troja.ath.cx> On Thu, Jul 27, 2006 at 06:34:07PM -0500, Sy Ali wrote: > Why not implement $FAKE_SERVER, so that when it's true, all send > commands automatically use fake_send > > This way I could design documentation and test cases which don't rely > on being connected to a real mud. Because send sends FROM us TO the server, and fake_send does it the other way... You can use fake_send even when you are connected to a MUD to test something that you think is not working, for example. I wouldnt want to break the normal meaning of send to be in one direction... Perhaps I should change fake_send to receive instead? That would be more logical, come to think on it. //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 04:37:19 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 10:37:19 +0200 Subject: [Muby-talk] remote triggers seem to be broken In-Reply-To: <1e55af990607271745x1efe0b7fxa965862bb29249d2@mail.gmail.com> References: <1e55af990607271745x1efe0b7fxa965862bb29249d2@mail.gmail.com> Message-ID: <20060728083719.GE4644@troja.ath.cx> On Thu, Jul 27, 2006 at 07:45:07PM -0500, Sy Ali wrote: > Now that triggers are rearranged.. I need examples of their use. > > How come this works: > > /$REMOTETRIGGERS["^(.+)ATEST7$"] = Proc.new do |inwin, outwin, match| > write "echo " + match[1] end > > echo some ATEST7 > => some > > But this does not: > > $REMOTETRIGGERS["^You disappear into the void.$"] = Proc.new do > |inwin, outwin, match| write "echo test" end > > echo You disappear into the void. > => > 20:31:28 undefined method `write' for main:Object > /home/user/muby/sy.rb:28 > ./lib/inputwindow.rb:199:in `execute' > ./lib/connection.rb:95:in `trigger' > ./lib/connection.rb:86:in `trigger' > ./lib/connection.rb:249:in `manage_buffers' > ./lib/connection.rb:216:in `handle' > ./lib/connection.rb:228:in `listen' > ./lib/connection.rb:24:in `initialize' > ./lib/connection.rb:22:in `initialize' > ./lib/inputwindow.rb:138:in `connect' > /home/user/muby/sy.rb:17 > ./lib/inputwindow.rb:201:in `execute' > ./lib/inputwindow.rb:263:in `process' > ./lib/inputwindow.rb:262:in `process' > ./muby.rb:167You disappear into the void. Well, its all about namespaces. The first trigger you defined in the /-commandline. This means that everything gets evaluated within the InputWindow _by_default_. Therefore you can reach the 'write' method. The second trigger you defined in a file (since you didnt have a / before it), which means that it DOESNT get evaluated within the InputWindow by default, and you therefore have to mention that the write method is within the InputWindow, that is - write "inwin.write" instead of "write". > Again, I don't understand the wierd scope stuff.. I know that write is > hidden in another file somewhere.. but I don't understand why it works > in one case and not in the other, just because I don't use match[1] in > one case.. which I don't want to use. > > I've tried all kinds of variations.. breaking down my trigger and > building it back up again.. > > > Argh. I'm not sure how to use what's working.. maybe I should wait > until things stabilize before running off to explore features? Or you should spend some time playing around with the OO features of ruby, so that you understand them properly? It would save you from a lot of these problems :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From sy1234 at gmail.com Fri Jul 28 05:55:55 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 04:55:55 -0500 Subject: [Muby-talk] Committing very cool, but broken, code Message-ID: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> I'm going to go ahead and commit what I've been hacking around on. I don't understand why it's not working.. because it's a simple matter of scope. =) I totally gutted inputwindow and moved the idea of working with specific keys or key combinations into a new file. It's very very cool.. and can be made even more cool. One day it will let a user define and redefine all their hotkeys very easily. Maybe this will let people script hotkeys in userspace without understanding the underlying code. From sy1234 at gmail.com Fri Jul 28 05:59:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 04:59:46 -0500 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> Message-ID: <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> On 7/28/06, Sy Ali wrote: > I'm going to go ahead and commit what I've been hacking around on. It's revision 67. I think I understand the issue.. but I've got to get going to work and won't be able to make it magical until this evening. I wanted to at least give you a chance to take a look at the idea. I think it would be easy for you to make it work. The hotkeys.rb doesn't understand the inputwindows.rb variables is all.. hotkeys should go into its own class and inheretance or whatever ought to ensue. I don't know. ;) From sy1234 at gmail.com Fri Jul 28 06:08:58 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 05:08:58 -0500 Subject: [Muby-talk] Learning new stuff Message-ID: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> I learned a bunch of new stuff just goofing around with the keyboard controls. I understand the Proc.new thing for triggers and the like. I figured that out and relied upon it to set up a hash of keystrokes and what the keystrokes do. hashes is the other big thing I learned.. they're interesting.. but I want to treat them like I treat 'case' and some other ruby features.. so some things are a lot uglier than I wanted. By the way, I notice your code.. and at the time you didn't seem to know about this: a = 1 a += 1 => 2 So I cleaned up a few lines of code. =) Also, my style is getting injected in whatever I do. So you'll see things like def test(string) if string == 0 then # do something end end converted to this: def test(string) if string < 1 return nil end # do something end The code is more readable with less levels of whitespace. Ok, I'm running away.. I saw all the other emails and I'm going to get back to hacking in about 10 hours. =) From zond at troja.ath.cx Fri Jul 28 07:12:39 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 13:12:39 +0200 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> Message-ID: <20060728111239.GA5888@troja.ath.cx> You are breaking too much of the structure of the program if you dont use classes and modules. You are essentially not programming ruby - ruby is OO. No hard feelings, but until you have showed me that you know how to handle OO at least, I have to remove your commit privileges :/ I hope you dont feel this is too cruel, but its either this or me giving you the entire project and never touching it again. If you rather want that I will actually consider it, but I would much rather continue to be a part of the process. That, however, requires you to respect the object orientated structure of the muby app. //Martin On Fri, Jul 28, 2006 at 04:59:46AM -0500, Sy Ali wrote: > On 7/28/06, Sy Ali wrote: > > I'm going to go ahead and commit what I've been hacking around on. > > It's revision 67. > > I think I understand the issue.. but I've got to get going to work and > won't be able to make it magical until this evening. > > I wanted to at least give you a chance to take a look at the idea. I > think it would be easy for you to make it work. The hotkeys.rb > doesn't understand the inputwindows.rb variables is all.. > > hotkeys should go into its own class and inheretance or whatever ought > to ensue. I don't know. ;) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 07:13:36 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 13:13:36 +0200 Subject: [Muby-talk] Learning new stuff In-Reply-To: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> Message-ID: <20060728111336.GB5888@troja.ath.cx> All of this is very well, but its peanuts compared to the fact that you totally disregard any kind of object oriented approach :( //Martin On Fri, Jul 28, 2006 at 05:08:58AM -0500, Sy Ali wrote: > I learned a bunch of new stuff just goofing around with the keyboard controls. > > I understand the Proc.new thing for triggers and the like. I figured > that out and relied upon it to set up a hash of keystrokes and what > the keystrokes do. > > hashes is the other big thing I learned.. they're interesting.. but I > want to treat them like I treat 'case' and some other ruby features.. > so some things are a lot uglier than I wanted. > > > By the way, I notice your code.. and at the time you didn't seem to > know about this: > > a = 1 > a += 1 > => 2 > > So I cleaned up a few lines of code. =) > > > Also, my style is getting injected in whatever I do. So you'll see things like > > def test(string) > if string == 0 then > # do something > end > end > > converted to this: > > def test(string) > if string < 1 return nil end > # do something > end > > The code is more readable with less levels of whitespace. > > > Ok, I'm running away.. I saw all the other emails and I'm going to get > back to hacking in about 10 hours. =) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From sy1234 at gmail.com Fri Jul 28 09:29:41 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 09:29:41 -0400 Subject: [Muby-talk] Learning new stuff In-Reply-To: <20060728111336.GB5888@troja.ath.cx> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> Message-ID: <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > > All of this is very well, but its peanuts compared to the fact that > you totally disregard any kind of object oriented approach :( I know I know.. I'm going to begin writing up my Ruby tutorial and docs, and start confirming what I do and do not know. I know enough to re-use code a certain way, but the OO stuff is totally beyond me. I'll be learning gently, and then writing a proper tutorial.. It seems that all the tutorials I've gotten into I'll totally lose interest past a certain point.. They don't explain the more advanced stuff very well at all. So I could never get to stuff like OO. From sy1234 at gmail.com Fri Jul 28 09:31:04 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 09:31:04 -0400 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <20060728111239.GA5888@troja.ath.cx> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> Message-ID: <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > No hard feelings, but until you have showed me that you know how to > handle OO at least, I have to remove your commit privileges :/ Wow, that's harsh. Ok, I'll get into the user scripting instead then. From zond at troja.ath.cx Fri Jul 28 10:24:46 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 16:24:46 +0200 Subject: [Muby-talk] Learning new stuff In-Reply-To: <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> Message-ID: <20060728142446.GA8256@troja.ath.cx> On Fri, Jul 28, 2006 at 09:29:41AM -0400, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > > > All of this is very well, but its peanuts compared to the fact that > > you totally disregard any kind of object oriented approach :( > > I know I know.. I'm going to begin writing up my Ruby tutorial and > docs, and start confirming what I do and do not know. > > I know enough to re-use code a certain way, but the OO stuff is > totally beyond me. I'll be learning gently, and then writing a proper > tutorial.. > > It seems that all the tutorials I've gotten into I'll totally lose > interest past a certain point.. They don't explain the more advanced > stuff very well at all. So I could never get to stuff like OO. Well, if you want a more down to business kind of text, check out wikipedias entry for OO: http://en.wikipedia.org/wiki/Object-oriented //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 10:30:33 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 16:30:33 +0200 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> Message-ID: <20060728143033.GB8256@troja.ath.cx> If you understand the reason why I dont want you to make any gut wrenching changes in the kernel of the system without understanding the OO thought behind it, then I will give you commit rights again. But you must understand my dilemma: This is my baby. I was very happy that someone wanted to use it, but I am also very protective about the basic thoughts behind its design. If I am to keep on caring about it, then I need to ensure its well being, so to speak. If we have a complete falling out, then anyone is (of course) welcome to fork it, but I hope that wont be necessary :) So - if you feel ok with either not making any big changes, or doing things the OO way, then Ill be ok with you having commit rights again. I just need you to understand how serious I am about code design (yes yes, I am a bit anal...) //Martin On Fri, Jul 28, 2006 at 09:31:04AM -0400, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > No hard feelings, but until you have showed me that you know how to > > handle OO at least, I have to remove your commit privileges :/ > > Wow, that's harsh. Ok, I'll get into the user scripting instead then. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From sy1234 at gmail.com Fri Jul 28 11:50:18 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 11:50:18 -0400 Subject: [Muby-talk] Substitutions In-Reply-To: <20060728081550.GA4644@troja.ath.cx> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> <20060727201005.GA28125@troja.ath.cx> <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> <20060728081550.GA4644@troja.ath.cx> Message-ID: <1e55af990607280850uffaca5fg9afc79b954a89c5d@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > The following method would do substitutes atm: > > def sub(text, replacement) > $GAGS << /text/ > $REMOTETRIGGERS[/(.*)#{text}(.*)/] = Proc.new do (inwin, outwin, match) outwin.print("#{match[1]}#{replacement}#{match[2]}") > end > > (Its untested, but the theory is sound :) This is exactly what I started playing with, before I realised that it would probably output the line without colour. From sy1234 at gmail.com Fri Jul 28 11:53:21 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 11:53:21 -0400 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <20060728081803.GC4644@troja.ath.cx> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> <20060727202132.GC28125@troja.ath.cx> <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> <1e55af990607271539p5d0b0c5ch94e41d55d4332a32@mail.gmail.com> <20060728081803.GC4644@troja.ath.cx> Message-ID: <1e55af990607280853o5ea00ecej81c4cfa3d4b7c7b2@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > The problem is that most any object is considered to be 'true', only > nil and false are actually false. I see.. and I vaguely recall something about 'return'.. where even if a method doesn't conclude with a return, something about either 'true' being sent, or the last assignment.. something wacky like that. Well, I need to play with the code to understand it better. I don't think it was working the way I wanted without my explicitly returning false. From sy1234 at gmail.com Fri Jul 28 11:55:21 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 11:55:21 -0400 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <20060728082017.GD4644@troja.ath.cx> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> <20060728082017.GD4644@troja.ath.cx> Message-ID: <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > On Thu, Jul 27, 2006 at 06:34:07PM -0500, Sy Ali wrote: > > Why not implement $FAKE_SERVER, so that when it's true, all send > > commands automatically use fake_send > Because send sends FROM us TO the server, and fake_send does it the > other way... Aah, I did have it backwards.. maybe I shouldn't be poking around at 3am. ;) > Perhaps I should change fake_send to receive instead? That would be > more logical, come to think on it. Very true. What would "fake send" do? Pretend to send output to the fake server (i.e. to nothing)? This would be a good way to test local triggers. From sy1234 at gmail.com Fri Jul 28 11:58:11 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 11:58:11 -0400 Subject: [Muby-talk] remote triggers seem to be broken In-Reply-To: <20060728083719.GE4644@troja.ath.cx> References: <1e55af990607271745x1efe0b7fxa965862bb29249d2@mail.gmail.com> <20060728083719.GE4644@troja.ath.cx> Message-ID: <1e55af990607280858j165a6a25yc87ed7cce635125d@mail.gmail.com> Regarding the namespace issue.. I think you may be right.. but I remember explicitly testing them both in userspace.. because I figured the problem was something like this. I'll re-test things later today. From sy1234 at gmail.com Fri Jul 28 12:00:54 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 12:00:54 -0400 Subject: [Muby-talk] Learning new stuff In-Reply-To: <20060728142446.GA8256@troja.ath.cx> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> <20060728142446.GA8256@troja.ath.cx> Message-ID: <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > Well, if you want a more down to business kind of text, check out > wikipedias entry for OO: http://en.wikipedia.org/wiki/Object-oriented That may be too general, but I'll read it. Also on my list somewhere is to understand the MVC concept.. for if/when I get into Rails programming. http://en.wikipedia.org/wiki/Model-view-controller From sy1234 at gmail.com Fri Jul 28 12:09:44 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 12:09:44 -0400 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <20060728143033.GB8256@troja.ath.cx> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> <20060728143033.GB8256@troja.ath.cx> Message-ID: <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > > If you understand the reason why I dont want you to make any gut > wrenching changes in the kernel of the system without understanding > the OO thought behind it, then I will give you commit rights again. > > But you must understand my dilemma: This is my baby. I was very happy > that someone wanted to use it, but I am also very protective about the > basic thoughts behind its design. If I am to keep on caring about it, > then I need to ensure its well being, so to speak. > > If we have a complete falling out, then anyone is (of course) welcome > to fork it, but I hope that wont be necessary :) > > So - if you feel ok with either not making any big changes, or doing > things the OO way, then Ill be ok with you having commit rights again. > > I just need you to understand how serious I am about code design (yes > yes, I am a bit anal...) I had only a moment before running off to work, and didn't think to package my code and send it off separately. I knew it would get reverted (and planned on doing that later today). I just wanted to show off some rough code that I dreamed up from 2-6am .. thinking it could be a really useful way to abstract the way the hotkeys were handled once I had learned enough to clean it up properly. I even mostly knew why it was broken and figured it was pretty trivial for you to help with. I still want to play around though.. I'll be good! I don't mind leaving the important stuff alone. I never wanted to step on your toes. =) I don't know enough to understand the overall design yet.. but I do occasionally see little places here and there which could be a little easier to read. Even if it means commenting so I understand the next time I come to that piece of code. =) From zond at troja.ath.cx Fri Jul 28 16:38:44 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 22:38:44 +0200 Subject: [Muby-talk] Substitutions In-Reply-To: <1e55af990607280850uffaca5fg9afc79b954a89c5d@mail.gmail.com> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> <20060727201005.GA28125@troja.ath.cx> <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> <20060728081550.GA4644@troja.ath.cx> <1e55af990607280850uffaca5fg9afc79b954a89c5d@mail.gmail.com> Message-ID: <20060728203844.GA14406@troja.ath.cx> On Fri, Jul 28, 2006 at 11:50:18AM -0400, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > The following method would do substitutes atm: > > > > def sub(text, replacement) > > $GAGS << /text/ > > $REMOTETRIGGERS[/(.*)#{text}(.*)/] = Proc.new do (inwin, outwin, match) outwin.print("#{match[1]}#{replacement}#{match[2]}") > > end > > > > (Its untested, but the theory is sound :) > > This is exactly what I started playing with, before I realised that it > would probably output the line without colour. True, no color there... I will add a SUBSTITUTIONS array for that then :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 16:39:08 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 22:39:08 +0200 Subject: [Muby-talk] aliases (local triggers) seem broken In-Reply-To: <1e55af990607280853o5ea00ecej81c4cfa3d4b7c7b2@mail.gmail.com> References: <1e55af990607270947l624db749r3f64833d231ba067@mail.gmail.com> <20060727202132.GC28125@troja.ath.cx> <1e55af990607271524ja9b25a3m5c916c56791cb213@mail.gmail.com> <1e55af990607271539p5d0b0c5ch94e41d55d4332a32@mail.gmail.com> <20060728081803.GC4644@troja.ath.cx> <1e55af990607280853o5ea00ecej81c4cfa3d4b7c7b2@mail.gmail.com> Message-ID: <20060728203908.GB14406@troja.ath.cx> On Fri, Jul 28, 2006 at 11:53:21AM -0400, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > The problem is that most any object is considered to be 'true', only > > nil and false are actually false. > > I see.. and I vaguely recall something about 'return'.. where even if > a method doesn't conclude with a return, something about either 'true' > being sent, or the last assignment.. something wacky like that. > > Well, I need to play with the code to understand it better. I don't > think it was working the way I wanted without my explicitly returning > false. Yes, there is allways a return, if nothing else - nil :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 16:41:55 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 22:41:55 +0200 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> <20060728082017.GD4644@troja.ath.cx> <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> Message-ID: <20060728204155.GC14406@troja.ath.cx> > > Perhaps I should change fake_send to receive instead? That would be > > more logical, come to think on it. > > Very true. > > What would "fake send" do? Pretend to send output to the fake server > (i.e. to nothing)? This would be a good way to test local triggers. But you can try local triggers just by typing... :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 16:43:37 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 22:43:37 +0200 Subject: [Muby-talk] Learning new stuff In-Reply-To: <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> <20060728142446.GA8256@troja.ath.cx> <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> Message-ID: <20060728204337.GD14406@troja.ath.cx> On Fri, Jul 28, 2006 at 12:00:54PM -0400, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > Well, if you want a more down to business kind of text, check out > > wikipedias entry for OO: http://en.wikipedia.org/wiki/Object-oriented > > That may be too general, but I'll read it. > > Also on my list somewhere is to understand the MVC concept.. for > if/when I get into Rails programming. > > http://en.wikipedia.org/wiki/Model-view-controller Well, with rails you cant really go wrong - you WILL put your view in your view, and you WILL put your model in your model, you dont have any choice :) But learning rails can be a good way of learning OO I guess. The app we are building at work is rails, btw. //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 16:50:05 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Fri, 28 Jul 2006 22:50:05 +0200 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> <20060728143033.GB8256@troja.ath.cx> <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> Message-ID: <20060728205005.GE14406@troja.ath.cx> On Fri, Jul 28, 2006 at 12:09:44PM -0400, Sy Ali wrote: > I had only a moment before running off to work, and didn't think to > package my code and send it off separately. I knew it would get > reverted (and planned on doing that later today). Well, rule nr one: Dont commit code you know is broken :O > I just wanted to show off some rough code that I dreamed up from 2-6am > .. thinking it could be a really useful way to abstract the way the > hotkeys were handled once I had learned enough to clean it up > properly. Show it off when it is finished :) > I even mostly knew why it was broken and figured it was pretty trivial > for you to help with. I am glad to help, but not be forced to after a broken commit :( > I still want to play around though.. I'll be good! I don't mind > leaving the important stuff alone. I never wanted to step on your > toes. =) Well, you are back in the svn again, if you promise to be good :) > I don't know enough to understand the overall design yet.. but I do > occasionally see little places here and there which could be a little > easier to read. Even if it means commenting so I understand the next > time I come to that piece of code. =) Please, go ahead and fix those things. But dont rip things apart until you understand them, and dont integrate anything with things you dont understand. Then Im happy :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From sy1234 at gmail.com Fri Jul 28 17:31:52 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 16:31:52 -0500 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <20060728205005.GE14406@troja.ath.cx> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> <20060728143033.GB8256@troja.ath.cx> <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> <20060728205005.GE14406@troja.ath.cx> Message-ID: <1e55af990607281431o4a289ddbkaf77dafeda731438@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > Please, go ahead and fix those things. But dont rip things apart until > you understand them, and dont integrate anything with things you dont > understand. Then Im happy :) I realised I shouldn't have committed broken code a couple of seconds after sending it all. I'm gently merging the useful non-dangerous changes back in. I'll also hunt through and pull out any of my early experimentation (like C-R to redraw the screen). Because user files allow such flexible programming, a lot of my experimentation can be done on the side without damaging the main codebase. You'll love the idea I have for inputkeys. I'll probably wait until some of your major work is done before revisiting it.. but I have an idea to generate a simple textfile which a user can hack through to very easily change what hotkeys do. Imagine a textfile with: KEYPAD_1 = Proc.new my_command end Or maybe users could do some kind of scripting like: $HOTKEYS << {"KEY_END", Proc.new my_command end} From sy1234 at gmail.com Fri Jul 28 17:33:54 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 16:33:54 -0500 Subject: [Muby-talk] change notes idea Message-ID: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> I'm adding notes to the bottom of files, to more elaborately describe what I'm doing. It'll help you understand what's going on. I do make changes in small amounts, but it may help if I'm verbose. These comments could be easily moved into the official user-facing 'changelog'. I see a lot of your changes and I'm trying to understand and document them.. but if you think this is a good idea, and you add your own notes.. I'll invisibly manage the changelog. From sy1234 at gmail.com Fri Jul 28 18:06:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 17:06:46 -0500 Subject: [Muby-talk] Substitutions In-Reply-To: <20060728203844.GA14406@troja.ath.cx> References: <1e55af990607270915v6bdd933dh2928974fc039bbdd@mail.gmail.com> <20060727201005.GA28125@troja.ath.cx> <1e55af990607271519j51218ef3t372d10c970e54228@mail.gmail.com> <20060728081550.GA4644@troja.ath.cx> <1e55af990607280850uffaca5fg9afc79b954a89c5d@mail.gmail.com> <20060728203844.GA14406@troja.ath.cx> Message-ID: <1e55af990607281506nf57d3bl5cacd39c936beaa2@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > True, no color there... > > I will add a SUBSTITUTIONS array for that then :) It's funny.. I actually implemented this same thing in tcl scripting for another client.. and for a very long time I couldn't tell why the screen looked different than I remembered. I realised that when I implemented a 'highlight helper' it was only helpful for what it highlighted.. for everything else it was unhelpful. ;) From sy1234 at gmail.com Fri Jul 28 18:08:27 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 17:08:27 -0500 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <20060728204155.GC14406@troja.ath.cx> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> <20060728082017.GD4644@troja.ath.cx> <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> <20060728204155.GC14406@troja.ath.cx> Message-ID: <1e55af990607281508w3de04775y292bc3e52d6f561e@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > > What would "fake send" do? Pretend to send output to the fake server > > (i.e. to nothing)? This would be a good way to test local triggers. > > But you can try local triggers just by typing... :) Yes, but how do you automate just typing? Maybe I'm wrong.. i'm just dreaming up a testing infrastructure. ;) From sy1234 at gmail.com Fri Jul 28 18:10:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 17:10:51 -0500 Subject: [Muby-talk] Learning new stuff In-Reply-To: <20060728204337.GD14406@troja.ath.cx> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> <20060728142446.GA8256@troja.ath.cx> <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> <20060728204337.GD14406@troja.ath.cx> Message-ID: <1e55af990607281510q1df6fde3u9a89dcef4741ffc1@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > Well, with rails you cant really go wrong - you WILL put your view in > your view, and you WILL put your model in your model, you dont have > any choice :) Yes, that I learned. =) > The app we are building at work is rails, btw. Are you learning AJAX as well? There are some magical things you can do.. rails, ajax and css make very very nice applications. My own business worked to replace Trac with our own ticket/todo application. It runs the business now. =) (one day it will be GPL.. but it's not feature-complete yet) From zond at troja.ath.cx Fri Jul 28 19:36:31 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 01:36:31 +0200 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <1e55af990607281431o4a289ddbkaf77dafeda731438@mail.gmail.com> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> <20060728143033.GB8256@troja.ath.cx> <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> <20060728205005.GE14406@troja.ath.cx> <1e55af990607281431o4a289ddbkaf77dafeda731438@mail.gmail.com> Message-ID: <20060728233631.GA15619@troja.ath.cx> On Fri, Jul 28, 2006 at 04:31:52PM -0500, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > Please, go ahead and fix those things. But dont rip things apart until > > you understand them, and dont integrate anything with things you dont > > understand. Then Im happy :) > > I realised I shouldn't have committed broken code a couple of seconds > after sending it all. I'm gently merging the useful non-dangerous > changes back in. Nice :) But beware, I am in the process of heavily modifying the entire app. Splitting up everything in better ways, using the years of experience I have hade since I created it to begin with, and greatly beautifying it all. The greatest change at the moment is a new Configuration class that contains all we need to know about config. And when I commit this, I will not be gentle :O I need this new architecture to keep on developing core features, so everything that gets in the way will disappear... > I'll also hunt through and pull out any of my early experimentation > (like C-R to redraw the screen). I will revisit that in this rewrite :) > Because user files allow such flexible programming, a lot of my > experimentation can be done on the side without damaging the main > codebase. True, that is a very good point. In fact, you CAN rewrite the entire app by (in runtime) redefining all classes and methods on the fly, and that way try any idea you have. If you feel up to the magic :) > You'll love the idea I have for inputkeys. I'll probably wait until > some of your major work is done before revisiting it.. but I have an > idea to generate a simple textfile which a user can hack through to > very easily change what hotkeys do. > > Imagine a textfile with: > KEYPAD_1 = Proc.new my_command end > > Or maybe users could do some kind of scripting like: > $HOTKEYS << {"KEY_END", Proc.new my_command end} It is something along those lines that I have imagined :) All your ideas are very good, really. I get inspired by a whole lot of your comments in the code. I cant wait till you have learned more OO so you can implement them prettily yourself as well :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 19:37:49 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 01:37:49 +0200 Subject: [Muby-talk] change notes idea In-Reply-To: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> Message-ID: <20060728233749.GB15619@troja.ath.cx> On Fri, Jul 28, 2006 at 04:33:54PM -0500, Sy Ali wrote: > I'm adding notes to the bottom of files, to more elaborately describe > what I'm doing. It'll help you understand what's going on. > > I do make changes in small amounts, but it may help if I'm verbose. As I said, dont spend too much time at this time, a LOT of things will be changed... > These comments could be easily moved into the official user-facing 'changelog'. > > I see a lot of your changes and I'm trying to understand and document > them.. but if you think this is a good idea, and you add your own > notes.. I'll invisibly manage the changelog. I think its better to base the change log on commit messages, but go ahead if you want to :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 19:38:57 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 01:38:57 +0200 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <1e55af990607281508w3de04775y292bc3e52d6f561e@mail.gmail.com> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> <20060728082017.GD4644@troja.ath.cx> <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> <20060728204155.GC14406@troja.ath.cx> <1e55af990607281508w3de04775y292bc3e52d6f561e@mail.gmail.com> Message-ID: <20060728233857.GC15619@troja.ath.cx> True, I can split up the input handling as well, so that we can do a method called "type" or something, that emulates someone typing keycodes... //Martin On Fri, Jul 28, 2006 at 05:08:27PM -0500, Sy Ali wrote: > On 7/28/06, Martin Kihlgren wrote: > > > What would "fake send" do? Pretend to send output to the fake server > > > (i.e. to nothing)? This would be a good way to test local triggers. > > > > But you can try local triggers just by typing... :) > > Yes, but how do you automate just typing? > > Maybe I'm wrong.. i'm just dreaming up a testing infrastructure. ;) > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From zond at troja.ath.cx Fri Jul 28 19:40:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 01:40:12 +0200 Subject: [Muby-talk] Learning new stuff In-Reply-To: <1e55af990607281510q1df6fde3u9a89dcef4741ffc1@mail.gmail.com> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> <20060728142446.GA8256@troja.ath.cx> <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> <20060728204337.GD14406@troja.ath.cx> <1e55af990607281510q1df6fde3u9a89dcef4741ffc1@mail.gmail.com> Message-ID: <20060728234012.GD15619@troja.ath.cx> On Fri, Jul 28, 2006 at 05:10:51PM -0500, Sy Ali wrote: > Are you learning AJAX as well? There are some magical things you can > do.. rails, ajax and css make very very nice applications. I know a bit of AJAX, but I much rather like pure ruby :O > My own business worked to replace Trac with our own ticket/todo > application. It runs the business now. =) > > (one day it will be GPL.. but it's not feature-complete yet) Cool :) Tell me when you release :) //Martin -- ################################################################### Sex is like air. It's only a big deal if you can't get any. ################################################################### From sy1234 at gmail.com Fri Jul 28 19:44:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 18:44:46 -0500 Subject: [Muby-talk] Gagging is a complete success Message-ID: <1e55af990607281644r160d9d87kb629cf6665ecdcbd@mail.gmail.com> I've gone through my old notes to create about 200 gags. I've learned regular expressions and the conversion from mmucl/tcl scripting to muby/ruby. The gagging is working perfectly. Flawlessly even. Useful documents: http://jrandomhacker.info/Muby/programming#Gags http://jrandomhacker.info/Muby/programming/gags Also, I will take some notes for mmucl users to help them switch: http://jrandomhacker.info/Muby/programming/muby_vs_mmucl I know that by far I was the most serious user for many years, so maybe this document is just healthy venting. =) From sy1234 at gmail.com Fri Jul 28 19:57:24 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 18:57:24 -0500 Subject: [Muby-talk] Committing very cool, but broken, code In-Reply-To: <20060728233631.GA15619@troja.ath.cx> References: <1e55af990607280255k1921bc2ex8d15a091c4937f1@mail.gmail.com> <1e55af990607280259h50c2fffaoe70ed7488b646805@mail.gmail.com> <20060728111239.GA5888@troja.ath.cx> <1e55af990607280631y40d21c6cje63c4e79c4754429@mail.gmail.com> <20060728143033.GB8256@troja.ath.cx> <1e55af990607280909p15217632qe0095d9544257fd5@mail.gmail.com> <20060728205005.GE14406@troja.ath.cx> <1e55af990607281431o4a289ddbkaf77dafeda731438@mail.gmail.com> <20060728233631.GA15619@troja.ath.cx> Message-ID: <1e55af990607281657r164c8bfap1aa04f6d9c04bd06@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > But beware, I am in the process of heavily modifying the entire > app. ... > And when I commit this, I will not be gentle :O > ... everything that gets in the way will disappear... Hmm. Well I've got a nice GUI diff application working well.. so I can do a comparison and hand-merge. When you do the big merge, I'll grab the previous revision from subversion and do a comparison and then hand-merge anything useful. > > I'll also hunt through and pull out any of my early experimentation > > (like C-R to redraw the screen). > > I will revisit that in this rewrite :) Things like the redrawing, clearing the screen or the input area have me run into ncurses code.. *cringe* > True, that is a very good point. In fact, you CAN rewrite the entire > app by (in runtime) redefining all classes and methods on the fly, and > that way try any idea you have. If you feel up to the magic :) I'm trying to think up a way to express this in documentation with examples. When the codebase stabilizes someday later, maybe I'll have learned enough to do this. This is one of the less obvious powers of ruby code. Imagine that, while using the application, you can do bug-fixes and add features. You don't even have to restart it! On that note, hardening will be nice to see.. so that ruby errors don't kill the application entirely. I experiment and things explode in entertaining ways. I'm glad I made my pause wrapper script, so I can always debug when muby dies in an xterm. > All your ideas are very good, really. I get inspired by a whole lot of > your comments in the code. > > I cant wait till you have learned more OO so you can implement them > prettily yourself as well :) I find something new to learn every day.. so it's inevitable at this point. A lot of how I work is to write or respond to comments in a very odd way. * I check my docs and todo list for inspiration, and also my user scripts, and also I randomly review the source. * Whenever I hit something interesting, but too annoying to deal with.. I comment. * If it's 2 minutes to fix, I fix it. If it turns out to take more than 2 minutes.. I either scrap it all and leave a comment (maybe with commented code) or maybe I'm inspired to keep going. * If I know it will be beyond me, I comment about it anyways. Sometimes a problem I think is insane turns out to be really easy the next time I see the comment. I end up doing review after review and making minor revisions until something gets my attention.. and then I run off to follow the rabbit down the rabbit-hole. When I learn more.. I'll be armed.. so I'll just shoot the rabbit. ;) From sy1234 at gmail.com Fri Jul 28 20:00:45 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 19:00:45 -0500 Subject: [Muby-talk] change notes idea In-Reply-To: <20060728233749.GB15619@troja.ath.cx> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> Message-ID: <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > As I said, dont spend too much time at this time, a LOT of things will > be changed... I'm working on user scripting right now.. as long as all the main functions work as-expected, it'll keep me busy for .. maybe for weeks. I have some horribly complex scripts I need to port from pseudo-tcl to ruby. > I think its better to base the change log on commit messages, but go > ahead if you want to :) Well.. commenting this way means that without any special attention, diffs will include the comments. From sy1234 at gmail.com Fri Jul 28 20:02:54 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 19:02:54 -0500 Subject: [Muby-talk] $FAKE_SERVER? In-Reply-To: <20060728233857.GC15619@troja.ath.cx> References: <1e55af990607271634q2537d2ccy2ac5c3ab58ac20ac@mail.gmail.com> <20060728082017.GD4644@troja.ath.cx> <1e55af990607280855o3be598b0m249739bf85b5a60a@mail.gmail.com> <20060728204155.GC14406@troja.ath.cx> <1e55af990607281508w3de04775y292bc3e52d6f561e@mail.gmail.com> <20060728233857.GC15619@troja.ath.cx> Message-ID: <1e55af990607281702l1edf3239yc776c7fca56ec08a@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > > True, I can split up the input handling as well, so that we can do a > method called "type" or something, that emulates someone typing > keycodes... Ok, that goes in the todo list, so you can safely forget it until your next notes-audit. =) From sy1234 at gmail.com Fri Jul 28 20:04:13 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 19:04:13 -0500 Subject: [Muby-talk] Learning new stuff In-Reply-To: <20060728234012.GD15619@troja.ath.cx> References: <1e55af990607280308s8851783m9fc24d9a0c08556e@mail.gmail.com> <20060728111336.GB5888@troja.ath.cx> <1e55af990607280629u3a1f441dk7aebcc80b4006574@mail.gmail.com> <20060728142446.GA8256@troja.ath.cx> <1e55af990607280900g454d4d42m46f3111e74eac06@mail.gmail.com> <20060728204337.GD14406@troja.ath.cx> <1e55af990607281510q1df6fde3u9a89dcef4741ffc1@mail.gmail.com> <20060728234012.GD15619@troja.ath.cx> Message-ID: <1e55af990607281704y718642c5p1bf1c3d4e9dce0a9@mail.gmail.com> On 7/28/06, Martin Kihlgren wrote: > On Fri, Jul 28, 2006 at 05:10:51PM -0500, Sy Ali wrote: > > My own business worked to replace Trac with our own ticket/todo > > application. It runs the business now. =) > > > > (one day it will be GPL.. but it's not feature-complete yet) > > Cool :) Tell me when you release :) Oh, you'll hear of it. It's the most complex-but-simple application of its kind which I've ever heard of. =) We may end up renting it out, like those other rails applications. From sy1234 at gmail.com Fri Jul 28 21:43:05 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 20:43:05 -0500 Subject: [Muby-talk] alias bug Message-ID: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> def _guildpaladin ; $INPUTWINDOW.echo "do this" end $LOCALTRIGGERS[/^_guildpaladin$/] = Proc.new do _guildpaladin end typing "_guildpaladin" will echo the text, but it will also send "_guildpaladin" to the server. The workaround is this: def _guildpaladin ; $INPUTWINDOW.echo "do this" ; $INPUTWINDOW.sendn "" end $LOCALTRIGGERS[/^_guildpaladin$/] = Proc.new do _guildpaladin end From sy1234 at gmail.com Fri Jul 28 21:49:38 2006 From: sy1234 at gmail.com (Sy Ali) Date: Fri, 28 Jul 2006 20:49:38 -0500 Subject: [Muby-talk] alias bug In-Reply-To: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> References: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> Message-ID: <1e55af990607281849p2f317b13t45d7e3b9bb2ec69e@mail.gmail.com> This is also seen with this: def _guildmage ; $INPUTWINDOW.echo "continue" ; run "d2s2ws" end $LOCALTRIGGERS[/^(_guildmage|_guildwizard)$/] = Proc.new do _guildmage end Solved with: def _guildmage ; $INPUTWINDOW.echo "continue" ; run "d2s2ws" ; $INPUTWINDOW.sendn "" end $LOCALTRIGGERS[/^(_guildmage|_guildwizard)$/] = Proc.new do _guildmage end So it seems that when not sending text, or when performing two actions, this bug is reproduced. From zond at troja.ath.cx Sat Jul 29 04:09:40 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 10:09:40 +0200 Subject: [Muby-talk] change notes idea In-Reply-To: <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> Message-ID: <20060729080940.GA16960@troja.ath.cx> On Fri, Jul 28, 2006 at 07:00:45PM -0500, Sy Ali wrote: > I'm working on user scripting right now.. as long as all the main > functions work as-expected, it'll keep me busy for .. maybe for weeks. > I have some horribly complex scripts I need to port from pseudo-tcl > to ruby. A few things will be renamed, but that will only be a case of search-replace for you I suppose. I am also going to make the print function support colors, a bit like your cce function, so that you can do /print RED, 'hello ', BOLD, 'mate ', RESET for example. //Martin -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 04:13:08 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 10:13:08 +0200 Subject: [Muby-talk] alias bug In-Reply-To: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> References: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> Message-ID: <20060729081308.GB16960@troja.ath.cx> You could just append a "; false" to the end of your trigger for it not to send the text.. //Martin On Fri, Jul 28, 2006 at 08:43:05PM -0500, Sy Ali wrote: > def _guildpaladin ; $INPUTWINDOW.echo "do this" end > $LOCALTRIGGERS[/^_guildpaladin$/] = Proc.new do _guildpaladin end > > typing "_guildpaladin" will echo the text, but it will also send > "_guildpaladin" to the server. > > The workaround is this: > > def _guildpaladin ; $INPUTWINDOW.echo "do this" ; $INPUTWINDOW.sendn "" end > $LOCALTRIGGERS[/^_guildpaladin$/] = Proc.new do _guildpaladin end > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From sy1234 at gmail.com Sat Jul 29 07:06:45 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 06:06:45 -0500 Subject: [Muby-talk] alias bug In-Reply-To: <20060729081308.GB16960@troja.ath.cx> References: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> <20060729081308.GB16960@troja.ath.cx> Message-ID: <1e55af990607290406ncab1db1m798dead629d872b6@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > > > You could just append a "; false" to the end of your trigger for it > not to send the text.. Aha.. I thought it was something like that. Is this still a bug, or is this intended behaviour? From sy1234 at gmail.com Sat Jul 29 07:11:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 06:11:46 -0500 Subject: [Muby-talk] change notes idea In-Reply-To: <20060729080940.GA16960@troja.ath.cx> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> Message-ID: <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > A few things will be renamed, but that will only be a case of > search-replace for you I suppose. I expected this. You're right.. it'll be easy to adjust scripting. Plus, I'll be able to stress-test all the functionality to see how it works in various situations. > I am also going to make the print function support colors, a bit like > your cce function, so that you can do > > /print RED, 'hello ', BOLD, 'mate ', RESET This is precisely how Term/ansicolor works, and what my original cce used: require 'rubygems' require 'term/ansicolor' include Term::ANSIColor print red, bold, "red bold", reset, "\n" There's also highline, which does this: require 'rubygems' require 'highline/import' say "test" # say "This is <%= color('red bold', red, bold) %>!" From sy1234 at gmail.com Sat Jul 29 10:33:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 09:33:59 -0500 Subject: [Muby-talk] aliases and regular expression matching Message-ID: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> I understand the regex stuff now, and so I can do this: $LOCALTRIGGERS[/^test2 (\w|\W)+/] = Proc.new do |inwin, outwin, match| $INPUTWINDOW.echo input false end test2 some string => test2 some string However, if I want to only get "some string", the workaround is fairly complex. I would do this: $INPUTWINDOW.echo input.to_s.split(' ')[1..-1].join(' ') which, without some more playing, would disregard extra spaces.. which is unfortunate but I don't care much.. test2 some string => some string My first question is.. is this the correct way to approach this problem? Is there another way to work with the match which I don't know about? From zond at troja.ath.cx Sat Jul 29 10:45:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 16:45:12 +0200 Subject: [Muby-talk] alias bug In-Reply-To: <1e55af990607290406ncab1db1m798dead629d872b6@mail.gmail.com> References: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> <20060729081308.GB16960@troja.ath.cx> <1e55af990607290406ncab1db1m798dead629d872b6@mail.gmail.com> Message-ID: <20060729144512.GA26095@troja.ath.cx> No behaviour is, atm - my checkout is in such a flux that nothing is decided yet. I have renamed a lot of variables and methods. It will be 0.6, I think :) On Sat, Jul 29, 2006 at 06:06:45AM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > > > > > You could just append a "; false" to the end of your trigger for it > > not to send the text.. > > Aha.. I thought it was something like that. > > Is this still a bug, or is this intended behaviour? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 10:46:29 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 16:46:29 +0200 Subject: [Muby-talk] change notes idea In-Reply-To: <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> Message-ID: <20060729144629.GB26095@troja.ath.cx> On Sat, Jul 29, 2006 at 06:11:46AM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > A few things will be renamed, but that will only be a case of > > search-replace for you I suppose. > > I expected this. You're right.. it'll be easy to adjust scripting. > > Plus, I'll be able to stress-test all the functionality to see how it > works in various situations. > > > > I am also going to make the print function support colors, a bit like > > your cce function, so that you can do > > > > /print RED, 'hello ', BOLD, 'mate ', RESET > > This is precisely how Term/ansicolor works, and what my original cce used: > > require 'rubygems' > require 'term/ansicolor' > include Term::ANSIColor > print red, bold, "red bold", reset, "\n" > > There's also highline, which does this: > > require 'rubygems' > require 'highline/import' > say "test" > # say "This is <%= color('red bold', red, bold) %>!" Nice :) However, I am a bit sceptical... As you said - ncurses keeps track of the current color for me. Perhaps it would be better to fix the ncurses support instead of taking it away? //Martin -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 10:50:15 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 16:50:15 +0200 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> Message-ID: <20060729145015.GC26095@troja.ath.cx> On Sat, Jul 29, 2006 at 09:33:59AM -0500, Sy Ali wrote: > I understand the regex stuff now, and so I can do this: > > $LOCALTRIGGERS[/^test2 (\w|\W)+/] = Proc.new do |inwin, outwin, match| > $INPUTWINDOW.echo input > false > end > > test2 some string > => test2 some string How can it even work? What is 'input' in the trigger code? > However, if I want to only get "some string", the workaround is fairly > complex. I would do this: > $INPUTWINDOW.echo input.to_s.split(' ')[1..-1].join(' ') > > which, without some more playing, would disregard extra spaces.. which > is unfortunate but I don't care much.. > test2 some string > => some string > > > My first question is.. is this the correct way to approach this problem? > > Is there another way to work with the match which I don't know about? I would do $LOCALTRIGGERS[/^test2 (\w|\W)+/] = Proc.new do |inwin, outwin, match| $INPUTWINDOW.echo match[1] false end Remember that the ('s in can be referenced by ['s in the match. //Martin -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From sy1234 at gmail.com Sat Jul 29 11:01:08 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 10:01:08 -0500 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <20060729145015.GC26095@troja.ath.cx> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> Message-ID: <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > How can it even work? What is 'input' in the trigger code? Sorry, I modified that from my notes. $LOCALTRIGGERS[/^test (\w)+/] = Proc.new do |inwin, outwin, match| test match ; false end def test(input) $INPUTWINDOW.echo "You gave me: #{input}" end > I would do > > $LOCALTRIGGERS[/^test2 (\w|\W)+/] = Proc.new do |inwin, outwin, match| > $INPUTWINDOW.echo match[1] > false > end > > Remember that the ('s in can be referenced by ['s in the match. I remember playing with that, but it wasn't working the way I wanted.. let me try again. From sy1234 at gmail.com Sat Jul 29 11:07:03 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 10:07:03 -0500 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> Message-ID: <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> On 7/29/06, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > I would do > > > > $LOCALTRIGGERS[/^test2 (\w|\W)+/] = Proc.new do |inwin, outwin, match| > > $INPUTWINDOW.echo match[1] > > false > > end > > > > Remember that the ('s in can be referenced by ['s in the match. > > I remember playing with that, but it wasn't working the way I wanted.. > let me try again. I tried it, and it echos a blank line. I have a working solution, documented at the bottom of: http://jrandomhacker.info/Muby/programming/aliases I detect MatchData, I cut it apart to take out the first word, and I use what's left.. it's not quite right, but it works well for my particular problem. From sy1234 at gmail.com Sat Jul 29 11:10:06 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 10:10:06 -0500 Subject: [Muby-talk] alias bug In-Reply-To: <20060729144512.GA26095@troja.ath.cx> References: <1e55af990607281843y6589a939t1e726843395b426a@mail.gmail.com> <20060729081308.GB16960@troja.ath.cx> <1e55af990607290406ncab1db1m798dead629d872b6@mail.gmail.com> <20060729144512.GA26095@troja.ath.cx> Message-ID: <1e55af990607290810p5422a023j119c38bf3623e758@mail.gmail.com> > > Is this still a bug, or is this intended behaviour? > No behaviour is, atm - my checkout is in such a flux that nothing is > decided yet. I have renamed a lot of variables and methods. That'll be such fun! I think you already know of a lot the little things that bugged me about names. But user-redefinition makes my concerns melt away. I have little helper wrappers, and I use my nicknames everywhere. A lot of what I do is based around mmucl. Converting its scripting is easier if I re-use terms like "write" and "echo".. > It will be 0.6, I think :) It better be. ;) From sy1234 at gmail.com Sat Jul 29 11:13:33 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 10:13:33 -0500 Subject: [Muby-talk] change notes idea In-Reply-To: <20060729144629.GB26095@troja.ath.cx> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> <20060729144629.GB26095@troja.ath.cx> Message-ID: <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > As you said - ncurses keeps track of the current color for me. Perhaps > it would be better to fix the ncurses support instead of taking it > away? Well.. why call upon ncurses to translate your RED, when you can directly send \e[0;14m or whatever ansi code it is.. maybe this is a speed improvement waiting to happen? Then early in the code you can ask ncurses if there is colour support.. (and have a user setting) and turn it on/off internally. That's further speed improvement for people without colour support. There are blind mudders on slow computers.. some of which are playing Aardwolf. Also, you're dangerously close to writing a classic text parser for a lot of the input/output. =) From zond at troja.ath.cx Sat Jul 29 11:23:02 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 17:23:02 +0200 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> Message-ID: <20060729152301.GA28601@troja.ath.cx> On Sat, Jul 29, 2006 at 10:07:03AM -0500, Sy Ali wrote: > On 7/29/06, Sy Ali wrote: > > I remember playing with that, but it wasn't working the way I wanted.. > > let me try again. > > I tried it, and it echos a blank line. I have a working solution, > documented at the bottom of: > http://jrandomhacker.info/Muby/programming/aliases > > I detect MatchData, I cut it apart to take out the first word, and I > use what's left.. it's not quite right, but it works well for my > particular problem. So, instead of fixing your regexp to do what regexps to the best (in the whole wide world :) you break the line apart yourself? :) Try to fix it instead, try to use /^test (.*)\n$/m or something. Then match[1] would be everything between the first test and the newline. //Martin -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 11:24:25 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sat, 29 Jul 2006 17:24:25 +0200 Subject: [Muby-talk] change notes idea In-Reply-To: <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> <20060729144629.GB26095@troja.ath.cx> <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> Message-ID: <20060729152425.GB28601@troja.ath.cx> On Sat, Jul 29, 2006 at 10:13:33AM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > As you said - ncurses keeps track of the current color for me. Perhaps > > it would be better to fix the ncurses support instead of taking it > > away? > > Well.. why call upon ncurses to translate your RED, when you can > directly send \e[0;14m or whatever ansi code it is.. maybe this is a > speed improvement waiting to happen? Because with ncurses I can switch back again, cause ncurses KNOWS what color it was before... if you want to insert text with one color and then revert, you have to keep track... > Then early in the code you can ask ncurses if there is colour > support.. (and have a user setting) and turn it on/off internally. > That's further speed improvement for people without colour support. > > There are blind mudders on slow computers.. some of which are playing Aardwolf. > > Also, you're dangerously close to writing a classic text parser for a > lot of the input/output. =) Well, there is parsing involved yes :) //Martin -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From sy1234 at gmail.com Sat Jul 29 12:41:17 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 11:41:17 -0500 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <20060729152301.GA28601@troja.ath.cx> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> <20060729152301.GA28601@troja.ath.cx> Message-ID: <1e55af990607290941h27ea5576g1f99fd393d5f7517@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > So, instead of fixing your regexp to do what regexps to the best (in > the whole wide world :) you break the line apart yourself? :) > > Try to fix it instead, try to use /^test (.*)\n$/m or something. Then > match[1] would be everything between the first test and the newline. Dammit, none of the ruby docs described this stuff. =/ Live and learn. From sy1234 at gmail.com Sat Jul 29 13:30:28 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 12:30:28 -0500 Subject: [Muby-talk] change notes idea In-Reply-To: <20060729152425.GB28601@troja.ath.cx> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> <20060729144629.GB26095@troja.ath.cx> <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> <20060729152425.GB28601@troja.ath.cx> Message-ID: <1e55af990607291030j3893abe1t699293662d9e41e1@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > Because with ncurses I can switch back again, cause ncurses KNOWS what > color it was before... if you want to insert text with one color and > then revert, you have to keep track... That doesn't seem hard to do. Your one method which takes care of the output of a colour code can do this. From sy1234 at gmail.com Sat Jul 29 19:15:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 18:15:51 -0500 Subject: [Muby-talk] % character not valid? Message-ID: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> I don't know if this is a bug which will go away with the rewrite, but it seems that the % character acts a bit odd and can also be made to kill muby. Press % and it appears.. press it twice and it will only appear the first time. Then it only appears every two keystrokes. I think that somehow % is being tied to another key somehow. I hold % down for a while, then immediately hit backspace, and I get this: ./lib/inputwindow.rb:211:in `open': wrong number of arguments (2 for 1) (ArgumentError) from ./lib/inputwindow.rb:211:in `saveHistory' from ./muby.rb:137:in `initialize' from /usr/lib/ruby/site_ruby/1.8/ncurses.rb:73 ./lib/inputwindow.rb:211:in `open': wrong number of arguments (2 for 1) (ArgumentError) from ./lib/inputwindow.rb:211:in `saveHistory' from ./muby.rb:137:in `initialize' from /usr/lib/ruby/site_ruby/1.8/ncurses.rb:73 From zond at troja.ath.cx Sat Jul 29 19:44:24 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 01:44:24 +0200 Subject: [Muby-talk] change notes idea In-Reply-To: <1e55af990607291030j3893abe1t699293662d9e41e1@mail.gmail.com> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> <20060729144629.GB26095@troja.ath.cx> <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> <20060729152425.GB28601@troja.ath.cx> <1e55af990607291030j3893abe1t699293662d9e41e1@mail.gmail.com> Message-ID: <20060729234424.GA1540@troja.ath.cx> No, because I have to implement a complete ANSI parser to do that... I need to know exactly what ANSI codes I have to enter to come back to exact that state we hade before the last change. To do that I have to keep track of the codes we have hade so far, and know which codes compensate for each other or affect each other. Of course, its not impossible, but ncurses was created for this... So I would rather use ncurses than reinvent the wheel. //Martin On Sat, Jul 29, 2006 at 12:30:28PM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > Because with ncurses I can switch back again, cause ncurses KNOWS what > > color it was before... if you want to insert text with one color and > > then revert, you have to keep track... > > That doesn't seem hard to do. Your one method which takes care of the > output of a colour code can do this. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 19:45:12 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 01:45:12 +0200 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <1e55af990607290941h27ea5576g1f99fd393d5f7517@mail.gmail.com> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> <20060729152301.GA28601@troja.ath.cx> <1e55af990607290941h27ea5576g1f99fd393d5f7517@mail.gmail.com> Message-ID: <20060729234512.GB1540@troja.ath.cx> Well, this is more regexp magic than ruby magic... :) //Martin On Sat, Jul 29, 2006 at 11:41:17AM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > So, instead of fixing your regexp to do what regexps to the best (in > > the whole wide world :) you break the line apart yourself? :) > > > > Try to fix it instead, try to use /^test (.*)\n$/m or something. Then > > match[1] would be everything between the first test and the newline. > > Dammit, none of the ruby docs described this stuff. =/ > > Live and learn. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From zond at troja.ath.cx Sat Jul 29 19:49:58 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 01:49:58 +0200 Subject: [Muby-talk] % character not valid? In-Reply-To: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> Message-ID: <20060729234958.GD1540@troja.ath.cx> That was really odd. It doesnt happen in the next gen version, however. But it DOES only show every other % I type :O I have no idea why. But since it doesnt crash, Ill leave it till later. //Martin On Sat, Jul 29, 2006 at 06:15:51PM -0500, Sy Ali wrote: > I don't know if this is a bug which will go away with the rewrite, but > it seems that the % character acts a bit odd and can also be made to > kill muby. > > Press % and it appears.. press it twice and it will only appear the > first time. Then it only appears every two keystrokes. > > I think that somehow % is being tied to another key somehow. I hold % > down for a while, then immediately hit backspace, and I get this: > > ./lib/inputwindow.rb:211:in `open': wrong number of arguments (2 for > 1) (ArgumentError) > from ./lib/inputwindow.rb:211:in `saveHistory' > from ./muby.rb:137:in `initialize' > from /usr/lib/ruby/site_ruby/1.8/ncurses.rb:73 > ./lib/inputwindow.rb:211:in `open': wrong number of arguments (2 for > 1) (ArgumentError) > from ./lib/inputwindow.rb:211:in `saveHistory' > from ./muby.rb:137:in `initialize' > from /usr/lib/ruby/site_ruby/1.8/ncurses.rb:73 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From sy1234 at gmail.com Sat Jul 29 19:57:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sat, 29 Jul 2006 18:57:51 -0500 Subject: [Muby-talk] % character not valid? In-Reply-To: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> Message-ID: <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> I can reproduce it: hold % for a while, press backspace once and then quickly hit space once. I get: illegal format character - % /usr/lib/ruby/site_ruby/1.8/ncurses.rb:279:in `sprintf' /usr/lib/ruby/site_ruby/1.8/ncurses.rb:279:in `mvwprintw' /usr/lib/ruby/site_ruby/1.8/ncurses.rb:75:in `method_missing' ./lib/inputwindow.rb:170:in `update' ./lib/inputwindow.rb:473:in `process' ./muby.rb:147:in `initialize' ./muby.rb:170 From zond at troja.ath.cx Sat Jul 29 20:35:01 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 02:35:01 +0200 Subject: [Muby-talk] % character not valid? In-Reply-To: <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> Message-ID: <20060730003501.GA2149@troja.ath.cx> Now I have commited the next gen muby. The changelog tells mostly what the news are, but its pretty big changes in naming and syntax. If you start up without a config file you will get one created, with help about what the options do. conf.substitutions is added that simply does ordinary regexp gsub on the strings being shown that come from the server. All global variables are gone, and replaced with the Muby::Configurable mixin and the conf method. Log level like output is added, you select show_level within [:trace, :debug, :info, :warn, :error] and will get the corresponding logging. All keys are defined in a hash in the config object, so its easy to redefined how all keys work. These are just among the changes, most of them are in the inner workings. More small fixes coming. //Martin On Sat, Jul 29, 2006 at 06:57:51PM -0500, Sy Ali wrote: > I can reproduce it: > hold % for a while, press backspace once and then quickly hit space once. > > I get: > illegal format character - % > /usr/lib/ruby/site_ruby/1.8/ncurses.rb:279:in `sprintf' > /usr/lib/ruby/site_ruby/1.8/ncurses.rb:279:in `mvwprintw' > /usr/lib/ruby/site_ruby/1.8/ncurses.rb:75:in `method_missing' > ./lib/inputwindow.rb:170:in `update' > ./lib/inputwindow.rb:473:in `process' > ./muby.rb:147:in `initialize' > ./muby.rb:170 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Q: What do you call the scratches that you get when a female sheep bites you? A: Ewe nicks. ################################################################### From sy1234 at gmail.com Sun Jul 30 01:04:07 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 00:04:07 -0500 Subject: [Muby-talk] aliases and regular expression matching In-Reply-To: <20060729234512.GB1540@troja.ath.cx> References: <1e55af990607290733w317d3014xa4e800657606201f@mail.gmail.com> <20060729145015.GC26095@troja.ath.cx> <1e55af990607290801g594c1f2dt3d72515f135e1a38@mail.gmail.com> <1e55af990607290807x5dddcfe8y2ae96bf144a34256@mail.gmail.com> <20060729152301.GA28601@troja.ath.cx> <1e55af990607290941h27ea5576g1f99fd393d5f7517@mail.gmail.com> <20060729234512.GB1540@troja.ath.cx> Message-ID: <1e55af990607292204h6d1c1ca9t86dc8eb64aed61b0@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > > Well, this is more regexp magic than ruby magic... :) I'm learning a bit more about regexes.. to the point of being fairly comfortable with some complex stuff.. I converted a couple of large-ish aliases and procedures (methods) and found the conversion fairly simple.. even when they're doing all sorts of strange matching. From sy1234 at gmail.com Sun Jul 30 01:06:42 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 00:06:42 -0500 Subject: [Muby-talk] change notes idea In-Reply-To: <20060729234424.GA1540@troja.ath.cx> References: <1e55af990607281433p2e269ea0le361df6a230ce4f0@mail.gmail.com> <20060728233749.GB15619@troja.ath.cx> <1e55af990607281700t5cd6a921t4c52e2dfe6c87fdf@mail.gmail.com> <20060729080940.GA16960@troja.ath.cx> <1e55af990607290411j5374f8cwf4272c1726855b27@mail.gmail.com> <20060729144629.GB26095@troja.ath.cx> <1e55af990607290813s4c32c142w5ff6ac286d81c2db@mail.gmail.com> <20060729152425.GB28601@troja.ath.cx> <1e55af990607291030j3893abe1t699293662d9e41e1@mail.gmail.com> <20060729234424.GA1540@troja.ath.cx> Message-ID: <1e55af990607292206l6e49a4d6rae012d7c60576e61@mail.gmail.com> > On Sat, Jul 29, 2006 at 12:30:28PM -0500, Sy Ali wrote: > > That doesn't seem hard to do. Your one method which takes care of the > > output of a colour code can do this. On 7/29/06, Martin Kihlgren wrote: > No, because I have to implement a complete ANSI parser to do that... I > need to know exactly what ANSI codes I have to enter to come back to > exact that state we hade before the last change. > > To do that I have to keep track of the codes we have hade so far, and > know which codes compensate for each other or affect each other. > > Of course, its not impossible, but ncurses was created for this... So > I would rather use ncurses than reinvent the wheel. I guess you should ignore ncurses for a while, to work on the more interesting problems. =) From sy1234 at gmail.com Sun Jul 30 01:11:48 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 00:11:48 -0500 Subject: [Muby-talk] % character not valid? In-Reply-To: <20060730003501.GA2149@troja.ath.cx> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> <20060730003501.GA2149@troja.ath.cx> Message-ID: <1e55af990607292211t77f76bb3j42e2a2d633f47be4@mail.gmail.com> On 7/29/06, Martin Kihlgren wrote: > > Now I have commited the next gen muby. > > The changelog tells mostly what the news are, but its pretty big > changes in naming and syntax. > > If you start up without a config file you will get one created, with > help about what the options do. > > conf.substitutions is added that simply does ordinary regexp gsub on > the strings being shown that come from the server. > > All global variables are gone, and replaced with the > Muby::Configurable mixin and the conf method. > > Log level like output is added, you select show_level within [:trace, > :debug, :info, :warn, :error] and will get the corresponding logging. > > All keys are defined in a hash in the config object, so its easy to > redefined how all keys work. > > These are just among the changes, most of them are in the inner > workings. > > More small fixes coming. Ok, it's too late for me to begin browsing through it all.. I need some sleep =) I've done my own huge amount of changes.. I've begin to extract all of my scripting, and have been gently porting it to muby-compatible code .. experimenting with scripting and doing some docs on the side. I've also begin working on the idea of mud-specific scripting. Remember the userdir concept? Well with that functionality, a user could expand someone else's package of scripts.. and it'll all get magically used. So I've begun some aardwolf-specific scripting, because that's what I know. Things like speedwalks, common aliases and the like. But I'll need to revisit everything with the new syntax and such.. I'll report back tomorrow. From zond at troja.ath.cx Sun Jul 30 06:07:27 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 12:07:27 +0200 Subject: [Muby-talk] % character not valid? In-Reply-To: <1e55af990607292211t77f76bb3j42e2a2d633f47be4@mail.gmail.com> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> <20060730003501.GA2149@troja.ath.cx> <1e55af990607292211t77f76bb3j42e2a2d633f47be4@mail.gmail.com> Message-ID: <20060730100727.GA2302@troja.ath.cx> Neat :) I would like you to treat the new code with care, also. At least until you understand the class and module hierarchy of it, please dont add methods without consulting me :) If you feel the need, please fix bugs and typos and such, but follow the spirit of the existing code. The way to add your own utility methods is to have them in your own script files - I would like to keep the kernel clean. I suggest you create a 'contrib' directory where you put all your scripts that you want to distribute with muby :) //Martin On Sun, Jul 30, 2006 at 12:11:48AM -0500, Sy Ali wrote: > On 7/29/06, Martin Kihlgren wrote: > > > > Now I have commited the next gen muby. > > > > The changelog tells mostly what the news are, but its pretty big > > changes in naming and syntax. > > > > If you start up without a config file you will get one created, with > > help about what the options do. > > > > conf.substitutions is added that simply does ordinary regexp gsub on > > the strings being shown that come from the server. > > > > All global variables are gone, and replaced with the > > Muby::Configurable mixin and the conf method. > > > > Log level like output is added, you select show_level within [:trace, > > :debug, :info, :warn, :error] and will get the corresponding logging. > > > > All keys are defined in a hash in the config object, so its easy to > > redefined how all keys work. > > > > These are just among the changes, most of them are in the inner > > workings. > > > > More small fixes coming. > > Ok, it's too late for me to begin browsing through it all.. I need some sleep =) > > I've done my own huge amount of changes.. I've begin to extract all of > my scripting, and have been gently porting it to muby-compatible code > .. experimenting with scripting and doing some docs on the side. > > I've also begin working on the idea of mud-specific scripting. > Remember the userdir concept? Well with that functionality, a user > could expand someone else's package of scripts.. and it'll all get > magically used. > > So I've begun some aardwolf-specific scripting, because that's what I > know. Things like speedwalks, common aliases and the like. > > > But I'll need to revisit everything with the new syntax and such.. > I'll report back tomorrow. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 09:25:48 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 08:25:48 -0500 Subject: [Muby-talk] % character not valid? In-Reply-To: <20060730100727.GA2302@troja.ath.cx> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> <20060730003501.GA2149@troja.ath.cx> <1e55af990607292211t77f76bb3j42e2a2d633f47be4@mail.gmail.com> <20060730100727.GA2302@troja.ath.cx> Message-ID: <1e55af990607300625jdcfee0lb467549869d675b7@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > I suggest you create a 'contrib' directory where you put all your > scripts that you want to distribute with muby :) I see that cce.rb is there.. and also that it was being required by muby.rb .. is this correct? I'd think that if it's contrib'd code it shouldn't be required by default. Also, maybe it's possible to make some method to require certain contribed code based on user settings.. muby knows where it resides, and the user script could require files as-necessary.. sortof like the user script loading feature. Hrm.. I'm just thinking out loud. From sy1234 at gmail.com Sun Jul 30 09:28:25 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 08:28:25 -0500 Subject: [Muby-talk] pause wrapper Message-ID: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> Since muby can do all kinds of things when errors kill it, I added a simple pause at the end. This will help an xterm/etc user, when they reload their scripts and there is an error in them. I figure it's a nice touch.. but it might be annoying to you, depending on how you develop. Maybe a simple user-routine should go there.. to make it something which can be redefined by each user? For example, I might want to write out special logs and such. Thoughts? From zond at troja.ath.cx Sun Jul 30 09:43:21 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 15:43:21 +0200 Subject: [Muby-talk] % character not valid? In-Reply-To: <1e55af990607300625jdcfee0lb467549869d675b7@mail.gmail.com> References: <1e55af990607291615j4bc6443av5f68559895efb673@mail.gmail.com> <1e55af990607291657o2bffc7a2n1a803dc9c55fd211@mail.gmail.com> <20060730003501.GA2149@troja.ath.cx> <1e55af990607292211t77f76bb3j42e2a2d633f47be4@mail.gmail.com> <20060730100727.GA2302@troja.ath.cx> <1e55af990607300625jdcfee0lb467549869d675b7@mail.gmail.com> Message-ID: <20060730134321.GA11786@troja.ath.cx> Yes, a bug. I will fix it very soon. I am currently fixing the broken ncurses support... I will think on that suggestion. //Martin On Sun, Jul 30, 2006 at 08:25:48AM -0500, Sy Ali wrote: > On 7/30/06, Martin Kihlgren wrote: > > I suggest you create a 'contrib' directory where you put all your > > scripts that you want to distribute with muby :) > > I see that cce.rb is there.. and also that it was being required by > muby.rb .. is this correct? I'd think that if it's contrib'd code it > shouldn't be required by default. > > Also, maybe it's possible to make some method to require certain > contribed code based on user settings.. muby knows where it resides, > and the user script could require files as-necessary.. sortof like the > user script loading feature. Hrm.. I'm just thinking out loud. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From zond at troja.ath.cx Sun Jul 30 09:45:03 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 15:45:03 +0200 Subject: [Muby-talk] pause wrapper In-Reply-To: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> References: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> Message-ID: <20060730134502.GB11786@troja.ath.cx> I allready have such a thing, if you look in the at_exit block. However, you are right, so I added it (the same way) to the rescue block of the main loop. But dont keep on adding the require wrapper, it is totally unnecessary :O //Martin On Sun, Jul 30, 2006 at 08:28:25AM -0500, Sy Ali wrote: > Since muby can do all kinds of things when errors kill it, I added a > simple pause at the end. This will help an xterm/etc user, when they > reload their scripts and there is an error in them. > > I figure it's a nice touch.. but it might be annoying to you, > depending on how you develop. > > Maybe a simple user-routine should go there.. to make it something > which can be redefined by each user? For example, I might want to > write out special logs and such. > > Thoughts? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 09:56:22 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 08:56:22 -0500 Subject: [Muby-talk] pause wrapper In-Reply-To: <20060730134502.GB11786@troja.ath.cx> References: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> <20060730134502.GB11786@troja.ath.cx> Message-ID: <1e55af990607300656u42ea04as8f08fed009d23cf5@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > But dont keep on adding the require wrapper, it is totally unnecessary > :O Really? But the error messages generated by ruby are unfriendly.. =/ well.. the rubygems wrapper needs to exist, for people with the ncurses rubygems From zond at troja.ath.cx Sun Jul 30 10:18:16 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 16:18:16 +0200 Subject: [Muby-talk] pause wrapper In-Reply-To: <1e55af990607300656u42ea04as8f08fed009d23cf5@mail.gmail.com> References: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> <20060730134502.GB11786@troja.ath.cx> <1e55af990607300656u42ea04as8f08fed009d23cf5@mail.gmail.com> Message-ID: <20060730141816.GA14161@troja.ath.cx> Well, no matter if they are unfriendly - if you cant load the files the app is broken, no use telling the user about the failure in a way that is nice and cuddly if the failure is complete and utter... Yes, the rubygems wrapper has to stay. //Martiny On Sun, Jul 30, 2006 at 08:56:22AM -0500, Sy Ali wrote: > On 7/30/06, Martin Kihlgren wrote: > > But dont keep on adding the require wrapper, it is totally unnecessary > > :O > > Really? But the error messages generated by ruby are unfriendly.. =/ > > well.. the rubygems wrapper needs to exist, for people with the ncurses rubygems > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From zond at troja.ath.cx Sun Jul 30 10:22:08 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 16:22:08 +0200 Subject: [Muby-talk] fixed ncurses support Message-ID: <20060730142208.GB14161@troja.ath.cx> Now the ncurses support is working perfectly. Both bold and non-bold text looks good at aardmud :) You can also reach constants like RED, BLUE, GREEN, BOLD, UNDERLINE etc from within the print command. Therefore, you can do things like: /print RED, UNDERLINE, BOLD, "hehu" or: /conf.remote_triggers[/learn/] = Proc.new do |inwin, outwin, match| outwin.print(RED, BOLD, "LEARN") end //Martin -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 10:42:49 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 09:42:49 -0500 Subject: [Muby-talk] pause wrapper In-Reply-To: <20060730141816.GA14161@troja.ath.cx> References: <1e55af990607300628s5204871em74f9241e413f7ad9@mail.gmail.com> <20060730134502.GB11786@troja.ath.cx> <1e55af990607300656u42ea04as8f08fed009d23cf5@mail.gmail.com> <20060730141816.GA14161@troja.ath.cx> Message-ID: <1e55af990607300742p383b5b87q4817b49cd7679991@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > > Well, no matter if they are unfriendly - if you cant load the files > the app is broken, no use telling the user about the failure in a way > that is nice and cuddly if the failure is complete and utter... Oh fine.. think like a programmer. =p From sy1234 at gmail.com Sun Jul 30 10:44:19 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 09:44:19 -0500 Subject: [Muby-talk] threads Message-ID: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> Reading through the changes.. I see how you're using threads to do some sleeping in a couple of places. How safe is it for a user to do this kind of thing? From zond at troja.ath.cx Sun Jul 30 10:57:46 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 16:57:46 +0200 Subject: [Muby-talk] threads In-Reply-To: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> References: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> Message-ID: <20060730145746.GA15062@troja.ath.cx> Completely safe, I think... :) //Martin On Sun, Jul 30, 2006 at 09:44:19AM -0500, Sy Ali wrote: > Reading through the changes.. I see how you're using threads to do > some sleeping in a couple of places. How safe is it for a user to do > this kind of thing? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From zond at troja.ath.cx Sun Jul 30 11:02:41 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 17:02:41 +0200 Subject: [Muby-talk] threads In-Reply-To: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> References: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> Message-ID: <20060730150241.GA15753@troja.ath.cx> Btw, we dont need to check for version until we know there are problems. Lets not pollute the codebase with stuff we dont know we need. //Martin On Sun, Jul 30, 2006 at 09:44:19AM -0500, Sy Ali wrote: > Reading through the changes.. I see how you're using threads to do > some sleeping in a couple of places. How safe is it for a user to do > this kind of thing? > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 12:31:32 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 11:31:32 -0500 Subject: [Muby-talk] threads In-Reply-To: <20060730150241.GA15753@troja.ath.cx> References: <1e55af990607300744q30982b2cl8fd353df90c97ce0@mail.gmail.com> <20060730150241.GA15753@troja.ath.cx> Message-ID: <1e55af990607300931j59472065g8bde01892a8fdc7b@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > > Btw, we dont need to check for version until we know there are > problems. Lets not pollute the codebase with stuff we dont know we > need. I saw.. I'll adopt your philosophy. =) From sy1234 at gmail.com Sun Jul 30 13:01:30 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 12:01:30 -0500 Subject: [Muby-talk] muby history bug Message-ID: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> I can generate a broken history file when I nuke the muby window without asking it to exit. The issue is with receiving an error when pressing enter: undefined method `[]' for nil:NilClass Deleting the history file and re-starting resolves the issue. From zond at troja.ath.cx Sun Jul 30 13:44:55 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 19:44:55 +0200 Subject: [Muby-talk] muby history bug In-Reply-To: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> References: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> Message-ID: <20060730174455.GA19035@troja.ath.cx> I dont understand? * I dont break my history file when I nuke the window. * What issue is when pressing enter? How do I reproduce it? Also: Which of the more or less hard-to-implement features do you feel is most pressing now? Where do you want me to begin? //Martin On Sun, Jul 30, 2006 at 12:01:30PM -0500, Sy Ali wrote: > I can generate a broken history file when I nuke the muby window > without asking it to exit. > > The issue is with receiving an error when pressing enter: > undefined method `[]' for nil:NilClass > > Deleting the history file and re-starting resolves the issue. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 14:34:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 13:34:59 -0500 Subject: [Muby-talk] next actions Message-ID: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> > Also: Which of the more or less hard-to-implement features do you feel > is most pressing now? Where do you want me to begin? Off the top of my head, since I'm now going through a whole lot of scripting: * Further-simplification of common commands (see below). * removing the spam from the userfiles reloading. Using 'puts' is very messy when muby is already running. * Re-implement the autostart feature. * Screen redrawing ---- How about considering making very easy helpers for simple situations. For example, this is a "simple" local trigger: conf.local_triggers[/say hello/] = Proc.new do |inwin, outwin, match| inwin.send("say Hello!"); false end For simple cases, why not have syntax like: alias "say hello", "say Hello!" * Assume a complete-line match * Assume the second parameter is sent to the server. Helpers like this, which make basic assumptions, would make life easy for newbies.. and it would cut down on the extra typing for some people. =) ---- I'm really muddled by the new syntax. This is how I would get a local alias to run a method: conf.local_triggers[/test2/] = Proc.new do |inwin, outwin, match| test2(inwin); false end def test2(inwin) inwin.send("say Hello!") end That's one heck of a lot of typing.. especially since I have to repeat this a hundred times. Is there a better way? ---- I created this simple helper, so that my methods can process semicolons in strings as separate lines: def write(string) # Split across any semi-colons. string = string.split(';') # Run through it, executing each command separately. string.each_index { |i| send string[i] } false end Do you think this idea is useful enough to fit in somewhere? From sy1234 at gmail.com Sun Jul 30 14:44:19 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 13:44:19 -0500 Subject: [Muby-talk] muby history bug In-Reply-To: <20060730174455.GA19035@troja.ath.cx> References: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> <20060730174455.GA19035@troja.ath.cx> Message-ID: <1e55af990607301144q533238afl696e54a8c89da929@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > > I dont understand? > > * I dont break my history file when I nuke the window. > * What issue is when pressing enter? How do I reproduce it? I think the history file gets mangled when I exit muby after I produce various kinds of errors through user scripting and using /reload. Pressing enter gives that message, and nothing I type is recognized (nothing happens). undefined method `[]' for nil:NilClass From sy1234 at gmail.com Sun Jul 30 14:52:05 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 13:52:05 -0500 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> Message-ID: <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> On 7/30/06, Sy Ali wrote: > > Also: Which of the more or less hard-to-implement features do you feel > > is most pressing now? Where do you want me to begin? Oh heck, after playing with it for a bit.. the top of the list has to be.. speed improvements. Removing my user directory and testing, muby is very significantly slower than 0.5.5 .. and with my user scripting it's like my old 1200-baud modem. =) I've tried with and without my MCCP proxy. From zond at troja.ath.cx Sun Jul 30 15:37:10 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 21:37:10 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> Message-ID: <20060730193710.GA19298@troja.ath.cx> On Sun, Jul 30, 2006 at 01:34:59PM -0500, Sy Ali wrote: > Off the top of my head, since I'm now going through a whole lot of scripting: > > * Further-simplification of common commands (see below). > * removing the spam from the userfiles reloading. Using 'puts' is > very messy when muby is already running. What spam are you talking about? Where is there 'puts' in the code now? > * Re-implement the autostart feature. You were the one who said it was unnecessary since you could put the same stuff in your rc-file? > * Screen redrawing I looked into that. There was a huge problem - my ncurses didnt get any event when the screen was resized, and Ncurses.COLS was the same after the resize. If you dont have any clever idea I dont know how to implement that... :/ > ---- > > How about considering making very easy helpers for simple situations. > For example, this is a "simple" local trigger: > > conf.local_triggers[/say hello/] = Proc.new do |inwin, outwin, match| > inwin.send("say Hello!"); false end > > For simple cases, why not have syntax like: > alias "say hello", "say Hello!" > > * Assume a complete-line match > * Assume the second parameter is sent to the server. > > Helpers like this, which make basic assumptions, would make life easy > for newbies.. and it would cut down on the extra typing for some > people. =) Sure, Ill look into that. > ---- > > I'm really muddled by the new syntax. This is how I would get a local > alias to run a method: > > conf.local_triggers[/test2/] = Proc.new do |inwin, outwin, match| > test2(inwin); false end > def test2(inwin) > inwin.send("say Hello!") > end > > That's one heck of a lot of typing.. especially since I have to repeat > this a hundred times. Is there a better way? The def is useless... the following conf.local_triggers[/test2/] = Proc.new do |inwin, outwin, match| inwin.send("say Hello!") end does the exact same thing. And if it is a method you want to call, then I can tell you a little secret: The values of the triggers dont have to be Proc's anymore. They can also be Strings, in which case they will be evaluated (in the scope of the InputWindow no less!) conf.local_triggers[/test2/] = "print('i got test2')" They can be Symbols, in which case the method with the name matching the symbol will be called def testN Muby::InputWindow.get_instance.print("testN called") end conf.local_triggers[/test2/] = :testN They can be Arrays, in which case the method with the name matching the first element of the array will be called with the rest of the array as arguments conf.local_triggers[/test2/] = [:print, 'hehu'] All these ways of doing triggers can take (for those that DO take arguments, Strings to be evaluated obviously do NOT take arguments) any number of arguments. The arguments you send (in the Array, no arguments otherwise) will get input window, output window and match added to them at the end, and then only the number of arguments that the method or Proc takes will be sent. This is extremely powerful, you can easily let your triggers do whatever the hell you want :) > ---- > > I created this simple helper, so that my methods can process > semicolons in strings as separate lines: > > def write(string) > # Split across any semi-colons. > string = string.split(';') > # Run through it, executing each command separately. > string.each_index { |i| > send string[i] > } > false > end > > Do you think this idea is useful enough to fit in somewhere? Ill think about a nice way of implementing that in the kernel :) //Martin -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From zond at troja.ath.cx Sun Jul 30 15:37:50 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Sun, 30 Jul 2006 21:37:50 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> Message-ID: <20060730193750.GB19298@troja.ath.cx> Tell me how to reproduce this, and Ill look into it :) //Martin On Sun, Jul 30, 2006 at 01:52:05PM -0500, Sy Ali wrote: > On 7/30/06, Sy Ali wrote: > > > Also: Which of the more or less hard-to-implement features do you feel > > > is most pressing now? Where do you want me to begin? > > Oh heck, after playing with it for a bit.. the top of the list has to > be.. speed improvements. > > Removing my user directory and testing, muby is very significantly > slower than 0.5.5 .. and with my user scripting it's like my old > 1200-baud modem. =) > > I've tried with and without my MCCP proxy. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### HUGH BEAUMONT died in 1982!! ################################################################### From sy1234 at gmail.com Sun Jul 30 17:30:52 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 16:30:52 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060730193710.GA19298@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> Message-ID: <1e55af990607301430s6ec27862hfed9f34bd9087b52@mail.gmail.com> On 7/30/06, Martin Kihlgren wrote: > > * removing the spam from the userfiles reloading. Using 'puts' is > > very messy when muby is already running. > > What spam are you talking about? Where is there 'puts' in the code > now? * While muby is running, I do /load_user_files! * load_user_files! uses nice_load! * nice_load! uses Muby::Displayer.info("Loaded #{f}") * Muby::Displayer.info uses puts =) > > * Re-implement the autostart feature. > > You were the one who said it was unnecessary since you could put the > same stuff in your rc-file? I can do a lot of scripting on the user-side, but the one thing I have not discovered is connecting automatically on startup. I would need an alias/etc (user-interaction) for this one thing. =) > > * Screen redrawing > > I looked into that. There was a huge problem - my ncurses didnt get > any event when the screen was resized, and Ncurses.COLS was the same > after the resize. If you dont have any clever idea I dont know how to > implement that... :/ That's unusual. When I was experimenting, my manual redraw feature could do it. Even now, if I do this it'll output the right value: /print Ncurses.COLS.to_s I can resize, try it again, and get the proper value. From sy1234 at gmail.com Sun Jul 30 17:47:50 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 16:47:50 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060730193710.GA19298@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> Message-ID: <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> Wow, those are some really powerful examples.. I think I'm beginning to understand things.. =) On 7/30/06, Martin Kihlgren wrote: > > I'm really muddled by the new syntax. This is how I would get a local > > alias to run a method: > The def is useless... I know.. but it demonstrated the idea. =p I caught on to some solutions just as I was reading your examples.. very interesting. I'm going to thin it down into some simple docs, and then provide the more advanced examples for more serious programmers. (vs. just scripters) > def testN > Muby::InputWindow.get_instance.print("testN called") > end > > conf.local_triggers[/test2/] = :testN Ok, so I could simplify scripts with something like this: def print(string) Muby::OutputWindow.print Muby::InputWindow.get_instance.string end and then the documentation would talk about this kind of syntax: def testN print("testN called") a= "value" print("testN called") end conf.local_triggers[/test4/] = :testN > They can be Arrays, in which case the method with the name matching > the first element of the array will be called with the rest of the > array as arguments > > conf.local_triggers[/test2/] = [:print, 'hehu'] This didn't work for me. I got: wrong number of arguments (2 for 1) From sy1234 at gmail.com Sun Jul 30 17:49:49 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 16:49:49 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060730193750.GB19298@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> <20060730193750.GB19298@troja.ath.cx> Message-ID: <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> > On Sun, Jul 30, 2006 at 01:52:05PM -0500, Sy Ali wrote: > > Oh heck, after playing with it for a bit.. the top of the list has to > > be.. speed improvements. On 7/30/06, Martin Kihlgren wrote: > Tell me how to reproduce this, and Ill look into it :) Well, my testing so far has been with Aardwolf. It's just visual.. even the login screen scrolls slowly. From sy1234 at gmail.com Sun Jul 30 19:17:58 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 18:17:58 -0500 Subject: [Muby-talk] speed reduction since 0.5.5 Message-ID: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> On 7/30/06, Sy Ali wrote: > > On Sun, Jul 30, 2006 at 01:52:05PM -0500, Sy Ali wrote: > > > Oh heck, after playing with it for a bit.. the top of the list has to > > > be.. speed improvements. > > On 7/30/06, Martin Kihlgren wrote: > > Tell me how to reproduce this, and Ill look into it :) > > Well, my testing so far has been with Aardwolf. It's just visual.. > even the login screen scrolls slowly. I'm going to do more testing and get back to you. I'm fairly sure it's a user-scripting thing. Until I refactor my user scripts, I'll assume that something of mine is broken. The volume of scripting -- triggers and gags -- wasn't a problem before. From sy1234 at gmail.com Sun Jul 30 19:28:25 2006 From: sy1234 at gmail.com (Sy Ali) Date: Sun, 30 Jul 2006 18:28:25 -0500 Subject: [Muby-talk] I recommend 0.6.0 be released Message-ID: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> Aside from startup and shutdown commands, everything seems to be working well. I've still got to migrate my user scripting to the new format, but all the basics check out. From sy1234 at gmail.com Mon Jul 31 01:09:47 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 00:09:47 -0500 Subject: [Muby-talk] disconnection issues (not flooding) Message-ID: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> I reproduced the disconnection with the 'explored' command on Aardwolf. I think therefore this is some more technical issue. Maybe something like nonstandard output from the server? I get this text, and then I am disconnected: This area has 896 explorable rooms. You have explored * Removing user scripting did not change this. * I tried with and without MCCP compression. From sy1234 at gmail.com Mon Jul 31 02:20:59 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 01:20:59 -0500 Subject: [Muby-talk] speed reduction since 0.5.5 In-Reply-To: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> References: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> Message-ID: <1e55af990607302320y686a08datcaa1a7ebb0100ab5@mail.gmail.com> On 7/30/06, Sy Ali wrote: > I'm going to do more testing and get back to you. I'm fairly sure > it's a user-scripting thing. Until I refactor my user scripts, I'll > assume that something of mine is broken. > > The volume of scripting -- triggers and gags -- wasn't a problem before. It's definitely a problem with user scripting. I've been doing a lot of experimentation and I even had it down to one particular block of script.. but it wasn't particularly special. It's a very difficult issue. I'll keep experimenting. From zond at troja.ath.cx Mon Jul 31 02:51:56 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 08:51:56 +0200 Subject: [Muby-talk] muby history bug In-Reply-To: <1e55af990607301144q533238afl696e54a8c89da929@mail.gmail.com> References: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> <20060730174455.GA19035@troja.ath.cx> <1e55af990607301144q533238afl696e54a8c89da929@mail.gmail.com> Message-ID: <20060731065156.GA5113@troja.ath.cx> Try to set show_level to :debug - then youll see the backtrace of the error, not just the message. Then you can tell me what the backtrace is, since I havent been able to reproduce the error. //Martin On Sun, Jul 30, 2006 at 01:44:19PM -0500, Sy Ali wrote: > On 7/30/06, Martin Kihlgren wrote: > > > > I dont understand? > > > > * I dont break my history file when I nuke the window. > > * What issue is when pressing enter? How do I reproduce it? > > I think the history file gets mangled when I exit muby after I produce > various kinds of errors through user scripting and using /reload. > > Pressing enter gives that message, and nothing I type is recognized > (nothing happens). > undefined method `[]' for nil:NilClass > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 03:11:23 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 09:11:23 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301430s6ec27862hfed9f34bd9087b52@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> <1e55af990607301430s6ec27862hfed9f34bd9087b52@mail.gmail.com> Message-ID: <20060731071123.GB5113@troja.ath.cx> On Sun, Jul 30, 2006 at 04:30:52PM -0500, Sy Ali wrote: > On 7/30/06, Martin Kihlgren wrote: > > > * removing the spam from the userfiles reloading. Using 'puts' is > > > very messy when muby is already running. > > > > What spam are you talking about? Where is there 'puts' in the code > > now? > > * While muby is running, I do /load_user_files! > * load_user_files! uses nice_load! > * nice_load! uses Muby::Displayer.info("Loaded #{f}") > * Muby::Displayer.info uses puts > > =) Only if your application is not running. However, I noticed the bug now - the application seems to temporarily find itself out of order when you reload. I fixed in in this commit now though. > > > * Re-implement the autostart feature. > > > > You were the one who said it was unnecessary since you could put the > > same stuff in your rc-file? > > I can do a lot of scripting on the user-side, but the one thing I have > not discovered is connecting automatically on startup. I would need > an alias/etc (user-interaction) for this one thing. =) Ah, I saw the problem. We need to run user scripts before initializing the windows, to be able to customize them. But we need to have initialized windows to be able to connect! I have re-added startup triggers (conf.startup_triggers). > > > * Screen redrawing > > > > I looked into that. There was a huge problem - my ncurses didnt get > > any event when the screen was resized, and Ncurses.COLS was the same > > after the resize. If you dont have any clever idea I dont know how to > > implement that... :/ > > That's unusual. When I was experimenting, my manual redraw feature > could do it. Even now, if I do this it'll output the right value: > > /print Ncurses.COLS.to_s > > I can resize, try it again, and get the proper value. Neat, then its just my terminal I guess. I will try another terminal and see if I can fix it :) //Martin -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 03:14:47 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 09:14:47 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> Message-ID: <20060731071447.GC5113@troja.ath.cx> On Sun, Jul 30, 2006 at 04:47:50PM -0500, Sy Ali wrote: > Ok, so I could simplify scripts with something like this: > > def print(string) > Muby::OutputWindow.print Muby::InputWindow.get_instance.string > end > > and then the documentation would talk about this kind of syntax: > > def testN > print("testN called") > a= "value" > print("testN called") > end > conf.local_triggers[/test4/] = :testN I still dont understand why you have defined the print method? And - what is Muby::InputWindow.get_instance.string? But yes, it ought to work (at least up until that get_instante.string, which I dont understand :) > > They can be Arrays, in which case the method with the name matching > > the first element of the array will be called with the rest of the > > array as arguments > > > > conf.local_triggers[/test2/] = [:print, 'hehu'] > > This didn't work for me. I got: > wrong number of arguments (2 for 1) Strange? Have you tried the latest version? And if it still breaks, turn show_level to :debug and give me the backtrace. //Martin -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 03:15:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 09:15:18 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> <20060730193750.GB19298@troja.ath.cx> <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> Message-ID: <20060731071518.GD5113@troja.ath.cx> Strange, its all very quick to me :O But I optimized a tiny bit yesterday, see if it did any difference! //Martin On Sun, Jul 30, 2006 at 04:49:49PM -0500, Sy Ali wrote: > > On Sun, Jul 30, 2006 at 01:52:05PM -0500, Sy Ali wrote: > > > Oh heck, after playing with it for a bit.. the top of the list has to > > > be.. speed improvements. > > On 7/30/06, Martin Kihlgren wrote: > > Tell me how to reproduce this, and Ill look into it :) > > Well, my testing so far has been with Aardwolf. It's just visual.. > even the login screen scrolls slowly. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 03:15:49 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 09:15:49 +0200 Subject: [Muby-talk] speed reduction since 0.5.5 In-Reply-To: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> References: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> Message-ID: <20060731071549.GE5113@troja.ath.cx> On Sun, Jul 30, 2006 at 06:17:58PM -0500, Sy Ali wrote: > On 7/30/06, Sy Ali wrote: > > > On Sun, Jul 30, 2006 at 01:52:05PM -0500, Sy Ali wrote: > > > > Oh heck, after playing with it for a bit.. the top of the list has to > > > > be.. speed improvements. > > > > On 7/30/06, Martin Kihlgren wrote: > > > Tell me how to reproduce this, and Ill look into it :) > > > > Well, my testing so far has been with Aardwolf. It's just visual.. > > even the login screen scrolls slowly. > > I'm going to do more testing and get back to you. I'm fairly sure > it's a user-scripting thing. Until I refactor my user scripts, I'll > assume that something of mine is broken. > > The volume of scripting -- triggers and gags -- wasn't a problem before. Could be it. Turn it all off and check what the difference is... //Martin -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 03:16:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 09:16:18 +0200 Subject: [Muby-talk] I recommend 0.6.0 be released In-Reply-To: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> References: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> Message-ID: <20060731071618.GF5113@troja.ath.cx> You do the release whenever you want to :) //Martin On Sun, Jul 30, 2006 at 06:28:25PM -0500, Sy Ali wrote: > Aside from startup and shutdown commands, everything seems to be working well. > > I've still got to migrate my user scripting to the new format, but all > the basics check out. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 04:29:03 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 10:29:03 +0200 Subject: [Muby-talk] disconnection issues (not flooding) In-Reply-To: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> References: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> Message-ID: <20060731082903.GA7693@troja.ath.cx> Ah, I solved it! All the print-functions in ncurses behave like printf in c - that is, they pay special attention to %-characters. I have now taken that into account. //Martin On Mon, Jul 31, 2006 at 12:09:47AM -0500, Sy Ali wrote: > I reproduced the disconnection with the 'explored' command on > Aardwolf. I think therefore this is some more technical issue. Maybe > something like nonstandard output from the server? > > I get this text, and then I am disconnected: > > This area has 896 explorable rooms. > You have explored > > * Removing user scripting did not change this. > * I tried with and without MCCP compression. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From sy1234 at gmail.com Mon Jul 31 12:28:46 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 11:28:46 -0500 Subject: [Muby-talk] muby history bug In-Reply-To: <20060731065156.GA5113@troja.ath.cx> References: <1e55af990607301001o74aef8efj200a0bfaff2cef47@mail.gmail.com> <20060730174455.GA19035@troja.ath.cx> <1e55af990607301144q533238afl696e54a8c89da929@mail.gmail.com> <20060731065156.GA5113@troja.ath.cx> Message-ID: <1e55af990607310928t4e158a9cl8cd4c2d1891d41a6@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > Try to set show_level to :debug - then youll see the backtrace of the > error, not just the message. > > Then you can tell me what the backtrace is, since I havent been able > to reproduce the error. I'll do this. I've been able to reproduce it inconsistantly.. I think in combination with using the user_load_files feature and scripting that half-works. ;) From sy1234 at gmail.com Mon Jul 31 12:47:31 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 11:47:31 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060731071447.GC5113@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <20060730193710.GA19298@troja.ath.cx> <1e55af990607301447o4680a3ddo2e1f25362d5225f4@mail.gmail.com> <20060731071447.GC5113@troja.ath.cx> Message-ID: <1e55af990607310947x41e8acf7hb33cbc700aeb4e21@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > On Sun, Jul 30, 2006 at 04:47:50PM -0500, Sy Ali wrote: > > Ok, so I could simplify scripts with something like this: > > > > def print(string) > > Muby::OutputWindow.print Muby::InputWindow.get_instance.string > > end > > > > and then the documentation would talk about this kind of syntax: > > > > def testN > > print("testN called") > > a= "value" > > print("testN called") > > end > > conf.local_triggers[/test4/] = :testN > > I still dont understand why you have defined the print method? > > And - what is Muby::InputWindow.get_instance.string? > > But yes, it ought to work (at least up until that get_instante.string, > which I dont understand :) I don't remember why I use the get_instance anymore.. it solved an issue with the method being called from within triggers, I think. I do this now: def write(string) string = ensure_s(string) # Split across any semi-colons. string = string.split(';') # Run through it, executing each command separately. string.each_index { |i| # Good for debugging. Then you don't have to connect to anything to try most stuff out. # Muby::InputWindow.get_instance.print string[i].lstrip + "\n" Muby::InputWindow.get_instance.send string[i].lstrip } false end This block of code works perfectly for all my purposes, where a regular "send" or "print" wouldn't be smart enough. Again, I'm not sure what led me to that code, but all my scripting relies on it. =) > > > conf.local_triggers[/test2/] = [:print, 'hehu'] > > > > This didn't work for me. I got: > > wrong number of arguments (2 for 1) > > Strange? Have you tried the latest version? And if it still breaks, > turn show_level to :debug and give me the backtrace. This works with the latest version. From sy1234 at gmail.com Mon Jul 31 13:07:13 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:07:13 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060731071518.GD5113@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> <20060730193750.GB19298@troja.ath.cx> <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> <20060731071518.GD5113@troja.ath.cx> Message-ID: <1e55af990607311007o175d215brf578a0dc743b2592@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > Strange, its all very quick to me :O > > But I optimized a tiny bit yesterday, see if it did any difference! Your correction of reload_application! allowed me to clean up some bad user scripting.. but it didn't make a difference for speed. I've tracked down the problem to one particular script.. but I'm completely in the dark as to what could be causing the issue. I'm still experimenting. From sy1234 at gmail.com Mon Jul 31 13:09:51 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:09:51 -0500 Subject: [Muby-talk] I recommend 0.6.0 be released In-Reply-To: <20060731071618.GF5113@troja.ath.cx> References: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> <20060731071618.GF5113@troja.ath.cx> Message-ID: <1e55af990607311009h1d072db5y8175222127a30f5a@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > You do the release whenever you want to :) I need permission. =p From zond at troja.ath.cx Mon Jul 31 13:18:47 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 19:18:47 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607310947x41e8acf7hb33cbc700aeb4e21@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> Message-ID: <20060731171847.GA16237@troja.ath.cx> On Mon, Jul 31, 2006 at 11:47:31AM -0500, Sy Ali wrote: > I don't remember why I use the get_instance anymore.. it solved an > issue with the method being called from within triggers, I think. I > do this now: > > def write(string) > string = ensure_s(string) > # Split across any semi-colons. > string = string.split(';') > # Run through it, executing each command separately. > string.each_index { |i| > # Good for debugging. Then you don't have to connect to anything > to try most stuff out. > # Muby::InputWindow.get_instance.print string[i].lstrip + "\n" > Muby::InputWindow.get_instance.send string[i].lstrip > } > false > end > > This block of code works perfectly for all my purposes, where a > regular "send" or "print" wouldn't be smart enough. > > Again, I'm not sure what led me to that code, but all my scripting > relies on it. =) I found out a nice way of making that part easier for you. I have renamed conf.substitutions conf.remote_substitutions, and added conf.local_substitutions. So, if you do conf.local_substitutions[/;/] = "\n" you would be able to write n;w;w;s;w;n;e and it would send the same thing, but with \n instead of ;. //Martin -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 13:19:10 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 19:19:10 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607311007o175d215brf578a0dc743b2592@mail.gmail.com> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> <20060730193750.GB19298@troja.ath.cx> <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> <20060731071518.GD5113@troja.ath.cx> <1e55af990607311007o175d215brf578a0dc743b2592@mail.gmail.com> Message-ID: <20060731171910.GB16237@troja.ath.cx> Show me the script, maybe I can help? //Martin On Mon, Jul 31, 2006 at 12:07:13PM -0500, Sy Ali wrote: > On 7/31/06, Martin Kihlgren wrote: > > > > Strange, its all very quick to me :O > > > > But I optimized a tiny bit yesterday, see if it did any difference! > > Your correction of reload_application! allowed me to clean up some bad > user scripting.. but it didn't make a difference for speed. > > I've tracked down the problem to one particular script.. but I'm > completely in the dark as to what could be causing the issue. I'm > still experimenting. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 13:20:04 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 19:20:04 +0200 Subject: [Muby-talk] I recommend 0.6.0 be released In-Reply-To: <1e55af990607311009h1d072db5y8175222127a30f5a@mail.gmail.com> References: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> <20060731071618.GF5113@troja.ath.cx> <1e55af990607311009h1d072db5y8175222127a30f5a@mail.gmail.com> Message-ID: <20060731172004.GC16237@troja.ath.cx> Are you sure? You are Senior Developer, and according to the admin page you have write permissions to the file release system... //Martin On Mon, Jul 31, 2006 at 12:09:51PM -0500, Sy Ali wrote: > On 7/31/06, Martin Kihlgren wrote: > > > > You do the release whenever you want to :) > > I need permission. =p > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From sy1234 at gmail.com Mon Jul 31 13:31:14 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:31:14 -0500 Subject: [Muby-talk] I recommend 0.6.0 be released In-Reply-To: <20060731172004.GC16237@troja.ath.cx> References: <1e55af990607301628k4cc3ecd3j4342df8d32fcc846@mail.gmail.com> <20060731071618.GF5113@troja.ath.cx> <1e55af990607311009h1d072db5y8175222127a30f5a@mail.gmail.com> <20060731172004.GC16237@troja.ath.cx> Message-ID: <1e55af990607311031g50d5f0f8ubadcddbc07ac9d9d@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > Are you sure? > > You are Senior Developer, and according to the admin page you have > write permissions to the file release system... Oh I see it now.. the interface is a bit different from what I'm used to. Ok, I'm doing a bit of testing quick, then I'll do a release. From sy1234 at gmail.com Mon Jul 31 13:33:22 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:33:22 -0500 Subject: [Muby-talk] disconnection issues (not flooding) In-Reply-To: <20060731082903.GA7693@troja.ath.cx> References: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> <20060731082903.GA7693@troja.ath.cx> Message-ID: <1e55af990607311033u170abe82r85d319096ad5129a@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > Ah, I solved it! I have reproduced the old flooding issue. The 'who' command on aardwolf will always disconnect. The workaround is to use an MCCP proxy. The issues with 'help aardeq' and 'explored' are indeed resolved, though. 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 From sy1234 at gmail.com Mon Jul 31 13:35:23 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:35:23 -0500 Subject: [Muby-talk] speed reduction since 0.5.5 In-Reply-To: <20060731071549.GE5113@troja.ath.cx> References: <1e55af990607301617u5a614639g2316c436034f453@mail.gmail.com> <20060731071549.GE5113@troja.ath.cx> Message-ID: <1e55af990607311035i448122b2y573a6c4005f3b603@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > > I'm going to do more testing and get back to you. I'm fairly sure > > it's a user-scripting thing. Until I refactor my user scripts, I'll > > assume that something of mine is broken. > > > > The volume of scripting -- triggers and gags -- wasn't a problem before. > > Could be it. Turn it all off and check what the difference is... I've been doing that.. and it seems to narrow down to that one file. I'll work on it some more later.. From sy1234 at gmail.com Mon Jul 31 13:36:50 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:36:50 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060731171910.GB16237@troja.ath.cx> References: <1e55af990607301134q6510aab3m2729f8de3fa401ba@mail.gmail.com> <1e55af990607301152x4139f9f9h4e1d7bd3f7a6ce96@mail.gmail.com> <20060730193750.GB19298@troja.ath.cx> <1e55af990607301449w3905c996iebe575500d08098f@mail.gmail.com> <20060731071518.GD5113@troja.ath.cx> <1e55af990607311007o175d215brf578a0dc743b2592@mail.gmail.com> <20060731171910.GB16237@troja.ath.cx> Message-ID: <1e55af990607311036h6165962uf2d825ae1857d501@mail.gmail.com> > On Mon, Jul 31, 2006 at 12:07:13PM -0500, Sy Ali wrote: > > On 7/31/06, Martin Kihlgren wrote: > > > > > > Strange, its all very quick to me :O > > > > > > But I optimized a tiny bit yesterday, see if it did any difference! > > > > Your correction of reload_application! allowed me to clean up some bad > > user scripting.. but it didn't make a difference for speed. > > > > I've tracked down the problem to one particular script.. but I'm > > completely in the dark as to what could be causing the issue. I'm > > still experimenting. On 7/31/06, Martin Kihlgren wrote: > > Show me the script, maybe I can help? Let me confirm my sanity before I waste your time. =) From sy1234 at gmail.com Mon Jul 31 13:45:02 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:45:02 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060731171847.GA16237@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> Message-ID: <1e55af990607311045n69fe8366me4a25c739a94f2ff@mail.gmail.com> On 7/31/06, Martin Kihlgren wrote: > I found out a nice way of making that part easier for you. > > I have renamed conf.substitutions conf.remote_substitutions, and added > conf.local_substitutions. I'm not typing these at the keyboard.. I'm copying-and-pasting them into the source code. That is a neat trick though, and a good way to show off substitutions. I'll get to documenting that after a release. From zond at troja.ath.cx Mon Jul 31 13:46:14 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 19:46:14 +0200 Subject: [Muby-talk] disconnection issues (not flooding) In-Reply-To: <1e55af990607311033u170abe82r85d319096ad5129a@mail.gmail.com> References: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> <20060731082903.GA7693@troja.ath.cx> <1e55af990607311033u170abe82r85d319096ad5129a@mail.gmail.com> Message-ID: <20060731174614.GA19763@troja.ath.cx> I cant break it by doing a 'who', not even if I hold down the enter key to flood myself with info :O //Martin On Mon, Jul 31, 2006 at 12:33:22PM -0500, Sy Ali wrote: > On 7/31/06, Martin Kihlgren wrote: > > > > Ah, I solved it! > > I have reproduced the old flooding issue. The 'who' command on > aardwolf will always disconnect. The workaround is to use an MCCP > proxy. > > The issues with 'help aardeq' and 'explored' are indeed resolved, though. > > 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 > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From zond at troja.ath.cx Mon Jul 31 13:47:18 2006 From: zond at troja.ath.cx (Martin Kihlgren) Date: Mon, 31 Jul 2006 19:47:18 +0200 Subject: [Muby-talk] next actions In-Reply-To: <1e55af990607311045n69fe8366me4a25c739a94f2ff@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> Message-ID: <20060731174718.GB19763@troja.ath.cx> 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... //Martin On Mon, Jul 31, 2006 at 12:45:02PM -0500, Sy Ali wrote: > On 7/31/06, Martin Kihlgren wrote: > > I found out a nice way of making that part easier for you. > > > > I have renamed conf.substitutions conf.remote_substitutions, and added > > conf.local_substitutions. > > I'm not typing these at the keyboard.. I'm copying-and-pasting them > into the source code. That is a neat trick though, and a good way to > show off substitutions. I'll get to documenting that after a release. > _______________________________________________ > muby-talk mailing list > muby-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/muby-talk > http://rubyforge.org/projects/muby/ -- ################################################################### Blow it out your ass! ################################################################### From sy1234 at gmail.com Mon Jul 31 13:49:52 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:49:52 -0500 Subject: [Muby-talk] receive Message-ID: <1e55af990607311049q6ed550dds777741efe81c8231@mail.gmail.com> Is it me, or is receive a little flaky at times? And what is the use of fake_connect anyway? I don't understand its use. 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. From sy1234 at gmail.com Mon Jul 31 13:57:50 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:57:50 -0500 Subject: [Muby-talk] 0.6.0 released Message-ID: <1e55af990607311057p460ef2acvd2af817c1458afe6@mail.gmail.com> Notes: Move your old rc file away, and muby will auto-generate a new one of the proper format. A lot of search/replace will be needed to get in line with the new user scripting style. But it's worth the work. Changes: * muby disconnects on Aardwolf with help aardeq or explored. o This is because all the print-functions in ncurses behave like printf in c - that is, they pay special attention to %-characters. o This may have affected any 0.5.x release. * Colour changes fixed a 0.5.x bug with not seeing dim colours. All global variables are gone. No more $s: * Configuration is done through the use of the Configuration class. It is most easily reached from the conf call. o Examples: + conf.echo = false + conf.connection_status = true + conf.gags << /my gagged text/ + conf.local_triggers[/say hello/] = Proc.new do |inwin, outwin, match| inwin.send("Hello!"); false end o If there is no configuration file present on startup, one is created for you with help comments and default settings. * Input window and output window are reached through the parameters sent to all called Procs. See above example. Many new commands are available, to help simplify the user experience: * send -- send text to the server. o This replaces any earlier concepts like "write" * echo -- echo text to the screen only if conf.echo == true * print -- echo text to the screen allways * receive "some text" o This replaces fake_send * conf.substitutions -- a Hash where the values will replace all matches of keys in text to be displayed from the server * print and echo both take any number of arguments, strings or color/style constants. o Examples: + /print RED, BOLD, "my red bold text ", NORMAL, "my normal red text" * Constants RED, BLUE, BOLD, UNDERLINE etc are created to simplify ANSI output. There may be other changes not noted here. The documentation is fairly complete. http://rubyforge.org/frs/download.php/12067/muby-0.6.0.tar.gz http://rubyforge.org/projects/muby/ http://jrandomhacker.info/Muby From sy1234 at gmail.com Mon Jul 31 13:59:15 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 12:59:15 -0500 Subject: [Muby-talk] disconnection issues (not flooding) In-Reply-To: <20060731174614.GA19763@troja.ath.cx> References: <1e55af990607302209u1aeb4d23hb31a17ec88cf06f4@mail.gmail.com> <20060731082903.GA7693@troja.ath.cx> <1e55af990607311033u170abe82r85d319096ad5129a@mail.gmail.com> <20060731174614.GA19763@troja.ath.cx> Message-ID: <1e55af990607311059i2cbeaa4bx7f4a97fdc39d4adc@mail.gmail.com> > 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... From sy1234 at gmail.com Mon Jul 31 14:01:19 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 13:01:19 -0500 Subject: [Muby-talk] next actions In-Reply-To: <20060731174718.GB19763@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> Message-ID: <1e55af990607311101n49b61d8fj1389475842c2f3bf@mail.gmail.com> 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. From sy1234 at gmail.com Mon Jul 31 19:32:13 2006 From: sy1234 at gmail.com (Sy Ali) Date: Mon, 31 Jul 2006 18:32:13 -0500 Subject: [Muby-talk] minor bug with scrollup/down not setting the message line Message-ID: <1e55af990607311632o5ce99de3qb457e5675f941dfa@mail.gmail.com> 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.