_________________ / Thu Apr 19 2007 \_____ Time | Dur | +gda/id | Owner | Fullname ------+-----+---------+------------------+--------------------------------- 16:00 | 2h | jg1gbx | Walker | Ruby Bot programming tutorial. A simple tutorial on writing a ruby bot, aimed at beginning programmers and those new to bot writing. Stage 1) Install Ruby and Interactive Ruby. Stage 2) Connect to M*U*S*H and say hello with your bot. Stage 3) Writing a script for your bot. Stage 4) Using WalkerBot. Stage 5) Adding Modules to WalkerBot. For those interested in getting a brief start on Ruby before this, I recommend the 15 minute tutorial at http://tryruby.hobix.com ----------------------------------------------------------------------- Trinsec wishes it wasn't so late. "I'm kinda in the mood of crawling into bed, and watch inu yasha episodes and then fall asleep. :P" Walker says, "So sorry. I made it as early as I could." Trinsec says, "Yeah, I know." Walker says, "Ok, let's go." Xeiran applauds. Walker says, "First of all, I want to cover what this is and isn't." Walker says, "I'm not here to teach you how to program in Ruby." Walker says, "As stated, I have 5 stages. 1) Install Ruby. 2) Using 'irb' ('Interactive Ruby'), connect to M*U*S*H and say hello. 3) And using that skill to write a very simple script." Walker says, "After stage 3, you'll have time to play with ruby and your bot, then we'll cover my own WalkerBot script, which you can download and install on your system. STage 4) covers downloading, installing, and interacting with, while stage 5 covers writing new plugins." Walker says, "I have players pre-created for you to use for making bots." Walker says, "For now, let's get onto stage 1. If everyone could please just say what OS they're using: Windows, Linux or Mac OS X?" Xeiran says, "Windows XP Pro" Cheetah says, "Gentoo Linux, Ruby firmly installed for ages ;>" Êlvïrå says, "Windows baybee!" Langley says, "Windows here too." Walker says, "Ok, Windows users please go to: http://rubyforge.org/projects/rubyinstaller/" Caelum emerges from the Linux Lobby. Walker restates for Cae: Walker says, "Ok, Windows users please go to: http://rubyforge.org/projects/rubyinstaller/" Langley is code ignorant and is here logging for a frend that couldn't be here. ;) Walker says, "Langley: I aim this to be interactive - you'll be making your bots as I say how." Xeiran says, "I assume we download the one-click installer, Walker?" Cheetah says, "(The logs will be on mush.pennmush.org along with the others, regardless.)" Walker says, "Yes, download the one click installer and install. It comes with everything you need for a simple bot." Walker says, "Linux and OS X users should already have Ruby installed" Jules says, "Wait, is that the little envelope?" Cheetah says, "Or install it via package management if it's not." Walker says, "No, it's the "download" link to the right of "One-Click Installer - Windows"" Sketch says, "What should I apt-get? :P -cache search gets me.. 'n' packages." Walker says, "http://rubyforge.org/frs/download.php/18566/ruby186-25.exe" Walker says, "If you want it for Windows and are too lazy to browse ;)" Sketch scratches his head. I'm darned sure I have ruby. Where'd it go? <_< Trinsec returns from potty. "Eh.. linux." Cheetah says, "Being apt, probably ruby?" Walker says, "Sketch: Debian or Ubuntu?" Sketch says, "Deb." Caelum says, "ruby1.9 probably" Sketch says, "Thanks." Trinsec says, "I oughta have mine already installed though." Walker says, "apt-get install ruby1.9 rdoc1.9 irb1.9, if my memory's right." Walker says, "Ditto for Ubuntu" Raëvnos says, "Will 1.8 work?" Walker says, "Yes" Walker says, "irb, by the way, is interactive ruby. It lets you type in ruby code and have it evaluated and its return value printed for you. When you type in code, it will print "=> " - That's the 'return value'." Walker says, "The names of the precreated bot characters are: Thorin Balin Fili Kili Dori Nori Ori Oin Gloin Bifur Bofur Bombur" Walker says, "Call dibs if you want, first come first serve ;)." nails emerges from the Linux Lobby. nails has arrived. Jules calls Thorin. Sketch says, "Nori!" Trinsec says, "Oin?" Cheetah says, "Balin." Walker says, "Nails: Install Ruby (http://rubyforge.org/frs/download.php/18566/ruby186-25.exe for windows), and pick one of the "The Hobbit" dwarves that hasn't already been picked. ;)" Êlvïrå installs da Ruby Walker says, "How is everyone coming with the Ruby install process?" Xeiran says, "Gloin, I think :)" Sketch says, "Got it." Trinsec says, "My linux one probably is laready installed, but the windows one takes its sweet time." Cheetah finished days ago? ;> Trinsec says, "Of course, that box is doing heavy duty other stuff atm too, so eh." Raëvnos says, "Wait. Ruby? Ooops. I was installing Emerald." Walker smirks at Raev. Xeiran says, "I want SciTE and RubyGems, right?" Walker says, "Neither are crucial to this, but SciTE is a nifty programmer's editor (if you're not a vim or emacs fan), and RubyGems is the de facto ruby "packaging" system that rubyists either love or hate. (I'm in the latter camp :D)" Xeiran says, "Well, since you hate it, I think I'll install it to see what it is :)" Walker says, "SciTE is an editor that does syntax hilighting for a great many languages, Ruby just being one of them." Trinsec says, "Sounds sensible." Walker says, "Anyone I need to wait for to finish installing Ruby?" Trinsec says, "My windows version still is installing." Xeiran says, "Installed" Langley is installed, but really really would rather watch. "I'm extremely intimidated by code." Jules files his nails while Ruby installs. Trinsec says, "Oh wow, it's going faster now taht the network copying is done Ought to be done soon." Jules says, "Best way to overcome fear is to face it." Cheetah doesn't think nails appreciates that, Jules. Walker says, "You'll have fun, Langley, I guarantee it (or your money back! :-P)" Êlvïrå says, "it's still installing for me" Trinsec says, "Windows ruby is installed now." Êlvïrå says, "almost there though" Jules ok Walker says, "Now everyone start up an Interactive Ruby (irb) session" Walker says, "On OSX and Linux, it's simply "irb" at the prompt" Sketch says, "Or in the case of Debian, 'irb1.9'. Wow. :p" Walker says, "On Windows, you need to look through the start menu and find 'irb'" Trinsec says, "Lies. I'm using debian and just type 'irb'." Sketch says, "Hm." Trinsec says, "1.8 though." Walker chuckles. "Trin, you probably have 1.8. Regardless, it makes no difference for this class." Walker nods. Jules can't seem to find 'irb', or anything that might be an 'irb'. Walker says, "So, everyone here have IRB open?" Êlvïrå neither Xeiran says, "The name on Windows is fxri - Interactive Ruby Help & Console" Jules says, "Now /that/, I have." Trinsec says, "In windows? go to start>programs>ruby-186-25>irb" Êlvïrå says, "scite or frxi" Êlvïrå aha Walker says, "Or what Trinsec said. 'ri' is a kind of ruby man page, so 'fxri' doesn't sound like it." Trinsec says, "It got 'effects' in it. fx, you know." Walker checks, "Yup, fxri isn't it. 'fx' is a windowing toolkit, FXRuby, a layer over Fox GUI kits." Cheetah thinks they just mean 'fix ri'. Trinsec giggles. Walker says, "You want irb, which as Trinsec said, is start->Programs->Ruby-186-25->irb" Trinsec says, "fxri - interactive blah is rbi" Trinsec says, "err, irb" Walker says, "It is? Odd, because google says it's just an interface to irb." Walker says, "regardless, if you type "2+2" in there, you should get "=> 4"" Trinsec says, "I get a nice interface where I can type stuff as if in linux irb" Trinsec says, "It does" Walker says, "Ok, is everyone in IRB?" Sketch says, "Neet." Langley thinks so. Walker says, "(Or FXRI)" Trinsec is doubly in IRB (linux and windows) Walker says, "Now, the first thing you need to do: type: require 'socket'" Sketch says, "TRUE!" Walker says, "That tells Ruby to load the 'socket' library, which we need to make a socket to connect to M*U*S*H with." Walker says, "If it returns anything other than 'true', let me know." Trinsec's windows IRB false on that. Jules gets false. Langley gets false too. Walker hrms. nails says, "sockets is false, we say!" nails says, "tricksy and false!" Walker says, "If you type: "Socket" (without the quotes), what does it return?" Trinsec says, "=> Socket" Walker says, "Good, it looks like fxri already has ruby include it on load" Xeiran says, "Socket must be capitalized, correct?" Walker says, "Yes" Xeiran says, "Okay." Trinsec says, "But not in the 'require' part?" Walker says, "'socket' is the file name, 'Socket' is the class name." Xeiran says, "Makes sense." Molikai emerges from the Linux Lobby. Xeiran says, "Could you theoretically change the case on the filename and still get the right file, or are they case-sensitive too?" Walker says, "On windows, they may be case insensitive. On linux, they're case sensitive." Xeiran says, "Just checked on windows; it doesn't like it when you require 'SOCKET'" Walker says, "Molikai: Install ruby (http://rubyforge.org/frs/download.php/18566/ruby186-25.exe if you're on windows), and open 'irb' (or 'fxri' on windows)" Cheetah says, "They'll be case sensitive on unix, not sure windows, but it's bad juju for compatibility to use it even if it works." Walker nods at Cheetah. Walker says, "Ok, now, let's get you connected to M*U*S*H." Walker says, "type: "client = TCPSocket.new('mush.pennmush.org',4201)"" Walker says, "(Not including the double quotes)" Walker says, "You should see: "=> #"" Trinsec confirms doubly. Walker says, "Next, type: "client.puts 'connect rubybot'"" Sketch says, "BOT-BUDDY! :D" Trinsec logged in doubly. ;) Xeiran hugs Gloin! Trinsec patpats Oin. Nori says, "DO-O-MO A-RI-GA-TO-U!" Trinsec giggles at 'who'. Thorin dances for Jules, his master! Balin says, "Bot-boys in da house." Jules sweet. Raëvnos says, "What if you're not using one of your bot players? Something like: client.puts 'connect Walker iamagodinbed'?" Walker says, "Yup." Jules realizes the bot does not 'see' anything. Hm. Cheetah says, "Walker will be getting to that ;)" Trinsec says, "Useful, now you don't get spammed to death. ;)" Walker says, "Try this: puts client.readline" Jules says, "Uh oh, I sense spamminess in the future." Xeiran says, "Walker, what is the puts method?" Raëvnos says, "PUT String." Cheetah says, "(Techie note: The weird scharacters at the start are part of telnet negotiation.)" Walker says, "The 'puts' method is a print method that adds a newline, either "\n" or "\r\n" as appropriate. In telnet's case, it adds "\r\n"" Gloin beats up all the other dwarves. Walker says, "Obviously, y'all are having fun with: client.puts """ Walker says, "Such as: client.puts "say Ruby is cool"" Bombur says, "Ruby is cool" Oin smacks Gloin. Gloin says, "Walker is a talking head." Oin oinks. Bofur tugs on Gloin's beard. Walker says, "Tada, we've completed stage 2. Now let's put this into making a short script." Walker says, "We'll make it 'wave' when it hears its name." Balin says, "I don't want to wave." Xeiran says, "Oops." Molikai is still installing. ;) Xeiran says, "I "readlined" too much, and now irb looks frozen" Xeiran says, "Ah, nevermind." Cheetah says, "Xeiran: Wait until it 'hears' more." Cheetah says, "Us techies say that the readline method 'blocks'." Langley is, as he figured he would be, hopelessly lost! Cheetah says, "(Which translates to 'if it ain't got a line it just sits there'.)" Xeiran says, "I see... is there any way to escape from it?" Oin says, "Oh bollocks."" Walker says, "You can use "ctrl+c", Xeiran." Cheetah says, "Yeah. I think Walker will get to that, too ;)" Xeiran says, "Don't think ctrl-C escapes in a windows app" Xeiran hrms. Walker says, "Try in fxri." Raëvnos says, "ctrl-d or ctrl-z" Walker says, "And it's not escape, it needs to break." Xeiran says, "Ah, there we go" Gloin says, "Phew." Walker says, "Anyway, using SciTE or your favorite editor, create a file called simple_client.rb" Walker says, "This is my simple script:" Sketch facepalms. Walker says, "http://walker.pennmush.org/walkerbot/mudbot/simple_client_01.rb" Trinsec uses scite to see what it's like Jules says, "do you want us to copy your script?" Walker says, "If you like. This is the basis I'll be using." Walker waves to bombur Bombur waves Walker says, "bots are cool" Bombur says, "yes they are" Walker says, "Don't forget - change 'bombur' to your own bot's name ;)" Trinsec says, "That whole file?" Trinsec says, "Do the bots have to relogin?" Walker says, "The lines beginning with '#' are comments." Walker says, "They don't have to, since Penn allows multiple reconnects ;)." Cheetah waves to Balin. Balin refuses to wave :P Walker waves to Balin. Balin refuses to wave :P Walker says, "Of course, feel free to change things. ;)" Molikai tries to figure out how t ocatch up.... Cheetah says, "Yeah. Bots are cool." Bombur says, "yes they are" Balin says, "Hmph." Walker says, "Molikai: Do you have ruby installed?" Molikai says, "Yep." Walker says, "Do you have 'fxri' or 'irb' open?" Molikai opens FXRI. Jules says, "Wait, how and what the reload thing?" Trinsec has the .rb file now, then what? Walker hms? at Jules? Cheetah says, "Reload that link Walker gave you (in your browser or such)." Jules points at Trinsec Cheetah says, "Transfer contents to file." Walker nods at Cheetah nails waves to Bombur. Bombur waves Sketch says, "Whee." nails waves to Nori. Nori waves nails says, "bots are cool" Nori says, "yes they are" Balin says, "Hmph." Trinsec says, "It's in a file, but then what?" Walker says, "On linux, type: "ruby simple_client.rb"" Jules waves to Thorin Walker says, "On windows, probably double click." Cheetah says, "Then probably doubleclick in Windows." Walker says, "Jules, are you running the simple_client.rb script I linked to?" Jules waves to Thorin Xeiran waves to Gloin Xeiran waves to Gloin. Cheetah says, "Also, in Linux, you can chmod +x simple_client.rb, then run ./simple_client.rb as if it were any old executable." Jules is attempting to, but not doing so well. :) Walker says, "Oh dear, folks - remember to change 'Bombur' to your bot's name ;)" Trinsec mrm. Trinsec says, "Bots are cool" Nori says, "yes they are" Balin says, "Hmph." Gloin says, "yes they are" Oin says, "yes they are, and especially me" Walker waves to bombur. Bombur waves Trinsec waves to oin Oin flails with his arms Xeiran says, "Bots are cool." Bombur says, "yes they are" Balin says, "Hmph." Thorin says, "yes they are" Oin says, "yes they are, and especially me" Trinsec says, "In windows it started a terminalish session of ruby" nails says, "Oh ho ho." Jules yay! Xeiran says, "Bots are cool." Nori says, "yes they are" Gloin says, "Yes they are, but I'm better than Oin." Oin says, "yes they are, and especially me" Balin says, "Shut up, Oin." Trinsec lols. Jules ROFL Sketch cackles! Walker says, "Fun, ain't it?" Walker says, "Now let's play with regexps." Jules laughs. Xeiran waves to Gloin Xeiran waves to Gloin. Xeiran says, "waves to Gloin" Walker waves to Bombur Bombur waves to walker Trinsec waves to oin Walker says, "If you'll check this script, you'll see I made a change to the "when /waves to bombur/" line" Walker says, "http://walker.pennmush.org/walkerbot/mudbot/simple_client_02.rb" Xeiran waves to Gloin Xeiran waves to Gloin. Walker says, "It's been changed to: "/(.*) waves to bombur/"" Bombur waves to walker says, "it's been changed to: "/(.*) Trinsec says, "oh" Xeiran waves to Gloin. Gloin waves Xeiran says, "What are the parenthesis for?" Walker says, "This makes it match a pattern, much like regexp (Hope you folks remember Cheetah's lecture!)" Walker says, "It makes it a capturing "pattern", Xeiran" Trinsec waves to oin Oin flails arms to trinsec Walker says, ".* will match 'walker', but Ruby won't remember it unless you put it in ()" Xeiran says, "I see, okay." Walker says, "The first () will be $1, the second () will be $2, etc" Xeiran says, "What about the period?" Sketch says, "'any character'." Walker says, "It's a regexp character that means "any character"" Xeiran says, "Why can't you use (*)?" Trinsec hehes and thinks Xeiran should check up chee's regexp lecture Walker says, "I won't cover regexps here, you can read Cheetah's tutorial" Jules does a handstand Thorin waves to jules Xeiran says, "Ok" Jules dances and then does a handstand. Thorin waves to jules dances and then Trinsec says, "Bots are cool" Bombur says, "yes they are" Gloin says, "Yes they are, but I'm better than Oin." Oin says, "yes they are, and especially me (poo on you, Balin)" Walker says, "You can do a great many things like this." Jules muses the possibilities already. Trinsec muses the spam. Xeiran waves to gloin Jules formulates RubyNet. Cheetah waves to Balin. Gloin waves back at $1. Balin refuses to wave to cheetah :P Trinsec laughs. Walker says, "Xeiran: If you want to use "infix" strings, you can use #{...}" Walker says, "Such as: "pose waves back at #{$1}"" Walker says, "It's identical to: 'pose waves back at ' + $1" Cheetah says, "Aha, that'll get rid of that ugly "foo " + bar + " baz"" Sketch waves at Nori. Sketch waves at nori. Xeiran waves at Gloin. Sketch waves to nori Nori waves back at sketch Sketch woo. Xeiran waves to Gloin. Gloin waves back at xeiran. Cheetah waves to Balin. Balin refuses to wave to cheetah :P Trinsec waves to oin Oin flails arms to trinsec Trinsec says, "My dwarf is violent." Walker grins. Trinsec says, "How'd you load a script in linux again?" Molikai is going to sit quietly and watch, ask politely for a log, then play with this later, I think. :) Xeiran waves to Gloin. Gloin waves back to xeiran. Xeiran waves at Gloin. Gloin waves back at xeiran. Walker says, "Trinsec: type 'ruby simple_client.rb'" nails is testing elsemu. nails >> You paged goop with 'you are fat' Xeiran says, "Here we go, so now Gloin can wave whether you wave 'at' him or 'to' him" nails >> goop pages: I agree that you are fat nails says, "my bot is mean :(" Cheetah says, "when /(.*) waves (to|at) balin/" Walker grins. Xeiran says, "Ah, much better Cheetah" Walker says, "Nails, if you want to test here, you can use Kili, Dori, Ori, Bifur or Bofur" Xeiran says, "Because right now..." Walker says, "All with password "rubybot"" Xeiran waves up Gloin. Gloin waves back up xeiran. Sketch says, "Bots are cool" Nori says, "yes they are" Gloin says, "Yes they are, but I'm better than Oin." Oin says, "yes they are, and especially me (poo on you, Balin)" Balin says, "Shut up, oin." Sketch cackles. Walker says, "I'm going to stick the intermission here, folks. Ask questions, play with your bots, add features." Trinsec waves to oin. Oin flails arms to trinsec harrr Oin flails arms to trinsec Walker says, "When I get back, we'll add a few suggested features to our bots that make them more than just toys." Jules says, "Do you think there's a possibility of a RubyNet? Like MUDNet, except it doesn't suck?" Trinsec has oin now under windows and linux with that script Sketch says, "YOUR MOM!" Nori points at sketch, "No, YOUR mom!" Walker says, "I started one, Jules, but then decided it wasn't worth the bother ;)" Trinsec says, "So, is the screen under linux also stuck while the script is running or?" Sketch glee. Jules wonders why not, Walker? Walker says, "You can background it, Trinsec, by typing "&"" Walker says, "Personal preference, Jules ;)." Trinsec says, "When?" nails is fond of MudTape. Walker says, "ruby simple_client.rb &" Trinsec says, "cool, and how do you end that script then?" Cheetah says, "kill" Trinsec checks ps.. ah ok. Trinsec says, "Easy enough to identify." Walker says, "Test" Walker says, "Now now, who's doing that? ;)" Trinsec says, "Doing what?" Sketch points at nori, "YOUR MOM!" Nori points at sketch points at, "No, YOUR mom!" Walker says, "@emiting that I said "test"" Sketch points at nori, "No, YOUR mom!" Walker says, "Or @pemiting to me, either one." Sketch aww. :/ Trinsec says, "Dunno" nails saw the emit. Walker says, "Test" Gloin mimics Walker mockingly. Walker says, "Test" Gloin mimics Walker mockingly. Xeiran :> Walker baps Xeiran. Walker says, "No spoofing me, please ;)." Gloin mimics Walker mockingly. Sync: Time: Thu Apr 19 14:00:01 2007 Mail: 0/106 Idle: 2s Puppets: Kickaha Nicker Rei Shadowfax Trinsec would be interested in rubynet heh Sketch says, "YoUr MoM" Nori points at sketch, "No, YOUR mom!" Balin says, "Shut up, William." Sketch cackles! Sketch gets the hint. :) Hee. Walker watches everyone make their bots interact in a kind of orchestrated play that would make Shakespear spin in his grave. Walker adds an 'e' to Shakespear to get the proper spelling. Raëvnos says, "Shakespear is perfectly acceptable. The man didn't spell his name the same way twice." Sketch says, "To be, or not to be...THAT is the question." your mom Cheetah says, "Shakefist." Trinsec thinks the log of this lecture will be.. uh. spammy? :) Walker grins at Trinsec. Xeiran says, "Man" Xeiran says, "My code won't load ;(" Walker says, "Do you have an error for it?" Xeiran says, "Not usre" Xeiran says, "Sure" Balin refuses to wave to god :P Walker says, "Try opening a 'cmd' window, and running: "ruby simple_client.rb" from there" Walker says, "In the correct directory, of course." Bombur waves to god Balin refuses to wave to god :P Oin flails arms to god harrr Trinsec blinks. Trinsec checks her script. Molikai grins. "Fooling with Pemits, to see if they would work." Trinsec says, "Oh" Trinsec says, "Of course they would" Trinsec says, "They see it" Xeiran says, "There's no previous pattern, to which * would identify cardinality" Walker says, "To a bot, a pemit is no different than a pose/etc. ;)" Xeiran says, "Er, define cardinality" Sketch says, "'*' isn't a wildcard. :)" Sketch says, "You'd need to do '.*'" Walker recommends reading Cheetah's regexp lecture, after this. Walker idles to make a drink real quick. Xeiran says, "your mom" Balin says, "Shut up, William." Sketch cackles.. Xeiran says, "YoUr MoM" Balin says, "Shut up, William." Cheetah says, "Balin, how's the weather?" Sketch points at Balin, "YOUR mom!" Balin says, "Shut up, William." Trinsec says, "your mom!" Balin says, "Shut up, William." Nori says, "No, YOUR mom!" Sketch says, "..What? ;)" Sketch says, "Nori isn't connected!" Xeiran says, "Sorry, testing a trigger :(" Cheetah says, "Balin, how's the weather?" Balin says, "Lalala, I didn't hear cheetah say anything like 'how's the weather?'." Nori says, "No, YOUR mom!" Cheetah says, "Balin, talk to me man." Balin says, "Lemme alone, cheetah." Nori says, "No, YOUR mom!" Molikai says, "Balin, your fly is undone." Balin puts his fingers in his ears. Trinsec says, "Your mom" Balin says, "Shut up, William." Xeiran says, "Well this is great" Êlvïrå says, "your mum" Êlvïrå says, "ah, doesn't understand British ;)" Trinsec says, "Your mom" Balin says, "Shut up, William." Oin says, "What has shakespeare done this time?" Trinsec says, "Ahh finally" Xeiran says, "Now we can make our bots do everything we've ever wanted to do but have been afraid to because of social reasons!" Trinsec smirks. Xeiran says, "These bots act like children :D" Gloin says, "I'M NOT IMMATURE!!!" Molikai says, "Balin, the cops are coming for you!" Balin puts his fingers in his ears. Molikai says, "Balin, They're gonna shoot you!" Trinsec shakes her head. Balin puts his fingers in his ears. Trinsec says, "Balin, u r suck" Molikai says, "He doesn't like me, it seems." Balin says, "Lemme alone, trinsec." Molikai says, "Balin? Put your fingers in your ears if you blow goats." Molikai says, "Sensible bot." Xeiran says, "Balin, put your fingers in your ears if Molikai is weird." Balin says, "Lalala, I didn't hear xeiran say anything like 'put your fingers in your ears if molikai is weird.'." Molikai smirks. "And Im' not weird: I'm scottish. Trinsec says, "Oin?" Cheetah waves at Balin. Balin refuses to wave to Cheetah :P Molikai waves for Balin. Molikai waves to Balin. Balin refuses to wave to Molikai :P Molikai waves at Balin. Balin refuses to wave to Molikai :P Cheetah says, "There, got rid of that dreadful lowercase thing." Trinsec says, "Oin?" Trinsec mehs, probably the ? mucking the regexp Trinsec already escaped it out Cheetah says, "What's it look like now?" Xeiran says, "gloin, die" Gloin says, "NO WAY!" Xeiran says, "die" Trinsec says, "when /(.*) "Oin\?"/" Cheetah says, "The O never matches." Trinsec says, "case sensitive?" Xeiran says, "Because it's lowercased" Cheetah says, "You're lowercasing everything first." Trinsec says, "Oin?" Trinsec says, "oin?" Cheetah says, "Courtesy of Walker's example." nails says, "do you need to escape the "s?" Xeiran >> line = client.readline Xeiran >> line.downcase Trinsec says, "oin?" Oin says, "Yes?" Cheetah says, "No, it gets lowercased /after/ it's said, so uppercase chars never match ;)" Trinsec says, "Oink!" Cheetah says, "Oin?" Oin says, "Yes?" Trinsec says, "oink" Trinsec says, "Ok what's wrong with /(.*) oink/" Oin says, "RAAAAR!" Trinsec says, "NOW it works, huh :P" Xeiran says, "gloin, die" Gloin says, "Never," Cheetah oinkoint? Oin says, "RAAAAR!" Trinsec says, "Oh wait" Trinsec got it Walker returns to mucho spam. ;). Xeiran says, "How do I carry on a variable to within a case?" Walker says, "Y'all having fun? =)" Trinsec says, "Bit too much" Trinsec says, "Oin?" Oin says, "Yes?" Trinsec says, "Oink!" Oin says, "RAAAAR!" Trinsec giggles. Cheetah says, "Balin is hating it." Cheetah says, "Balin, isn't that right?" Balin puts his fingers in his ears. Trinsec says, "Oin's not too happy either ;)" Xeiran says, "I have it so Gloin listens to "gloin, (.*)" but he can't grab the name of the person who said it" Trinsec says, "well you'll have to put something in front whre '' comes from" Cheetah says, "(.*) says, "..." Xeiran says, "Yes, I understand that" Xeiran says, "But I can't use the $1 to refer to it within the case" Walker says, "Xeiran, what's the entire "when" line?" Xeiran >> when /(.*) says, "gloin, (.*)"/ Xeiran >> case $2 Xeiran >> when /die/ Xeiran >> client.puts "say Never, #$1" Xeiran >> end Trinsec says, "It's greedy?" Cheetah says, "The second // eats the matches from the first." Xeiran says, "I see" Xeiran says, "So I could like make a new local string within the case that carries the $1" Walker says, "Not exactly" Walker says, "Since 'when' are exclusives" Walker says, "If it matches the first, it'll never match the second" Walker says, "Let's change the script to do what you want" Cheetah says, "Case, Walker." Cheetah says, "Nesting cases." Cheetah says, "Surely that works?" Xeiran says, "Gloin, die!" Gloin says, "Never, #name" Xeiran says, "Oops :D" [Nethack] & -> P -> P Jules woot. Trinsec knows enough of how to run a script under linux and goes focus on windows one for ease now. [Nethack] & -> P -> P Jules has just about every intrinsic. [Nethack] You displaced your Cheetah says, "Unchanging?" [Nethack] You displaced your Cheetah says, "Stoning resist?" Walker says, "Bombur, salute!" Xeiran says, "gloin, die" Bombur salutes walker! Gloin says, "Never, xeiran" Xeiran says, "HOORAY" Walker says, "Bombur, reverse hello" Bombur says, "olleh" Sketch returns... Walker says, "If you'll check the new script:" Molikai says, "Bombur, reverse tsaot" Walker says, "http://walker.pennmush.org/walkerbot/simple_client_03.rb" Bombur says, "toast" Walker says, "I have it doing something new." Cheetah says, "Bombur, reverse !dnim ym htiw gnissem si reklaW ,pleH" Bombur says, "help, walker is messing with my mind!" Sketch says, "reverse oof" reverse oof Walker says, "First, it makes sure that you're talking to him: By making sure that what it sees matches the string, "(.*) says, "bombur, (.*)""" Xeiran says, "Bombur, reverse !eid ,niolG" Bombur says, "gloin, die!" Gloin says, "Never, bombur" Walker says, "It stores $1 as the 'who' for who gave the command, and $2 as the "command"" Sketch says, "Nori, reverse foo" Nori says, "oof" Walker says, "Bombur, reverse looc era stob" Bombur says, "bots are cool" Thorin says, "yes they are" Gloin says, "Yes they are, but I'm better than Oin." Oin says, "yes they are, and especially me (poo on you, Balin)" Balin says, "Shut up, Oin." Sketch cackles! Walker says, "This is very close to how WalkerBot works." Xeiran says, "I don't understand" Xeiran says, "How does this work:" Xeiran >> next unless line =~ /^(.*) says, "bombur, (.*)"/ Cheetah says, "Bombur, reverse em yllaicepse dna ,era yeht sey" Bombur says, "yes they are, and especially me" Balin says, "Shut up, Bombur." Balin says, "Shut up, Thorin." Trinsec says, "oin, salute" Jules browlifts. Sketch says, "I think 'next' is like 'continue' in C" Xeiran says, "What are caret symbols for?" Trinsec says, "Regexp start of line" Walker says, "The 'next' in this case means: "Skip this portion of the loop and go back to read the next line"" Trinsec says, "start of match" Trinsec says, "oin, salute!" Oin waves to trinsec Trinsec says, "oin, reverse wahwah" Oin says, "hawhaw" Walker says, "So "next unless ..." means "Unless ... is true, skip the rest of this loop"" Xeiran says, "Gotcha" Sketch says, "Nori, reverse racecar" Nori says, "racecar" Walker makes it a little clearer by using 'if' instead of next Walker says, "http://walker.pennmush.org/walkerbot/mudbot/simple_client_04.rb" Xeiran says, "So it's like an if(!true) continue; statement" Sketch says, "Ja." Walker says, "Right" Walker says, "Bombur, reverse racecar esrever ,iroN" Bombur says, "nori, reverse racecar" Nori says, "racecar" Trinsec says, "heh" Walker says, "Jules, don't forget to replace "bombur" with "thorin" ;)" Sketch hmm. Xeiran says, "Why do we need ^?" Cheetah says, "Or Balin will mutter at him." Walker says, "Just regexp niceness." Xeiran says, "What would happen without it?" Sketch says, "Nori, reverse abcde" Nori says, "emm0dcm13ba" Walker says, "In this case, probably nothing." Trinsec hehs Sketch says, "How delightful. :D" Walker says, "But I like to stay in the habit of writing well done regexps ;)" Walker says, "Thorin, salute!" Thorin waves to walker Xeiran says, "Indeed." Xeiran says, "I really should read that logs" Xeiran says, "Log even." Cheetah says, "You should ;)" Cheetah says, "" Trinsec says, "oin, reverse reverse double" Oin says, "double" Walker grins. Trinsec says, "oin, reverse reverse hi" Walker grins at Trinsec. Oin says, "1;31mhi0mm" Walker says, "Obviously, the bots don't grok ansi ;)" Jules boggle. Trinsec hehes. Xeiran says, "How do I use a regexp to only gather one word, like with spaces around it?" Cheetah says, "Depends." Walker says, "Can you give an example?" Xeiran says, "I really should "" Xeiran says, "If I could get "really"" Xeiran says, "But only if that word is one word" Cheetah says, "\b(.*?)\b may or may not be what you want." Xeiran says, "Ok" Xeiran says, "What are the question marks for?" Cheetah says, "Non-greedy." Trinsec says, "Again, regexp lecture ;)" Walker says, "Making it non greedy. Read the log, we'll not cover it here :D" Xeiran says, "Greedy means picking up a ton, right?" Sketch says, "Right." Walker says, "Means picking up as much as it can" Xeiran says, "Roger." Walker says, "Now let's make these scripts useful. Does anyone have anything on the internet that they might want to check or use through mush? (Keep it simple, so we can do it in several minutes ;)" Trinsec says, "Google!" Xeiran says, "Cortex Command RSS" Cheetah says, "METAR stations ;>" Sketch says, "Subversion control!" Trinsec knows nothing about all those other suggestions Sketch tries to think of something non-insane, now. Cheetah says, "Weather conditions." Trinsec would just look outside for /that/ Xeiran says, "I should jump off a cliff." Jules says, "Another MUSH. :D" Sketch says, "AH! Got one!" Xeiran says, "gloin, I should jump off a cliff." Cheetah says, "Yeah, Trin, but I'm lazy." Sketch says, "YOUR MOM!" Balin says, "Shut up, William." Nori says, "No, YOUR mom!" Xeiran says, "gloin, I should jump off a cliff." Gloin says, "Yeah xeiran, you really should." Sketch is out of ideas now. Sketch says, "Hm." Xeiran says, "gloin, I really should be nice." Gloin says, "Yeah xeiran, you really should." Sketch says, "How about commandline/MUSH interface?" Molikai says, "Whether someone has updated a webjournal? :)" Xeiran says, "gloin, I really blah blah should be nice." Gloin says, "Yeah xeiran, you really should." Sketch says, "That'd be kinda neat. :)" Walker says, "Preferably, let's stick with something that has an RSS feed, at most." Walker grins. Xeiran says, "Walker, I have one" Walker says, "Shoot, Xeiran" Cheetah says, "Gloin, I really think you should shush a bit." Gloin says, "Yeah cheetah, you really should." Cheetah says, "Drat ;>" Trinsec snickers Xeiran says, "www.datarealms.com/devlog" Molikai says, "was gonna say: THe BBS news headlines come in an RSS feed, I think." Molikai says, "BBS? BBC." Cheetah says, "They do." Trinsec sleepy. Molikai says, "Yep! http://news.bbc.co.uk/1/hi/help/3223484.stm" Trinsec says, "Let's get something doing before I snooze." Walker says, "datarealms.com seems to be too slow for me to access, Xei." Walker checks BBC rss Xeiran says, "http://feeds.feedburner.com/datarealms?format=xml" Sketch attempts to think of something cool. Xeiran says, "gloin, sketch is mean" Gloin says, "Okay, I'll remember that, xeiran." Sketch . o O ( *FAILURE!* >:O ) Sketch says, "I've got nothin'." Xeiran says, "gloin, what is sketch like?" Gloin says, "Sketch is mean, from what I hear." Sketch says, "'mean' like... average?" Xeiran says, "gloin, sketch is terrifying." Gloin says, "Okay, I'll remember that, xeiran." Xeiran says, "gloin, what is sketch like?" Gloin says, "Sketch is terrifying., from what I hear." Sketch says, "Nice." Walker says, "Bombur, fetch datarealms titles" Walker hms. Walker says, "Bombur, salute!" Bombur salutes walker! Xeiran says, "gloin, what is sketch like?" Walker says, "Bombur, fetch datarealms titles" Bombur says, "fetching!" Bombur says, "parsing!" Cheetah says, "Did you, like, figure out hashes, Xeiran?" Xeiran says, "Eh Cheetah?" Sketch says, "Variable, Chee?" Cheetah says, "How are you storing stuff? ;)" Xeiran says, "Oh, I'm just fooling around, I'm not sure what I'm doing" Sketch says, "you're particularly good at it.." Xeiran says, "gloin, sketch is fond of dolphins" Gloin says, "Okay, I'll remember that, xeiran." Xeiran says, "gloin, what is sketch like?" Gloin says, "Sketch is fond of dolphins, from what xeirantells me." Sketch heh! Cheetah says, "Yeah Sketch, but a 'simple' variable holds only one entry." Walker forgot the 'say'. D'oh. Walker says, "Bombur, fetch datarealms titles" Bombur says, "fetching!" Bombur says, "parsing!" Bombur says, "Blam!, Physics engine overhaul!, AI HUD fun, Back to business, Data Realms at Game Developers Conference 07, Playtesting Cortex Command, Test Build 13, fixes most of 12âs issues, Test Build 12 - Configuration Bliss, Some more split with that screen?, Dr. Who, CC Episode" Jules looks confused. Trinsec says, "Those are headers of the datarealms website apparently." Walker says, "The of the s in the RSS feed that Xeiran pointed at, actually." Sketch gets an idea that he can't do in 15 minutes. Dang. Cheetah says, "Ruby prolly has an rss and/or xml parser." Walker nods. Trinsec hmms at titles.join(', ') Walker doesn't use it, just uses regexp fun. ;) Walker says, "The script for accessing the datarealm feeds is at:" Walker says, "http://walker.pennmush.org/walkerbot/mudbot/simple_client_05.rb" Trinsec says, "Is taht like itemize?" Trinsec says, "Oh wait, titles = [], so it's an array of some sort?" Sketch says, "Array -> string with delimiters" Sketch says, "= .join" Xeiran says, "gloin, what is sketch like?" Gloin says, "Nobody's told me anything about him." Xeiran says, "gloin, sketch is furious" Gloin says, "Okay, I'll remember that, xeiran." Trinsec says, "Gloin, xeiran is smelly" Xeiran says, "gloin, what is sketch like?" Gloin says, "Sketch is furious, from what xeiran tells me." Xeiran says, "gloin, forget what i told you about sketch." Walker says, "Yes, Trinsec" Gloin says, "I'll try, xeiran." Walker says, "But no, array is not a 'string with delimiters'" Xeiran says, "Hmm... a bug" Walker says, "In Ruby" Sketch says, "No, I mean .join MAKES an array into a string with delimiters." Xeiran says, "Walker, how do I clear the value of a variable?" Walker says, "Ah yes, that's true." Trinsec says, "ah" Walker says, "Xei: In a hash, or an actual variable?" Walker says, "variable = nil" Walker says, "or hashname = nil" Xeiran says, "What's a hash anyway :D" Trinsec thinks #{}, not sure. Xeiran says, "gloin, sketch is terrible" Gloin says, "Okay, I'll remember that, xeiran." Xeiran says, "gloin, forget what i told you about sketch" Gloin says, "I'll try, xeiran." Xeiran says, "gloin, what do you know about sketch?" Sketch says, "Gloin, what's sketch like?" Xeiran says, "gloin, what is sketch like?" Gloin says, "Nobody's told me anything about him." Sketch says, "gloin, what's sketch like?" Xeiran says, "Right now it only works with "Sketch" :D" Xeiran says, "I just need to figure out hashes so I can use anyone's name." Sketch heh! Xeiran says, "Oh crud, I have to go :(" Cheetah says, "Ahh, that's how ;)" Trinsec says, "#-1, the 'r'?" Xeiran says, "Well, wait, I must figure out hashes first" Trinsec says, ".. open("url",'r'), the 'r'?" Walker says, "Bombur, walker?" Xeiran says, "They can't be THAT hard." Cheetah says, "Read only?" Sketch says, "'read'." Trinsec says, "what's that body = file.read doing?" Walker is always forgetting 'say' Walker says, "Bombur, walker?" Bombur says, "walker is something I don't know" Trinsec says, "if there's already read in open?" Walker says, "Bombur, walker is a moron" Bombur says, "ok" Walker says, "Bombur, walker?" Bombur says, "walker is a moron" Cheetah says, "Read the whole file, put it in body." Trinsec says, "bombur, trinsec is cool" Bombur says, "ok" Trinsec says, "bombur, trinsec?" Bombur says, "trinsec is cool" Walker says, "http://walker.pennmush.org/walkerbot/mudbot/simple_client_06.rb" Cheetah says, "Open doesn't /read/ it, just opens it." Trinsec says, "oh" Cheetah says, "Like opening a book." Trinsec says, "scan is another function eh?" Cheetah says, "Method." Walker says, "Ok, the simple client has been updated to include both the datarealms RSS "reader" and the definition thingy I just added" Walker says, "Bombur, ruby is a pretty cool thing." Bombur says, "ok" Walker says, "Bombur, ruby?" Bombur says, "ruby is a pretty cool thing." Cheetah says, "Bombur, Balin?" Bombur says, "balin is something I don't know" Xeiran says, "Bombur, Balin is cheetah's bot" Bombur says, "ok" Xeiran says, "Bombur, balin?" Bombur says, "balin is cheetah's bot" Cheetah says, "Bombur, Balin is Cheetah's grumpy bot" Bombur says, "ok" Cheetah says, "Bombur, Balin?" Bombur says, "balin is cheetah's grumpy bot" Trinsec says, "all that stuff it only remembers so long that script is running eh?" Cheetah says, "Yep." Walker says, "Yes." Xeiran says, "Bombur, Balin is #$1" Bombur says, "ok" Xeiran says, "Bombur, balin?" Bombur says, "balin is #$1" Walker says, "That won't work, Xei ;)" Xeiran says, "Just testing :)" Trinsec says, "Gee, you figure? :)" Walker says, "Bombur, balin is #{client}" Bombur says, "ok" Walker says, "Bombur, balin?" Bombur says, "balin is #client" Walker says, "Bombur, balin is Cheetah's grumpy bot" Bombur says, "ok" Xeiran says, "so # is a comment?" Xeiran says, "oops" Xeiran says, "So, #{name} is a variable?" Walker says, "Bombur, dangerous is [emit(Walker sucks)]" Bombur says, "ok" Walker says, "Bomber, dangerous?" Walker says, "Bombur, dangerous is test [emit(Walker sucks)]" Bombur says, "ok" Walker says, "Bomber, dangerous?" Trinsec says, "bombur, with u" Walker dohs Cheetah laughs. Walker is obviously tired ;) Walker says, "Bombur, dangerous?" walker sucks Bombur says, "dangerous is test " Walker says, "Yes, I do suck. :-P." Trinsec says, "not as tired as i am, i'm just observing now ;)" Walker says, "Bombur, dangerous is bad" Bombur says, "ok" Sketch +sanctions Bombur. Help! I'm being coerced to say this! Xeiran says, "Bombur, Walker is friendly and nice." Bombur says, "ok" Walker grins at Sketch Xeiran says, "Bombur, Walker is friendly and nice.[emit(Help! I'm being coerced to say this!)]" Bombur says, "ok" Sketch cackles. Xeiran says, "bombur, walker?" help! i'm being coerced to say this! Bombur says, "walker is friendly and nice." Walker points the gun at Xeiran instead of Bombur ;) Walker says, "Any questions about either the definitions bits, or the datarealms feed bits?" Walker says, "Other than regexp questions ;)" Xeiran says, "Okay, well, I had best get going, thanks for the lesson Walker" Jules feels a little confused at how it was actually done. Jules needs to see it all together at once. :/ The crowd goes wild and carries Walker upon raised hands. Trinsec says, "the body = file.read is putting the whole text in the body variable as is?" Cheetah says, "Yeah." Sketch says, "How do I make a thread so I can input stuff from my console?" Trinsec says, "what's the real diff between a readline and scan?" Walker says, "Jules, have you been following the script changes?" Cheetah says, "brain_contents = school_book.read" Walker will be editing the log to point to different scripts as this progresses, he thinks. Jules says, "I might have missed one. :)" Xeiran says, "Alright. Off to shower and review before Calc 2 exam. Cya guys later!" Xeiran says, "gloin, sketch is a cruel, cruel man" Gloin says, "Okay, I'll remember that, xeiran." Cheetah says, "readline reads one line from a socket. scan groverls through a string for interesting bits." Trinsec says, "why is it checking for stuff first?" Walker says, "Because I don't want the title of the entire feed, which exits outside of ... bits." You drop Bot Responder. Walker types --> ex Bot Responder Bot Responder(#11656TV) Type: THING Flags: VISUAL Owner: Walker(#6061POWetACMc) Zone: *NOTHING* Ducats: 10 Parent: *NOTHING* Powers: Warnings checked: Created: Thu Apr 19 17:58:30 2007 Last Modification: Thu Apr 19 18:50:12 2007 TEST [#6061]: $respond/* *=*:@pemit %1=Results of %0 from %N:%r%2 Home: Gentoo Hall(#2602RVa) Trinsec says, "what's do |item|?" Sync: Time: Thu Apr 19 15:00:01 2007 Mail: 0/106 Idle: 20s Puppets: Kickaha Nicker Rei Shadowfax Walker says, "Ruby way of saying 'Call the argument to this block 'item'" Walker says, "And the block is called with each matching bit of text that scan() finds" Walker types --> @pemit bombur=2+2 You pemit "2+2" to Bombur. Bot Responder says, "For #6061: Results of calc from Bombur: 4" Walker says, "Bombur is running WalkerBot." Walker says, "If anyone else wants to continue on stage 3, let me know, otherwise we'll move on to stage 4, if anyone still has interest ;)." Sketch says, "With a bogus passphrase, I assume.." Trinsec still doesn't grasp the do |item| part, and then 'if item =~ ...' Sketch says, "Stage 4! ... what are they all, again? Heh..." Cheetah says, "If item ~= /foo/" Walker says, "if item =~ /foo/ -- That's the same as mushcode if(regmatch(item,foo),...)" Cheetah says, "Yeah.." Trinsec says, "so the ~ is regexpify?" Walker says, "Stage 4 is installing and using WalkerBot" Trinsec says, "Oh man" Walker says, "=~ is a regexp comparison." Trinsec says, "I'd love stage 4 but I'm afraid I simply can't pay attention anymore :/" Walker says, "So just stick with linux, it's simple enough" Cheetah hands Trin the caffeine IV? Walker says, "http://walker.pennmush.org/walkerbot/walkerbot.zip (For windows users)" Walker says, "http://walker.pennmush.org/walkerbot/walkerbot.tar.gz" Walker says, "Is anyone still with me, or are you all nodding off, falling asleep, running off to class, or the like? ;)" Cheetah is falling off to nod. Sketch says, "I'm here! >D" Cheetah says, "Actually, I'm here." Trinsec is slowly falling asleep. Walker says, "Ok, grab your respective tarball/zipfile, and uncompress it, then cd into walkerbot/ and edit config.rb" Sketch has! Anyone else awake? :3 Walker says, "Change HOST and PORT to mush.pennmush.org and 4201, respectively ;)" Walker says, "And LOGIN to 'connect rubybot'" Jules is here, but needs to go. :p Jules says, "Soonish." Sketch looks at start. Heh. Walker says, "Once you have the configuration variables set, start your bot up!" Sketch says, "Naaaa!" Walker says, "You can change PASSPHRASE if you like, but for our testing purposes, no real need. ;)" Jules lifts a brow. Walker says, "Now - the way that WalkerBot works is, it expects commands to be sent to it in a single line, such as args" Trinsec goes sleep and will watch the log. Walker says, "It will then call the appropriate , and send the results back to by using "respond/ ="" Jules thinks he has goofed something. Config goes, then stops. Walker says, "You want to run rubybot.rb, not config.rb" Jules oh Walker says, "Just edit config.rb, then run rubybot.rb" Sketch poofs to head home. Should be back soonish. Soon-soonish. Jules same. :( Walker says, "I've added a simple response command to the 'Bot Responder' object." Walker will wait until you two are back, or others unidle ;) SAVE: PennMUSH gets its tax return! Now how can it spend it? Balin mutters. "Another one of those annoying dbsaves." Sketch returns. SAVE: Balin is a liar. Balin mutters. "Another one of those annoying dbsaves." Gloin says, "Yeah, I know, huh?" Sketch is not. :/ Sketch says, "Responder.." Jules ? Xeiran says, "Well, I'm REALLY leaving now, so see you guys later." Walker isn't yet finished. :-P. Cheetah waves. Walker says, "So, Sketch, Jules, you back?" Walker waves to Xei anyway Jules says, "Did you pause? :)" Cheetah says, "Balin, wave to the man." Balin says, "Lalala, I didn't hear Cheetah say anything like 'wave to the man.'." Cheetah hits unpause. Walker waves to Xei anyway Walker says, "So, Sketch, Jules, you back?" Sketch says, "I am!" Walker isn't yet finished. :-P. Jules is here. Walker will wait until you two are back, or others unidle ;) Sketch says, "Hmm.. A bot? ;)" Sketch is here. Walker says, "I've added a simple response command to the 'Bot Responder'" Walker bahs as nobody makes a "Cheetah hit rewind instead of unpause" joke. Jules aaahs. Walker says, "Now - the way that WalkerBot works is, it expects commands to be sent to it in a single line, such as args" Walker says, "Then responds via "respond/ =" Walker types --> @emit 2+2 2+2 Bot Responder says, "For #6061: Results of calc from Thorin: 4" Bot Responder says, "For #6061: Results of calc from Bombur: 4" Jules didn't realize his Thorin was logged on successfully. huh. o_O Walker hehs Sketch frowns.. Walker says, "Is Nori using WalkerBot, Sketch?" Sketch says, "Should be." 2/0 Bot Responder says, "For #1: Results of calc from Thorin: error: divison by zero" Bot Responder says, "For #1: Results of calc from Bombur: error: divison by zero" Cheetah says, "Awww O:)" Walker types --> @emit Bot Responder says, "For #6061: Results of bash from Thorin: http://bash.org/?306 - (677) people beta test a MS product every time they boot windows " Walker types --> @emit 677 677 Bot Responder says, "For #6061: Results of bash from Thorin: http://bash.org/?153 - (751) I think hypr accidentally joined #invest by mistakenngly typing a v instead of a c. " Walker says, "(An example of using bash with args)" Jules lol Jules says, "Swetet. :D" Jules wtyopsz. Walker frowns and wonders why Bombur doesn't react. Jules gagh! Walker shrugs. Jules's keyboard is messed up. D: Bot Responder says, "For #6061: Results of bash from Bombur: err: execution expired" Walker ahs Bot Responder says, "For #6061: Results of bash from Bombur: err: execution expired" Cheetah says, "That'll be why." Walker types --> @emit elucidate Bot Responder says, "For #6061: Results of define from Thorin: Unknown command" Bot Responder says, "For #6061: Results of define from Bombur: Unknown command" Sketch narrows his eyes at Nori. Hmm. Walker says, "That doesn't work because neither my Windows box nor Jules' has ruby-dict installed." Walker says, "Did you change the passphrase, Sketch?" Sketch says, "I did..." Jules says, "That explains it." Sketch says, "'BooHoo'" Walker types --> @emit power power Sketch hm. Walker types --> @emit power power Bot Responder says, "For #6061: Results of synonyms from Thorin: power: arm, authority, clutch, command, control, dominion, grip, hold, mastery, sway power: energy, force, might, muscle, potency, puissance, sinew, strength, vigor power: faculty " Bot Responder says, "For #6061: Results of synonyms from Bombur: power: arm, authority, clutch, command, control, dominion, grip, hold, mastery, sway power: energy, force, might, muscle, potency, puissance, sinew, strength, vigor power: faculty " Bot Responder says, "For #9862: Results of synonyms from Nori: power: arm, authority, clutch, command, control, dominion, grip, hold, mastery, sway power: energy, force, might, muscle, potency, puissance, sinew, strength, vigor power: faculty " Sketch says, "There we go." Walker says, "If you'll look in the plugins/ directory, there's a number of files" Sketch says, "..Whee. :)" Walker says, "WalkerBot loads them *all* on startup, and you can force a reload using the 'reload' command/plugin" Walker types --> @emit synonyms.rb thesaurus.rb Bot Responder says, "For #6061: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #6061: Results of reload from Bombur: Plugin loaded" Calc: 74 Calc: 187.96 Bot Responder says, "For #9862: Results of reload from Nori: Plugin loaded" Walker says, "Now, let's make a plugin to do the defining thing we did earlier." Walker says, "Normally, we can use 'what' plugin, but unless you have Ruby-mysql installed, not an easy thing ;)" Cheetah says, "Tech note: Us programmer folks would call this 'working with the WalkerBot API' ;)" Walker nods at Cheetah. Walker says, "Copy 'test.rb' to, let's say, 'define.rb'" Jules says, "You want us to do this? :O" Walker says, "Absolutely" Walker says, "Then edit every instance of "Test" in define.rb to "Define"" Jules gives the thumbsup. Editted. Do I need to restart ruby.rb? Jules says, "Er, Walkerbot?" Cheetah says, "Nope." Walker says, "Remember the reload command I gave above? @pemit it to your bot." Bot Responder says, "For #9862: Results of reload from Nori: Plugin loaded" Bot Responder says, "For #9814: Results of relord from Thorin: Unknown command" Bot Responder says, "For #9814: Results of relord from Bombur: Unknown command" Bot Responder says, "For #9814: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #9814: Results of reload from Bombur: Plugin loaded" Jules huzzah. Bot Responder says, "For #6061: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #6061: Results of reload from Bombur: Plugin loaded" Bot Responder says, "For #6061: Results of getdef from Thorin: Unknown command" Bot Responder says, "For #6061: Results of getdef from Bombur: Todo: Fetch Definition of foo" Jules aww. Bot Responder says, "For #6061: Results of adddef from Thorin: Unknown command" Bot Responder says, "For #6061: Results of adddef from Bombur: Todo: Set foo to bar" Jules says, "What goofed?" Jules says, "Oh wait, or are you adding things to yours that aren't going to be in mine? :)" Walker says, "http://walker.pennmush.org/walkerbot/define.rb" Walker says, "That's the first step in getting a plugin working the way you want it" Walker says, "Make sure it responds, loads, etc." Walker says, "And can parse its arguments right." Cheetah says, "In Soviet Rubia, Bombur defines you." Jules hm. Walker says, "Any questions yet? Sketch? Jules?" Cheetah says, "Balin, got any questions?" Balin says, "Lalala, I didn't hear Cheetah say anything like 'got any questions?'." Jules hmms. Walker says, "Balin, bots are cool" Balin says, "Lemme alone, Walker." Gloin says, "Yes they are, but I'm better than Oin." Walker says, "bots are cool" Gloin says, "Yes they are, but I'm better than Oin." Cheetah says, "Aww, Oin left." Sketch hmmm... I think I got it. XD Molikai says, "Bots are cool." Gloin says, "Yes they are, but I'm better than Oin." Walker says, "Give it a try, Sketch =)" Molikai says, "oin is cool." Jules says, "I'm a little shaky, but I think it's just lack of XP." Walker nods. Molikai jives Jules 200 XP. Cheetah says, "Yes they are, and especially me." Balin says, "Shut up, Cheetah." Sketch says, "Nori, Ruby is the greatest programming language!" Walker says, "Sketch, remember that Walkerbot doesn't work like the simple scripts we did." Bot Responder says, "For #6061: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #6061: Results of reload from Bombur: Plugin loaded" Bot Responder says, "For #9862: Results of reload from Nori: Plugin loaded" Sketch says, "Nori, Ruby is the greatest programming language!" Bot Responder says, "For #6061: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #6061: Results of reload from Bombur: Plugin loaded" Sketch scratches head. Bot Responder says, "For #6061: Results of adddef from Thorin: Todo: Set sketch to A lunatic" Bot Responder says, "For #6061: Results of adddef from Bombur: Ok" Cheetah says, "Sketch, did you add the conversation thing back?" Bot Responder says, "For #6061: Results of getdef from Thorin: Todo: Fetch Definition of sketch" Bot Responder says, "For #6061: Results of getdef from Bombur: Error with command: getdef" Sketch says, "Uh.. I might not have? THere's a lot of backscroll.. :/" Bot Responder says, "For #6061: Results of reload from Thorin: Plugin loaded" Bot Responder says, "For #6061: Results of reload from Bombur: Plugin loaded" Bot Responder says, "For #6061: Results of getdef from Thorin: Todo: Fetch Definition of sketch" Bot Responder says, "For #6061: Results of getdef from Bombur: A lunatic" Jules rofl :) Walker says, "I'm going to change the Bot REsponder to use pemit instead of emit" TFEdit > &TEST #11656=$respond/* *=*:say For %1: Results of %0 from %N:%r%2 Walker says, "Err, instead of say ;)" Results of getdef from Thorin: Todo: Fetch Definition of sketch Results of getdef from Bombur: A lunatic Cheetah says, "Also, @pemit to your target bot at this point? ;)" Sketch gets it now.. Aha. Sketch has to head out, though. THanks, Walker. :) You drop Gandalf. Walker types --> ex gandalf Gandalf(#11418TVnM) Type: THING Flags: VISUAL NO_COMMAND MONITOR Owner: Walker(#6061POWXetACMc) Zone: *NOTHING* Ducats: 10 Parent: *NOTHING* Powers: Warnings checked: Created: Thu Apr 19 18:50:26 2007 Last Modification: Thu Apr 19 18:54:55 2007 LISTEN_DEFINE [#6061]: ^* says, "Gandalf, *\?":@pemit bombur=%1 LISTEN_RETURN [#6061]: ^Results of getdef from Bombur\:*:say [trim(%0,%r)] LISTEN_SET [#6061]: ^* says, "Gandalf, * is *":@pemit bombur=%1:%2 LISTEN_SETRETURN [#6061]: ^*Ok*:pose nods, "Ok." Home: Gentoo Hall(#2602RVa) Balin tries to nick it. Walker says, "Gandalf, sketch?" Gandalf says, "A lunatic" Sketch sigh. :) "You all know me too well." Walker says, "Gandalf, sketch?" Gandalf says, "A lunatic" Walker says, "Gandalf, sketch is cool" Gandalf says, "something I don't know about" Gandalf nods, "Ok." Walker says, "Gandalf, sketch?" Gandalf says, "cool" Walker says, "Gandalf, sketch?" Gandalf says, "cool" Walker says, "Gandalf, sketch is cool" Gandalf nods, "Ok." Walker says, "Gandalf, sketch?" Gandalf says, "cool" Walker says, "Gandalf is an example of a simple way to get a mush object to interact with Walkerbot commands."