MUSHCode for Moe's +wear class

OGR - Tuesday, October 03, 2000, 5:02 PM
©2000 Moses@OGR. You may copy and redistribute this document provided
that it remains complete, with credits intact, and is used only for
non-profit purposes.
----------------------------------------
Lecture Room
Aleriel has arrived.
Moses welcomes Aleriel.
Moses pokes Parity to see if it is awake.
Aleriel thanks. "Looks like you'll be teaching just me :)"
Moses chuckles. Their loss.
You say "I'll get started."
Aleriel sits comfortably.
You say "Okay, while this class(?) is going to be themed with +wear in mind, it really is to be
about how to approach building/coding a full system."
You say "What I mean by system is: a set of inter-related commands, with all of the commands
acting upon one common set of data. Most systems are global systems, but in any context, a
coded system is a multi-functional set of related commands, all acting upon one collection of
shared or common data."
You say "Which is all technical for saying, a lot of commands that just use one set of stuff to
work with."
GoI-Envoy Sae has arrived.
Moses will repose the little bit he's said for Goi's benefit.
{Post-lecture Note: I just said the three things I had said before for Goi-Envoy Sae's
benefit.}
You say "I'm hoping that we can all discuss these questions so that the class will be somewhat
interactive until we get to the real code."
Moth has arrived.
You say "As well, I am logging this so that it can be posted to the website. If you don't want
your comments noted, please tell me now, and I'll edit you out later."
You say "Moth, what I'm doing now is I'm going to list a few questions I ask before I start any
major coding project, and we'll discuss them."
Moth nods, cool by me
You say "Aleriel, are you a staffer anymu*?"
Aleriel nods, "Yes"
Aleriel says "I staff on B5:RS and a few other places"
Moses nods. Okay, good, there will be room for discussion about security issues.
You say "Now, on to the questions."
You say "1) What is the list of capabilities I want this system to have? Put another way,
what is the list of things I want players to be able to do with this code?"
You say "THis is /always/ the first thing I ask myself."
You say "So, we're going to be basing this class on a +wear, aka multidescer."
You say "What are things that you guys like to see in a multidescer? All the things we agree
on will be coded by us, throughout this and further classes."
Aleriel hmms. "Add a new desc, change descs, add on to existing desc, delete a desc"
Aleriel says "combine two or more descs"
Moses nods. all good things.
You say "Moth, Goi?"
GoI-Envoy Sae smiles. "Call me Sae, or Saeran, please. As for the descer, all of what Aleriel
said, plus eas of use and inability to break stuff by misusing it. I know those are more
general."
Moses nods to the name.
Moth says "Most +wear codebits I've seen have been overcomplicated. Most important for me is
Simplicity, overall ease of use... so very basic commands: add, edit/change, delete"
Moth likes to keep it simple because, as Parity knows, I'm code challenged ;)
Moses nods. Okay...So, let's plan on a system that allows you to make a one or two part
description, and you can add, edit, sort and delete those one or two parts. Sound good?
GoI-Envoy Sae once overwrote parts of the mu by misusing +wear code.
Aleriel oys
Moth says "Ugh..."
Moses laughs....in that dark, ugly sort of way.
You say "Okay..2) What is the most desirable way to structure the commands that will be used
in this system?"
You say "This is the next thing I ask myself."
You say "The reason for this is: You can do lots of smaller commands. Or one main command that
has many switches."
Moth says "What do you mean by structure, exactly?"
Moth says "Oh okay..."
You say "We could do +add +delete +edit +sort +puton as our series of commands."
You say "Or we can do +wear/add +wear/delete ...etc."
GoI-Envoy Sae likes the latter.
Aleriel thinks +wear/whatever is easier to remember
Moth would as well... as +delete and +edit might be commands somewhere else...
Moses nods. As do I. Now, there are certainly instances where the former is going to be an
easier way to do it.
Moses nods to what Moth said.
You say "Precisely."
Moth says "That's how you end up overwriting stuff... **shudder**"
You say "An instance where the former method of doing things is better would be a chargen."
You say "Chargens have a lot of very specific commands, so in a case like that, it's generally
better to make lots of individual commands, rather than one big switched one."
You say "Next. 3) What is the most efficient way for me to store the data that my code will
use?"
You say "Here's where we hit our first bit of code."
You say "I spend most of the time before I dive into the guts of the system on this particular
question."
You say "The reason is, I'm going to make or break myself with this. If I choose to store my
data in a very unwieldy way, it's going to be more difficult to code for, and therefore more
prone to bugs."
You say "Since we're designing a full system of commands that all acts on one shared bit of
data, how we store it is important."
You say "Parity set out some naming conventions for attributes in his classes, and they're
especially valid here."
GoI-Envoy Sae notes that she was overwriting stuff by putting the desc into the category title
accidentally. And since the category title had a fixed number of characters, the characters
were spilling out onto other stuff.
Moses ahhs and nods. "Yes. One of the things we're going to get to in the code is
error-trapping."
Moth noddles
You say "Robust coding is important when doing systems. Basic rule of programming is: The user
never types what you expect them to"
You say "By robust, I mean capable of dealing with whatever input is given it, even if to
report an error."
You say "Lots of code gets odd input and politely clunks to a grinding halt."
You say "Now...back to the subject."
You say "We should now decide what we're going to name our two parts."
You say "The first part of a desc is usually the 'general' description, and in +wears has been
classically called the 'gen'."
You say "Any suggestions for the second part?"
You say "Or for the first, for that matter?"
GoI-Envoy Sae says "Base, for the first..."
Aleriel uhhs, "I'm missing something. What parts are we talking about?"
Moses nods. Good one. The base or basic description.
GoI-Envoy Sae just gives what she's familiar with...I would call the second, if there's only
going to be two, something like clothes.
You say "The two parts that we can combine to make one desc."
You say "If at any point I jump forward, feel free to lasso me."
Aleriel says "Oh. Then yeah, I'd call it 'general' and 'clothes', too. Or something like
that."
Moses nods. I like 'base' and 'clothes'.
Moth has seen both
You say "Okay...so to group them together, we could name all of our attributes 'base-<name>'
and 'clothes-<name>'"
You say "WHere <name> is the name of the individual desc that the user has put in."
You say "So, hypothetically we could have 'clothes-blueshirt' and 'base-wounded'"
You say "Where the first is a desc of a blue shirt, and the second is a desc of the character
when he/she/it is wounded."
You say "Make sense?"
Aleriel nods
Moth nods...
You say "Another capability we will have to give our code, going back to #1 is the ability to
list and preview what descs the character has."
You say "Moth, you probably remember the space2tilde/tilde2space from Parity's class, and
Aleriel, you've probably seen it before in code?"
You say "Saeran, what space2tilde is is a function that takes a list of words, with spaces
between them, and changes the space to a ~ character."
You say "THis would change: 1 2 3 to 1~2~3"
Aleriel hasn't seen that, but she's done similar things.
Moses nods...Okay. It's a concept more than a specific practice anyways.
Moth nods... has an example on me...
Moth sets Prospero down.
Moses typically does space to - or _
Prospero wiggles his way off of Moth and across the floor in search of raisins.
You say "Is the ferret visual?"
Moses grins.
Moth says "Feel free to ex the ferret if you want to see code spam.."
Moth says "Yep he is"
Moses nods. Okay. Good.
Moses forgot to ask you if you brought him. :)
Moth offers Prospero a raisin.

