Retour au texte principal
Protocole de la leçon de programmation sur Diversity University
Remarque: Chip est l'enseignant
CH101, Beginner's MOO Coding, CLASS SESSION 1 LOG:
TOPICS LIST: Introduction to Terms, MOO as Programming Language, MOO as
Database, Object-Orientation, Parent/Child Relationships and Lineage,
What is a Verb?, What is a Property?, Inheritance of Verbs/Props.
Chip says, "O.k. 'bout time to fire up the logger..."
Chip says, "Let's start off by looking at the chalkboard. I've aliased it as
'board', so just 'look board'"
Chip says, "and 'read board'"
READ BOARD:
-----------------------------------------------------------------
WELCOME!
I'm Chip!
My background:
I have been arch-wiz at two MOOs: Point MOOt, Texas and AnarchyMOO
I have programmed MOO for about three years.
Academically, I'm a "returning undergrad", though most of my MOO work
has been for the purpose of helping either professors or graduate students
with their research goals.
Professionally, I program, database, network, and write technical manuals.
I also instruct, and have also been published in various little newspapers
here in Austin with Internet- or MOO-related articles.
------------------------------------------------------------------
Cil says, "Done"
kilty nods.
PJ says, "done"
Suzi_J done
Frankie smiles.
Lakota nods.
CindyB is impressed.
FrankCh exclaims, "got it!"
Chip says, "That's my basic background. I'm here essentially to help
educatorsutilize MOO as effectively as they can."
PJ says, "sounds familiar :)"
Chip says, "Hopefully soon I'll get my own research from those two MOOs
published."
kilty grins.
Chip smiles.
Cil asks, "What research?"
Data on social and economic interactions in MOOspace. :)
Chip says, "Data on social and economic interactions in MOOspace. :)"
Cil winks
Chip says, "Point MOOt was openly logged."
kilty sips tea carefully
Chip says, "O.k."
Chip says, "I had a chance to meet with most of you (at least sort of!)
beforehand."
Chip says, "The majority of you have some kind of technical background with
programming, but some of you don't at all."
Chip says, "Those I didn't interview, I did an @info on. ;-)"
Suzi_J smiles
Chip says, "OR Jeanne recommended you directly."
Chip says, "Either way, most of you ARE educators."
kilty opens her notebook and selects a pen
Cil poises her fingers over the keyboard
Chip says, "What this all adds up to is that some of you may get bored with thefirst few sessions, which reside more in the theoretical realm."
Chip says, "If you ARE a programmer, but don't know object-oriented theory, then you'll still gain from this session."
Cil exclaims, "good!"
Chip flips the chalkboard over, and it sizzles and crackles with electric blue
energy.
Chip says, "Okay."
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
*** WELCOME TO CLASS! ***
Let's start with some basic definitions:
---------------------------------------------------------------------
Chip finishes quoting.
Chip says, "This chalkboard is my main tool. I just built it today, and
hope it works o.k. I'm more than welcome to take feedback on it. :-)"
Chip says, "Let's start with MOO itself."
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
MOO: Multi-user Dungeon, Object-Oriented. This definition hails from MUDs,
which were the first text-only multi-user virtual environments on the Net.
MOO defers from MUD, however, in that its purpose is not JUST game-oriented.
MOO is both a DATABASE and a PROGRAMMING LANGUAGE.
---------------------------------------------------------------------
Chip finishes quoting.
Chip asks, "Is everyone familiar with MUDs?"
CindyB nods.
Frankie says, "No"
Adele nods.
kilty nods.
PJ was just on sloth ii...
JohnMac says, "yup"
Lakota says, "only in theory ... i've never played on one."
Chip says, "MUDs are basically Dungeons & Dragons on the Internet."
Frankie says, "I am the only senile one :->"
PJ . o O ( addicting too.... )
Chip says, "Much like MOOs, but geared ONLY towards hack and slash adventure."
ds'.
Chip says, "It is because MOO descended from MUD that people like Jeanne are
called 'wizards'."
kilty pats Frankie on the shoulder
Frankie smiles at kilty.
Chip says, "It's also why we are all referred to as 'players'. We changed
thatto 'citizens' at Point MOOt."
JohnMac exclaims, "!"
Lakota . o O ( i've been using that term too )
kilty says, "We play here too of course! *grin*"
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Database: An organized collection of data managed in such a way as to allow
easy and organized retrieval of specific data, or specific SETS OF DATA in
an organized and productive manner. Both MOO and MUD are databases.
In MOO, you and everything you own are objects which are sorted and organized
within a database. Only the people running the MOO on the unix system it is
on have direct access to the database file in which all of us are stored.
The rest of us can merely act from our role of objects WITHIN that database.
---------------------------------------------------------------------
Chip finishes quoting.
Donald says, "Jeanne prfers the term character I think. :)."
Adele says, "Life is just one big database :)"
JohnMac says, "Chip, do you want us to hold comments unttil Chip asks"
Lakota smiles at Adele.
Chip says, "This is working fine so far. :)"
JohnMac asks, "One comment on Muds?"
Chip says, "I'm assuming that y'all will ask or whatever when you need to."
Chip says, "Sure."
PJ . o O ( typical students interrupting the teacher :) )
JohnMac says, "On Most true Muds only the wizard could build .. on Mushes, all
could buid . that's more like a MOO"
Suzi_J is lagging miserably
Frankie tries to comfort Suzi_J.
Chip says, "Ture."
Chip says, "True, even."
FrankCh [to Suzi_J]: I am like you too!
Chip says, "There's also another critical difference from the developer's
perspective:"
Chip says, "In MUD, all of the programming is (traditionally, anyway) done
OUTSIDE the play environment. All of the information is stored in seperate
files in scripts."
Chip says, "In MOO, on the other hand, you develop WHILE IN THE SYSTEM."
Chip says, "AND:"
Chip says, "MOO runs entirely off the motherboard."
Frankie asks, "What do you mean Chip?"
Chip says, "The actual database file of a MOO is read once upon booting up the
MOO."
kilty asks, "Is that what is meant as a "real-time system"?"
Chip says, "Then, once an hour (standard) the MOO dumps off of the
motherboard,and writes back to the file on the disk."
Frankie [to Chip]: You mean entirely in memory?
PJ asks, "Isn't some stored in a swap space?"
Chip says, "That's a real-time system."
Barrington Bunny sits down and starts scratching his shoulder.
Chip says, "Some of that memory might be swap, but from the machine's
perspective, it's all RAM."
PJ nods.
Frankie asks, "How large is the database?"
Adele [to Chip]: That explains why data is lost from a particular check point.
Chip says, "When the MOO dumps back to disk all the changes from the last
hour,this is called 'checkpointing'."
Chip says, "If the system crashes, and has to be rebooted, you lose whatever
changes were made since that last checkpoint."
Chip [to Adele]: EXACTLY.
Chip says, "I got hit today."
PJ says, "Isn't pavel working on a disk based version of moo now? 1.8 or 1.9
something like that."
Chip says, "Lost about 10 minute's worth of coding."
Chip says, "Yup. 1.9 is supposed to be disk-based."
Cil exclaims, "Yikes!"
Chip says, "However, that means it will be slower."
kilty asks, "disk based?"
Chip says, "AND, disks will need to be replaced more often."
Cil asks, "?"
Chip says, "Disk-based means that every change is written straight to the disk
rather than waiting around for the next checkpoint."
Cil nods
Chip says, "As far as the database size is concerned, it varies with every
moo."
kilty [to Chip]: re: disk-based but won't that be slow as molasses?
Chip says, "LambdaCore db is about 1.7 megs."
PJ says, "A majority of the db will be maintained in memory...."
Chip says, "Point MOOt died finally because it got up to 11 megs."
Chip says, "At the time of checkpoint, here's what the system does:"
Chip says, "1) the db itself is already on the motherboard"
Chip says, "2) the system files and executables are on the motherboard"
Chip says, "3) a SECOND COPY of the db is generated on the motherboard and
slowly farmed out to the disk."
Chip says, "Which means that at checkpoint, you can expect the memory
requirements to be almost triple what the db size is."
Chip says, "Point MOO was an 11 meg db on a 32 meg motherboard. We crashed
thewhole system at every checkpoint."
Cil asks, "Is lag time enhanced during checkpoint?"
Chip says, "Absolutely. You get to where you can tell when they're hitting."
FrankCh asks, "Can't you increase the swap space to go over that 32meg limit?"
Adele [to Chip]: so what can you do when the db gets so large?
JohnMac says, "Kill 1/2 the characters"
Frankie [to Chip]: What can be done to reduce the size of the database once it
is high?
Chip says, "In our case, we were on linux, the swap functions choked, and the
other solution (buy more RAM) wasn't doable due to budget."
Chip says, "Purging un-read mail is the quickest way to shrink the db."
Chip says, "I also stripped out old mailing lists and archived them."
kilty vows to purge her mail religiously
Chip says, "Text data is usually the largest chunk of MOO data in the db file."
Cil nods
Lakota managed her mail today ...
Chip says, "Point MOOt was so develop-oriented, though, it eventually grew
impossible."
Cil pats Lakota on the back
Suzi_J blushes at her overstuffed mailbox
Chip says, "O.k. What is a database? I'll show that again."
Adele wiped hers all out by mistake :)
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Database: An organized collection of data managed in such a way as to allow
easy and organized retrieval of specific data, or specific SETS OF DATA in
an organized and productive manner. Both MOO and MUD are databases.
In MOO, you and everything you own are objects which are sorted and organized
within a database. Only the people running the MOO on the unix system it is
on have direct access to the database file in which all of us are stored.
The rest of us can merely act from our role of objects WITHIN that database.
---------------------------------------------------------------------
Chip finishes quoting.
Frankie points at Suzi!
PJ says, "-rw------- 1 moo 36478536 Dec 8 14:29 du.db"
Chip asks, "Any questions on that topic?"
Chip asks, "3.6 megs, eh?"
Chip says, "Healthy size."
PJ says, "36 megs"
Chip says, "We got to where we were growing over a meg a day after we hit 5.5."
kilty [to Chip]: no ... except, on disk-based won't it run too slowly?
Chip shudders.
Chip exclaims, "Youch! 36 indeed!"
PJ says, "why erau doesn't want us there..."
Chip says, "The disk-based solution, as was pointed out, is only planned to be
partially disk-based. It should balance out."
PJ says, "I use to work there..."
Cil asks, "How big is our motherboard?"
kilty nods to you.
Chip notes we're probably on at least a 64Meg Mamaboard.
FrankCh kiss my kid goodnight
kilty notes that the move should make a big difference.
Barrington Bunny looks around hoping someone will notice %(Property not found).
Cil says, "I hope"
Chip asks, "Any questions on the definition of a database?"
Cil says, "nope"
kilty [to Chip]: no
Adele doesn't know what PJ's message meant.
JohnMac says, "It was code, Adele"
Lakota looks at Barrington Bunny ... oops!
Chip says, "O.k. Onto MOO as programming language."
Adele laughs.
JohnMac says, "You need a ring"
PJ says, "Actually it was part of the directory at erau..."
Adele Thanks PJ
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Programming Language: A programming language represents a compromise between
you and the computer. It uses certain logical constructs and (mostly) English
words to perform functions which can be translated by the computer into the
zeroes and ones with which it is familiar. MOO as a programming language is
powerful and diverse. Once you have a handle on the basic tools, you can do
almost anything you can imagine. Part of this is because MOO is (as stated
before) an OBJECT-ORIENTED programming language.
---------------------------------------------------------------------
Chip finishes quoting.
Cil says, "I've worked a little with Smalltalk on the Mac"
kilty looks at the rabbit skeptically
Cil says, "OOPS"
Chip asks, "Okay. Any questions so far?"
kilty [to Chip]: no not yet
PJ says, "OOPs -- Object Oriented Programing Skills...:)"
Frankie says, "Clear as MUD..... Get it :->"
Frankie laughs.
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Note too, that the program that actually makes a MOO run is NOT written in MOO.
It was written by Pavel Curtis at Xerox Parc in the C programming language.
That C program nestles down between all of our MOO programming and the machine
itself to help make sure that what we do is properly translated into those old
zeroes and ones. Once again, as with the database file itself, only the folks
who have access to the unix system upon which the MOO runs can access the moo
program itself.
---------------------------------------------------------------------
Chip finishes quoting.
kilty exclaims, "Pavel did it all on his own? wow!"
Cil [to Chip]: do we ever deal with C within the MOO
Adele [to Chip]: Is that the Lambdacore?
Chip says, "I'm sure PAvel had assistance."
kilty nods to you.
Donald says, "actually he took it over, S White, i think started it."
Chip says, "No, we don't deal with C inside the MOO. We're totally walled off
from it."
Cil pouts
PJ says, "Actually pavel got the start code from a student at illonois (sp?)
and took it over from there..."
Chip says, "And LambdaCore usually refers to both the executable 'moo' program
and the db itself."
Adele nods.
Chip says, "The LambdaCore db has several utilities and tools in it which are
not included in the 'minimal db' you can also download. Most of those tools
are programmer's tools."
Chip says, "We'll get into those later."
Cil says, " cool"
Windwalker pokes at Lakota from Joey's Hideaway.
kilty smiles.
Chip asks, "Okay. So everyone understand that MOO is both a database and a
development language?"
PJ nods.
CindyB nods.
Cil says, "yep"
kilty nods.
Chip exclaims, "All we are is objects in the database, dude!"
Adele nods.
kilty grins.
Chip notes that Bill & Ted imitations don't come off as well by type.
Adele pokes at you.
Chip smiles.
Cil exclaims, "At least we're not numbers -- maybe we are!"
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Object-Orientation: A new philosophy in programming (last 4-5 years) which
attempts to better model the real world than does traditional programming.
The object-oriented system views the real world as a collection of objects
which interact with one another in specific ways. Each object is distinct
from the objects around it in that it has specific properties and functions
which the other objects to do not hold in quite the same way. An integral
part of an object-oriented system is the concept of inheritance, or PARENT-
CHILD relationships.
---------------------------------------------------------------------
Chip finishes quoting.
FrankCh exclaims, "yes ! we are!"
kilty exclaims, "But this is an excellent adventure!"
Chip asks, "Questions?"
Lakota doesn't mind being an object as long as she's not *treated* like one!
Chip says, "Heh."
Frankie smiles at Lakota.
Chip was waiting for that joke.
Cil pokes lakota
kilty asks, "please redo board?"
Lakota [to Chip]: didn't want to disappoint you!
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Object-Orientation: A new philosophy in programming (last 4-5 years) which
attempts to better model the real world than does traditional programming.
The object-oriented system views the real world as a collection of objects
which interact with one another in specific ways. Each object is distinct
from the objects around it in that it has specific properties and functions
which the other objects to do not hold in quite the same way. An integral
part of an object-oriented system is the concept of inheritance, or PARENT-
CHILD relationships.
---------------------------------------------------------------------
Chip finishes quoting.
kilty says, "thank you"
You bow.
PJ says, "If you have a log on your client, you might want to activate it..."
Chip asks, "Any questions on object-orientation?"
Cil shakes her head
JohnMac asks, "comment?"
FrankCh [to kilty]: "or 'look board' should do it
Chip says, "Certainly."
kilty has a log, but her board got messed up and she tried "look board" DON'T!
Suzi_J says, "Nope"
PJ asks, "Off topic, does C++ use parent-child relationship?"
Chip says, "read board will give the WHOLE lesson."
Chip says, "Yes, C++ does. :)"
Chip says, "Though I don't know it."
You sigh.
Cil says, "C++ is an OOP also -- all OOps use that relationship"
PJ pats chip on the back, not hard to learn at all...
kilty has fuzzy questions but waits until they form
Chip says, "Okay. Parent-Child:"
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Parent/Child Relationships: Though each object in this universe is unique and
set apart from the other objects around it, each object at the same time has
many things in common with certain sets of the other objects. The parent-child
classification is a way of grouping common objects together based upon certain
shared traits or functions. For example: A library and a bathroom both serve
very different functions, yet each one is at the same time, a room. Each has
PROPERTIES and FUNCTIONS intrinsic to "roomness" which define each as a room.
Both have walls, floors, and ceilings. Both are part of a larger structure...
Both serve the purpose of containing people or other objects...
Thus, both a bathroom and a library would be a CHILD of the GENERIC ROOM PARENT
in an object-oriented framework.
--------------------------------------------------------------------
Chip finishes quoting.
JohnMac says, "An object is often foreign to programmers because it contains a
name, data,and instuctions (code) .. the term used is encapituslation"
Chip nods.
JohnMac asks, "sp?"
kilty says, "ok"
Chip asks, "questions?"
Cil says, "Kind of like coding in C when you are used to fortran"
Chip says, "Exactly. O-O takes modular programming all the way."
PJ asks, "Procedures and functions then?"
Chip says, "BASIC --> Pascal --> C --> MOO"
Donald says, "encapsulation he meant :)."
Chip says, "Procedures and functions are stuck on objects in MOO."
Chip says, "Some built-in functions exist."
Adele remebers Basic
Chip says, "but most 'procedures' are verbs on objects."
PJ asks, "Whats basic?"
PJ nods.
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Verbs: In traditional programming, the whole program is one huge mess of stuff
that gets done: logical statements, functions, procedures, etc... In an
object-oriented system like MOO, you still have all of those types of
processes, but with a big difference. In MOO, each thing that is done is
a verb located on a specific object. Each object interacts with its world
either by initiating an action, or by responding in a certain way to another
action. Each of these actions or reactions is defined as a verb on the object
which holds that verb as part of its identity. For Example: You hand a donut
to your MOO-friend Bob. One of the things that helps define a donut as what
it is is the fact that you CAN hand such a thing to somebody. Thus, on the
donut itself is a verb called "hand". Another example is on you: As a player,
you can emote things and say things. This is part of what being a player
means. Thus, on you, are two verbs called "emote" and "say", respectively.
Note that in MOO, verbs are defined by their object followed by a colon,
followed by a verb name. EXAMPLE: chalkboard:write
---------------------------------------------------------------------
Chip finishes quoting.
Chip winces at some of his phraseology.
kilty asks, "what is the diff between a procedure and a function?"
Cil asks, "Verbs are defined as....?"
Cil says, "last sentence"
Chip asks, "Eh?"
Adele [to Chip]: so feature objects are holders of verbs?
Chip says, "Exactly."
Chip says, "O.k. Functions vs. Procedures."
Chip says, "You can code a verb which performs something with arguments you
pass
to it."
Chip says, "dog:hit(Frankie)"
PJ says, "my verb family is @verb #3126:spoof (The number being my object,
spoof being the verb name on me."
Chip says, "That's more-or-less the oldschool procedure."
Cil asks, "?"
kilty nods to you.
Chip says, "A "function" would be dead = dog:check_to_see_if_dead()"
However, in MOO, the distinction is pretty much blurred.
Chip says, "However, in MOO, the distinction is pretty much blurred."
Cil nods
Frankie never hits his dog :-(
kilty [to Chip]: ok I see Thank you
Chip says, "Procedures and functions both translate as verbs which are
callableby other verbs, either directly or by assigning their feedback
to a variable."
Adele is confused
Chip says, "Let me re-try that:"
Chip says, "Old-school programmers use procedures and functions."
Chip says, "a procedure is a 'verb' you call to process a chunk of data."
kilty asks, "So basically procedures and functions are two diff. ways to write
a verb?"
Chip says, "In this case, we take the variable Frankie, and pass it to the
procedure dog:bite"
Chip says, "dog:bite(Frankie)"
Frankie exclaims, "Oh Great!"
FrankCh [to Frankie]: feel good?!@#$%
Chip says, "And old-school function would be a process of assigning a verb's
returned feedback to a variable. Take the variable 'dead' and assign its
value with the function dog:check_to_see_if_dead"
Chip says, "dead = dog:check_to_see_if_dead()"
Frankie smiles.
PJ asks, "Does a function act like it does in Pascal where it only returns one
process as where a procedure can return multiple processes?"
Chip says, "In either event, this is a question based on the old-school
(pre-object-oriented) concept of function vs. procedure."
Chip says, "In MOO, verbs can pass up to three args cleanly."
Chip says, "However:"
Chip says, "That question is only relvant if you already know what a procedure
or a function are. :)"
Chip says, "In MOO, you don't have to think that way."
Frankie exclaims, "Good!!!!!"
kilty nods.
Cil exclaims, " thank goodness!"
Adele thanks Chip
Chip says, "The important thing to note here is that every snippet of code
thatDOES something in MOO is a verb attached to an object."
Chip says, "AND, that verbs are defined like this:"
JohnMac asks, "Define snippet?"
Chip says, "#2100:bite"
Chip says, "or:"
FrankCh says, "don't quite understand 'three args' and 'cleanly'"
Chip says, "Chip:bite"
Chip says, "args and cleanly we'll get to in about 3 more class sessions."
args = arguments. how much data you can pass back and forth between verbs.
Chip says, "args = arguments. how much data you can pass back and forth
between verbs."
Adele [to You]: have a verb that lets you bite?
Chip says, "Not really, but if I did, that's how it would be referenced."
Cil [to Adele]: nope, not yet!
Chip says, "Snippet = small piece of code. In object-oriented languages, you
never have that 5,000-line long piece of programming."
Chip says, "You have one verb that calls another or another."
Adele [to Chip]: I guess that's what I meant :)
Chip says, "It means that each verb is relatively short - just a "snippet" of
code."
Chip says, "I program FoxPro. "Snippet" is a FoxPro term. :-)"
kilty sips tea and concentrates
Chip says, "Okay. I hope you non-programmers didn't get scared away by that
last round. It's not important to know what a procedure or a function are."
Chip smiles.
Chip asks, "Any more questions?"
kilty sorries
Adele appreciates Chip's concern.
Chip says, "It's o.k. If you KNOW what procedures and functions are, MOO
verbskill you."
Chip smiles.
PJ nods.
Cil tries to ge up off the floor, reels and falls back down.
Chip says, "It's a big mental leap from traditional coding to object-oriented."
Chip says, "Okay. To sum up verbs:"
Chip says, "Ever object has them."
Chip says, "For the most part, the verb is specific to the object's identity."
Chip says, "A thing you can hand to someone (like a donut) would have
donut:hand as one of its verbs."
Adele nods.
Chip says, "Each of us has a verb called :say and one called :emote"
Cil has a lightbulb apperar over her head
Chip says, "Sometimes the verbs aren't as easy to understand."
Chip says, "Every object in MOO has a verb called :look_self."
Chip says, "If I use Chip:look to look at the chalkboard (I type 'look
chalkboard')"
Chip says, "The contents of my :look verb call up the chalkboard:look_self
verb."
Chip says, ":look_self is what you hack if you want your description to do
strange things."
Cil asks, "such as?"
Chip says, "I programmed mine once to reflect everyone else's description
rightback at them."
kilty asks, "strange things?"
Cil asks, "entrances and exits?"
Chip says, "Called myself "PostModern_Man" ;-)"
Adele [to Chip]: That was cruel.
kilty exclaims, "ah!"
Cil smiles
Chip grins.
Cil asks, "how do you do it?"
PJ laughs.
Chip says, "The Feature Object question that was asked earlier, we'll get back
to."
Chip says, "We'll also get into hacking :look_self later too."
Chip says, "O.k. By now you're used to me referring to verbs with the colon
in front."
kilty grins evilly
Chip says, "Let's move on to properties..."
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Properties: As specific functions help differentiate objects in an object-
oriented universe, so do properties. A property is a condition or state on
an object which may or may not be present, or which may be present in any
number of ways. The mere presence of a property is enough to begin making
some basic distinctions between objects. For example, each of you has a
gender. The donut you handed to Bob does not have a gender, and the reasons
are obvious. Properties further distinguish their holders from other objects
by having certain VALUES.
Note that in MOO, properties are defined by their object's name, followed by
a period, followed by the property name. Example: chalkboard.description
---------------------------------------------------------------------
Chip finishes quoting.
Chip says, "So: every object that you can look at has a :look_self verb which
shows to you the object's .description"
Adele [to properties]: are non-verb characteristics?
Chip says, "Properties are referenced with a . in front."
Chip says, "Verbs DO stuff. Properties simply store information."
Adele nods.
Donald [to Chip]: could you add gender to objects , to do a French moo for
instance, the obvious is not so obvious .
Chip says, "Your "look" verb allows you to look at things. What you see is a
description which is stored in a property: .description."
Chip says, "Yeah, you can."
Chip says, "You can put any property on anything, with the exception of the
.player, .programmer, and .wizard properties. You can put them on a thing,
but they won't work right."
kilty notes that a French Moo exists
kilty nods to you.
PJ says, "What about objects that have wiz_perms I have heard about that on
MOO-Cows..."
Chip says, "O.k. Now, the presence of a property says a lot, but the VALUE of
the property says much more:"
Cil asks, "?????"
Chip says, "We'll get into wiz-perms in a bit."
Chip quotes from Chip's dimensional phase-shifting, quotable chalkboard:
---------------------------------------------------------------------
Values: This is what a property actually IS. As each of you has a property
called "gender", each of you has a certain value for that property: MALE,
FEMALE, NEUTER, etc. Each of these options is the VALUE which the property
holds.
Note that sometimes it is more the VALUE of the property than the PRESENCE
of the property itself which helps shape an object's identity. For reasons
of security, the WIZARD PROPERTY exists on every object in the MOO. On most
objects and people, this property is set to 0. (Value = 0 translates as "NOT
a wizard"). Only for the wizards of the MOO is the value of the wizard
property set to 1. (IS a wizard). Note that the use of 0 and 1 in properties
is common to many other properties as well. It is a great way to state whether
something IS or ISN'T some specific thing.
---------------------------------------------------------------------
Chip finishes quoting.
Barrington Bunny sits down and starts scratching his shoulder.
Adele [to Chip]: so a programmers bit is turning the programmer property to 1?
Chip says, "bingo."
Chip says, "AND changing the player to a child of the generic programmer."
Chip says, "so that you now inherit from the parent all the verbs that help you program."
kilty says, "ummmm.."
Cil says, "ahhhhh"
Chip says, "That's the important part about parent/child relationships:"
kilty says, "I have a question..."
Chip says, "Any verb that the parent has, and any property, the CHILD INHERITS."
Adele says, "Eureka."
Chip [to kilty]: Shoot.
PJ tries to kick Barrington Bunny.
Barrington Bunny scampers out of the way to avoid PJ's shoe.
Lakota looks at PJ questioningly.
kilty asks, "I was a child or generic programmer, changed my class to #500 but
am I still child of programmer? What happened there value-wise?"
Chip says, "O.k. Here's where we get into some strange stuff."
Chip says, "everyone type this: @parents me"
@PARENTS ME
Chip(#2100) generic programmer(#59) generic builder(#4) generic
player(#6) Root Class(#1)
@parents #500
Crash Test Class(#500) generic programmer(#59) generic builder(#4)
generic player(#6) Root Class(#1)
Chip says, "Almost every object in MOO comes from a whole lineage."
FrankCh says, "doesn't work for me."
Chip says, "Uh oh. You don't have your programmer's bit yet..."
kilty says, "child OF (not or)"
PJ says, "Just asked jeanne"
Donald says, "nope just a generic player."
Chip says, "The @parents verb is a verb on the generic programmer. If you
don't have it, you're not a child of the programmer. If you do, then that's
one of the verbs that got handed down from your parent."
FrankCh asks, "how to set my programmer's bit?"
Cil [to FrankCh]: How did you enroll?
Chip says, "Can't set your own. Has to be done by a wizard."
kilty [to Chip]: So it's sort of like inclusive sets?
Chip says, "I thought everyone had their p-bit."
FrankCh has just been awarded the degree of Programmer.
Donald [to FrankCh]: you can't , you need a wiz, well you can but don't do it.
PJ [to Frackch]: you should have it now
kilty [to Chip]: root includes 6 includes 4 etc?
Chip says, "Yes... Back to the question about changing your parent to #500:
Everyone type: @parents #500"
FrankCh [to Cil]: I enroll by email to chip
Chip says, "I thought you had read the syllabus."
Chip says, "No biggie. Get a wizard to hook you up."
Adele says, "I'm already a #500."
Chip says, "If you are a child of #500, it in turn is a child of the generic
programmer."
Suzi_J nods
FrankCh [to PJ]: Thanks for the progammer bit
Chip says, "What that means is that YOU have inherited all the verbs and
properties of the programmer AND all the verbs and properties of the #500
player class."
kilty [to Chip]: so it's sort of like inclusive sets?
PJ asks, "so you need to be a programmer to get it then?"
Chip says, "You have more verbs and properties than I do."
Chip says, "Inclusive is not the best way to think about it."
Chip says, "Because the parent doesn't care who its kids are."
Cil asks, "what is the #500 player class?"
Chip says, "It's more important from each object's perspective who its parents
are."
JohnMac says, "this new society"
Chip says, "HOWEVER"
Donald says, "crash test dummy, #500 I recall"
Adele says, "type help #500"
kilty [to Chip]: I guess I meant that all players are children or root
kilty says, "OF root sheesh poor typing"
Chip says, "FrankCh never actually typed 'enroll' that's where I put the
programmer check."
Chip says, "O.k."
Chip says, "ALL players are children of #6, Generic Player"
Suzi_J says, "There are many things on the #500 including absent page
answering that are not availble on other parents"
Chip says, "That's what distringuishes you from Barrington and from the donut."
Adele laughs.
kilty [to Chip]: ok thanks
Chip says, "If you can @dig, and build rooms, you are ALSO a child of #4,
Generic Builder"
Chip says, "It's the one with the @dig, @exits, verbs."
PJ says, "absent page answering, now there's a db sucker..."
Chip says, "Next in line is the programmer, with all of its verbs,"
Suzi_J smiles......
Chip says, "and finally, the wizard."
Chip says, "In the case of the programmer and wizard, you also have to have
your
.programmer or .wizard property set to 1."
Chip says, "If I create a player class LIKE #500, but don't make it a child of
the generic programmer..."
Frankie [to Chip]: So obviously an object can have more than two parents
Chip says, "Then, switching to that class means LOSING your programmer verbs."
Chip says, "#500 IS a child of the programmer, so you get all the benefits of
the whole lineage."
FrankCh lag farrrr behind
Chip says, "You can have multiple parents, but only in the sense that each is
in
turn the child of another parent."
Chip says, "wizard is a child of programmer is a child of builder is a child
of player."
Suzi_J understnads
Suzi_J understands too
kilty's head is brightly lit by it's overhead lightbulb
Frankie exclaims, "I get it now!"
PJ asks, "can you be a wiz without a programmer?"
Chip says, "if you're a child of the wizard, you get to do and be ALL the
stuff that ALL of those get to do and be."
Chip says, "Nope."
Chip says, "Becuase wizard is itself a child of programmer."
Chip exclaims, "No way to avoid your grandparents!"
Adele asks, "Because wiz is child of programmer?"
Adele laughs.
kilty nods to Adele.
Chip says, "so: when you type: @parents, what you are doing is listing your
whole lineage in order of mom to grandmom to great-grandmom, etc."
FrankCh asks, "so there is no private property that won't pass to the child in
MOO?"
kilty says, "a family tree of sorts"
Donald [to Adele]: its like saying the Queen of england is a person, not much
more than that.
Cil says, "not unless you get a good lawyer! :)"
Chip says, "You CAN create things which are not copyable. I can make an
object that I do not allow anyone to make a child of."
Chip says, "BINGO."
Chip says, "The Queen of England is a person, as opposed to a donut."
kilty asks, "bingo?"
Chip asks, "Which means, what?"
Chip says, "you can kiss her, talk to her, but you can't eat her or hand her
to Suzi."
kilty asks, "her parents aren't the same as the donuts'?"
kilty laughs.
Chip says, "Nope."
Adele [to Chip]: Because she's a player object.
Chip says, "There are five main MOO generics:"
Cil asks, "who are the donuts parents?"
kilty says, "Chip asksed me what that meant I guess it was rhetorical...
*grin*"
Chip says, "$thing - the generic thing."
Chip says, "$room - the generic room."
Chip says, "$player - the generic player."
Chip says, "$container - the generic container"
Chip says, "$exit - the generic exit."
Chip says, "That's it."
Chip says, "Every single thing in MOO comes from one of those lines of
descent."
Chip exclaims, "Oops!"
Chip says, "$note - generic note."
kilty hands the Queen of England to Adele and nods to Chip
Chip says, "A donut is just a child of $thing"
Chip says, "The Queen is a $player"
Donald says, "what about #1 :)."
Chip says, "O.k."
Chip says, "#1 and #0..."
Chip says, "#1 is the Root Class."
Chip says, "all of those generics I listed are direct children of it."
Chip says, "EVERYTHING in MOO is descended from #1."
kilty nods.
Chip says, "That's the last parent listed when you '@parents me'"
Chip says, "that's the great-grandpappy of us all."
Donald says, "I am not sure but $container here may be different it has $thing
in between."
Chip says, "Ah. That might be the case all around."
Donald asks, "it may be someone redefined it here at DU ?"
Chip says, "It mostly acts like a 'thing' anyway. See - it is all just means
of
distinction."
Chip says, "A box is thing that happens to be a thing you can put other things
into. It makes sense."
Chip says, "$note is probably actually a $thing too, thinking about it."
Chip says, "Yup. It is."
Chip asks, "Have you noticed that I've been referring to the main generics as
$whatever?"
PJ nods.
kilty nods to you.
Chip says, "That's a system variable."
Cil nods
Chip says, "Any and all generics (higher up on the parent scale anyway) have
been what they call 'corified'. As in, "put into the core""
Chip says, "that's where object #0 comes in."
Chip says, "It's the system object."
Chip says, "Not part of the lineage itself, but it controls how EVERYTHING is
done."
Chip says, "It's what they call the MOO core."
Chip says, "for every $whatever in the MOO, there is a property on the #0
object."
Chip says, "In the case of $player:"
Chip says, "#0.player is a property"
Chip says, "It's VALUE is set to:"
Chip says, "#6"
Chip says, "So: #0.player = #6"
Chip says, "Once that's done, you can ALWAYS slap a $ in front of the property
name:"
Chip says, "$player"
kilty is confused by idea of #0
PJ nods to kilty.
Chip says, "And expect it to reference the object that is the property's
value:"
Chip says, "so: $player = #6."
Cil asks, " Can we ever do this?"
Adele [to Chip]: so we all start out as 0 until a value is assigned?
Chip says, "I can type '@parents #6' or '@parents $player' and get the same
feedback."
Chip says, "Only a wizard can touch #0."
Chip asks, "We start out as zero?"
Chip says, "mmmmm...."
Chip says, "You don't exist AT ALL until you are created."
kilty [to Chip]: each player has a diff value on #0?
Chip says, "Nope. Only the generics."
Adele [to Chip]: and that's how they create a character (player object)?
Chip says, "When a player is created, several things happen."
Chip says, "1) create($player, "Frankie")"
Chip says, "2) Frankie.player = 1"
Chip says, "That's the crux of it, though it's more complicated."
PJ asks, "crux?"
Chip says, "The system object doesn't know we're here."
Chip says, "It only knows that $player exists."
JohnMac says, "No ma'm"
Chip says, "The wizards create children of $player, which is what we are."
Adele says, "This is rather metaphysical."
kilty [to Chip]: what's the purpose of #0?
Chip says, "Our .player properties are also set to 1."
Chip says, "#0 informs the whole database what its verbs and properties and
built-in functions are. From the level of the top parents of each lineage."
Chip says, "O.k. I'm gonna have to cut this off here."
Chip says, "Unfortunately, a client has just come by."
Frankie [to Chip]: Thanks Chip!
Chip says, "all-night tech-writing gig."
Chip shudders.
CindyB claps her hands.
kilty says, "it's 7:30 anyway"
JohnMac asks, "Will you send out transcripts, Chip?"
Cil exclaims, "thanks!!!"
Donald thanks, very nice Chip!
Frankie applauds
Chip says, "O.k. Mull over these concepts, and MOOmail me with questions."
kilty hugs you.
Adele thnks Chip
Suzi_J exclaims, "Thank you, Chip!"
PJ says, "I have this logged if you all need it..."
Chip says, "I'll be taking us from here to a more step-by-step approach next."
JohnMac says, "Thanks, Chip"
PJ says, "thanks chips..."
Suzi_J says, "Well done..."
Frankie [to Chip]: G'night, guy!
Chip says, "I have logged it too. :)"
kilty exclaims, "Chip, this is VERY well done! Thank you!"
Chip bows.
Lakota thanks Chip.
Cil exclaims, "see you soon!"
PJ waves.
Suzi_J hops down from the barstool.
Suzi_J goes home.
JohnMac asks, "Will you mail the logs, Chip?"
kilty hops down from the barstool.
Chip exclaims, "Later, gators! Feel free to mail with questions from this
session!"
Frankie waves to Cil, PJ, you, CindyB, Adele, FrankCh, Lakota, kilty, Donald,
JohnMac, and Zircon_Guest.
Patrick Jermann