Io VM Cheat Sheet Prototype - 2004 Mike Austin

Object An Object is a key/value dictionary with string keys and values of any type

methods:

hover mouse over methods for a short description

clone shallowCopy typeprint write== !=and orsetSlot getSlot removeSlot slotNames foreach • perform performWithArgList ? forward super • for if while • break continue exit • catchException raiseException • @ @@ yield pause resume wait isActive activeCoroCount setSchedulerSleepSeconds schedularSleepSeconds • method block list collectGarbage do doString doMessage uniqueId getenv
Number A Number primivative is a container for a double(a large floating point number)
methods: + - / * abs exp % negate log log10 pow sqrt • < <= > >= != == between • asNumber asString asCharacter asBuffer • print roundDown roundUp ceil floor min max toggle • acos asin atan atan2 cos sin tan • random setRandomSeed • & | bitwiseAng bitwiseOr bitwiseXor bitwiseComplement sheftLeft shiftRight • isAlphaNumeric isAlphabetic isControlCharacter isDigit isGraph isLowerCase isUpperCase isPrint isPunctuation isSpace isHexDigit
String A String is a container for a byte array that can contain strings or other data
  asNumber asString asBuffer at find reverseFind beginsWith endsWith contains containsAnyCase length split splitCount splitAt substring • escape unescape append .. insert removeFromTo replace lower upper • foreach • == != < > <= >= • print linePrint doFile join • toBase fromBase • appendPath removeLastPathComponent lastPathComponent pathExtension
Buffer A Buffer is a container for a byte array similar to a immutable String
  == • print • asString at length fromTo find byteAt • setLength sizeTo empty atPut append .. prepend insertAt removeFromTo replace join split splitCount lower upper • foreach
Nil Nil is a special object used for comparison.
clone and or
List An mutable array of values. The first index is 0.
  at contains count indexOf print • add atPut empty atInsert push pop remove removeAt reverse • == • random randomize • sort sortBy • foreach do select selectInPlace detect
LinkedList  A mutable, doubly linked list of values.
  at contains count indexOf • add atPut empty insertAt push pop remove removeAt reverse • == • random randomize • and or • doBlock foreach
Map A key/value dictionary appropriate for holding large key/value collections.
  type clear • at atPut atIfAbsentPut remove count • atIfAbsent keyAtValue • hasKey hasValue • keys values do foreach
WeakLink A reference to an object that does not prevent the garbage collector from collecting it.
  setLink link setDelegate delegate setIdentifier identifier
  Date A container for a date and time
    < > == !=now clock year setYear month setMonth day setDay hour setHour minute setMinute second setSecond isDaylightSavingsTime zone • secondsSince dateAfterSeconds secondsToRun • setFormat format asString asNumber fromNumber fromString • + - += -=
  Duration A container for a duration of time
    < > == != • years setYears days setDays hours setHours minutes setMinutes seconds setSeconds • asString asNumber fromNumber • += -=
   
  File Encapsulates file i/o
    standardInput standardOutput • setPath path name useTemporaryPath • exists size • openForReading openForUpdating openForAppending open mode close • asString asBuffer readLine readLines readStringOfLength at foreach • write atPut flush • rewind setPosition position • remove moveTo
  Directory Support for accessing filesystem directories with the Io programming language. (IoServer)
  exists create path setPath name items at count
     
  Exception  The Exception proto is used to raise and catch errors
  raise raiseResumable catch resume isResumable
     
  Message A Message object encapsulates the action of a message send.
    name setName nextMessage setNextMessage attachedMessage setAttachedMessage arguments setArguments doInContext fromString
  Future A transparent container for a value returned by an asynchronous message.
    ? isWaitingFuture
  Nop No operation, useful in empty if statements
    forward
     
  Vector A vector is an array of numbers (IoServer). Supports PPC Altivec and x86 SSE optimizations.
    copy subarray setSize size at atPut • += -= *= sum min max mean square normalize absolute • log log10 pow random sort reverseSort • meanSquare rootMeanSquare dotProduct sin • setMin setMax set