{Post-lecture note: These are the two functions, also covered in Parity's codeclasses that
I will refer to, subsequently.}

Moth's Prospero
SPACE2TILDE-FN:edit(%0,%b,~)
TILDE2SPACE-FN:edit(%0,~,%b)

Carnelia has arrived.
Moses welcomes Carnelia.
Moth waves to Carnelia...
Aleriel wavey-waves
You say "We're not too far in, Carnelia. What we're discussing now is how to store the data we
will create with our +wear/multidescer."
Carnelia wavies. :) "I'm sorry for disrupting the class."
You say "NP."
You say "Okay, on Prospero, the function I'm referring to is the space2tilde-fn"
You say "Using that, we can allow for multiple word titles in our attributes."
You say "So, what was clothes-blueshirt would become clothes-blue~shirt"
You say "Which is good, visually, because the - separates the type of attr from its title
and the ~ shows us it is a multi-word title."
You say "So, we will plan on allowing for multiple-word titles(up to 255 characters, since
that's all TInyMUSH allows, I believe), with this space2tilde function doing the grunt work
for us."
You say "Carnelia, we're discussing the planning stages of the system. I'm giving a list of
questions I ask myself before I plunge into building the code."
Carnelia nods.
You say "Next question: 4) Is this for personal or global use?"
You say "A lot of systems like econ, faction, chargen, etc...are global or at least zoned
systems."
You say "Multidescers can be either/or. Which way would you like to address this one for the
purposes of this class? Personal or global?"
You say "Global means we get to address the security issues involved in building for the entire
mush, meaning powered objects, permissions, etc."
Moth says "How about personal..."
Moth says "Or whatever the standard is... I've seen more personal +wear than global"
You say "Personal means we get to experiment with the structure of the code, and we can then
later extrapolate the knowledge that we learned in a personal system to a larger scope."
Moses recommends Personal for the purposes of this class, though I will be happy to field any
global/security questions along the way.
Aleriel hmms. "Could we discuss personal, but then go into differences between personal/global
and security issues it implies?"
Moth nods, that'd be great
Moses couldn't have said it better himself, Aleriel, even though he tried. :)
Aleriel preens :)
Moth meant to vote for personal, not give an edict btb... laf... that's the cold medicine, I
swear!
You say "Okay, doing it for personal use softens the strength of this next question, but as far
as coding practices go, it is an important one to address: 5) ufuns and side-effect functions
vs. @commands."
You say "It's really more about the side-effect functions versus the @commands."
Moth nods
You say "For those of you that don't know what side-effect functions are, they're almost a
religious issue amongst coders and admin of MUSHes through the years."
Aleriel personally prefers @commands for everything except setting attributes. Like, if you
just need to list descs to the player, @pemit would work nicely. But for storing new descs,
I think function-based code is better. Am I wrong? :)
Moses nods to Aleriel. Right. The only side-effect function we'd have to really worry about
here is set(), the use of which makes our job as coders about fifty percent easier.
You say "However, there are side-effect functions such as create() dig() wipe() etc. that can
do some very nasty things to certain databases when misused."
You say "Fortunately we don't have to worry about them too much, but for other systems, such
as a global room digging system, that they would come into play."
You say "Okay, those are all the questions that I ask myself before I go charging into the
guts of the code..."
You say "Which is good, because that only took an hour."
Moses grins. :)
You say "So, I'll recap."
You say "Quickly."
You say "We first decided what capabilities we wanted our code to have. We decided on a
multidescer that could display a one or two-part description, with the ability to add, edit,
delete, list, and preview those parts that we have defined."
You say "Next we decided how to structure the commands that we'd use. We decided the best way
to do a system like +wear is to have switched commands. +wear/add +wear/delete +wear/list,
etc."
You say "Then we decided the way to store our data."
You say "darn enter key."
You say "We chose the terms base and clothes for the two parts of our description, and will
include the space2tilde function to allow for multiple word names of individual elements."
You say "Then, we decided this is for personal use, and we will use side-effect functions, as
necessary."
You say "Great."
You say "I agree with Parity's hands-on idea of coding, so if you all want to @create an object
and uselock it to yourself, we can start."

