archive-org.com » ORG » I » IOKE.ORG

Total: 746

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Kind: DefaultBehavior
    Kind Number Ratio Main mimic Number Rational A ratio of two integral numbers Mimics Number Rational Inactive cells kind Active cells Specs Inactive cells details kind Number Ratio Active cells

    Original URL path: https://ioke.org/dok/release/kinds/Number/Ratio.html (2016-02-13)
    Open archived version from archive


  • Kind: DefaultBehavior
    Rational nor a Decimal it tries to call asRational and if that fails it signals a condition Number Rational should return 0 for the difference between 0 and 0 show source 0 0 should 0 should return the difference between really large numbers show source 123435334645674745675675757 123435334645674745675675756 should 1 123435334645674745675675757 1 should 123435334645674745675675756 123435334645674745675675757 24334534544345345345345 should 123411000111130400330330412 should return the difference between smaller numbers show source 1 1 should 0 0 1 should 1 2 1 should 1 10 5 should 5 234 30 should 204 30 35 should 5 should return the difference between negative numbers show source 0 1 1 should 2 0 1 5 should 6 0 1 0 5 should 4 0 10 5 should 15 0 10 0 5 should 5 0 2545345345346547456756 0 2545345345346547456755 should 1 should return the number when 0 is the argument show source 1 0 should 1 10 0 should 10 1325234534634564564576367 0 should 1325234534634564564576367 should convert itself to a decimal if the argument is a decimal show source 1 0 6 should 0 4 3 1 2 should 1 8 should convert its argument to a rational if its not a number or a decimal show source x Origin mimic x asRational method 42 43 x should 1 should signal a condition if it can t be converted and there is no way of subtracting show source fn 1 Origin mimic should signal Condition Error Type IncorrectType should validate type of receiver show source Number Rational should checkReceiverTypeOn 4 dividend returns the quotient of this number and the argument if the division is not exact it will return a Ratio Number Rational should cause a condition when dividing with 0 show source fn 10 0 should signal Condition Error Arithmetic DivisionByZero should divide simple numbers show source 2 1 should 2 4 2 should 2 200 5 should 40 should return a rational when dividing uneven numbers show source x 8192 10 x should mimic Number Ratio x should 4096 5 x 3 2 x should mimic Number Ratio x should not 1 x should 3 2 x 5 2 x should mimic Number Ratio x should not 2 x should 5 2 x 1 2 x should mimic Number Ratio x should not 0 x should 1 2 should divide negative numbers correctly show source 8200 10 should 820 should divide with a negative dividend correctly show source 8200 10 820 should divide a negative number with a negative dividend show source 8200 10 820 should convert itself to a decimal if the argument is a decimal show source 1 0 5 should 2 0 3 1 2 should 2 5 should convert its argument to a number if its not a number or a decimal show source x Origin mimic x asRational method 2 42 x should 21 should signal a condition if it isn t a number and can t be converted show source fn 1 Origin mimic should signal Condition Error Type IncorrectType should validate

    Original URL path: https://ioke.org/dok/release/kinds/Number/Rational.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    cells kind Active cells other Specs Inactive cells details kind Number Real Active cells details other nil show source method other if self same 0 Reflector other mimics cell other 0 bind rescue Condition Error fn c false self other Number Real should check for mimicness if receiver is Number Real show source Number Real should Number Real Number Real should Number Rational Number Real should Number Decimal Number Real

    Original URL path: https://ioke.org/dok/release/kinds/Number/Real.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    X x should be mimic X Origin notice should return Origin show source Origin notice should Origin should not return Origin for a mimic show source Origin mimic notice should not Origin Inactive cells details kind Origin Active cells details other nil show source method other if self same Origin FB4538D Reflector other mimics cell other Origin FB4538D bind rescue Condition Error fn c false self other Origin should check for mimicness if receiver is Origin show source Origin should Origin Origin should Origin mimic Origin should foo Origin should not Ground should check for equalness if receiver is not Origin show source x Origin mimic y Origin mimic z Origin mimic z fnx other other same x x should x x should not y x should not Origin x should not z z should not z z should x eval source Takes some Text and evaluates it as Ioke source in the context of the receiver show source method source Message fromText source evaluateOn self Origin eval should eval on the receiver show source x Origin mimic x foo 42 x eval foo should 42 x eval identity should be same x should eval an empty string show source Origin eval should nil should eval a number show source Origin eval 1 should 1 should eval a simple message show source Origin eval 1 2 3 4 should 1 2 3 4 should eval a message with operator shuffling show source Origin eval 1 2 should 3 should eval multiple message chains show source Origin eval sam 1 boris 5 sooze 10 sam boris sooze should 16 mimic will return a new derivation of the receiving object Might throw exceptions if the object is an oddball object show source macro aspectCall macro ss if kind Locals self call resendToValue

    Original URL path: https://ioke.org/dok/release/kinds/Origin.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    t coerce nil t coerce symbol t Specs Inactive cells details all integer symbol boolean nil decimal coerce boolean fn coerce decimal fn coerce integer fn coerce nil fn coerce symbol fn kind Origin Coerce Active cells details coerce boolean t nil show source method t t true coerce decimal t nil show source method t t toDecimal coerce integer t nil show source method t n Message fromText if

    Original URL path: https://ioke.org/dok/release/kinds/Origin/Coerce.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    1 4 1 3 should 4 3 other returns true if the left hand side pair is equal to the right hand side pair other nil show source method other if self same nil nil Reflector other mimics cell other nil nil bind rescue Condition Error fn c false self other asTuple returns a tuple with the same content as this pair show source method tuple first second Pair asTuple should return a tuple with the two elements in it show source 1 2 asTuple should tuple 1 2 blarg foo asTuple should tuple blarg foo first Returns the first value Pair first should return the first element show source 1 2 first should 1 should validate type of receiver show source Pair should checkReceiverTypeOn first hash returns a hash for the pair Pair hash should be derived from the constituent elements show source 1 2 hash should 1 2 hash 1 2 hash should not 1 1 hash inspect Returns a text inspection of the object Pair inspect should return it s two elements separated by show source 1 2 inspect should 1 2 should use inspect format for elements show source method abc foo qux 2 inspect should method abc foo qux 2 2 method abc foo qux inspect should 2 method abc foo qux should return the inspect of something inside it show source foo method blarg fux inspect should foo method blarg fux should return a simple string for something simple show source 1 2 inspect should 1 2 should validate type of receiver show source Pair should checkReceiverTypeOn inspect key Returns the first value Pair key should return the first element show source 1 2 key should 1 should validate type of receiver show source Pair should checkReceiverTypeOn key notice Returns a brief text inspection

    Original URL path: https://ioke.org/dok/release/kinds/Pair.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    that will be sent to each object in the range the result will be thrown away if two arguments are given the first is an unevaluated name that will be set to each of the values in the range in succession and then the second argument will be evaluated in a scope with that argument in it if three arguments is given the first one is an unevaluated name that will be set to the index of each element and the other two arguments are the name of the argument for the value and the actual code the code will evaluate in a lexical context and if the argument name is available outside the context it will be shadowed the method will return the range Range each should return a seq when given no arguments show source x 1 5 each x should mimic Sequence should not do anything for an empty list show source x 0 0 0 each x x should 0 should be possible to iterate the wrong way with it show source Ground y 10 0 each xx y xx y should 10 9 8 7 6 5 4 3 2 1 0 Ground y 10 0 each xx y xx y should 10 9 8 7 6 5 4 3 2 1 should be possible to just give it a message chain that will be invoked on each object show source Ground y Ground xs method y self 1 3 each xs y should 1 2 3 Ground y Ground xs method y self 1 3 each xs y should 1 2 x 0 1 3 each nil x x should 3 x 0 1 3 each nil x x should 2 should be possible to give it an argument name and code show source y 1 3 each x y x y should 1 2 3 y 1 3 each x y x y should 1 2 should return the object show source y 1 3 y each x x should y should establish a lexical context when invoking the methods this context will be the same for all invocations show source 1 3 each x list blarg 32 cell x list should be false cell blarg should be false x 14 1 3 each x blarg 32 x should 14 should be possible to give it an extra argument to get the index show source y 1 4 each i x y i x y should 0 1 1 2 2 3 3 4 y 1 4 each i x y i x y should 0 1 1 2 2 3 exclusive from to will return a new exclusive Range based on the two arguments exclusive returns true if the receiver is an exclusive range false otherwise Range exclusive should return false for an inclusive range show source 0 13 exclusive should be false should return true for an exclusive range show source 0 13 exclusive should be true from returns the from

    Original URL path: https://ioke.org/dok/release/kinds/Range.html (2016-02-13)
    Open archived version from archive

  • Kind: DefaultBehavior
    source fn Reflector other cellOwner Origin test cell owner should offer restart ignore fn fn Reflector other cellOwner Origin test cell owner should returnFromRestart ignore false other cells other includeMimics false takes one optional evaluated boolean argument which defaults to false if false this method returns a dict of the cell names and values of the receiver if true it returns the cell names and values of this object and all it s mimics recursively Reflector other cells should return the cells of this object by default show source x Origin mimic Reflector other cells x should x Origin mimic x f 13 Reflector other cells x should f 13 x Origin mimic x f 13 x Why 1 Reflector other cells x should f 13 Why 1 x Origin mimic x Why 1 x f 13 Reflector other cells x should f 13 Why 1 should take a boolean when given will make it return all cells in both this and it s parents objects show source x Base mimic Reflector other cells x true should kind Base cell kind mimic Base cell mimic Base cell Base cell hash Base cell hash documentation Base cell documentation documentation Base cell documentation cell Base cell cell identity Base cell identity cellNames Base cell cellNames cells Base cell cells cell Base cell cell notice Base inspect Base removeCell Base cell removeCell undefineCell Base cell undefineCell cellOwner Base cell cellOwner cellOwner Base cell cellOwner cell Base cell cell x Base mimic x kind blarg Reflector other cells x true should kind blarg mimic Base cell mimic Base cell Base cell hash Base cell hash documentation Base cell documentation documentation Base cell documentation cell Base cell cell identity Base cell identity cellNames Base cell cellNames cells Base cell cells cell Base cell cell notice Base inspect Base removeCell Base cell removeCell undefineCell Base cell undefineCell cellOwner Base cell cellOwner cellOwner Base cell cellOwner cell Base cell cell other documentation other returns the documentation text of the object given as argument anything can have a documentation text this text will initially be nil Reflector other documentation should fetch an objects documentation show source obj Origin mimic Reflector other documentation obj should be nil obj documentation foo bar Reflector other documentation obj should foo bar obj removeAllMimics Reflector other documentation obj should foo bar other documentation other text sets the documentation string for a specific object Reflector other documentation should set the documentation on an object show source obj Origin mimic Reflector other documentation obj flux obj documentation should flux obj removeAllMimics Reflector other documentation obj should flux other freeze other ensures that the receiver is frozen Reflector other freeze should be possible to call several times without effect show source x Origin mimic Reflector other freeze x x freeze should not be possible to modify a frozen object show source x Origin mimic x existing 43 Reflector other freeze x fn x y 42 should signal Condition Error ModifyOnFrozen fn x existing 42 should signal Condition Error ModifyOnFrozen fn x mimic Origin mimic should signal Condition Error ModifyOnFrozen fn x prependMimic Origin mimic should signal Condition Error ModifyOnFrozen fn x removeMimic Origin should signal Condition Error ModifyOnFrozen fn x removeAllMimics should signal Condition Error ModifyOnFrozen fn x documentation blarg should signal Condition Error ModifyOnFrozen fn x become 42 should signal Condition Error ModifyOnFrozen should be copied when becoming show source x Origin mimic y Origin mimic Reflector other freeze x y become x y should be frozen other frozen other returns true if the receiver is frozen otherwise false Reflector other frozen should return false on something that isn t frozen show source x Origin mimic Reflector other frozen x should be false x freeze Reflector other frozen x should be true other is other potentialMimic Takes one evaluated argument and returns either true or false if this object or one of it s mimics mimics that argument exactly the same as other mimics Reflector other is should work correctly for any object show source Reflector other is DefaultBehavior Origin should be false Reflector other is Ground Base should be true obj Origin mimic Reflector other is obj Origin should be true Reflector other is obj Base should be true obj removeAllMimics Reflector other is obj Origin should be false other kind other name Takes one evaluated Text argument and returns either true or false if this object or one of it s mimics have the kind of the name specified Reflector other kind should return false if the kind doesn t match show source Reflector other kind Text nil should be false Reflector other kind Text Number should be false Reflector other kind nil should be false Reflector other kind Number should be false Reflector other kind System should be false should return true if the current object has the kind show source Reflector other kind Text Text should be true should return true if the main mimic has the kind show source Reflector other kind Text should be true Reflector other kind DefaultBehavior should be true Reflector other kind Base should be true Reflector other kind Ground should be true Reflector other kind Origin should be true should return true if another mimic has the kind show source Reflector other kind 123 Mixins Comparing should be true should handle a cycle of mimics correctly show source f Origin mimic f mimic f Reflector other kind f Origin should be true f Origin mimic Origin mimic f Reflector other kind f Origin should be true f Origin mimic Origin mimic f Reflector other kind f DefaultBehavior should be true other mimic other will return a new derivation of the receiving object Might throw exceptions if the object is an oddball object Reflector other mimic should be able to mimic Origin show source result Reflector other mimic Origin result should have kind Origin result should not be same Origin should be able to mimic Ground show source result Reflector other mimic Ground result should have

    Original URL path: https://ioke.org/dok/release/kinds/Reflector.html (2016-02-13)
    Open archived version from archive



  •