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".
  • Guide:Assignment - IokeWiki
    hand side of the assignment takes arguments the amp quot amp quot method figures out that the assignment is not to a simple cell name but to a place The parsing step will change amp quot cell amp quot amp quot 42 amp quot into amp quot cell amp quot amp quot 42 amp quot Notice here that the argument comes along into the specification of the place When this happens the assignment operator will not try to create or assign a cell instead it will in this case call the method cell So amp quot cell amp quot amp quot 42 amp quot will ultimately end up being the same as amp quot cell amp quot amp quot 42 amp quot This way of transforming the name will work the same for all cases so you can have as many arguments as you want to the place on the left hand side The equals sign will be added to the method name and a message will be sent to that instead What happens here is a bit subtle Since the left hand side of the assignment takes arguments the quot quot method figures out that the assignment is not to a simple cell name but to a place The parsing step will change quot cell quot quot 42 quot into quot cell quot quot 42 quot Notice here that the argument comes along into the specification of the place When this happens the assignment operator will not try to create or assign a cell instead it will in this case call the method cell So quot cell quot quot 42 quot will ultimately end up being the same as quot cell quot quot 42 quot This way of transforming the name will work the same for all cases so you can have as many arguments as you want to the place on the left hand side The equals sign will be added to the method name and a message will be sent to that instead This makes assignment of places highly flexible and the only thing you need to do is implement methods with the right names This feature is used extensively in Lists and Dicts to make it easy to assign to specific indexes So say we have a list called x Then this code amp quot x 13 42 amp quot will be transformed into amp quot x 13 42 amp quot which will in turn be transformed into amp quot x 13 42 amp quot Ioke lists also has an at method so you can do amp quot x at 13 42 amp quot which will call at of course This makes assignment of places highly flexible and the only thing you need to do is implement methods with the right names This feature is used extensively in Lists and Dicts to make it easy to assign to specific indexes So say we have a list called x Then this code quot x 13 42 quot will be transformed into quot x 13 42 quot which will in turn be transformed into quot x 13 42 quot Ioke lists also has an at method so you can do quot x at 13 42 quot which will call at of course The second transformation that might happen is that if you try to assign a cell that has an assigner you will call that assigner instead of actually assigning a cell So for example if you do amp quot foo documentation 42 amp quot this will not actually create or assign the cell amp quot documentation amp quot Instead it will find that Base has a cell called amp quot documentation amp quot and instead send that message So the prior code would actually be equivalent to amp quot foo documentation 42 amp quot The second transformation that might happen is that if you try to assign a cell that has an assigner you will call that assigner instead of actually assigning a cell So for example if you do quot foo documentation 42 quot this will not actually create or assign the cell quot documentation quot Instead it will find that Base has a cell called quot documentation quot and instead send that message So the prior code would actually be equivalent to quot foo documentation 42 quot All of these assignment processes together make it really easy to take control over assignment while still making it very obvious and natural in most cases All of these assignment processes together make it really easy to take control over assignment while still making it very obvious and natural in most cases The easiest example of destructuring assignment looks like this The easiest example of destructuring assignment looks like this lt source lang quot ioke quot gt x y 42 44 lt source gt source lang ioke x y 42 44 source Note that the parenthesis are necessary both on the left hand and right hand side This will assign x to 42 and y to 44 in the current context following the assignment rules given above This assignment will happen in parallel which means you can do the obvious swapping of values in one operation Note that the parenthesis are necessary both on the left hand and right hand side This will assign x to 42 and y to 44 in the current context following the assignment rules given above This assignment will happen in parallel which means you can do the obvious swapping of values in one operation lt source lang quot ioke quot gt x y y x lt source gt source lang ioke x y y x source This also works for more than two simultaneous assignments This also works for more than two simultaneous assignments The right hand side of an expression like this is expected to be a regular value that can be converted into a tuple This include all Enumerable objects since asTuple is defined there That means you can also

    Original URL path: https://ioke.org/wiki/index.php?title=Guide:Assignment&diff=prev&oldid=404 (2016-02-13)
    Open archived version from archive

  • Revision history of "Guide:Core kinds" - IokeWiki
    the last one is code not an argument cur last 17 33 19 April 2009 Tumble Talk contribs m 23 934 bytes Other things cur last 13 11 19 April 2009 Tumble Talk contribs m 23 932 bytes Regexps cur last 12 16 19 April 2009 Tumble Talk contribs m 23 931 bytes Enumerable cur last 11 39 19 April 2009 Tumble Talk contribs m 23 928 bytes Ranges and Pairs cur last 11 38 19 April 2009 Tumble Talk contribs m 23 924 bytes Ranges and Pairs cur last 11 37 19 April 2009 Tumble Talk contribs m 23 908 bytes Ranges and Pairs cur last 10 33 19 April 2009 Tumble Talk contribs m 23 907 bytes Lists cur last 09 19 19 April 2009 Tumble Talk contribs m 23 906 bytes Text cur last 09 18 19 April 2009 Tumble Talk contribs m 23 913 bytes Text cur last 08 01 19 April 2009 Tumble Talk contribs m 23 912 bytes Conditions cur last 08 00 19 April 2009 Tumble Talk contribs m 23 912 bytes Conditions cur last 15 26 19 March 2009 Naeu Talk contribs 23 913 bytes add dict format specifier cur last 08

    Original URL path: https://ioke.org/wiki/index.php?title=Guide:Core_kinds&action=history (2016-02-13)
    Open archived version from archive

  • Guide:Core kinds - IokeWiki
    at is the same as and l at 0 gt 1 l at 0 1 empty the list empty the list l clear l clear l gt true l true follows the each protocol follows the each protocol is empty is empty l empty gt true l empty true does it include an element does it include an element l include foo gt false l include foo false the last element the last element l last gt nil l last nil 1 2 last gt 2 1 2 last 2 the length the length 1 2 length gt 2 1 2 length 2 first value first value 1 2 first gt 1 1 2 first 1 rest except for first rest except for first 1 2 3 rest gt 2 3 1 2 3 rest 2 3 returns a new sorted list returns a new sorted list 3 2 1 sort gt 1 2 3 3 2 1 sort 1 2 3 sorts in place sorts in place l 3 2 1 l 3 2 1 l sort l sort l 1 2 3 gt true lt source gt l 1 2 3 true source Dicts Dicts A Dict is a dictionary of key value mappings The mappings are unordered and there can only ever be one key with the same value Any kind of Ioke object can be used as a key There is no problem with having the same value for different keys The default implementation of Dict uses a hash based implementation That s not necessarily always true for all dicts The iteration order is not necessarily stable either so don t write code that depends on it A Dict is a dictionary of key value mappings The mappings are unordered and there can only ever be one key with the same value Any kind of Ioke object can be used as a key There is no problem with having the same value for different keys The default implementation of Dict uses a hash based implementation That s not necessarily always true for all dicts The iteration order is not necessarily stable either so don t write code that depends on it Creating a dict is done using either the amp quot dict amp quot or the amp quot amp quot methods Both of these expect either keyword arguments or mimics of Pair If keyword arguments these keywords will be used as symbol keys That s the most common thing so it makes sense to have that happen automatically Dicts also try to print themselves that way Creating a dict is done using either the quot dict quot or the quot quot methods Both of these expect either keyword arguments or mimics of Pair If keyword arguments these keywords will be used as symbol keys That s the most common thing so it makes sense to have that happen automatically Dicts also try to print themselves that way lt source lang quot ioke quot gt dict 1 gt 2 3 gt 4 source lang ioke dict 1 2 3 4 these two are the same these two are the same dict foo quot bar quot baaz quot quux quot dict foo bar baaz quux dict foo gt quot bar quot baaz gt quot quux quot dict foo bar baaz quux 1 gt 2 3 gt 4 1 2 3 4 these two are the same these two are the same foo quot bar quot baaz quot quux quot foo bar baaz quux foo gt quot bar quot baaz gt quot quux quot foo bar baaz quux the formats can be combined the formats can be combined 1 gt 2 foo 42 quot bar quot gt quot qux quot lt source gt 1 2 foo 42 bar qux source The literal Pair syntax using amp gt will not necessarily instantiate real pairs for this The literal Pair syntax using gt will not necessarily instantiate real pairs for this Dicts mix in Enumerable When using each what will be yielded are mimics of Pair where the first value will be the key and the second will be value Just like Lists Dicts have several useful methods in themselves Dicts mix in Enumerable When using each what will be yielded are mimics of Pair where the first value will be the key and the second will be value Just like Lists Dicts have several useful methods in themselves lt source lang quot ioke quot gt d one quot two quot 3 gt 4 source lang ioke d one two 3 4 lookup with quot at quot works the same lookup with at works the same d one gt quot two quot d one two d two gt nil d two nil d 3 gt 4 d 3 4 d 4 gt nil d 4 nil assign values with assign values with d one quot three quot d one three d new quot wow quot d new wow d one quot three quot 3 gt 4 new quot wow quot d one three 3 4 new wow iterate over it iterate over it get all keys get all keys d keys set one new 3 lt source gt d keys set one new 3 source Sets Sets If you want an object that work like a mathematical set Ioke provides such a kind for you There is also literal syntax for sets from Ioke E This syntax looks like this lt code gt 42 55 111 lt code gt A set can be iterated over and it is Enumerable You can add and remove elements and check for membership If you want an object that work like a mathematical set Ioke provides such a kind for you There is also literal syntax for sets from Ioke E This syntax looks like this code 42 55 111 code A set can be iterated over and it is Enumerable You can add and remove elements and check for membership lt source lang quot ioke quot gt x set 1 2 3 3 2 1 source lang ioke x set 1 2 3 3 2 1 x map 2 sort gt 2 4 6 x map 2 sort 2 4 6 x 1 gt true x 1 true x 0 gt false x 0 false x remove 2 x remove 2 x 2 gt false x 2 false x lt lt 4 x 4 x 4 gt true lt source gt x 4 true source Sets also have methods to do union and intersection These mimic the mathematical operators for these operations Sets also have methods to do union and intersection These mimic the mathematical operators for these operations lt source lang quot ioke quot gt intersection source lang ioke intersection 1 2 3 4 1 2 3 4 5 should 1 2 3 4 1 2 3 4 1 2 3 4 5 should 1 2 3 4 union union 1 2 1 3 should 1 2 3 1 2 1 3 should 1 2 3 lt source gt source You can also test membership nonmembership subset and superset relations using the mathematical operators You can also test membership nonmembership subset and superset relations using the mathematical operators lt source lang quot ioke quot gt membership source lang ioke membership 42 1 2 42 3 42 1 2 42 3 proper subset proper subset quot bar quot quot foo quot quot foo quot quot bar quot quot quux quot bar foo foo bar quux superset superset proper superset proper superset quot bar quot quot foo quot quot quux quot quot foo quot quot bar quot bar foo quux foo bar lt source gt source Ranges and Pairs Ranges and Pairs Both ranges and pairs tie two values together They also have literal syntax to create them since they are very useful in many circumstances Both ranges and pairs tie two values together They also have literal syntax to create them since they are very useful in many circumstances A Range defines two endpoints A Range is Enumerable and you can also check for membership It s also convenient to send Ranges to the amp quot List amp quot method A Range can be exclusive or inclusive If it s inclusive it includes the end value and if it is exclusive it doesn t A Range defines two endpoints A Range is Enumerable and you can also check for membership It s also convenient to send Ranges to the quot List quot method A Range can be exclusive or inclusive If it s inclusive it includes the end value and if it is exclusive it doesn t An addition to Ioke S is the possibility of inverted ranges If the first value is larger than the second value then the range is inverted This puts slightly different demands on the objects inside of it Specifically if you want to iterate over the elements the kind you re using need to have a method called pred for predecessor instead of succ for successor Membership can still be tested as long as amp lt amp gt is defined So you can do something like this amp quot foo amp quot amp quot aoo amp quot amp quot boo amp quot It s mostly useful for iterating in the opposite direction like with 10 1 for example An addition to Ioke S is the possibility of inverted ranges If the first value is larger than the second value then the range is inverted This puts slightly different demands on the objects inside of it Specifically if you want to iterate over the elements the kind you re using need to have a method called pred for predecessor instead of succ for successor Membership can still be tested as long as lt gt is defined So you can do something like this quot foo quot quot aoo quot quot boo quot It s mostly useful for iterating in the opposite direction like with 10 1 for example lt source lang quot ioke quot gt literal syntax for inclusive range source lang ioke literal syntax for inclusive range 1 10 1 10 check for membership check for membership 1 10 5 gt true 1 10 5 true 1 10 10 gt true 1 10 10 true 1 10 11 gt false 1 10 11 false 1 10 5 gt true 1 10 5 true 1 10 10 gt false 1 10 10 false 1 10 11 gt false 1 10 11 false get the from value get the from value 1 10 from 1 gt true 1 10 from 1 true 1 10 from 1 gt true 1 10 from 1 true get the to value get the to value 1 10 to 10 gt true 1 10 to 10 true 1 10 to 10 gt true 1 10 to 10 true is this range exclusive is this range exclusive 1 10 exclusive gt false 1 10 exclusive false 1 10 exclusive gt true 1 10 exclusive true is this range inclusive is this range inclusive 1 10 inclusive gt true 1 10 inclusive true 1 10 inclusive gt false lt source gt 1 10 inclusive false source A Pair represents a combination of two values They don t have to be of the same kind They can have any kind of relationship Since Pairs are often used to represent the elements of Dicts it is very useful to refer to the first value as the amp quot key amp quot and the second value as the amp quot value amp quot A Pair represents a combination of two values They don t have to be of the same kind They can have any kind of relationship Since Pairs are often used to represent the elements of Dicts it is very useful to refer to the first value as the quot key quot and the second value as the quot value quot lt source lang quot ioke quot gt literal syntax for a pair source lang ioke literal syntax for a pair quot foo quot gt quot bar quot foo bar getting the first value getting the first value quot foo quot gt quot bar quot first gt quot foo quot foo bar first foo quot foo quot gt quot bar quot key gt quot foo quot foo bar key foo getting the second value getting the second value quot foo quot gt quot bar quot second gt quot bar quot foo bar second bar quot foo quot gt quot bar quot value gt quot bar quot lt source gt foo bar value bar source Tuples Tuples A Pair is a special case of wanting to tie two values together The general case of bundling several values together can be achieved by using Tuples If you give anything else than one argument to the empty method you will get back a Tuple You can also create a new tuple explicitly using the lt code gt tuple lt code gt method A Pair is a special case of wanting to tie two values together The general case of bundling several values together can be achieved by using Tuples If you give anything else than one argument to the empty method you will get back a Tuple You can also create a new tuple explicitly using the code tuple code method To extract elements out of the tuple the main way is using destructuring assignment It is also possible to use a named extractor to get a given index To extract elements out of the tuple the main way is using destructuring assignment It is also possible to use a named extractor to get a given index Tuples are by design not Enumerable This is a feature not a misfeature If you use tuples as something that should be enumerated over you re using the wrong data structure Also remember that Enumerable defines asTuple so anything enumerable can be turned into a tuple if needed Tuples are by design not Enumerable This is a feature not a misfeature If you use tuples as something that should be enumerated over you re using the wrong data structure Also remember that Enumerable defines asTuple so anything enumerable can be turned into a tuple if needed lt source lang quot ioke quot gt t tuple 42 55 18 source lang ioke t tuple 42 55 18 x y z t x y z t t third should 18 t third should 18 t 3 should 18 lt source gt t 3 should 18 source As you can see english style names are defined for accessing elements These will only be available up to nine elements The underscore syntax for indexing will always be possible though As you can see english style names are defined for accessing elements These will only be available up to nine elements The underscore syntax for indexing will always be possible though You create a new one by calling the Struct method You create a new one by calling the Struct method lt source lang quot ioke quot gt Person Struct first name sur name age lt source gt source lang ioke Person Struct first name sur name age source You can provide default values using keyword arguments instead You can provide default values using keyword arguments instead lt source lang quot ioke quot gt Person Struct first name sur name age 1 lt source gt source lang ioke Person Struct first name sur name age 1 source Creating a new version of a Struct can be done using the object as a function Creating a new version of a Struct can be done using the object as a function lt source lang quot ioke quot gt o Person quot Ola quot quot Bini quot lt source gt source lang ioke o Person Ola Bini source It is also possible to provide these values using keywords or even a mix It is also possible to provide these values using keywords or even a mix lt source lang quot ioke quot gt s Person first name quot Sam quot sur name quot Aaron quot source lang ioke s Person first name Sam sur name Aaron b Person sur name quot Guthrie quot quot Brian quot lt source gt b Person sur name Guthrie Brian source All of these objects will implement lt nowiki gt lt nowiki gt hash asText notice and inspect Accessors and mutators also work All of these objects will implement nowiki nowiki hash asText notice and inspect Accessors and mutators also work You can get access to all the Struct attributes by calling lt code gt attributes lt code gt If you just want the names you can use lt code gt attributeNames lt code gt A Struct instance is also Sequenced over a combination of its keys and values You can get access to all the Struct attributes by calling code attributes code If you just want the names you can use code attributeNames code A Struct instance is also Sequenced over a combination of its keys and values Enumerable Enumerable Mapping a collection into a another collection can be done using map or mapFn These are aliased as collect and collectFn too Mapping a collection into a another collection can be done using map or mapFn These are aliased as collect and collectFn too lt source lang quot ioke quot gt l 10 20 30 40 source lang ioke l 10 20 30 40 mapping into text mapping into text l map asText gt quot 10 quot quot 20 quot quot 30 quot quot 40 quot l map asText 10 20 30 40 l map n n asText gt quot 10 quot quot 20 quot quot 30 quot quot 40 quot l map n n asText 10 20 30 40 exponentiation exponentiation l map 2 gt 100 400 900 1600 l map 2 100 400 900 1600 l map n n n gt 100 400 900

    Original URL path: https://ioke.org/wiki/index.php?title=Guide:Core_kinds&diff=prev&oldid=403 (2016-02-13)
    Open archived version from archive

  • Main Page - IokeWiki
    2010 view source Admin Talk contribs m Reverted edits by Lenora Mullen Talk to last version by Admin Newer edit tr tr table table http www college paper org custom essay html college essays Revision as of 17 46 27 July 2010 Retrieved from http ioke org internal wiki index php Main Page Views Page Discussion View source History Personal tools 192 168 0 2 Talk for this IP Log

    Original URL path: https://ioke.org/wiki/index.php?title=Main_Page&diff=prev&oldid=380 (2016-02-13)
    Open archived version from archive

  • User contributions - IokeWiki
    Category Category talk From year and earlier From month and earlier all January February March April May June July August September October November December Latest Earliest View newer 50 older 50 20 50 100 250 500 20 10 26 July 2010 hist diff Main Page Events Latest Earliest View newer 50 older 50 20 50 100 250 500 Retrieved from http ioke org internal wiki index php Special Contributions Views

    Original URL path: https://ioke.org/wiki/index.php/Special:Contributions/Lenora_Mullen (2016-02-13)
    Open archived version from archive

  • Main Page - IokeWiki
    2009 view source Admin Talk contribs Versions Newer edit Ioke P Ioke P Ioke F Ioke F Ioke L Ioke G Ioke B Ioke A Ioke C td td td td Libraries Libraries Cane Cane Revision as of 14 35 28 December 2009 Retrieved from http ioke org internal wiki index php Main Page Views Page Discussion View source History Personal tools 192 168 0 2 Talk for this IP

    Original URL path: https://ioke.org/wiki/index.php?title=Main_Page&diff=prev&oldid=374 (2016-02-13)
    Open archived version from archive

  • Revision history of "MediaWiki:Common.css" - IokeWiki
    January 2009 Admin Talk contribs 862 bytes cur last 14 09 23 January 2009 Admin Talk contribs 965 bytes cur last 14 09 23 January 2009 Admin Talk contribs 965 bytes cur last 14 08 23 January 2009 Admin Talk contribs 965 bytes cur last 14 07 23 January 2009 Admin Talk contribs 832 bytes cur last 14 06 23 January 2009 Admin Talk contribs 816 bytes cur last 14 05 23 January 2009 Admin Talk contribs 792 bytes cur last 14 03 23 January 2009 Admin Talk contribs 782 bytes cur last 14 01 23 January 2009 Admin Talk contribs 784 bytes cur last 13 57 23 January 2009 Admin Talk contribs 748 bytes cur last 13 54 23 January 2009 Admin Talk contribs 760 bytes cur last 13 52 23 January 2009 Admin Talk contribs 745 bytes cur last 13 49 23 January 2009 Admin Talk contribs 739 bytes cur last 13 48 23 January 2009 Admin Talk contribs 739 bytes cur last 13 46 23 January 2009 Admin Talk contribs 744 bytes cur last 13 42 23 January 2009 Admin Talk contribs 701 bytes cur last 13 41 23 January 2009 Admin Talk contribs 144 bytes cur

    Original URL path: https://ioke.org/wiki/index.php?title=MediaWiki:Common.css&action=history (2016-02-13)
    Open archived version from archive

  • MediaWiki:Common.css - IokeWiki
    color bbbbbb Text Whitespace body mf color 666666 Literal Number Float body mh color 666666 Literal Number Hex body mi color 666666 Literal Number Integer body mo color 666666 Literal Number Oct body sb color BA2121 Literal String Backtick body sc color BA2121 Literal String Char body sd color BA2121 font style italic Literal String Doc body s2 color BA2121 Literal String Double body se color BB6622 font weight bold Literal String Escape body sh color BA2121 Literal String Heredoc body si color BB6688 font weight bold Literal String Interpol body sx color 008000 Literal String Other body sr color BB6688 Literal String Regex body s1 color BA2121 Literal String Single body ss color 19177C Literal String Symbol body bp color 008000 Name Builtin Pseudo body vc color 19177C Name Variable Class body vg color 19177C Name Variable Global body vi color 19177C Name Variable Instance body il color 666666 Literal Number Integer Long Current revision CSS placed here will be applied to all skins body td p color 444 font family Arial Verdana Sans Serif background fff a href font family Helvetica Neue Helvetica Arial sans serif color 000 text decoration none font size 1 1em a href hover text decoration underline p cactions li a color 000 p cactions li a hover text decoration underline p personal li a color 000 p personal li a hover text decoration underline li selected a font weight bold dt code font family courier color black pre code display block background color black color white font family courier margin 75em 0 border 1px dotted ccc border width 1px 0 padding 5px 15px overflow auto font size 1 0em portlet ul list style type none list style image url portlet h5 display none pBody content h1 h2 h3 h4 h5 h6 p cactions li footer border 0px none td linenos background color f0f0f0 padding right 10px span lineno background color f0f0f0 padding 0 5px 0 5px pre line height 125 body hll background color ffffcc body background f8f8f8 body c color 408080 font style italic Comment body err border 1px solid FF0000 Error body k color 008000 font weight bold Keyword body o color 666666 Operator body cm color 408080 font style italic Comment Multiline body cp color BC7A00 Comment Preproc body c1 color 408080 font style italic Comment Single body cs color 408080 font style italic Comment Special body gd color A00000 Generic Deleted body ge font style italic Generic Emph body gr color FF0000 Generic Error body gh color 000080 font weight bold Generic Heading body gi color 00A000 Generic Inserted body go color 808080 Generic Output body gp color 000080 font weight bold Generic Prompt body gs font weight bold Generic Strong body gu color 800080 font weight bold Generic Subheading body gt color 0040D0 Generic Traceback body kc color 008000 font weight bold Keyword Constant body kd color 008000 font weight bold Keyword Declaration body kn color 008000 font weight bold Keyword Namespace body kp color 008000 Keyword Pseudo

    Original URL path: https://ioke.org/wiki/index.php?title=MediaWiki:Common.css&diff=prev&oldid=373 (2016-02-13)
    Open archived version from archive



  •