Armoire created.
Locked.
Set.

You say "And make sure to set your object 'commands'"
You say "As well, visual is nice, so that we can all look at each other's code."

{post-lecture note: Right after I said this, I completely forgot to set it on my own object.}

Parity stirs in its slumber mumbling something about objeval() and then goes back to sleep. ;)
Moses grins at Parity. Precisely.
Moth chuckles
Aleriel finished with creating an object, "Now I'm ready :)"
Prospero has left.
Moth calls Prospero and waits to be pounced.
You say "Okay, since we've chosen the format of a switched command, the best thing to do is
set up our 'big' commands first."
You say "We can set up our commands now, with the plan to farm the work of the code out to
ufuns that we will code later."
You say "Now, if we think about the list of capabilities we have, there are two forms our
+wear command is going to take: +wear/* * and +wear/* *=*"
You say "The first one is for +wear/delete <name> +wear/preview <name> for instance."
GoI-Envoy Sae says "Where name is the name of a particular desc in one of the two categories?"
Moses nods. Precisely, Sae.
You say "Of course, we hit a slight bump. What if you have both a base and a clothes of the
same name?"
You say "Suggestions?"
GoI-Envoy Sae mutters, "Don't allow it. Because coding around that just makes the command
harder to use."
Moses nods. That is one good suggestion.
Aleriel says "do +wear/* */*"
Moses nods. That's the other one.
GoI-Envoy Sae mphs. "See...that seems bad to me."
Aleriel says "Or do it the easy way - +wear/* *-* :P"
You say "It's a matter of functionality. How versatile do you want to make your system."
GoI-Envoy Sae says "Too darn complicated. :p"
You say "*/* or *-* or *^* or *booger* is of little matter..."
GoI-Envoy Sae would rather be able to do a +wear greenshirt and have it /know/ that greenshirt
is in the 'clothes' category.
Aleriel says "depends.. you could still have just * and then all you'd have to do is use %0 as
attribute name you're looking for"
Parity . o O ( +wear/* *=* )
You say "Holy cow! We have bleachers!"
Moses grins.
You say "Yes, the other thing is to simplify two commands into one of +wear/* *=*."
You say "This covers all situations that we're planning for except one."
GoI-Envoy Sae gets lost. :)
You say "The only thing we'll have to make an exception for is +wear-list"
You say "Er, +wear/list"
You say "Which is easily coded as a separate command."
You say "And is the one I was going to suggest our starting with, anyways."
You say "Does anyone else have an argument or question for +wear/* *=*?"
Aleriel says "we could do +wear/list like that, too.."
You say "+wear/list base and +wear/list clothes?"
Aleriel says "like, +wear/list base=blah, or +wear/list clothes=all"
You say "Oh, I see."
Aleriel says "'all' meaning that all descs would be listed. We'd run into a problem of having
a desc with that name, though"
Moses nods...which would be something we couldn't allow.
Parity's solution on its multidescer was to make the list command just '+wear' (well, '.desc'
but... )
Moses nods. Right. The command with no arguments produces the most generic output.
Aleriel nods..
Moses outputted the +help file when people did that with his. ;)
You say "Each specific implementation is going to be specific to the MUSH, the coder, and the
needs of the system."
You say "For the purposes of this class, I suggest we have a separate +wear/list command, with
the structure of +wear/* *=* for the other capabilities."
You say "If you want to do it another way, I'll be happy to go into that...However, I'm
striving for least common denominator."
You say "It's easier to make it easy now and hard later than hard now, and excruciating later.
:)"
Aleriel says "that works for me :)"
Moses nods. Okay, so let's get into +wear/list.
You say "We know it needs to pemit three things: 1) The two categories 2) The listing of names
in each category 3) the command you need to type in order to either get more help, or preview
one of those names."
You say "Any other suggestions?"
Aleriel shakes her head, "Not really"
Moses passes the hat around.
Parity drops a quarter in it. ;)
Moses woo's! I can afford that Jag I've been saving for!
Moses ahems.
Aleriel says "Oh, a question: where are we storing the descs? on the object or the player?"
Moth is a code newbie. I could give suggestions, but they might not be conducive to stuff
working;)
Moth is the Timmy of Coding... for those of you who watch South Park
You say "Ahh! Aleriel hit something I should have covered in the original questions."
Moses thwaps self in head.
Moth nods...gets back to class
You say "Okay, personally, I recommend objects. Reason: A lot of players(and admin) find
themselves ex'ing the player a lot. This gets quite spammy if you have multi-line descriptions
stored on your character."
Aleriel nods
Parity stirs...
Moses whisks.
You say "There are issues with doing it on an objct."
Parity says "Objects makes it harder to globalize the code later without introducing MR
inefficiency."
Aleriel says "MR?"
Parity says "Master Room."
Moses nods...Parity beat me to it.
Aleriel says "Oh"
You say "It is an extra function that has to be called for each and every command done with
+wear to put it on an object. However, for personal use, which is what we're planning this
for, it is a 50/50 issue."
You say "All those in favour of putting the data on an obj, say so?"
Aleriel says "works for me"
GoI-Envoy Sae shrugs...
Aleriel says "doesn't really matter right now.."
You say "Moth? Carnelia?"
Moth is cool with it
Moses shrugs. It doesn't matter now. There are global issues, as Parity said, with doing it
on an object. But, we're coding for personal use.
Moth nods, and it's just an example anyhoo... but it's good to know why -not- to do a thing a
certain way... and how -not- to do it;)... (altho, usually I discover that on my own;p)
Moses grins. Mistakes are the best teachers. :)
Moth grins
You say "Okay, so with the code on an object, we only need to have one basic test for our
+wear/list command. Does the player/object triggering this code have permission to see this
list?"
You say "&cmd-list <obj>=$+wear/list:@switch controls(%#,me)=0,{@pemit %#=You can't do
that!}....would be the beginning."
You say "Yes, my name conventions are opposite from parity's. I have cmd-<name> and fn-<name>"
You say "For the purposes of this class, I don't really want to get into the best way to code
graphical headers, and pretty ansi displays. That's a whole other set of classes."
Parity nods. "The prevailing argument is it lets you group things by type... my argument is I
never want to group things by type, but by category. ie, *wear not *cmd. It -really- doesn't
matter unless you're decompiling large objects into files. And then you can always sort it
with a quick perlscript. :)"
Aleriel dropped Whee.
You say "&cmd-list <obj>=$+wear/list:@switch controls(%#,me)=0,{@pemit %#=You can't do
that!},1,{@pemit %#==[center(+Wear,75,-)]=%RBasic
Descriptions:%R[iter(lattr(me/base-*),[u(fn-tilde2space,[after(##,-)])])]%RClothes
Descriptions:%R[iter(lattr(me/clothes-*),[u(fn-tilde2space,[after(##,-)])])]%RType
'+wear/preview <type>=<name> to see one of these.},{@pemit %#=Whoa. Error. Page [name(owner(me))]}"
You say "Yes to what Parity said."
You say "Okay, I typed all this out, for a reason."
Whee has left.
You say "As you can see, just in this one little command, there's some meat in it."
You say "And a better way to do part of it."
You say "You'll notice that we do the same thing identically, twice."
Aleriel peers at her code (on #1354). "Gee, I just had to list things in two columns,
didn't I?"

Aleriel's Whee
CMD_WEAR_LIST:$+wear/list: @switch controls(%#,me) = 0, {@pemit %# = You can't see that!},
{@pemit %# = List of descs:%rBase[space(10)]Clothes%r[iter(lattr(me/base*),[setq(0,%q0
##)])][iter(lattr(me/clothes*),[setq(1,%q1
##)])][iter(ifelse(gt(words(%q0),words(%q1)),lnum(0,words(%q0)),lnum(0,words(%q1))),
%r[ljust([after(extract(%q0,##,1),-)],14)][after(extract(%q1,##,1))])]}

Moses nods to what Aleriel did.
You say "You did it the hard way, indeed."
Moses grins.
You say "But, that's one option. :)"
Aleriel forgot tilde2space conversion too. "Ah well :)"
You say "Okay, that's cmd-list on the armoire, if you all want to look at it."

Moses' Armoire
CMD-LIST:$+wear/list:@switch controls(%#,me)=0,{@pemit %#=You can't do that!},1,{@pemit
%#==[center(+Wear,75,-)]=%RBasic
Descriptions:%R[iter(lattr(me/base-*),[u(fn-tilde2space,[after(##,-)])])]%RClothes
Descriptions:%R[iter(lattr(me/clothes-*),[u(fn-tilde2space,[after(##,-)])])]%RType
'+wear/preview <type>=<name> to see one of these.},{@pemit %#=Whoa. Error. Page
[name(owner(me))]}

You say "Now, as I was saying, we are doing the same thing twice, and we can make it easier on
ourselves."
Parity rarely if ever uses controls, btw; uselocks its codetoys to itself, and uselocks global
commands to appropriate groups, etc, but supposes it doesn't hurt to do a little security
layering.
Moses suggests: &fn-showname <obj>=[u(fn-tilde2space,[after(%0,-)])]
Moses nods to what Parity said. Right, by doing it this way, we're learning a lesson that we
can later extrapolate to a global issue.
You say "The function I just typed does the work that we did twice."

Moses' Armoire, revised
CMD-LIST:$+wear/list:@switch controls(%#,me)=0,{@pemit %#=You can't do that!},1,{@pemit
%#==[center(+Wear,75,-)]=%RBasic
Descriptions:%R[iter(lattr(me/base-*),[u(fn-showname,##)])]%RClothes
Descriptions:%R[iter(lattr(me/clothes-*),[u(fn-showname,##)])]%RType '+wear/preview
<type>=<name> to see one of these.},{@pemit %#=Whoa. Error. Page [name(owner(me))]}

You say "And if you ex armoire/cmd-list, it looks a bit cleaner."
Aleriel says "umm.. set it visual?"
Moses arghs!
Moses sorries.
Moses shrugs. Well.../I/ could see it. :)
Moth thought it was, then remembered... I can ex everything...
Moses laughs.
Aleriel grins
Moth waggles brows
You say "Power is beautiful, eh Moth? :)_"
Moth chuckles
You say "Aleriel's is different than mine."
~*~ No Comment ~*~
Moses grins.
You say "But that's good."
You say "It shows a different way of doing things."
Aleriel dropped Whee.
Aleriel says "It also shows that I'm incapable of doing things the easy way ;)"
You say "Okay, and to keep in the two hour window we have left, we can do one of two things:
1)Discuss bits and pieces of this command or 2) Build the framework of the next command."

Aleriel's Whee
CMD_WEAR_LIST:$+wear/list: @switch controls(%#,me) = 0, {@pemit %# = You can't see that!},
{@pemit %# = List of descs:%rBase[space(10)]Clothes%r[iter(lattr(me/base*),[setq(0,%q0
##)])][iter(lattr(me/clothes*),[setq(1,%q1
##)])][iter(ifelse(gt(words(%q0),words(%q1)),lnum(0,words(%q0)),lnum(0,words(%q1))),
%r[ljust([u(fn-showname,extract(%q0,##,1))],14)][u(fn-showname,extract(%q1,##,1))])]}
FN-SHOWNAME:[u(fn-tilde2space,[after(%0,-)])]

{Note to self for later class: Make sure Aleriel puts fn-tilde2space on Whee}
Aleriel votes for the latter.
Moses nods. Anyone who would like the former?
Moth the English Major votes for the former
GoI-Envoy Sae smiles and thinks she will adjourn, since it's all been way over her head since
we got into actual code. Later, all. :)
Moses waves to Sae, and thanks her for sticking it out this far.
Moth smiles, always good to see it, even if you don't understand it ;)... that's what I always
say.
Aleriel wavey-waves to Sae
Moses nods...
Moth waves!
Carnelia thinks she needed to attend the earlier code classes.
Moses thinks he hears a call to slow down a bit and explain what the guts of cmd-list are?
GoI-Envoy Sae grins at Carnelia. "That's what I told Moses. But it was fun anyhow. Laters." :)
GoI-Envoy Sae has left.
You say "Okay, Moth I know you know iter(), since it was covered in the second codeclass I
believe, yes?"
You say "Carnelia, do you know what iter() does?"
Carnelia says "I don't want to slow down the pace of the class /that/ much... and it would be
much. :)"
Moses chuckles.
Carnelia says "I'm afraid not."
Moth nods, knows the basics... in that I've seen it and can now read the help files;)
You say "Well we only have 15 minutes left, so I will try to explain as much as I can, while
not going into minute detail. I'd suggest reading the logs of Parity's classes."
Moth nods to Carnelia... the first three are posted. Very helpful.
Moses sorries to Aleriel, but invites her to come to the next class where we'll get to the
guts of the big command.
Carnelia ohs, and nods okay. :) That I can do.
You say "iter() takes a list of things, does something, code-wise, to each thing in the list,
and generally separates everything with a space."
You say "For example: iter(1 2 3,add(##,1)) would give you back: 2 3 4"
Carnelia nods. And the ## means?
You say "The ## is the way you reference each object in the list. The first time through,
it's 1, then it's 2, then it's 3. ## just means 'item in list I'm working on currently'"
Carnelia says "Thank you."
You say "lattr() lists the names of the attributes on an object."
Moth nods, makes sense
You say "You can narrow your search by telling it to look for attributes that start off with,
in this case, base-*. We use the * because it's a 'wildcard', meaning that it could be
anything."
Moth nods, follows...
You say "So if we have attributes named base-1, base-2, and base-3, lattr(obj/base-*) is going
to return the list: base-1 base-2 base-3 and ignore the rest of the attributes on the object."
You say "You can do lattr(obj) and get a list of every attribute on an object, or you can
narrow your search. It's like doing a keyword search on a website."
You say "So, the iter goes through the list produced by the lattr(), and passes each member
of the list into the function called fn-showname"
Moth nods...
You say "It is passed into the function as %0."
You say "The after() function takes %0, and returns everything after the - in the string."
You say "So, it's after(%0,-), and %0 is something like base-dirty, it will take what's after
the '-' and give you back the word 'dirty'"
Moth nods, cool
You say "Since we've decided to allow for multiple word titles, there is the possibility that
we will have tildes in our name. We might get back dirty~wounded."
You say "So, to account for that, we send what the after() gives us to the tilde2space function
that Parity showed us in its classes."
Moth hmms...lags
Moses did too.
You say "the tilde2space function does: edit(%0,~,%b) and what that does is find every
occurrence of ~ in the string, and replace it with a space(%b)"
You say "Again, the data is passed to the function as %0"
You say "So, all of that comes back to our cmd-list, and is displayed."
Moth nods...gets it...
You say "Parity or Aleriel probably see the potential bug I've given myself in the output of
this, and we will discuss that at the next class."
Moth woos....
Moth appreciates you scripting that out...
Moses nods. No problem.
Parity stopped paying attention awhile ago actually, sorry. ;o
Parity says "Angel is on, you see... ;)"
Moth lafs
Aleriel wonders, "When's the next class? :)"
Moth says "Oh that's right. It's Buffy Night for Parity"
Moses laughs. Oh, it's just an iter'ed list that I'm outputting words with spaces from.
You say "I'd like to do them once a week, if that's okay with everyone else?"
Moth would you like to pick it back up next Tuesday?
Moses nods. Sounds good.
Aleriel nodnods. "Works for me"
Moth says "Was 5PM Pacific a good time?"
Moses nods. Yep. Next time, I make dinner /before/ class, though. ;)
Moth grins, ditto
Parity oh, yeah. "Sepchar. help iter() will solve it in five seconds. ;)"
Moses nods. Bingo. On the nosey.
You say "Everyone read help iter() to learn about separation characters. :)"
Moth will post the announcement of part2 tonight....
Moses nods. Coolio.
Parity is probably going to do list manipulation in the next class.
Moses woo's.
Aleriel grins
Carnelia says "I'll try to be here. Parity, is information on your code class logs in the +bbs
somewhere? I haven't caught up on those yet."
Parity says "Had a talk with Cho Chang today about some stuff and realized that was a big hole
in what I'm covering."
You say "http://members.fortunecity.com/ogr/codeclass101.txt, codeclass201.txt and
mushcode202.txt"
Moth says "What will you attempt to do next class specifically? // The logs are up on the OGR
site, Carnelia, under "Resources"..."
Aleriel would really like to hear about security issues of global code and the like :)
Moth nods, would as well
Parity says "My logs are on my webpage at http://www.angelfire.com/linux/parity/ and OGR's
webpage at... uhm... what moses said."
Moth is going to head out for now and wash dishes...
You say "Okay, the next class is going to specifically cover the structure of the +wear
command, and how to take advantage of u-functions."
Moth nods, groovy
Parity will be doing more with iter() and also first(), rest(), before(), after(), setunion(),
setdiff(), member().... :)
Parity says "Just... list manipulation. :)"
Moth nods, groovies on that as well...
Aleriel says "Cool"
You say "And ldelete(), replace(), insert(), remove() are fun too. ;)"
Moth nods, thanks Moses for the class and his patience;)... and heads off to do dishes
Carnelia wavies.
Moses waves and stops the log.