Joshua oos. "We have a nice attendance today. We're going to be waiting a few more minutes, though. Professor hugger wanted to attend, and I think a couple of others. But if they don't start soon, we will begin without them." You say, "Someone please log alongside me, I don't want any nasty surprises." Garrison nods and quickly takes a seat. Kelisea logs often and logs daily. :) Garrison nods "Already doing so, Claude.' You say, "Thank you!" Kelisea is currently sitting at a desk which is in the middle of the room. Beltrami has arrived. Roofus_roo has arrived. Beltrami brings Roofus_roo with her, holding hands. Garrison waves to Bel and Roofus. Roofus_roo hms. You say, "Hello, ladies!" Beltrami waves to Garrison and Claude! Joshua shouts "I'm sorry, that's S2 W1." (Public-shout) BunnyHugger has arrived. Chitter has arrived. Austin has arrived. BunnyHugger enters, with a nonanthro Eastern gray squirrel (Chitter) [Chitter(#5713XZ)] and A rabbit-eared, raccoon-tailed, elastic coatimundi. (Austin) walking along next to her. BunnyHugger stops Austin from walking along with her. Beltrami waves to the Lord Mayor and Deputy! Garrison waves to Austin and BH. You say, "Hi!" BunnyHugger says, "Sorry, I was in such a hurry I failed to get changed, but I brought my Buggle Box with me." Tora has arrived. BunnyHugger puts on a black jacket with sparkling sequins over a black shirt with two pockets, its top buttons undone to show fluffy chest fur. The look is completed with a pair of huge, round eyeglasses with transparent plastic frames, through which her eyes look enormous. Beltrami smiles and waves to Tora! Tora mrfs, "Thanks, was entirely lost, thar..." BunnyHugger says, "I do that with MPI, the only MPI I've really written past, you know, {list:desc} or the force that mumble mumble." Beltrami frowns and nods. [Beltrami just looked in your direction! (female Balloon Dragon)] BunnyHugger's mumble mumble might sound like "Controls Chitter." Garrison grins BunnyHugger looks down at herself. Joshua ruffs, "Alright, I think this is sufficiently full. This class seems more populous than the MUF class. I guess there's more demand for MPI." BunnyHugger says, "The Buggle Box is pretty insensitive to fashion, I'm afraid. This shirt and this jacket? ... Hmmmmm." Garrison says "Pants are not required. :)" Austin says, "Oh, anything with sequins, dear." BunnyHugger says, "More populous than building class too, which is odd because I'd think everyone would want to know how to build better." You say, "It's the publicity." BunnyHugger says, "Er..." Garrison nods to Claude You say, "The building class popularized the idea." Garrison says, "You inadvertently advertised this for five weeks. :)" Joshua walks over toward the board, "Welcome, class. I am professor Farstrike. Today, we will be learning the ancient art of MPI." He starts to write out on the board his name, and the code: {null:{tell:Hello\, world!}} Skyler steps off of the floating disk that carried him up. Skyler has arrived. Garrison grins. "The classics." Claude sits on his desk and waves to Skyler. Skyler waves! Garrison waves to Skyler. Tora mrfs, "The classic, illustrating a functional language widdan impurrative example. :D" Garrison nods to Tora Beltrami takes a set and sets Roofus on the desk in front of her. Joshua nods, "Hello, Skyler. Take a seat anywhere. We're just starting." He explains to the class, "My primary expertise is in MUF. I see a few people in this room who could probably teach me a thing or two about MPI. Feel free to enlighten us on a point if we get a bit bogged down. I do, however, know enough about MPI that I've used it for decently complex mini-programs, and enough to teach you folks how to use it." Skyler wanders to a desk, sitting on top, "Hey, Joshua," and perks ears to listen. Niny'ah presses the hoofprint agaisnt her chest... Garrison takes out his note book and starts noting. Niny'ah pokes at the nebulous ??? where she thinks Kelisea is Joshua looks over the class, "MPI officially stands for 'Message Parsing Interpreter.' However, this is a backronym. It originally stood for 'My Personal Insanity'. When the code was released, it was decided a more respectable name should be chosen." He looks over the class, "I know I've seen a few of you from my MUF class. How many of you have programming experience? What is your experience with MPI specifically?" GreenKai frowns, "You could take all those squiggles and dots out, an' just put 'Hello, world!'." The norn clearly thinks it's too early for squiggles. BunnyHugger raises a forepaw. Claude does too. Garrison raises a paw Tora raises paw. "Various. Including some things in MPI that prolly Should Never Have Been." :D Skyler says, "If you've seen the town hall clock in Neopolis...that one's mine." Joshua looks to GreenKai, "You could, but people came here to learn Squiggles. I'll explain them in a bit." He points to the students, "In order, then. BunnyHugger, Claude, and Garrison." BunnyHugger says, "The only language I know at all well (and then only at an intermediate level) is MUF. I have dabbled in MPI as noted before class, by writing the Bugglizer which randomly dresses me up in outfits based on a few lists of things (jackets, shirts, ties, glasses) and says to the room and to me what I just put on. That's my only MPI program not counting very minor things." Tora mrfs, "Green, with the squiggles, it's just the *string* 'Hello World!' With them, it's a program that carries out an action (by side-effect), of outputing said string." Joshua nods to Tora. BunnyHugger is pretty sure Green's *player* knows that. >:) Tora mrfs, "Eh, first 'with' = 'without'. Durrr." Tora suspected as much, but thought he'd play along. :) Garrison chuckles. You say, "The longest MPI I've written is 11 lines long, and I struggled with that." GreenKai giggles, "Yeah, but it's a valid MPI program, too!" BunnyHugger says, "Almost everyone's at least used MPI to write a description, though folks who used the player hammer might not realize they did." [OOC] GreenKai says, "I'm a programmer with 15 years of development experience, but I've not done much MPI - the only script was what was necessary for the cable car: http://pastebin.com/fa4rGisg" Tora mrfs, "Hrm, that's getting into 'tree falls in an empty forest' territory. :)" Garrison says, "Taught myself while on FM (mumble mumble) years ago." Niny'ah says, "If it's a forest, it can't be empty" Joshua nods. "Anyone here who is completely new to MPI or programming? Tora muzzlepaws... Niny'ah cheekygrins at Tora [OOC] Joshua says, "Nice work, GreenKai" Kelisea has done no programming in the MUCK area only some programming on MUSHes and MUXes. Joshua nods, "Kelisea, you will find MPI very similar to MUSHcode." Claude earperks at Kelisea. Tora mrfs, "MPI is somewhat inna mold of MUX softcode, except the syntax, and a higher degree of capability nerfing. Lots of stuff is only purractical in MUF." Kelisea nods back to Joshua. "Ah, good to know. Is the syntax easier than the LISP format of MUX/MUSH softcode? Tora mrfs, "Nope. :)" Kelisea hrms. BunnyHugger says, "It has syntax? >:P" Tora mrfs, "The general format is: {:arg1,arg2,...,argn}." BunnyHugger says, "Sorry. Prior to breaking down and deciding to learn MPI, I've called it "the devil's own code" because it looks like such a big hot mess of spaghetti when I look at it." Tora mrfs, "It gets... real {}y." Garrison whispers, "Claude can haz syntax ;)" to you. Garrison hehs BunnyHugger says, "It's not tidy and beautiful like MUF. <3" BunnyHugger gets starry eyed. Niny'ah scares therest of the class Tora mrfs, "But you can use whitespace and formatting to make it more readable, like the example Green shared a short while ago." {pronouns:%n,this} is, presently, a horse! more specifically, an anthro Choktaw {if:{eq:{pronouns:%a,this},his},Stallion,{if:{eq:{pronouns:%a,this},hers},Mare,{if:{eq:{pronouns:%a,this},his},Stallion,{if:{eq:{pronouns:%a,this},hers},Mare,{if:{instr:{tolower:{prop:gender,this}},herm},Stalmare,Horse}}}}} standing just under 5 feet tall, of a compact and sturdy build. {pronouns:%P,this} coat is mottled brown and white, and {pronouns:%s,this} is comfortably clad in soft barkcloth leggings that reach just past the knee. Joshua ruffs, "Most of you have probably heard of the programming language LISP, and either find it to be overrated or are a rabid fan of it..." He looks over his shoulder as he writes on the board, "For whatever reason, it just seems that there's no middle ground." He starts to write a bit of LISP on the board, "MUF was inspired by LISP, which is one of the oldest high-level programming languages, dating back to the 1950s. For a very long time, it was the primary programming language taught by the Massachusetts Institute of Technology, or MIT, for their beginning course, Structure and Interpretation of Computer Programs (SICP)."" You whisper, "Tee-hee!" to Garrison. [OOC] GreenKai says, "It has a beauty of its own! Which, admittedly, is the kinda beauty that requires dim lighting and a soft focus." Skyler nods... Niny'ah chortles at GreenKai [OOC] Garrison grins GreenKai ooohs, "I did Scheme! It was kinda like LISP, only more nefarious." She thinks back, "And kinda tricky. Only one other person got it, an' they went on to make biiiig computers work." BunnyHugger listens. [OOC] Claude idles a moment. GreenKai sips her expressochoc (hot-chocolate cappuccino), stirring in some Extra Rasin Rasin Bran for body. Niny'ah drops Hoofprint. Claude thinks Lisp is more useful as a set of principles. Joshua ruffs, "Recently this class has switched to teaching Python. However, Lisp is still considered by many to be the best programming language evar, and it is used in Artificial Intelligence applications as well as other avenues of reasearch. Mastering it is no small task. Likewise, MPI can be difficult to grasp at first. Its method of evaluation is patterned on LISP and so if you learn one, you have a good stepping stone to learning the other if you desire. However, MPI is /not/ LISP. It has a few differences. The primary is in the syntax. Here are two snippets of code. The first one is in LISP, and the second in MPI." (print "Hello, world!") {tell:Hello\, world!} Claude nods. Garrison nods. Kelisea nods too. Niny'ah drops Sonja. Sonja pokes at Kelisea. "I can't make clothes for you if you don't have a body! Joshua ruffs, "The primary difference here is that MPI was designed to be slipped into descriptions without all descriptions having to be rewritten. That is, when Revar, the developer of MPI, started making it, he didn't want to require changes in how descriptions were handled without warrant. Parenthesis are more likely to be used in normal text than curly braces. He wished for everything to be a string proper, that is, just text, so quotation marks are not needed around text. So, the best way to separate the function name from the text was to use a colon. But we're getting ahead of ourselves, perhaps. Let's break down the Hello, World program." Joshua ruffs, "I wrote this on the board earlier:" ( {null:{tell:Hello\, world!}} ) Joshua ruffs, "Right, spoof here adds parenthesis." Joshua forgot that. Kelisea is merely a construct right now, not even a full idea. She asks Joshua, "Why the 'null' part?" BunnyHugger says, "Everything being a string is part of what flummoxes me." BunnyHugger says, "Ooh oooh oooooh! I know!" BunnyHugger waves her hand. GreenKai oooh, oohs, then awwws as BunnyHugger beats her. Kona has disconnected. Niny'ah raises her own hand as well Joshua will do future code in quotes. "I'll explain that in a moment, Kelisea, but, BunnyHugger, if you'd like to give it a swing?" Beltrami grins. Garrison:grins to BH.' BunnyHugger says, "Because it shuts it up. Otherwise it always blurts whatever it evaluates out loud, like if it's on a @succ it blurts it in your ear, or if it's on the @osucc it blurts it to the room, which completely confused and bothered me when I first wrote the Bugglizer. I just wanted it to store some stuff in props, but it was also yelling them all into my ear which is not how MUF operates so I thought I'd written something wrong until Austin told me." Kelisea nods, "Ah! Like halting something in MUSH. Gottit." Garrison nods GreenKai adds, "Sometimes you want that, of course. Like the cable car, there's no tell:' on Skyler nods. Kelisea nods. ( . . . on the messages, it just returns it. ) BunnyHugger says, "Right right, I then realized that I could harness this, so now I actually use that aspect to tell the room what I just stored so they know what closed I changed into. But I had to write it to account for that." BunnyHugger says, "(closed=clothes)" Kelisea says, "I understand now." Joshua nods, "Right. And I'll explain why that is in a bit." He looks back to the board, "Each MPI function breaks down into its brackets, the function name, the separator, and the arguments." Ronnie has arrived. { function-name: argument1, argument2 } Tora mrfs, "Yes, {tell:} is kinda slightly anomalous as it's not a true 'function' at all. It's there to carry out a side-effect, not to return a result." [OOC] GreenKai thinks MPI fits nicely into RP, where nothing happens unless you say it - its whole purpose is to make a string. Everything else is just a big ol' side-effect. [OOC] Ronnie says, "depends on how you put it" Joshua ruffs, "The reason we had to put a backslash in front of the comma in 'Hello, world' was because otherwise, it would thing 'Hello' and 'World' were two different arguments."" Garrison nods Niny'ah says, "hello, escape codes" BunnyHugger says, "It's the 'escape' character!" BunnyHugger smiles. BunnyHugger starts to hop excitedly on top of her seat. Tora grins. Chitter silently grabs BunnyHugger and forces her to sit down. Joshua nods to BunnyHugger, "That it is. Now, each MPI function returns something. That is, when you run an MPI function, the result of whatever it does is what is fed to any other function it's fed to. Garrison chuckles BunnyHugger nods. Joshua ruffs, "Let's take a look at this." Claude earperks. {lrand:{list:redesc}} Joshua ruffs, "Most of you have used the List editor. In fact, probably all of you have. It's the line editor which you use to write your descriptions. Kelisea may not have, as she comes from the MUSH/MUX world. I don't know how much experience she has with MUCKs, but I know that MUSHes don't well support interactivity, and multi-line documents are made by putting in things like %n for a new line." GreenKai uses {nl} just to be contrary. Garrison hehs Skyler nods... Joshua ruffs, "You might recall that the list editor allows you to add several lines in a series of properties on yourself. Anyone who has a description they set up through editplayer, and who opted for the 'complex MPI option', can examine themselves and see this structure. I'll show you mine." Niny'ah discovers an error in some personal MPI Kelisea has used the list editor before. She has been on other mucks prior but not any programming in them. ex me=redesc#/ - str /redesc#/1: - str /redesc#/10:them. He is ususally seen smiling at least slightly, and looking around as - str /redesc#/11:though there is wonder all around him, though he hardly looks lost or - str /redesc#/12:confused. - str /redesc#/13: His outfit is something between that of a tunic and light tactical combat - str /redesc#/14:armor. The tunic is dyed a dull red, and there are two belts criss-crossed on - str /redesc#/15:his chest, each holding a few pouches. A nametag can be seen in place of one - str /redesc#/16:of the pouches at his top left side. It reads: - str /redesc#/17: - str /redesc#/18: Professor Joshua Farstrike - str /redesc#/19: Technical Studies - str /redesc#/2: Before you is a canine sort of creature. He looks to be something between - str /redesc#/20: 1-01-5RC - str /redesc#/21: - str /redesc#/22: The shoulders, outer arms, and the chest area under the belt are all - str /redesc#/23:covered with a black tough plating, its material difficult to determine from - str /redesc#/24:sight alone. He has leggings with similar color and plating. Airbrushed on the - str /redesc#/25:upper outer arms, near the shoulders, are a golden cogwheel with a star in the - str /redesc#/26:center of it, a slight bit of glossing overtop. - str /redesc#/27: He has a happy and friendly countenance about him, and despite his armor, - str /redesc#/28:his short stature makes him seem a good size for picking up and hugging. - str /redesc#/29: - str /redesc#/3:a coyote and a wolf, and stands at about three feet in height. He seems to - str /redesc#/4:have been working out, the little canine having well toned muscles, though not - str /redesc#/5:especially large ones. Along the back of his head and neck are several holes - str /redesc#/6:that look strikingly similar to computer ports. There are one or two small - str /redesc#/7:devices plugged into them while the rest are free. - str /redesc#/8: His fur is soft and healthy-- a gentle gray that surrounds all of him - str /redesc#/9:solidly. His eyes are a lighter grey, and they have a soft gentleness about 29 properties listed. Niny'ah errrs, "You've got some numbering-shuffle due to lack of leading zeros BunnyHugger says, "It's inevitable." Tora mrfs, "That's the way 'ex' does this things." Ronnie purrowls, "yep" Tora mrfs, "It and the list editor don't quite see eye-to-eye, it seems." Joshua ruffs, "That is correct. The system will run through the list in numerical order, so it comes out right when using the data." [OOC] GreenKai had to use lsedit and then .l to get clean output. Tora mrfs, "There's also a 'list' program." Tora mrfs, "But ex has the advantage of explicitly showing the names of the individual props." BunnyHugger nods. Garrison ods Garrison nods, even Niny'ah says, "If I may share an example for you to dissect later, Joshua?" Joshua ruffs, "The 'list' MPI function takes all of these lines and pulls them in for use. It separates each line with a 'newline' character. The result is that the value pulled in is actually just one long string. Those in my MUF class may remember that the best way to deal with lists there is in an array. Each item becomes a separate string to work with and manipulate." Joshua ruffs, "Sure." Joshua ruffs, "However, this is not the case in MPI. In MPI, everything is a string until it's 'needed' as something else, and then it's processed on the spot for that purpose." Joshua ruffs, "This has a side effect:" str /morph#/1/_/de:{looknotify+}{pronouns:%n,this} is, presently, a horse! more specifically, an anthro Choktaw {if:{eq:{pronouns:%a,this},his},Stallion,{if:{eq:{pronouns:%a,this},hers},Mare,{if:{instr:{tolower:{prop:gender,this}},herm},Stalmare,Horse}}}}} standing just under 5 feet tall, of a compact and sturdy build. {pronouns:%P,this} coat is mottled brown and white, and {pronouns:%s,this} is comfortably clad in soft barkcloth leggings that reach just past the knee. {if:{eq:{pronouns:%a,this},his},Stallion,{if:{eq:{pronouns:%a,this},hers},Mare,{if:{instr:{tolower:{prop:gender,this}},herm},Stalmare,Horse}}}}} {if:{eq:{pronouns:%a,this},his}, Stallion, {if:{eq:{pronouns:%a,this},hers}, Mare, {if:{instr:{tolower:{prop:gender,this}},herm}, Stalmare, Horse} } } } Claude falls over. Joshua ruffs, "Very long lists will lose data if pulled in all at once. They will be cut short (or 'truncated') when the maximum string size is exceeded by the total list size." Garrison picks Claude up and dusts him off. Claude licks Garrison. :3 Niny'ah says, "IIRC, the buffer is something like 1kB?" Joshua looks over the MPI and nods, "This works, though I may have to show you some things that could make the result much simpler. Joshua ruffs, "Only one way to find out." Joshua ruffs, "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" Garrison blinks GreenKai says, "2KB-2!" Austin says, "I think that it's 511 lines in a list and perhaps 1023 characters per line. I forget exactly." GreenKai says, "Well, 2KB including the "'s" Skyler hehs. Skyler says, "Well, at least we didn't crash SpinDizzy. ;)" Ronnie chuckles. Joshua nods, "If it were that easy, we'd have bigger problems." Niny'ah heh Garrison says,"again" Joshua ruffs, "Anyway, so we then get the list in a string where each list entry is separated by a newline." Joshua ruffs, "lrand is another function. It takes a string and finds all newlines in it, and then picks a section from the separated result. These strings are usually lists, hence its name. You can try this code out. How many of you are familiar with the @mpi command?" You say, "I am!" Beltrami nodnods. Niny'ah hand Skyler nods! GreenKai drops a disembodied hand, which resumes floating in the air. Garrison nods Hand hand! Joshua ruffs, "@mpi is a command for allowing you to test and run arbitrary MPI on the spot. Whatever you type after it will be run through the MPI interpreter." Joshua ruffs, "So, try:" @mpi {lrand:{list:redesc}} Command : "{lrand:{list:redesc}}" Result : "A white combination cap sits on his head, rather floppy in shape and with a crest depicting an anchor into a cloud." Joshua ruffs, "This will probably work for everyone in the room except Kelisea, since she does not have an MPI description. I'm guessing everyone else does." Claude nods! Hand wiggles a finger as well. Joshua ruffs, "lrand can be given a second argument. If you wish to use a separator other than a newline, you can feed that to it. So, if we wanted to be particularly silly, we could use the letter 'e':" GreenKai says, "I didn't wanna use a big ol' redesc when making the Hand to go with Albia. It's an old-fasioned zombie." BunnyHugger nods. @mpi {lrand:{list:redesc},e} Command : "{lrand:{list:redesc},e}" Result : "mi-anthro cat, with whit" You say, "That's silly." Joshua ruffs, "Run that a few times, and you'll probably get some results that have more than one line." GreenKai giggles, "It got Kai norn!" BunnyHugger says, "Got it." Joshua ruffs, "The resulting string is what lrand returns. A point of confusion many people get when using MPI is how to handle returned data." You say, "Oh?" Joshua ruffs, "When a property is evaluated, such as a @succ or @osucc message, whatever the result of the outermost MPI command is gets put into the result. So, if I did:" @mpi Joshua has been described as "{lrand:{list:redesc}}". Joshua ruffs, "I'd get the result of that MPI injected right between those quote marks." You say, "Right!" Joshua ruffs, "Now, many people get confused (especially those who have primarily used MUF before. I've been guilty of this) and think they are supposed to explicitly tell the MPI interpreter to make this statement." Joshua ruffs, "They try to run this:" BunnyHugger says, "Yes yes yes!!" @mpi Joshua has been described as "{tell:{lrand:{list:redesc}}}". You say, "Oh." BunnyHugger says, "This is why MPI feels so foreign to me!" Austin smiles. Niny'ah says, "MPI is a string-evaluated system" Joshua ruffs, "If they run that, they'll get these two bits of output:" Niny'ah says, "Not a string-concatenated" covered with a black tough plating, its material difficult to determine from Joshua has been described as "covered with a black tough plating, its material difficult to determine from ". Joshua ruffs, "Right, Niny'ah. It is put right into the string the MPI was in." BunnyHugger says, "MPI is so ill mannered! If I want a program to tell me something I'll *tell* it to tell me something, Frith blast it! Grrr!" Joshua chuckles. Chitter grabs BunnyHugger before she can stand up. Kona has connected. Skyler grins. Joshua ruffs, "Due to MPI's design, it would actually be much less useful if it didn't do that. After all, you wouldn't be able to inject it in directly. I mean, perhaps there could be a 'result' primitive. But this would reduce the simplicity of the language and likely cause trouble for more complex MPI programs." Niny'ah says, "The example i shared earlier is for a TRaM toy's description library. TRaM is Temporary Randdom Morph, and is operated through calls to a MUF group." BunnyHugger says, "I'm just kidding, I sort of feel like I'm starting to get MPI now. It still feels 'strange' to me though." You say, "It's essentially a templating language." Joshua ruffs, "That's a good way to think of it, Claude." Garrison nods Kelisea agrees with BunnyHugger. Niny'ah says, "the extracted MPI phrase (I prefer to call MPI 'phrases' due to the string-evaluated nature) automatically selects the best gender-title to insert, based on the character's existing gender" Joshua ruffs, "There may be times, however, when you don't want MPI to give any explicit output except that which you specify. An example of that might be when you're dealing with property manipulation." [OOC] GreenKai says, "You can also think of everything having a big ol' {tell: } around it. Then your mind can think of it like any other return from a function." BunnyHugger says, "When I used store: and it stored something AND returned it back to me that felt completely counterintuitive to me. I feel like 'store' means 'store' not 'store and also leave the string out there for inspection.'" Joshua ruffs, "You could, GreenKai. But this idea would break down as soon as you called the MPI interpreter from within MUF." BunnyHugger nods, putting her paw over her own mouth to shut herself up. You say, "That's so you can immediately do something else with the value if you need to, BH." GreenKai awws, "Yeah, but that's just cheating!" Joshua ruffs, "Because everything is nested, the most useful thing to do is to always return something. So, nearly every MPI command returns something. MUF, by contrast, always eats whatever is on top of the stack." BunnyHugger says, "Yay!" Joshua ruffs, "It's how the look command works :) And how the @mpi command works." Austin grins. BunnyHugger's paw immediately leaves her mouth. GreenKai wonders if MPI->MUF->MPI->MUF loops are covered by the loop-checker. Joshua ruffs, "They can be used to cheat a little." Joshua ruffs, "The instruction counts are what are used to keep a lid on things there." GreenKai hmms, "Is a MUF triggered by an MPI triggered by a MUF a new program, though, or an existing one?" Joshua ruffs, "MUF, being a stack based language, would be hindered if it didn't eat whatever was on top of the stack. Manual removal would be an incredible chore." Niny'ah says, "Joshua, you mentioned there likely being a better way for my example earlier, I'm guessing you mean than nested IFs?" Joshua ruffs, "Niny'ah, I was actually talking about how you were handling pronouns." Niny'ah couldn't find a "Case" functionality Niny'ah says, "oh, the scraper>" Niny'ah? Joshua ruffs, "Then again, I'm not certain if this would work well in your case, since it involves protected properties. But if you check 'help pronouns'" Joshua ruffs, "...You can see that the 'sex' can be set to Mare. And then all the %s can be defined to follow that." Niny'ah says, "nope. this will take /any/ gender for M/F, as long as masculine/feminine pronouns are defined" Niny'ah points to Sonja. "Feminine, but female pronouns Joshua ruffs, "Right. But you're making them a Mare or Stallion. So if it were possible to set their sex to Mare or Stallion, you could simplify the code significantly." Niny'ah says, "it'll also work if existing=Stallion, with set pronouns" Joshua ruffs, "So long as you could define the pronoun set, too" Niny'ah says, "this is quicker and probably simpler" Joshua ruffs, "You can use the legacy %s props, but if you do so, it could be discourteous unless you at least back them up first. I'm also unsure if there are proper hooks in TRaM. But anyway, we're getting way off topic." Niny'ah says, "yeah, thought you just meant a more elegant way to do the existing scraper" Joshua ruffs, "So, let's say you wanted to make a counter which counted how many times a button has been pushed." Joshua ruffs, "But let's also say you don't want to tell the user how many times the button has been pushed. The counter is actually in another room." Joshua ruffs, "Or, at least, in another part of the room." You say, "Okay..." Joshua ruffs, "For simplicity in testing this code, we'll just do this storage on ourselves. Though you guys can go ahead and create counter objects if you want to." Joshua ruffs, "You might set on the @suc property:" You press the button.{store:{add:{prop:counter},1},me} Joshua ruffs, "You can run that with @mpi. You'll see that the number is tacked on to the end. Slight detour here..." Skyler nods... Niny'ah says, "that code equates to {counter++}" Joshua ruffs, "The prop command is used to fetch the value of a property. If a property is empty, it returns an empty string, ''" Niny'ah says, "for all you C coders" GreenKai sings, o/~ Class, the time has come to . . . push the button . . . MPIse! o/~ Ronnie chuckles. Joshua ruffs, "If MPI is asked to do math on an empty string, it assumes the proper value is 0." Joshua ruffs, "So it won't crash when you run this the first time if you've not set anything." Joshua ruffs, "That can also be a problem, however." @mpi {add:Hello,1} Joshua ruffs, "See what happens when you try that." Command : "{add:Hello,1}" Result : "1" You say, "It says "1"." Joshua ruffs, "Not only does every empty string produce 0, but any string which MPI cannot determine a number from will also be understood as a 0." You say, "Aah... *nod nod*" Kelisea grins. Joshua ruffs, "This can be a pain when debugging-- if you are accidentally sending a string to a function where a number should be, you can end up very confused, thinking, 'Why is this number 0? I can see right here it's supposed to be 1337'. A complete red herring."" Joshua ruffs, "So, keep that in mind if you get weird numbers: Am I accidentally passing a string somewhere?" BunnyHugger nods. BunnyHugger makes a button on herself and presses it a few times, but frowns. "Why is it always giving me '1'? Shouldn't it be counting up?" Joshua ruffs, "Because you start with 0, and add 1 to it." BunnyHugger says, "I see." Joshua ruffs, "The command you used was 'add 1'." Joshua ruffs, "What you add 1 to is 0 in this case, since the string is understood to be 0. 0 + 1 is 1." BunnyHugger says, "I see..." BunnyHugger says, "Are you going to show us what the code would look like to make a counter that counted up each time we pressed it?" Joshua ruffs, "Sure. You remember that command I gave you earlier that had store and prop?" Joshua ruffs, "Run it again." Roofus_roo has disconnected. BunnyHugger looks confused. "I thought it was this one? 'You press the button.{store:{add:{prop:counter},1},me}'" Joshua ruffs, "Store is the opposite of prop. It stores a value in a property. Store requires you to explicitly state where a prop is to be stored. Prop is different. It will pick a default object (the MPI the object concerns-- usually the MPI the object is stored on), and if the property is not there, it will search up the environment tree trying to find it." Joshua ruffs, "Yes. Run that a few times." BunnyHugger says, "I did." Joshua ruffs, "And did the number increase?" BunnyHugger says, "No!" BunnyHugger looks worried and confused. Joshua takes a look... You say, "What does {add} return?" You say, "Because it looks like you're not telling store where to store." Joshua thought he had that working earlier... BunnyHugger says, "I just get '1' every time." Joshua ruffs, "Ah, you're right. I thought Store didn't do implicit storage." Joshua ruffs, "My bad. I suppose it does. Let me redact that last statement." Joshua ruffs, "And adjust the code." BunnyHugger says, "OK!" BunnyHugger smiles. Beltrami grins. Joshua ruffs, "Good catch." @mpi You press the button.{store:{add:{prop:counter},1},counter,me} Tora has disconnected. Command : "You press the button.{store:{add:{prop:counter},1},counter,me}" Result : "You press the button.1" - dir /_/:(no value) - dir /_bbsread/:(no value) - dir /_board/:(no value) - dir /_fake/:(no value) - dir /_feel/:(no value) - dir /_hand/:(no value) - dir /_images/:(no value) - str /_lastmorph:Captain Kitty - dir /_meet/:(no value) - dir /_morph#/:(no value) - dir /_page/:(no value) - dir /_prefs/:(no value) - str /_receive_ok:yes - dir /_reg/:(no value) - str /_regmorphs: OWL captain - str /_scent:Claude smells of vinyl, ink and oranges. Why oranges? Good question. - str /_sweep:sweeps the sleepers with an invisible broom. - str /_swept:scampers home with a flustered "Meow!" - dir /_tel/:(no value) - str /_throw_ok:yes - dir /_ui/:(no value) - dir /_verbatim/:(no value) - dir /_whisp/:(no value) - str /_xcondbref:10473 - str /_xconecho:y - str /counter:1 - str /gender:male - dir /muckstat/:(no value) - int /ratpoints:5 - str /redesc#/:3 - str /reflist:#3 #4 - dir /RIDE/:(no value) - dir /rose/:(no value) - str /sex:male - dir /snow/:(no value) - str /species:LOLcat - int /testlist#/:1 - dir /whereis/:(no value) - str /~status:meow 39 properties listed. Skyler raises a foreleg. Joshua ruffs, "Store is the opposite of prop. It stores a value in a property. Store requires at least two arguments-- the value to store and the prop to store it on. The property will always be stored as a string, which is important to MUF coders who might interact with MPI and who have to deal with property types like Integers and DBREFs. You can also specify what to store the property on. If you don't specify, it will assume that it should be stored on the object the MPI is concerning. The MPI is always run against a particular object. Usually, this is the object the property is stored on." Joshua points to Skyler. Skyler says, "I know we'll probably get to this in a bit...but maybe it's worth mentioning the 'mpi' command...which is not the same as the '@mpi' command. If you don't know what an MPI function will do, 'mpi ' tends to be really good at telling you." Skyler says, "In this case, 'mpi store'." Joshua ruffs, "Right, I was going to go into that soon. :)" BunnyHugger checks the new code and looks happy. Kelisea ohs. Skyler hees. "I use it a lot. That's the reason I mentioned it not." BunnyHugger says, "mpi is to MPI what man is to MUF. And it's ... about as variable as the MUF manual in terms of how useful it is." BunnyHugger says, "I have a love-hate relationship with the MUF manual." Joshua ruffs, "nods, "Right." Joshua ruffs, "I hear you." Joshua ruffs, "Skyler, did a patch get applied to this server to address the time zone problem? :P" Joshua ruffs, "Ah, we better not get into that, actually." Joshua ruffs, "We'd get ahead of ourselves." Garrison nods Skyler hmms. "Ask me later, but I don't think so." Joshua ruffs, "Now, back to our original issue. We've now got that counter running. It's storing things just fine. But we don't want the player to know what the number is when they press the button." Joshua ruffs, "So, we need to suppress the final result. We can do this with the 'null' function." @mpi You press the button.{null:{store:{add:{prop:counter},1},counter,me}} Joshua ruffs, "Now, the counter will increase, but the player will not see the results of the MPI." Joshua ruffs, "This can also be used to keep outer MPI functions from receiving input from inner ones, if you would need to do so." Joshua ruffs, "Everyone with me so far? :)" Skyler nods! Roofus_roo has connected. Niny'ah is Joshua ruffs, "Good. Kelisea, are you still awake?" Garrison says, "Yep." You say, "I am!" Joshua ruffs, "She is in a unique position to demonstrate something for us." Beltrami nods? Joshua ruffs, "Though if she doesn't wake up soon, I'll have to find another method :)" BunnyHugger nods. Joshua takes a short RL bathroom break. Brb... Garrison grins Hand waves! Kelisea nods, "I'm right here. :) You say, "Great timing." Garrison grins Ronnie chuckles. Joshua returns! Joshua ruffs, "Ok. So, could you type:" Kelisea gets ready to... @desc me={list:redesc} Joshua ruffs, "Kelisea has no redesc list, so this will have an interesting result." Kelisea nods and did so. "Now what shall I do?" Joshua ruffs, "Oh. I guess not. Hmm." Joshua ruffs, "Maybe that list is called something different..." You say, "It should just display nothing." Joshua ruffs, "One moment. Austin, could you help me with something?" Ronnie has disconnected. Joshua leans over to whisper into the Coati's ear. [OOC] GreenKai tried it, then forgot what her hand looked like. Doh. Kelisea, could you remind me? :-) Joshua ruffs, "Everyone, please look at Kelisea." Skyler nods... Joshua ruffs, "Notice something odd? Who can account for this strangeness?" BunnyHugger says, "Heh, I've made this mistake." BunnyHugger raises her hand. GreenKai says, "Environment prop!" Garrison nods Niny'ah blink A dark and quiet room, awaiting students to bring it to life. BunnyHugger says, "I used this as an example in building class actually." Joshua nods, "Right! The room's description list is 'redesc'. If there is no 'redesc' list on an object, MPI searches up the environment tree for any object that may have the redesc list. Niny'ah says, "Doesn't it default to "here" if "me" not found?" BunnyHugger says, "Although I didn't have a working example to show like Kelisea does. >:)" Garrison hehs Joshua ruffs, "Since redesc is also used on both people and rooms, the most common result is people ending up with the room's description." You say, "That's an interesting side effect..." GreenKai says, "It's like you're invisible. Woo!" Joshua ruffs, "redesc, by the way, is an arbitrary choice. You could name your list something else, but it's convention." BunnyHugger says, "I've sometimes forgotten to put the appropriate list on an object that I had used {list:desc} or similar on, and then could not figure out why looking at it while I was holding it was giving me MY desc, until I worked out for myself what was going on." Hand floats around mysteriously, although the coconut makes it a little obvious where it is. Kona has disconnected. Garrison grins "Actually its the Spindizzy initiation. First day here we turn you into a room :)" Niny'ah gigglesnorts Skyler grins. BunnyHugger says, "I was taught to use desc: a reaaaaally long time ago and still have that habit even though it's contrary to how people do it these days." BunnyHugger says, "Er, to use {list:desc}. Back when I didn't even know what MPI was really." Joshua nods, "The reason why people use redesc is because Triggur's hammer programs, like editplayer, use that by default. They became quite popular, so everyone started using it. Kelisea is a dark and quiet room. "I'm cool with this." Garrison grins Joshua ruffs, "Just wait until you go someplace else :)" Kelisea says, "I'm okay with other rooms. :) I fear the fire though. " Garrison says, "Or outer space around Spindizzy." Garrison says, "You'll be the cosmos.' Joshua ruffs, "Ok. So, we now have a counter object which we can increment however we like." BunnyHugger says, "Yay!" BunnyHugger says, "So that '1' that gets added..." BunnyHugger says, "It knows that's a number even though it's a string?" Tora has connected. You say, "{add} tries to parse it as a number, and succeeds." Joshua ruffs, "Correct. MPI sees '1', and does a conversion of it, which turns it into the integer 1. Then it does its operation (in this case, adding 1), and then converts the result back to a string, so you get something like '2'." Niny'ah says, "i think it's AutoCast - if(all 0d numberal) = number" Niny'ah says, "if everything that makes up this string is a valid numeral, it say "Ok, it's a number"" Joshua ruffs, "Let's make it to where when we hit 10, there's a surprise and we reset." Kelisea says, "Oh, with the counter we can use it for looping? Only up to 10 though?" Tora mrfs, "MPI doesn't have much in the way of types at all, really." BunnyHugger says, "Does it always change it into an integer, or only when you're trying to do something with it that needs it to be?" Niny'ah says, "it's not a loop, more an if-reset" BunnyHugger nods... "This is also one of the things that confuses me." Niny'ah says, "only when doing numeric actions on it" You say, "{add} does that because it only makes sense when applied to numbers." Niny'ah-> {prop:counter} would return {str:counter} Tora mrfs, "add:'s arguments are strings, and it returns a string; those strings only make sense as integers, though." Niny'ah pseudocodes: {add:} -> {if:{isnum:counter},...} @mpi You press the button.{null:{if:{eq:{store:{add:{prop:counter},1},counter,me},10},{store:0,counter,me}{tell:SURPRISE!!!}}} Joshua ruffs, "Now we're getting a bit more complex." BunnyHugger says, "Who ordered the spaghetti?" Joshua ruffs, "We're also getting MPI that is more difficult to read" Niny'ah says, "may I reshare my example, to show the improv-whitespace here?" Somewhere on the muck, Ali has connected. BunnyHugger looks a little lost. "Let's just do one thing at a time..." Joshua ruffs, "Yes, one thing at a time. Let me paste this code with indentation." {null: {if: {eq: {store: {add: {prop:counter}, 1}, counter,me}, 10}, {store:0,counter,me}{tell:SURPRISE!!!} } } Kelisea says, "From what I see of that code it means 'if what is stored in counter as it adds up by 1 is equal to 10 then store a 0 in counter. Also say surprise on the screen." Joshua ruffs, "Someone else may have a better indentation scheme than this, but it does help us keep track of brances." Joshua braces You say, "Now it makes sense." Joshua ruffs, "That is correct, Kelsea." Joshua Kelisea Garrison nods Joshua ruffs, "Kelisea, you've done a good deal of work in MUSHcode, yes? Wouldn't it be nice if you could store code like this?" Kelisea says, "I can read much of code intuitively but come up with it from scratch is often much harder for me. I can debug also rather well even systems that are way over my head." Joshua nods, "On MUSH systems, though, all code has to be stored in one long line, right? Kelisea says, "I see many using setq in MUSHcode if they need temp storage. But yes, I would love variables again." Kelisea says, "setq is the only temp storage way. And it gets lost after its use." Kelisea says, "I mean what is stored in it gets lost after its use." You say, "No Joshua, you can have functions." Joshua ruffs, "That's not the same, Claude. I mean, you can't store the code with indentations and formatting." Joshua ruffs, "That's what I'm getting at." You say, "I find it more useful than indentation." Joshua ruffs, "I'd like to use both :)" You say, "Sure, that would be ideal." Skyler says, "If it /can/ be, Joshua, even I don't know that." Joshua ruffs, "We'll get to function definitions later. Not sure if we will today." Kelisea says, "You'd likely not want to store it with indentations and formatting. Sometimes a full complete chargen system is stored on two objects or so." Skyler nods. Kelisea says, "Skimming through global objects is horrendous." Skyler says, "The thing I hate about MPI is like...I create it once, it all ends up in one line, and if I have to debug it later, it's pure hell." Garrison nods to Skyler. BunnyHugger says, "So how do you do this with the indentations? Someone told me once but I forgot. It's to do with the list editor?" Joshua ruffs, "In MPI, you certainly can store the bulk of your MPI this way, and just use a wrapper to handle it from there. Eval can be used on a list." Joshua ruffs, "You do have to be a little selective with your indents when dealing with raw strings, but those usually need to only be on one line anyway." Joshua ruffs, "For integers, DBREFs, and functions, whitespace is trimmed and inconsequential." Niny'ah says, "I ran into a truly foul whitespace problem a while ago" BunnyHugger says, "Can you give an example of how I use eval with a list to do this?" Niny'ah-> {MUFmakefakeitem:, ItemName,...} Niny'ah er Niny'ah-> {MUFmakefakeitem: ItemName,...} Joshua ruffs, "BunnyHugger, create a list with lsedit, and past in your formatted code. Then, you can use {eval:{list:listname}}" BunnyHugger says, "OK." Niny'ah says, "the FakeItem utility can't handle leading spaces" Kelisea hmms, "I do have to ask how is it that MUF and MPI work together on a MUCK." Niny'ah says, "so fair warning - NEVER add non-string whitespace when writing a prop" Dragoncat has arrived. BunnyHugger says, "Good question Kelisea." Niny'ah says, "oh damn what was the formatting..." BunnyHugger says, "I know this a little but not well." Claude waves. Joshua nods, "We may even have to change my example formatting there." Beltrami smiles to Dragoncat. Joshua is, oddly enough, getting permission denied errors, "I have a feeling this may be due to the way @mpi works..." Kelisea says, "I only ask my question because there is referral to MUF and MPI a lot interchangeable. Not like I have a clue of the difference here." Joshua ruffs, "Oh, didn't see your question." Austin says, "To using lists? Yes, I don't believe @mpi lets you summon lists, at least not easily." Dragoncat hums... Niny'ah says, "MUF is a Compiled Program, and some are designed to be slipped in as an MPI Func" Joshua explains, "MUF is a stack-based FORTH-inspired language that does the heavy lifting of a MUCK. It can make major database and setting changes, can create and destroy objects and players, and all sorts of other really fun stuff. Garrison hehs and nods. Niny'ah-> {muf:$program,args} Niny'ah says, "so" BunnyHugger says, "MUF programs are stored as database objects in themselves, whereas MPI is attached to other objects. That's another difference I know." Joshua ruffs, "MPI is a much less powerful, but perhaps more expressive language. It can't do large scale changes to the database without really bending it. Instead, it focused on making fun programs and decorations." Niny'ah-> {muf:$makefakeitem.muf,Keycard} BunnyHugger realizes she's interrupting the professor too much and raises her paw instead. Joshua ruffs, "With proper wizard permissions, MPI can do more things, but it still can't touch MUF in terms of ability to manipulate the database." Niny'ah says, "this would call the MakeFakeItem MUF, and pass it "Keycard"" Joshua points to BunnyHugger. BunnyHugger stands up excitedly. BunnyHugger says, "One interesting difference is that to write MUF you must have a flag ("bit") set on you by a wizard. Anyone can write and use MPI. On Fuzzball. I've discovered a type of MUCK where this is not the case, which blew my little mind -- where you have to have a bit to use MPI. But here, that's not the case and so MPI has the advantage that anyone can use it!" Niny'ah says, "MakeFakeItem then writes a set of props in the trigger's /_fake/ directory" Garrison nods to BunnyHugger. BunnyHugger says, "Fuzzball is the type of MUCK we're on and the one that seems most common among furry MUCKs." Niny'ah says, "If I may, Joshua?" Joshua ruffs, "Go ahead, Niny'ah." BunnyHugger sits down. Kelisea nods and understands now. [Connection froze here.] Niny'ah snaps her fingers. "The corkboards too Joshua ruffs, "Welcome back, Claude." Niny'ah says, "did you get my long one, Claude?" Dragoncat waves to Claude. Garrison nods "An excellent description." You say, "No, Niny." Niny'ah says, "MPI is built around the idea that everything can be evaluated to strings-evaluated and properties. MUF is an actual programming language. you can build a behavior in MPI, but it's still built out of a group of fairly simple "primitive actions" - Arithmetic, Store, Retrieve, Tell and flow control (if/while/for etc). MUF is a High Level Language in the more traditional sense, insofar as it is a selfcontained "compiled behavior". You can do more complex behaviors such as timers, deep dbase or State retrieval. I'm not a MUF programmer so someone with more experience should handle that part of explanation. However, something like the TRaM is a MUF by necessity as it does some pretty hokey prop manipulation" You say, "Oh, okay. Thanks!" Niny'ah says, "the corkboards (+read, cread, rpread) are another example of a MUFbased utility" Joshua ruffs, "Anyway, there's a previous MUF class which you can look up in the SpinDizzy newspaper." Joshua ruffs, "MUF also allows for interactive programs." Joshua ruffs, "For instance, the list editor and the paste command." Niny'ah???? when was the MUF class? You say, "A while ago." Garrison nods Niny'ah says, "generally, anything that intercepts your input will probably be MUF" Joshua ruffs, "Months and months ago. Probably over a year now." Kelisea nodnods. Joshua ruffs, "Alright, so, now we have an if statement." GreenKai read the paper! It had all the logses. Joshua ruffs, "We'll also want to loop." season winter season What season do you want to set? winter Niny'ah says, "The first can be built with an action+MPI toy, the latter would require a fairly simple MUF" BunnyHugger says, "MUF class was in spring 2011." You say, "Wow, that long?" BunnyHugger nods. Niny'ah didn't get here till May '12, will have to go back and peruse Joshua ruffs, "The for loop here is actually rather similar to C in how it handles things. " {for:varname,start,end,increment,command} Kelisea loves for-loops. Joshua ruffs, "The first thing you'll specify is the name of a variable. But this now takes us down a detour, as we haven't talked about variables yet :)" Joshua ruffs, "In MPI programs where you want to create a specific variable name, you need the 'with' command." Niny'ah still doesn't grasp MPI vars Niny'ah's been chewing on it a lot too Kelisea says, "Can you set up a simple example for us to see how the 'with' command is used?" Garrison whispers, "don't worry, I'm still logging if you missed any of it." to you. You whisper, "Thanks! See, that's why I wanted backup. :)" to Garrison. Garrison whispers, "Garrison nods "Never hurts :)" to you. Tora mrfs, "Here's a *real* simple example: @mpi {with:x,3,{mult:{&x},{&x}}}" {with:number,1,The number is {&number}} You say, "So it's essentially (let)." Tora nodnods. Joshua ruffs, "With has an interesting syntax in that you can put several expressions after it to use the variable with. This is silly. Just stuff it all in the first expression. Tora, do you see any reason for allowing with to evaluate 7 extra expressions?" Tora mrfs, "Beats maoi. :)" Joshua ruffs, "Aye, it's silly, and makes both the explanation in the manual and any code that would use that feature unnecessarily complex." Skyler says, "I think..well, we might be a little confused -here-, Joshua, and if the manual isn't any better..." GreenKai says, "Maybe they just want to decrease the number of curly brackets." Joshua ruffs, "Could you elaborate, Skyler?" Tora mrfs, "As it doesn't even compose the results, it can only be for side-effects." Joshua ruffs, "I suppose. Its use seems pretty esoteric, though. The most people will ever use it for us the first expression, in the form I pasted above." You say, "That makes sense though, Tora." BunnyHugger says, "He's trying to help me." BunnyHugger says, "Because I whispered to him that I have no idea what's going on and will probably learn it better from doing homework." BunnyHugger says, "This all looks completely incomprehensible to me. I'm really slow at stuff like this." Skyler nods. "Well, the variable stuff is a pretty big jump, too. Maybe slowing down a tad?" @mpi {with:number,,Last time\, the number was {set:number,{prop:counter,me}}. The number is now {store:{add:{&number},1},counter,me}} Joshua ruffs, "You can use with to just 'declare' a variable by making the value you set it as a null string like that. Then you can use the 'set' command to set the real value of the variable later. You can also just use set to change the value of the variable." Tora mrfs, "with: is pretty simple. It just lets you name something (the variable name), and then refer to it later (as &variable)." Joshua ruffs, "You can access the variable with {&varname}" Joshua ruffs, "Or, {v:varname}" Skyler says, "But it only lasts as long as the MPI runs?" Joshua ruffs, "Right." Joshua ruffs, "It only lasts for the evaluation within the with command." Tora mrfs, "Only inside the scope of the with: itself." Garrison says,"I'd think so." Niny'ah says, "I thinkWith: would make more sense if shown as a whitespaced prefix" Tora mrfs, "If you want something purrsistent, you'd use store: to stash inna prop." BunnyHugger says, "Right..." Niny'ah says, "as if you break it into whitespace, it -loks- like a traditionally-declared variable" {with:number,, Last time\, the number was {set:number,{prop:counter,me}}. The number is now {store:{add:{&number},1},counter,me} } BunnyHugger says, "I guess. Hrm. I'm trying to understand this in relation to how I use variables in MUF and it isn't working in my head somehow." Joshua ruffs, "The example there, bunnyhugger, is like saying:" You say, "Think local variables, BH." Niny'ah says, "it'd make more sense whitespaced though if you have several" lvar number : thenumber { "The number was " me @ "counter" getpropstr int number ! number @ ". The number is now " number @ ++ number ! me @ "counter" number @ intostr setprop }cat ; Kelisea says, "That's the same thing in MUF? *nose twitches as she tries to understand this too*" Joshua nods, "That it is." BunnyHugger nods. Tora mrfs, "It's generally more 'functional style' than variables in MUF. You don't typically use 'em, and repeatedly update them; you define 'em once, and use 'em multiple times." BunnyHugger says, "Right..." BunnyHugger says, "That's why it feels kind of limited to me." Tora mrfs, "Well, it's not fundamentally a procedural language." Joshua ruffs, "I should explain what that means." [OOC] GreenKai expects the term 'closure' to come up any time now. Joshua ruffs, "A functional language is a language where each function (optimally) behaves like a mathematical function-- that is, it's a formula. You specify the inputs and get specific outputs, and nothing in the system actually changes. Once you've done all your calculations, you do things like storage and what have you." Tora snickers atta OOCgreen! Joshua ruffs, "But not until then." BunnyHugger says, "OK." Joshua ruffs, "In a procedural language, we have no problems changing variables on the fly, or setting props in the middle of a smaller function off somewhere deep in the code." You say, "Which can easily cause trouble." Tora mrfs, "In simple terms: a MPI program is a string, which when interpreted, returns a result string." Joshua ruffs, "There are advantages to both approaches." Tora mrfs, "In most usages, it's not intended to 'do' actions." Niny'ah says, "that's why I call it "an MPI phrase"" You say, "It's easier to think and code in procedural terms." You say, "But it's also messier." Kelisea nods. Garrison nods "Indeed." Joshua nods, "Functional programming languages can produce more consistent and dependable code, but they are often less readable and less easy to understand." Joshua ruffs, "It's a trade." Tora mrfs, "Lies! :D" Joshua ruffs, "Anyway, we've now hit the stated end time." Joshua ruffs, "So, let me think. I should assign you some homework." Niny'ah says, "Quick question - is "phrase" a good term to use here?" Joshua ruffs, "Let's have you all create a small device which stores something, retrieves it, manipulates it, tells us the result, and stores it again." Joshua ruffs, "I don't have a problem with it." Somewhere on the muck, Maxia has disconnected. Joshua ruffs, "Bring said device to the next class. You can check out the mpi manual to find what goodies are available to you." Beltrami nods. Garrison nods Joshua ruffs, "Ah, that sound be part of the assignment:" Kelisea says, "Where is the MPI manual btw?" Joshua ruffs, "Use two mpi functions I didn't directly mention in my examples, and be prepared to explain what they do." BunnyHugger says, "'mpi'" Joshua ruffs, "@mpi runs MPI, mpi brings up the manual." Niny'ah says, "there's also the Belfry Library and... rdarf Library" BunnyHugger looks deflated. Niny'ah says, "rdwarf" Joshua pats BunnyHugger. Kelisea says, "Ah okay." Joshua ruffs, "With that class is dismissed, but feel free to ask any questions." Austin says, "Thank you, Joshua." Joshua ruffs, "You're welcome." Kelisea says, "Thanks for the class!" Niny'ah scootles! player is stinky Joshua waves. Beltrami nods and touches her chin. Garrison smiles "Thank you."