<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://ioke.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cv</id>
		<title>IokeWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://ioke.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cv"/>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php/Special:Contributions/Cv"/>
		<updated>2026-04-27T18:27:36Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Main_Page&amp;diff=306</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Main_Page&amp;diff=306"/>
				<updated>2009-11-04T01:09:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: revert spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Welcome to the Ioke wiki. This wiki is dedicated to everything that has to do with the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=&amp;quot;100%&amp;quot; cellpadding=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr valign=&amp;quot;top&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
== About Ioke ==&lt;br /&gt;
&lt;br /&gt;
* [[Guide|Programming Guide]]&lt;br /&gt;
* [[Pitfalls|Common pitfalls]]&lt;br /&gt;
* [[Future plans]]&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
&lt;br /&gt;
* [[Ioke 0]]&lt;br /&gt;
* [[Ioke S]]&lt;br /&gt;
* [[Ioke E]]&lt;br /&gt;
* [[Ioke P]]&lt;br /&gt;
* [[Ioke F]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
== Libraries ==&lt;br /&gt;
* [[Cane]]&lt;br /&gt;
* [[DokGen]]&lt;br /&gt;
* [[IIk]]&lt;br /&gt;
* [[IOpt]]&lt;br /&gt;
* [[ISpec]]&lt;br /&gt;
* [[Mike]]&lt;br /&gt;
* [[TextScanner]]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Development process ==&lt;br /&gt;
&lt;br /&gt;
* [[Todo]]&lt;br /&gt;
* [[Cooperation with Git]]&lt;br /&gt;
* [[Editors]]&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
&lt;br /&gt;
* Ioke at Amsterdam.rb, February 23rd 2009. (already been)&lt;br /&gt;
* Language creation with Ioke and JRuby case studies&lt;br /&gt;
** At ThoughtWorks and QCon Geek Night, London, March 10th 2009.&lt;br /&gt;
** Video here: [http://skillsmatter.com/podcast/java-jee/language-on-jvm]&lt;br /&gt;
* Ioke - A Folding Language, at ThoughtWorks Geek Night, Bangalore, April 21st 2009&lt;br /&gt;
** More info here: [http://www.thoughtworker.com/events/geek-night-ola-bini]&lt;br /&gt;
* Ioke - A Folding Language, at Skills Matter, London, May 14th 2009&lt;br /&gt;
** More info and signup: [http://skillsmatter.com/event/java-jee/ljc-meetup-346]&lt;br /&gt;
* Ioke for Ruby Developers at RailsWayCon, Berlin, May 26th 2009&lt;br /&gt;
** More info here: [http://it-republik.de/conferences/railswaycon/]&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Todo&amp;diff=206</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Todo&amp;diff=206"/>
				<updated>2009-03-06T19:40:05Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a brief list of things that remains to be done. It should link to a page with more information when needed.&lt;br /&gt;
&lt;br /&gt;
== Core language ==&lt;br /&gt;
&lt;br /&gt;
* [[Java integration planning|Java integration]] - [[User:Olabini|Ola Bini]]&lt;br /&gt;
* [[Concurrency planning|Concurrency primitives]]&lt;br /&gt;
* Assignment&lt;br /&gt;
** [[Destructuring assignment ideas|Destructuring assignment]] with ()&lt;br /&gt;
* Units&lt;br /&gt;
&lt;br /&gt;
== Core libraries ==&lt;br /&gt;
&lt;br /&gt;
* [[Socket]]&lt;br /&gt;
* [[Tuple]]&lt;br /&gt;
* [[Iik]]&lt;br /&gt;
** Saving history to file&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
* [[Cane planning|Cane]]&lt;br /&gt;
&lt;br /&gt;
== Other libraries ==&lt;br /&gt;
&lt;br /&gt;
* SQL interaction DSL&lt;br /&gt;
* JRuby integration&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Chained/Linked map structure - [[Martin Elwin]]&lt;br /&gt;
* Saving/restoring VM state to disk (a la Smalltalk image)&lt;br /&gt;
* [[CLR runtime planning|CLR runtime]]&lt;br /&gt;
* [[V8 runtime planning|V8 runtime]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Code&amp;diff=190</id>
		<title>Guide:Code</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Code&amp;diff=190"/>
				<updated>2009-02-07T13:59:04Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Code =&lt;br /&gt;
&lt;br /&gt;
Many of the things you do in Ioke will directly manipulate code. Since the messages that make up code is really easy to get hold of, this manipulation comes easy too. Ioke takes the Lisp philosophy of &amp;amp;quot;code is data&amp;amp;quot; to heart. The basic unit of a piece of code is a Message. A Message has a name, a next and prev pointer, and any number of arguments. When you manipulate a message, the argument list will contain messages too - and if the next or prev pointers are not nil, they will point to other messages. It serves well to remember that except for the message itself, all code will be evaluated in the context of a receiver and a ground. The ground is necessary because arguments to be evaluated need to be run in some specific context, even though the current receiver is not the same as the ground.&lt;br /&gt;
&lt;br /&gt;
The current types of code can be divided into three different categories. These are methods, macros and blocks. Native methods are all of the kind JavaMethod, but can have any kind of semantics - including semantics that look like macros. Most native methods do have the same semantics as regular methods, however.&lt;br /&gt;
&lt;br /&gt;
== Methods ==&lt;br /&gt;
&lt;br /&gt;
A method in Ioke is executable code that is activatable. A method can take arguments of several different types. The arguments to a method will always be evaluated before the code in the method starts to execute. An Ioke method is defined using the &amp;amp;quot;method&amp;amp;quot; method. All Ioke methods have the kind DefaultMethod. This leaves the room open to define other kinds of methods, if need be. DefaultMethod's could be implemented using macros, but at this point they aren't. A DefaultMethod can have a name - and will get a name the first time it is assigned to a cell.&lt;br /&gt;
&lt;br /&gt;
It is really easy to define and use a simple method. The easiest case is to define a method that is empty. This method will just return nil:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;m = method()&lt;br /&gt;
m ;; call the method&amp;lt;/source&amp;gt;&lt;br /&gt;
Since methods are activatable, when you name a cell that contains a method, that method will be invoked. To stop that behavior, use the &amp;amp;quot;cell&amp;amp;quot; method.&lt;br /&gt;
&lt;br /&gt;
The definition of a method can take several different pieces. These are a documentation string, definitions of positional required arguments, definitions of positional optional arguments, definitions of keyword arguments, definition of a rest argument, definition of a keyword rest argument and the actual code of the method.&lt;br /&gt;
&lt;br /&gt;
Let's take these one by one. First, if the the first element of a call to &amp;amp;quot;method&amp;amp;quot; is a literal text, and there is at least one more argument in the definition, then that text will be the documentation text for the method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;;; a method that returns &amp;quot;foo&amp;quot;&lt;br /&gt;
m = method(&amp;quot;foo&amp;quot;) &lt;br /&gt;
&lt;br /&gt;
;; a method that returns nil, but&lt;br /&gt;
;; has the documentation text &amp;quot;foo&amp;quot;&lt;br /&gt;
m = method(&amp;quot;foo&amp;quot;, nil)&amp;lt;/source&amp;gt;&lt;br /&gt;
A method can take any number of required positional arguments. These will be checked when a method is called, and if not enough -- or too many -- arguments are provided, an error will be signalled.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;m = method(x, x println)&lt;br /&gt;
m = method(x, y, z,&lt;br /&gt;
  x * y + z)&amp;lt;/source&amp;gt;&lt;br /&gt;
The first method takes one argument and prints that argument. The second method takes three arguments and return the product of the two first added to the third.&lt;br /&gt;
&lt;br /&gt;
A method can also have optional positional arguments. In that case the optional arguments must follow the required arguments. Optional arguments need to have a default value -- in fact, that is how you distinguish them from required arguments. The arity of method calls will still be checked, but using minimum and maximum values instead. The default value for an argument should be code that can be executed in the context of the running method, so a default value can refer to earlier positional arguments. A default value can also do quite complex things, if need be, although it's not really recommended.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;;; takes zero or one arguments&lt;br /&gt;
m = method(x 42, x println)&lt;br /&gt;
&lt;br /&gt;
;; takes one to three arguments&lt;br /&gt;
m = method(x, y 42, z 25, &lt;br /&gt;
  x*y + z)&amp;lt;/source&amp;gt;&lt;br /&gt;
The syntax for optional arguments is to just write a space after the name of the argument, and then write the code to generate the default value after it.&lt;br /&gt;
&lt;br /&gt;
A method can also have keyword arguments. Keyword arguments are checked, just like regular arguments, and you can't generally give keyword arguments to a method not expecting it. Nor can you give unexpected keyword arguments to a method that takes other keywords. Keyword arguments can never be required. They can have default values, which will default to nil if not provided. They can be defined anywhere among the arguments -- the only reason to reorder them is that default values of other optional arguments can use prior defined keyword arguments.&lt;br /&gt;
&lt;br /&gt;
A keyword argument is defined just like a regular argument, except that it ends in a colon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;m = method(foo:, bar: 42,&lt;br /&gt;
  foo println&lt;br /&gt;
  bar println&lt;br /&gt;
)&amp;lt;/source&amp;gt;&lt;br /&gt;
Just as with regular optional arguments, you supply the default value of the keyword argument after a space. The cells for the keyword arguments will be the same as their names, without the ending colon. The above code would print nil and 42 if no arguments were specified. It's important to remember that keyword arguments and positional arguments do not interact -- except for when calculating default values. When assigning values it's always possible to see what is positional and what is a keyword argument.&lt;br /&gt;
&lt;br /&gt;
Ioke methods can collect positional arguments into a list. This allow methods to take variable number of arguments. The rule is that all other positional arguments are first calculated, and the remaining positional arguments will be added to the rest argument. If no positional arguments are available, the rest argument will be empty. A rest argument is defined by preceding it with a plus sign in the argument definition. For clarity a rest argument should be defined last in the list, although it doesn't exactly matter anyway.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;m = method(+rest,&lt;br /&gt;
  rest println)&lt;br /&gt;
&lt;br /&gt;
m = method(x, y 42, +rest,&lt;br /&gt;
  rest println)&amp;lt;/source&amp;gt;&lt;br /&gt;
The above code defines one method that only takes one rest argument. That means the method can take any number of arguments and all of them will be collected into a list. The second method takes one required argument, one optional argument and any number of extra arguments. So if four arguments are given, the rest argument will contain two.&lt;br /&gt;
&lt;br /&gt;
The final type of argument is keyword rest arguments. Just like positional rest arguments, a keyword rest argument can collect all keywords given to a method, no matter what. If a keyword rest argument is used, no conditions will be signalled if an unknown keyword is given to a method. If other keywords are defined, these keywords will not show up in the keyword rest argument. The keyword rest argument is defined by preceding the name with a +: sigil, and the keyword rest argument will be a Dict instead of a list. The keys will be symbols but without the ending colon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;m = method(+:krest,&lt;br /&gt;
  krest println)&lt;br /&gt;
&lt;br /&gt;
m = method(x, y:, +rest, +:krest,&lt;br /&gt;
  [x, y, rest, krest])&amp;lt;/source&amp;gt;&lt;br /&gt;
The above code first creates a method that can take any number of keyword arguments but nothing else. The second method takes one required positional argument, one keyword argument, rest arguments and keyword rest arguments, and returns a new list containing all the arguments given to it.&lt;br /&gt;
&lt;br /&gt;
The final argument to the method method should always be the code to execute. This code will be executed in the context of a receiver, that is the object the method is activated on. A method execution also happens in the context of the method activation context, where local variables are stored. This activation context contain some predefined variables that can be used. These are &amp;amp;quot;self&amp;amp;quot;, &amp;amp;quot;@&amp;amp;quot;, &amp;amp;quot;currentMessage&amp;amp;quot; and &amp;amp;quot;surroundingContext&amp;amp;quot;. Both &amp;amp;quot;self&amp;amp;quot; and &amp;amp;quot;@&amp;amp;quot; refer to the receiver of the method call. &amp;amp;quot;currentMessage&amp;amp;quot; returns the message that initiated the activation of the method, and &amp;amp;quot;surroundingContext&amp;amp;quot; returns the object that represents the context where this method was called from. Both &amp;amp;quot;self&amp;amp;quot; and &amp;amp;quot;@&amp;amp;quot; can be used to specify that something should be assigned to the receiver, for example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;createNewCell = method(&lt;br /&gt;
  @foo = 42&lt;br /&gt;
)&amp;lt;/source&amp;gt;&lt;br /&gt;
The method create above will create assign the value 42 to the cell &amp;amp;quot;foo&amp;amp;quot; on the object the method was called on.&lt;br /&gt;
&lt;br /&gt;
When calling a method, you specify positional arguments separated with commas. You can provide keyword arguments in any order, in any place inside the braces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;;; the method foo takes any kind of argument&lt;br /&gt;
foo&lt;br /&gt;
foo()&lt;br /&gt;
foo(1, 2, 3)&lt;br /&gt;
foo(blarg: 42, 2, 3, 4)&lt;br /&gt;
foo(quux: 42*2)&amp;lt;/source&amp;gt;&lt;br /&gt;
To give a keyword argument, you just write it exactly like you define keyword arugments - a name followed by a colon.&lt;br /&gt;
&lt;br /&gt;
Sometimes it can be useful to be able to take a list of values and give them as positional arguments. The same can be useful to do with a dict of names. You can do that using splatting. This is done by preceding a list or a dict with an asterisk. This will result in the method getting the values inside of it as if the arguments were given directly. You can splat several things to the same invocation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;dc = {foo: 42, bar: 13}&lt;br /&gt;
ls = [1, 2, 3, 4]&lt;br /&gt;
ls2 = [42, 43, 44]&lt;br /&gt;
&lt;br /&gt;
foo(*dc)&lt;br /&gt;
;; the same as:&lt;br /&gt;
foo(foo: 42, bar: 13)&lt;br /&gt;
&lt;br /&gt;
foo(*ls)&lt;br /&gt;
;; the same as:&lt;br /&gt;
foo(1, 2, 3, 4)&lt;br /&gt;
&lt;br /&gt;
foo(*ls2, 111, *dc, *ls)&lt;br /&gt;
;; the same as:&lt;br /&gt;
foo(42, 43, 44, 111, foo: 42, bar: 13, 1, 2, 3, 4)&amp;lt;/source&amp;gt;&lt;br /&gt;
If you try to splat something that can't be splatted, a condition will be signalled.&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
&lt;br /&gt;
The main difference between a macro and a method in Ioke is that the arguments to a macro is not evaluated before they are sent to the macro. That means you have to use macros to send raw message chains in an invocation. In most languages, this kind of feature is generally called call-by-name. When a macro gets called, it will get access to a cell called &amp;amp;quot;call&amp;amp;quot; which is a mimic of the kind Call. This gives access to information about the call and makes it possible to evaluate the code sent as arguments, check how many arguments are supplied, and so on.&lt;br /&gt;
&lt;br /&gt;
A macro is created using the &amp;amp;quot;macro&amp;amp;quot; cell on DefaultBehavior. This will return a mimic of DefaultMacro. Since macros can't define arguments, it's a bit easier to describe than methods, but the things that can be done with macros is also a bit more interesting than what can be achieved with methods. One important thing to keep in mind is that most macros can not receive splatted arguments. In most cases keyword arguments aren't available either - but they could be faked if needed. Macros should generally be used to implement control structures and things that need to manipulate code in different ways.&lt;br /&gt;
&lt;br /&gt;
Just like a method, a macro gets evaluated on a specific receiver. It also gets the same kind of method activation context, but the contents of it is a bit different. Specifically, the context for a macro contains cells named &amp;amp;quot;self&amp;amp;quot;, &amp;amp;quot;@&amp;amp;quot;, &amp;amp;quot;currentMessage&amp;amp;quot;, &amp;amp;quot;surroundingContext&amp;amp;quot; and &amp;amp;quot;call&amp;amp;quot;. It's the &amp;amp;quot;call&amp;amp;quot; cell that is most important. It is a mimic of Call, and Call defines several important methods for manipulating the call environment. These are:&lt;br /&gt;
&lt;br /&gt;
; arguments&lt;br /&gt;
: This method returns a list containing the unevaluated arguments given to this message. Any kind of manipulation can be done with these arguments.&lt;br /&gt;
; ground&lt;br /&gt;
: Returns the ground in which the call was initiated. This is necessary to evaluate arguments in their own environment.&lt;br /&gt;
; message&lt;br /&gt;
: The currently executing message. This is the same as the &amp;amp;quot;currentMessage&amp;amp;quot; cell in the macro activation context.&lt;br /&gt;
; evaluatedArguments&lt;br /&gt;
: Returns a list containing all arguments, evaluated according to the regular rules (but not handling splatting or keywords).&lt;br /&gt;
; resendToMethod&lt;br /&gt;
: Allows a specific message to be resent to another method, without manually copying lots of information.&lt;br /&gt;
These methods are a bit hard to understand, so I'll take some examples from the implementation of Ioke, and show how macros are used here.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;Mixins Enumerable map = macro(&lt;br /&gt;
  &amp;quot;takes one or two arguments. if one argument is given,&lt;br /&gt;
it will be evaluated as a message chain on each element&lt;br /&gt;
in the enumerable, and then the result will be collected&lt;br /&gt;
in a new List. if two arguments are given, the first one&lt;br /&gt;
should be an unevaluated argument name, which will be&lt;br /&gt;
bound inside the scope of executing the second piece of&lt;br /&gt;
code. it's important to notice that the one argument&lt;br /&gt;
form will establish no context, while the two argument form&lt;br /&gt;
establishes a new lexical closure.&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
  len = call arguments length&lt;br /&gt;
  result = list()&lt;br /&gt;
  if(len == 1,&lt;br /&gt;
    code = call arguments first&lt;br /&gt;
    self each(n, result &amp;lt;&amp;lt; code evaluateOn(call ground, cell(:n))),&lt;br /&gt;
&lt;br /&gt;
    code = LexicalBlock createFrom(call arguments, call ground)&lt;br /&gt;
    self each(n, result &amp;lt;&amp;lt; code call(cell(:n))))&lt;br /&gt;
  result)&amp;lt;/source&amp;gt;&lt;br /&gt;
The code above implements map, one of the methods from Enumerable. The map method allows one collection to be mapped in a predefined way into something else. It can take either one or two arguments. If one argument is given, that is a message chain to apply, and then collect the results. If two arguments are given, the first is the argument name to use, and the second is the code to execute for each entry.&lt;br /&gt;
&lt;br /&gt;
The first step is to figure out how many arguments have been given. This is done by checking the length of the &amp;amp;quot;call arguments&amp;amp;quot; cell. If we have a length of one, we know that the first argument is a piece of code to apply, so we assign that argument to a cell called &amp;amp;quot;code&amp;amp;quot;. Now, &amp;amp;quot;code&amp;amp;quot; will be a mimic of Message, and Message has a method called &amp;amp;quot;evaluateOn&amp;amp;quot;, that can be used to fully evaluate a message chain. And that's exacty what we do for each element in the collection we are in. The result of evaluateOn is added to the result list. We use &amp;amp;quot;call ground&amp;amp;quot; to get the correct ground for the code to be evaluated in.&lt;br /&gt;
&lt;br /&gt;
If we get two arguments, it's possible to take a shortcut and generate a lexical block from those arguments, and then use that. So we call &amp;amp;quot;LexicalBlock createFrom&amp;amp;quot; and send in the arguments and the ground, and then call that piece of code once for each element in the collection.&lt;br /&gt;
&lt;br /&gt;
It is a bit tricky to figure out how macros work. I recommend looking at the implementations of some of the core Ioke methods/macros, since these use much of the functionality.&lt;br /&gt;
&lt;br /&gt;
== Blocks ==&lt;br /&gt;
&lt;br /&gt;
A lexical block allows the execution of a piece of code in the lexical context of some other code, instead of in a dynamic object scope. A lexical block does not have a receiver. Instead, it just establishes a new lexical context, and executes the code in that. The exact effect that has on assignments has been [[Guide:Assignment|described]] earlier.&lt;br /&gt;
&lt;br /&gt;
A lexical block can be created using either the &amp;amp;quot;fn&amp;amp;quot; or the &amp;amp;quot;fnx&amp;amp;quot; methods of DefaultBehavior. The main difference between the two is that a block created with &amp;amp;quot;fnx&amp;amp;quot; will be activatable, while something created with &amp;amp;quot;fn&amp;amp;quot; will not. Lexical blocks handle arguments exactly the same way as methods, so a lexical block can take optional arguments, keyword arguments, rest arguments and so on. Both &amp;amp;quot;fn&amp;amp;quot; and &amp;amp;quot;fnx&amp;amp;quot; also take optional documentation text.&lt;br /&gt;
&lt;br /&gt;
A block created with the &amp;amp;quot;fn&amp;amp;quot; method can be invoked using the &amp;amp;quot;call&amp;amp;quot; method of the kind [http://ioke.org/dok/kinds/LexicalBlock.html &amp;lt;code&amp;gt;LexicalBlock&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = fn(z, z println)&lt;br /&gt;
x call(42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a block created with the &amp;amp;quot;fn&amp;amp;quot; method takes one or more explicit parameters it can also be activated like a regular method. The reason for this is shown in the code snippet below. Here the result of invoking the block referred to by &amp;amp;quot;x&amp;amp;quot; is passed to &amp;amp;quot;y&amp;amp;quot; (which may be a regular method or even another block). If &amp;amp;quot;x&amp;amp;quot; would be fully non-activatable, &amp;amp;quot;x&amp;amp;quot; would be passed to &amp;amp;quot;y&amp;amp;quot; as is with the argument thrown away. In other words, that would be dead code. However, you can still refer to the block as &amp;amp;quot;x&amp;amp;quot; without an invocation to happen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = fn(z, z + 42)&lt;br /&gt;
y(x(100)) ;; activates the block with argument 100 and passes the result to y&lt;br /&gt;
x ;; refers to the block without activating it&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A block created with the &amp;amp;quot;fnx&amp;amp;quot; method is activatable per se and thus can be activated like a regular method. The default is to use &amp;amp;quot;fn&amp;amp;quot; to create inactive blocks though, since blocks are generally used to pass pieces of code around.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
y = fnx(z, z println)&lt;br /&gt;
y(42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A lexical block is a regular kind of object that can be assigned to any cell, just like other objects. Lexical blocks mimic LexicalBlock, and blocks don't have names. In contrast to methods and macros, no extra cells will be added to the activation context for a lexical block.&lt;br /&gt;
&lt;br /&gt;
== Lecros ==&lt;br /&gt;
&lt;br /&gt;
A macro works exactly like a method, in that it always has a receiver, and that receiver is available inside the macro as 'self' and '@'. In some circumstances it can be really useful to have a macro that behaves like a lexical block instead - being lexical so it can use cells defined outside of the definition of the macro. These macros won't have access to 'self' or '@', since they don't have a receiver in that way. Where such a macro is called is only based on namespacing.&lt;br /&gt;
&lt;br /&gt;
Ioke supports these kind of macros. They are all mimics of the kind LexicalMacro, and they are created using the method 'lecro'. A LexicalMacro is activatable by default, but a non-activatable lecro can be created using lecrox. The 'lecro' method takes the same arguments as 'macro', and the only real difference is the way it handles outside cells and the receiver value. A lecro also has a cell called outerScope that can be used if you need to explicitly access something in the outer name space - such as call.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
Ioke supports loads of stuff with the standard &amp;lt;code&amp;gt;macro&amp;lt;/code&amp;gt;, but sometimes these are a bit too low level for commonly used operations. Syntax is one of those cases: you can achieve the same goals with macros, but you don't really want to. Many features in Ioke S are implemented using syntax.&lt;br /&gt;
&lt;br /&gt;
You can define syntax using the &amp;lt;code&amp;gt;syntax&amp;lt;/code&amp;gt; method. This returns a mimic of &amp;lt;code&amp;gt;DefaultSyntax&amp;lt;/code&amp;gt;. You can use the same kind of cells in a syntax as you can in a macro. What is different with syntax is that syntax can only return one of two things. The first is &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;, and the second is a message chain. A syntax will only be executed once at every point in the message chains, because after a syntax executes the first time, it will replace itself with the result of that evaluation. If that evaluation returns &amp;lt;code&amp;gt;nil&amp;lt;/code&amp;gt;, syntax will just remove itself from the message chain.&lt;br /&gt;
&lt;br /&gt;
You can use this for many things, but one of the more useful things you can do is translate a high level declarative definition of something into a low level executable version. That is exactly how for comprehensions are implemented.&lt;br /&gt;
&lt;br /&gt;
Syntactic macros are fairly advanced, and take some time to grok. They are incredibly useful though, and they are used all over the standard library to achieve all manner of interesting things. Take a look there and things should hopefully become clearer. It's also a must to read the section on message chain manipulation and quoting in this guide to make syntax macros readable.&lt;br /&gt;
&lt;br /&gt;
== Destructuring ==&lt;br /&gt;
&lt;br /&gt;
A common problem with macros is that you want to take several different combinations of arguments, and do different things depending on how many you get. Say you might want to take one code argument, but also two optional arguments that should be evaluated. All of that code turns out to be highly repetetive, so Ioke contains a collection of syntax macros that make it easier to write these things. These are collectively called destructuring syntax.&lt;br /&gt;
&lt;br /&gt;
Let us say we have a macro that either [code], [evaluatedArgument, code], or [evaluatedArgument, code, evaluatedArgument]. The stuff that should happen is totally different for each of these cases. With a regular macro the code would look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;foo = macro(&lt;br /&gt;
  len = call arguments length&lt;br /&gt;
  case(len,&lt;br /&gt;
    1,&lt;br /&gt;
    code = call arguments[0]&lt;br /&gt;
    ; do something with the code&lt;br /&gt;
    ,&lt;br /&gt;
    2,&lt;br /&gt;
    arg1 = call argAt(0)&lt;br /&gt;
    code = call arguments[1]&lt;br /&gt;
    ; do something with the code and arg&lt;br /&gt;
    ,&lt;br /&gt;
    3,&lt;br /&gt;
    arg1 = call argAt(0)&lt;br /&gt;
    code = call arguments[1]&lt;br /&gt;
    arg2 = call argAt(2)&lt;br /&gt;
    ; do something with the code and args&lt;br /&gt;
    ))&amp;lt;/source&amp;gt;&lt;br /&gt;
As you can see it's really a lot of code to see what happens here, and it is very imperative in style. But, if I instead use dmacro - which is the destructuring version of macro - it looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;foo = dmacro(&lt;br /&gt;
  [code]&lt;br /&gt;
  ; do something with the code&lt;br /&gt;
  ,&lt;br /&gt;
  [&amp;gt;arg1, code]&lt;br /&gt;
  ; do something with the code and arg&lt;br /&gt;
  ,&lt;br /&gt;
  [&amp;gt;arg1, code, &amp;gt;arg2]&lt;br /&gt;
  ; do something with the code and args&lt;br /&gt;
)&amp;lt;/source&amp;gt;&lt;br /&gt;
dmacro will automatically check the length and extract the different arguments. The right arrow before the names of arg1 and arg2 marks that these should be evaluated. And what is more, dmacro will generate code that also generates a good condition if no argument matching works out. If you give zero arguments to the first version, it will fail silently. The dmacro will complain immediately. The dmacro destructuring syntax actually supports several more ways of ripping arguments apart. You can find this information in the doks for dmacro. Also, there are equivalent versions of dmacro for lecro, lecrox and syntax, called dlecro, dlecrox and dsyntax. They do the same thing, except they act like lecros or syntax instead.&lt;br /&gt;
&lt;br /&gt;
== Message chains ==&lt;br /&gt;
&lt;br /&gt;
In many cases a macro will take code that is not wrapped up inside of a method, macro or block. These pieces of code is called message chains, since their representation will be to a raw Message mimic. The chains are quite flexible, since they can be taken apart, modified and put together again. They can also be unevaluated and used as data definitions of some kind. That's how the argument handling to methods are implemented, for example. Since the call to &amp;amp;quot;method&amp;amp;quot; can be seen as a regular call to a macro, the argument descriptions are actually just unevaluated message chains that are picked apart to tease out the argument names. The same technique is applicable in any macro usage.&lt;br /&gt;
&lt;br /&gt;
The term message chain fragment is also used to specifically mean a message chain that is meant to be put together with something and evaluated. Picture a daisy chain that gets added at the end of another chain and then executed. That's what happens if you execute something like &amp;lt;code&amp;gt;[1, 2, 3] map(*2)&amp;lt;/code&amp;gt;. In this case the call to &amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; with the argument 2 will be a message chain fragment that will be put together with a new receiver before execution.&lt;br /&gt;
&lt;br /&gt;
To handle syntax correctly - but also to generally handle manipulation of message chains - it is important to know about the available methods to do this. I have added quite a lot of nice stuff that makes it easy to work with message chains.&lt;br /&gt;
&lt;br /&gt;
First, messages are actually &amp;lt;code&amp;gt;Enumerable&amp;lt;/code&amp;gt;, so you can use any &amp;lt;code&amp;gt;Enumerable&amp;lt;/code&amp;gt; methods on them. The enumeration always starts at the receiver. It will not proceed into arguments, just following the next-pointer. To create a new message or message chain, there are several helpful methods and operators. The first method is called &amp;lt;code&amp;gt;message&amp;lt;/code&amp;gt; and takes an evaluated name and returns a new message with that name. &amp;lt;code&amp;gt;Message from&amp;lt;/code&amp;gt; takes one argument that will not be evaluated and returns a message chain corresponding to that argument. &amp;lt;code&amp;gt;Message fromText&amp;lt;/code&amp;gt; parses text and returns the message chain for it. &amp;lt;code&amp;gt;Message wrap&amp;lt;/code&amp;gt; takes an evaluated argument and returns a message that will always return that value. As will be mentioned later, Message has &amp;lt;code&amp;gt;next=&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;prev=&amp;lt;/code&amp;gt; methods that you can use to set the next and previous pointers. Message also has &amp;lt;code&amp;gt;appendArgument&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;prependArgument&amp;lt;/code&amp;gt; that allow you to add new arguments to the message arguments.&lt;br /&gt;
&lt;br /&gt;
The most used versions for creating message chains are short cuts for the above. Let us begin with creation. Instead of &amp;lt;code&amp;gt;Message from&amp;lt;/code&amp;gt; you can use '. That is a single quote mark. The message after that will be unevaluated and returned as a message chain. If you use a `, a backtick, that is equivalent to &amp;lt;code&amp;gt;Message wrap&amp;lt;/code&amp;gt;. And then we have &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;, that is two single quotes after each other. This message is generally called metaquote or quasiquote. It works the same as ', except that it will find any place where ` is used and insert the value of evaluating the message after the ` and insert that into the current message chain. Finally, &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt; will replace a `` with a literal ` message.&lt;br /&gt;
&lt;br /&gt;
You can add new arguments to a message by using the &amp;amp;lt;&amp;amp;lt; operator. This operator returns the receiver.&lt;br /&gt;
&lt;br /&gt;
If you want to chain together a message chain, using &amp;lt;code&amp;gt;next=&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;prev=&amp;lt;/code&amp;gt; is pretty tedious. You can instead use the -&amp;amp;gt; operator. This will chain together the left hand side and the right hand side messages, and return the right hand side message.&lt;br /&gt;
&lt;br /&gt;
I think it is time for some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;; create a new message with name foo&lt;br /&gt;
x = 'foo&lt;br /&gt;
&lt;br /&gt;
; add two arguments to the foo message&lt;br /&gt;
arg = '(bar quux)&lt;br /&gt;
(x &amp;lt;&amp;lt; arg) &amp;lt;&amp;lt; 'baz&lt;br /&gt;
&lt;br /&gt;
; what we have done so far could be done with:&lt;br /&gt;
x = '(foo(bar quux, baz))&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
y = 'blurg&lt;br /&gt;
; chain together x and y&lt;br /&gt;
x -&amp;gt; y&lt;br /&gt;
&lt;br /&gt;
; the above is equivalent to&lt;br /&gt;
if(y prev,&lt;br /&gt;
  y prev next = nil)&lt;br /&gt;
x next = y&lt;br /&gt;
y prev = x&lt;br /&gt;
&lt;br /&gt;
val = 42&lt;br /&gt;
&lt;br /&gt;
; insert the message chain in x&lt;br /&gt;
''(foo bar(`val) `x)&lt;br /&gt;
&lt;br /&gt;
; the above will return the same as&lt;br /&gt;
'(foo bar(42) foo(bar quux, baz))&amp;lt;/source&amp;gt;&lt;br /&gt;
To understand these operators, you need to have a clear understanding of how the internals of message chains work. Once that clicks, these should be fairly straight forward to understand.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=185</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=185"/>
				<updated>2009-01-27T07:46:09Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Building Ioke */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.com Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [[Ioke S]]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [[Ioke E]], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Building Ioke ===&lt;br /&gt;
&lt;br /&gt;
If you'd like to build Ioke from source, make sure you have a recent version of the [http://java.sun.com/javase/downloads/index.jsp Java Development Kit] installed (1.5.0 or higher, preferrably 1.6.0) and [http://ant.apache.org Apache Ant]. You must have the &amp;lt;tt&amp;gt;ant&amp;lt;/tt&amp;gt; script reachable from your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable. Then, simply check out the source code from the [http://github.org/olabini/ioke/tree/master main repository], and built it using &amp;lt;tt&amp;gt;ant&amp;lt;/tt&amp;gt;. That should run all the compilation steps and tests, and allow the &amp;lt;tt&amp;gt;bin/ioke&amp;lt;/tt&amp;gt; script to run. Just proceed as if you had unpacked the distribution, adding the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to the &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=184</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=184"/>
				<updated>2009-01-27T07:44:05Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Getting started */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.com Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [[Ioke S]]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [[Ioke E]], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Building Ioke ===&lt;br /&gt;
&lt;br /&gt;
If you'd like to build Ioke from source, make sure you have a recent version of the [http://java.sun.com/javase/downloads/index.jsp Java Development Kit] installed (1.5.0 or higher, preferrably 1.6.0) and [http://ant.apache.org Apache Ant]. You must have the &amp;lt;tt&amp;gt;ant&amp;lt;/tt&amp;gt; script reachable from your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; variable. Then, simply check out the source code from the [[main repository]], and built it using &amp;lt;tt&amp;gt;ant&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Todo&amp;diff=183</id>
		<title>Todo</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Todo&amp;diff=183"/>
				<updated>2009-01-26T20:28:15Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains a brief list of things that remains to be done. It should link to a page with more information when needed.&lt;br /&gt;
&lt;br /&gt;
== Core language ==&lt;br /&gt;
&lt;br /&gt;
* [[Java integration planning|Java integration]]&lt;br /&gt;
* [[Concurrency planning|Concurrency primitives]]&lt;br /&gt;
* Assignment&lt;br /&gt;
** [[Destructuring assignment ideas|Destructuring assignment]] with ()&lt;br /&gt;
* Units&lt;br /&gt;
&lt;br /&gt;
== Core libraries ==&lt;br /&gt;
&lt;br /&gt;
* [[List]]&lt;br /&gt;
** Removing elements&lt;br /&gt;
* [[Socket]]&lt;br /&gt;
* [[Tuple]]&lt;br /&gt;
* [[Iik]]&lt;br /&gt;
** Saving history to file&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
&lt;br /&gt;
* [[Cane planning|Cane]]&lt;br /&gt;
&lt;br /&gt;
== Other libraries ==&lt;br /&gt;
&lt;br /&gt;
* SQL interaction DSL&lt;br /&gt;
* JRuby integration&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
&lt;br /&gt;
* Chained/Linked map structure&lt;br /&gt;
* [[CLR runtime planning|CLR runtime]]&lt;br /&gt;
* [[V8 runtime planning|V8 runtime]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Future_plans&amp;diff=182</id>
		<title>Future plans</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Future_plans&amp;diff=182"/>
				<updated>2009-01-26T20:26:56Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: point to TODO list instead of keeping duplicate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Future plans =&lt;br /&gt;
&lt;br /&gt;
I have many plans for the future of Ioke. The next major versions of Ioke will be called [[Ioke E]] and [[Ioke P]], respectively. Exactly what they will contain we'll have to see, but feel free to add your requests and ideas to [[Todo|our TODO list]].&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=181</id>
		<title>Pitfalls</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=181"/>
				<updated>2009-01-26T20:24:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page collect easy mistakes to make while developing Ioke code. Anything that causes unobvious failures should be listed here. Note that things on this page are not bugs - just things that might be a bit counterintuitive at first glance.&lt;br /&gt;
&lt;br /&gt;
== Mismatched commas ==&lt;br /&gt;
&lt;br /&gt;
One of the most insidious problems that can show up in Ioke programs happens when you forget to add a comma at the right place - or add a comma in a place where there shouldn't be one. Remember, commas separate arguments. Nothing else. Here are some of the most common situations where a mismatched comma will cause the program to work incorrectly - but it will generally still run.&lt;br /&gt;
&lt;br /&gt;
=== Missing comma after documentation text ===&lt;br /&gt;
&lt;br /&gt;
When defining a method, macro or syntax with a documentation text, it is very important to remember to add a comma after the text. In most cases the only thing that happens when you forget it is that the object will not get any documentation. But if you continue the expression on the same line you will probably get a signaled condition of some kind.&lt;br /&gt;
&lt;br /&gt;
An example of faulty code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fixed version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;,&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most problematic case is when you have arguments. In that case the omission of the comma will lead to incorrect code that will fail at some point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot; x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; is called above, you will get either a &amp;lt;code&amp;gt;Condition Error Invocation TooManyArguments&amp;lt;/code&amp;gt;, or you will get a &amp;lt;code&amp;gt;Condition Error NoSuchCell&amp;lt;/code&amp;gt;. The solution is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;, x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing comma in conditional expressions ===&lt;br /&gt;
&lt;br /&gt;
In a case expression, all the different parts of it have to be separated by commas. It is common to use indentation to show which parts belong together, but that is not enough for the Ioke parser to figure things out. A few typical examples where this happens in &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cond&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;unless&amp;lt;/code&amp;gt; code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42)&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock] win(p1),&lt;br /&gt;
  [:rock, :scissors] win(p1),&lt;br /&gt;
  [:scissors, :paper] win(p1),&lt;br /&gt;
  [:rock, :paper] win(p2),&lt;br /&gt;
  [:paper, :scissors] win(p2),&lt;br /&gt;
  [:scissors, :rock] win(p2),&lt;br /&gt;
  else draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo&lt;br /&gt;
  x&amp;lt;5, :bar&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course, in these examples it is easy to see where the missing commas should go - but in a real program it gets a bit more messy. It has happened several times during the Ioke development process that a bug like this has persisted for a while.&lt;br /&gt;
&lt;br /&gt;
The above should be corrected as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13,&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42),&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock], win(p1),&lt;br /&gt;
  [:rock, :scissors], win(p1),&lt;br /&gt;
  [:scissors, :paper], win(p1),&lt;br /&gt;
  [:rock, :paper], win(p2),&lt;br /&gt;
  [:paper, :scissors], win(p2),&lt;br /&gt;
  [:scissors, :rock], win(p2),&lt;br /&gt;
  else, draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo,&lt;br /&gt;
  x&amp;lt;5, :bar,&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Added comma in &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; specification ===&lt;br /&gt;
&lt;br /&gt;
This problem is the most insidious for the simple reason that it is the opposite of the other comma-related problems. Namely, when writing a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt;, or one of the other destructuring syntax elements, the problem is generally that you add too many commas:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar],&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is wrong: there shouldn't be a comma after the square brackets. The &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; will fail in some spectacular way because of this, but probably not when you expect it. If a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; fails for uncertain reasons, and debug-by-printing tells you strange things, the most common cause will be one comma too much. The above code should be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar]&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=180</id>
		<title>Pitfalls</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=180"/>
				<updated>2009-01-26T20:23:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page collect easy mistakes to do while developing Ioke code. Anything that causes unobvious failures should be listed here. Note that things on this page are not bugs - just things that might be a bit counterintuitive at first glance.&lt;br /&gt;
&lt;br /&gt;
== Mismatched commas ==&lt;br /&gt;
&lt;br /&gt;
One of the most insidious problems that can show up in Ioke programs happens when you forget to add a comma at the right place - or add a comma in a place where there shouldn't be one. Remember, commas separate arguments. Nothing else. Here are some of the most common situations where a mismatched comma will cause the program to work incorrectly - but it will generally still run.&lt;br /&gt;
&lt;br /&gt;
=== Missing comma after documentation text ===&lt;br /&gt;
&lt;br /&gt;
When defining a method, macro or syntax with a documentation text, it is very important to remember to add a comma after the text. In most cases the only thing that happens when you forget it is that the object will not get any documentation. But if you continue the expression on the same line you will probably get a signaled condition of some kind.&lt;br /&gt;
&lt;br /&gt;
An example of faulty code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fixed version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;,&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most problematic case is when you have arguments. In that case the omission of the comma will lead to incorrect code that will fail at some point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot; x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When foo is called above, you will get either a Condition Error Invocation TooManyArguments, or you will get a Condition Error NoSuchCell. The solution is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;, x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing comma in conditional expressions ===&lt;br /&gt;
&lt;br /&gt;
In a case expression, all the different parts of it have to be separated by commas. It is common to use indentation to show which parts belong together, but that is not enough for the Ioke parser to figure things out. A few typical examples where this happens in &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cond&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;unless&amp;lt;/code&amp;gt; code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42)&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock] win(p1),&lt;br /&gt;
  [:rock, :scissors] win(p1),&lt;br /&gt;
  [:scissors, :paper] win(p1),&lt;br /&gt;
  [:rock, :paper] win(p2),&lt;br /&gt;
  [:paper, :scissors] win(p2),&lt;br /&gt;
  [:scissors, :rock] win(p2),&lt;br /&gt;
  else draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo&lt;br /&gt;
  x&amp;lt;5, :bar&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course, in these examples it is easy to see where the missing commas should go - but in a real program it gets a bit more messy. It has happened several times during the Ioke development process that a bug like this has persisted for a while.&lt;br /&gt;
&lt;br /&gt;
The above should be corrected as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13,&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42),&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock], win(p1),&lt;br /&gt;
  [:rock, :scissors], win(p1),&lt;br /&gt;
  [:scissors, :paper], win(p1),&lt;br /&gt;
  [:rock, :paper], win(p2),&lt;br /&gt;
  [:paper, :scissors], win(p2),&lt;br /&gt;
  [:scissors, :rock], win(p2),&lt;br /&gt;
  else, draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo,&lt;br /&gt;
  x&amp;lt;5, :bar,&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Added comma in &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; specification ===&lt;br /&gt;
&lt;br /&gt;
This problem is the most insidious for the simple reason that it is the opposite of the other comma-related problems. Namely, when writing a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt;, or one of the other destructuring syntax elements, the problem is generally that you add too many commas:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar],&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is wrong: there shouldn't be a comma after the square brackets. The &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; will fail in some spectacular way because of this, but probably not when you expect it. If a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; fails for uncertain reasons, and debug-by-printing tells you strange things, the most common cause will be one comma too much. The above code should be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar]&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=179</id>
		<title>Pitfalls</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Pitfalls&amp;diff=179"/>
				<updated>2009-01-26T20:22:25Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page collect easy mistakes to do while developing Ioke code. Anything that causes unobvious failures should be listed here. Note that things on this page are not bugs - just things that might be a bit counterintuitive at first glance.&lt;br /&gt;
&lt;br /&gt;
== Mismatched commas ==&lt;br /&gt;
&lt;br /&gt;
One of the most insidious problems that can show up in Ioke programs happens when you forget to add a comma at the right place - or add a comma in a place where there shouldn't be one. Remember, commas separate arguments. Nothing else. Here are some of the most common situations where a mismatched comma will cause the program to work incorrectly - but it will generally still run.&lt;br /&gt;
&lt;br /&gt;
=== Missing comma after documentation text ===&lt;br /&gt;
&lt;br /&gt;
When defining a method, macro or syntax with a documentation text, it is very important to remember to add a comma after the text. In most cases the only thing that happens when you forget it is that the object will not get any documentation. But if you continue the expression on the same line you will probably get a signaled condition of some kind.&lt;br /&gt;
&lt;br /&gt;
An example of faulty code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fixed version:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;,&lt;br /&gt;
  42*42)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The most problematic case is when you have arguments. In that case the omission of the comma will lead to incorrect code that will fail at some point:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot; x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When foo is called above, you will get either a Condition Error Invocation TooManyArguments, or you will get a Condition Error NoSuchCell. The solution is easy:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
foo = method(&amp;quot;foo is a method that does something really cool&amp;quot;, x,&lt;br /&gt;
  42*x)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing comma in case, cond, if and unless expressions ===&lt;br /&gt;
&lt;br /&gt;
In a case expression, all the different parts of it have to be separated by commas. It is common to use indentation to show which parts belong together, but that is not enough for the Ioke parser to figure things out. A few typical examples where this happens in &amp;lt;code&amp;gt;case&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cond&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;unless&amp;lt;/code&amp;gt; code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42)&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock] win(p1),&lt;br /&gt;
  [:rock, :scissors] win(p1),&lt;br /&gt;
  [:scissors, :paper] win(p1),&lt;br /&gt;
  [:rock, :paper] win(p2),&lt;br /&gt;
  [:paper, :scissors] win(p2),&lt;br /&gt;
  [:scissors, :rock] win(p2),&lt;br /&gt;
  else draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo&lt;br /&gt;
  x&amp;lt;5, :bar&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course, in these examples it is easy to see where the missing commas should go - but in a real program it gets a bit more messy. It has happened several times during the Ioke development process that a bug like this has persisted for a while.&lt;br /&gt;
&lt;br /&gt;
The above should be corrected as:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
if(foox === 1..3,&lt;br /&gt;
  x = 13,&lt;br /&gt;
  x = :fail)&lt;br /&gt;
&lt;br /&gt;
unless(foxy(42),&lt;br /&gt;
  &amp;quot;hello world!&amp;quot; println)&lt;br /&gt;
&lt;br /&gt;
case([p1 value, p2 value],&lt;br /&gt;
  [:paper, :rock], win(p1),&lt;br /&gt;
  [:rock, :scissors], win(p1),&lt;br /&gt;
  [:scissors, :paper], win(p1),&lt;br /&gt;
  [:rock, :paper], win(p2),&lt;br /&gt;
  [:paper, :scissors], win(p2),&lt;br /&gt;
  [:scissors, :rock], win(p2),&lt;br /&gt;
  else, draw)&lt;br /&gt;
    &lt;br /&gt;
cond(&lt;br /&gt;
  x&amp;gt;10, :foo,&lt;br /&gt;
  x&amp;lt;5, :bar,&lt;br /&gt;
  x==7, :fluxie)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Added comma in &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; specification ===&lt;br /&gt;
&lt;br /&gt;
This problem is the most insidious for the simple reason that it is the opposite of the other comma-related problems. Namely, when writing a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt;, or one of the other destructuring syntax elements, the problem is generally that you add too many commas:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar],&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code is wrong: there shouldn't be a comma after the square brackets. The &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; will fail in some spectacular way because of this, but probably not when you expect it. If a &amp;lt;code&amp;gt;dmacro&amp;lt;/code&amp;gt; fails for uncertain reasons, and debug-by-printing tells you strange things, the most common cause will be one comma too much. The above code should be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;ioke&amp;quot;&amp;gt;&lt;br /&gt;
x = dmacro(&lt;br /&gt;
 [&amp;gt;foo, bar]&lt;br /&gt;
 foo + bar evaluateOn(call ground, call ground))&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=127</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=127"/>
				<updated>2009-01-26T03:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;program       ::=  messageChain?&lt;br /&gt;
messageChain  ::=  expression+&lt;br /&gt;
expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;lt;code&amp;gt;foo().bar(quux(42)).baaz()&amp;lt;/code&amp;gt; would be expressed as &amp;lt;code&amp;gt;foo() bar(quux(42)) baaz()&amp;lt;/code&amp;gt;, or more succinctly &amp;lt;code&amp;gt;foo bar(quux(42)) baaz&amp;lt;/code&amp;gt; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [[Guide:Code|code]].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [[Guide:Assignment|assignment]]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way a Ioke program works is very simple. Everything executes based on two things: the the context, or the ground, and the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available to most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;lt;code&amp;gt;foo bar(flux bar) quux&amp;lt;/code&amp;gt; involves 5 different messages:&lt;br /&gt;
&lt;br /&gt;
# The message &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message is used as the argument value given to the outside &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; method.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;quux&amp;lt;/code&amp;gt; is sent to the result of the initial &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a [http://ioke.org/dok/kinds/Condition/Error/NoSuchCell.html &amp;lt;code&amp;gt;Condition Error NoSuchCell&amp;lt;/code&amp;gt;] condition.&lt;br /&gt;
&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [[Guide:Code|code]].&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=126</id>
		<title>Ioke 0</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=126"/>
				<updated>2009-01-26T03:05:44Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ioke 0 was the first release of the Ioke programming language, which happened on December 23, 2008.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke 0 released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a dynamic language targeted at the Java Virtual Machine.&lt;br /&gt;
It's been designed from scratch to be a highly flexible general&lt;br /&gt;
purpose language. It is a prototype-based programming language that&lt;br /&gt;
is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke 0 is the first release of Ioke, and as such is not production&lt;br /&gt;
ready. I would appreciate if people tried it out and reported bugs,&lt;br /&gt;
thoughts and ideas.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ioke 0 | Next: [[Ioke S]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=125</id>
		<title>Ioke 0</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=125"/>
				<updated>2009-01-26T03:05:08Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ioke 0 was the first release of the Ioke programming language, which happened on December 23, 2008.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke 0 released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a dynamic language targeted at the Java Virtual Machine.&lt;br /&gt;
It's been designed from scratch to be a highly flexible general&lt;br /&gt;
purpose language. It is a prototype-based programming language that&lt;br /&gt;
is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke 0 is the first release of Ioke, and as such is not production&lt;br /&gt;
ready. I would appreciate if people tried it out and reported bugs,&lt;br /&gt;
thoughts and ideas.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=124</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=124"/>
				<updated>2009-01-26T03:04:09Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible.&lt;br /&gt;
It is a dynamic language targeted at the Java Virtual Machine. It's&lt;br /&gt;
been designed from scratch to be a highly flexible general purpose&lt;br /&gt;
language. It is a prototype-based programming language that is&lt;br /&gt;
inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount&lt;br /&gt;
of new features compared to Ioke 0. Among the most important are&lt;br /&gt;
syntactic macros, full regular expression support, for comprehensions,&lt;br /&gt;
aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several &lt;br /&gt;
example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without &lt;br /&gt;
the support of several new contributors. I would like to call out &lt;br /&gt;
and thank:&lt;br /&gt;
&lt;br /&gt;
T W                          &amp;amp;lt;twellman@gmail.com&amp;amp;gt;&lt;br /&gt;
Sam Aaron                    &amp;amp;lt;samaaron@gmail.com&amp;amp;gt;&lt;br /&gt;
Carlos Villela               &amp;amp;lt;cv@lixo.org&amp;amp;gt;&lt;br /&gt;
Brian Guthrie                &amp;amp;lt;btguthrie@gmail.com&amp;amp;gt;&lt;br /&gt;
Martin Elwin                 &amp;amp;lt;elvvin@gmail.com&amp;amp;gt;&lt;br /&gt;
Felipe Rodrigues de Almeida  &amp;amp;lt;felipero@gmail.com&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=123</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=123"/>
				<updated>2009-01-26T03:03:49Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible.&lt;br /&gt;
It is a dynamic language targeted at the Java Virtual Machine. It's&lt;br /&gt;
been designed from scratch to be a highly flexible general purpose&lt;br /&gt;
language. It is a prototype-based programming language that is&lt;br /&gt;
inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount&lt;br /&gt;
of new features compared to Ioke 0. Among the most important are&lt;br /&gt;
syntactic macros, full regular expression support, for comprehensions,&lt;br /&gt;
aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several &lt;br /&gt;
example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without the support of several new contributors. I would like to call out and thank:&lt;br /&gt;
&lt;br /&gt;
T W                          &amp;amp;lt;twellman@gmail.com&amp;amp;gt;&lt;br /&gt;
Sam Aaron                    &amp;amp;lt;samaaron@gmail.com&amp;amp;gt;&lt;br /&gt;
Carlos Villela               &amp;amp;lt;cv@lixo.org&amp;amp;gt;&lt;br /&gt;
Brian Guthrie                &amp;amp;lt;btguthrie@gmail.com&amp;amp;gt;&lt;br /&gt;
Martin Elwin                 &amp;amp;lt;elvvin@gmail.com&amp;amp;gt;&lt;br /&gt;
Felipe Rodrigues de Almeida  &amp;amp;lt;felipero@gmail.com&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=122</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=122"/>
				<updated>2009-01-26T03:02:35Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible. It is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount of new features compared to Ioke 0. Among the most important are syntactic macros, full regular expression support, for comprehensions, aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without the support of several new contributors. I would like to call out and thank:&lt;br /&gt;
&lt;br /&gt;
T W                          &amp;amp;lt;twellman@gmail.com&amp;amp;gt;&lt;br /&gt;
Sam Aaron                    &amp;amp;lt;samaaron@gmail.com&amp;amp;gt;&lt;br /&gt;
Carlos Villela               &amp;amp;lt;cv@lixo.org&amp;amp;gt;&lt;br /&gt;
Brian Guthrie                &amp;amp;lt;btguthrie@gmail.com&amp;amp;gt;&lt;br /&gt;
Martin Elwin                 &amp;amp;lt;elvvin@gmail.com&amp;amp;gt;&lt;br /&gt;
Felipe Rodrigues de Almeida  &amp;amp;lt;felipero@gmail.com&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=121</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=121"/>
				<updated>2009-01-26T03:01:46Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible. It is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount of new features compared to Ioke 0. Among the most important are syntactic macros, full regular expression support, for comprehensions, aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without the support of several new contributors. I would like to call out and thank:&lt;br /&gt;
T W                          twellman@gmail.com&lt;br /&gt;
Sam Aaron                    samaaron@gmail.com&lt;br /&gt;
Carlos Villela               cv@lixo.org&lt;br /&gt;
Brian Guthrie                btguthrie@gmail.com&lt;br /&gt;
Martin Elwin                 elvvin@gmail.com&lt;br /&gt;
Felipe Rodrigues de Almeida  felipero@gmail.com&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=120</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=120"/>
				<updated>2009-01-26T03:01:28Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible. It is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount of new features compared to Ioke 0. Among the most important are syntactic macros, full regular expression support, for comprehensions, aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without the support of several new contributors. I would like to call out and thank:&lt;br /&gt;
T W                          twellman@gmail.com&lt;br /&gt;
Sam Aaron                    samaaron@gmail.com&lt;br /&gt;
Carlos Villela               cv@lixo.org&lt;br /&gt;
Brian Guthrie                btguthrie@gmail.com&lt;br /&gt;
Martin Elwin                 elvvin@gmail.com&lt;br /&gt;
Felipe Rodrigues de Almeida  felipero@gmail.com&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=119</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=119"/>
				<updated>2009-01-26T03:00:48Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&lt;br /&gt;
Ioke S released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a language that is designed to be as expressive as possible. It is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke S is the second release of Ioke. It includes a large amount of new features compared to Ioke 0. Among the most important are syntactic macros, full regular expression support, for comprehensions, aspects, cond and case, destructuring macros, and many more things.&lt;br /&gt;
&lt;br /&gt;
Ioke S also includes a large amount of bug fixes, and also several example programs.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Expressiveness first&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Aspects&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
The many things added in Ioke S could not have been done without the support of several new contributors. I would like to call out and thank:&lt;br /&gt;
T W                          &amp;lt;twellman@gmail.com&amp;gt;&lt;br /&gt;
Sam Aaron                    &amp;lt;samaaron@gmail.com&amp;gt;&lt;br /&gt;
Carlos Villela               &amp;lt;cv@lixo.org&amp;gt;&lt;br /&gt;
Brian Guthrie                &amp;lt;btguthrie@gmail.com&amp;gt;&lt;br /&gt;
Martin Elwin                 &amp;lt;elvvin@gmail.com&amp;gt;&lt;br /&gt;
Felipe Rodrigues de Almeida  &amp;lt;felipero@gmail.com&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=118</id>
		<title>Ioke 0</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=118"/>
				<updated>2009-01-26T03:00:37Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ioke 0 was the first release of the Ioke programming language, which happened on December 23, 2008.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ioke 0 released&lt;br /&gt;
---------------&lt;br /&gt;
&lt;br /&gt;
Ioke is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke 0 is the first release of Ioke, and as such is not production ready. I would appreciate if people tried it out and reported bugs, thoughts and ideas.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=117</id>
		<title>Ioke 0</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_0&amp;diff=117"/>
				<updated>2009-01-26T02:59:12Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: Ioke 0 was the first release of the Ioke programming language, which happened on December 23, 2008.  Here's the original announcement:  &amp;lt;pre&amp;gt; == Ioke 0 released ==   Ioke is a dynamic lang...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ioke 0 was the first release of the Ioke programming language, which happened on December 23, 2008.&lt;br /&gt;
&lt;br /&gt;
Here's the original announcement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
== Ioke 0 released == &lt;br /&gt;
&lt;br /&gt;
Ioke is a dynamic language targeted at the Java Virtual Machine. It's been designed from scratch to be a highly flexible general purpose language. It is a prototype-based programming language that is inspired by Io, Smalltalk, Lisp and Ruby.&lt;br /&gt;
&lt;br /&gt;
Homepage: http://ioke.org&lt;br /&gt;
Download: http://ioke.org/download.html&lt;br /&gt;
Programming guide: http://ioke.org/guide.html&lt;br /&gt;
&lt;br /&gt;
Ioke 0 is the first release of Ioke, and as such is not production ready. I would appreciate if people tried it out and reported bugs, thoughts and ideas.&lt;br /&gt;
&lt;br /&gt;
Features:&lt;br /&gt;
- Strong, dynamic typing&lt;br /&gt;
- Prototype based object orientation&lt;br /&gt;
- Homoiconic language&lt;br /&gt;
- Simple syntax&lt;br /&gt;
- Powerful macro facilities&lt;br /&gt;
- Condition system&lt;br /&gt;
- Developed using TDD&lt;br /&gt;
- Documentation system that combines documentation with specs&lt;br /&gt;
- Wedded to the JVM&lt;br /&gt;
&lt;br /&gt;
Ola Bini    - ola.bini@gmail.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Future_plans&amp;diff=116</id>
		<title>Future plans</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Future_plans&amp;diff=116"/>
				<updated>2009-01-26T02:58:02Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: = Future plans =  I have many plans for the future of Ioke. The next major versions of Ioke will be called Ioke E and Ioke P, respectively. Exactly what they will contain we'll hav...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Future plans =&lt;br /&gt;
&lt;br /&gt;
I have many plans for the future of Ioke. The next major versions of Ioke will be called [[Ioke E]] and [[Ioke P]], respectively. Exactly what they will contain we'll have to see, but these are things I need to have, large and small:&lt;br /&gt;
&lt;br /&gt;
* Java integration&lt;br /&gt;
* Concurrency primitives of some kind&lt;br /&gt;
&lt;br /&gt;
This list is in no way exhaustive, but it is what currently comes to mind.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Future_plans&amp;diff=115</id>
		<title>Guide:Future plans</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Future_plans&amp;diff=115"/>
				<updated>2009-01-26T02:57:59Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: Replacing page with '{{:Future plans}}'&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{:Future plans}}&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Future_plans&amp;diff=114</id>
		<title>Guide:Future plans</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Future_plans&amp;diff=114"/>
				<updated>2009-01-26T02:57:34Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Future plans */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Future plans =&lt;br /&gt;
&lt;br /&gt;
I have many plans for the future of Ioke. The next major versions of Ioke will be called [[Ioke E]] and [[Ioke P]], respectively. Exactly what they will contain we'll have to see, but these are things I need to have, large and small:&lt;br /&gt;
&lt;br /&gt;
* Java integration&lt;br /&gt;
* Concurrency primitives of some kind&lt;br /&gt;
&lt;br /&gt;
This list is in no way exhaustive, but it is what currently comes to mind.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_E&amp;diff=113</id>
		<title>Ioke E</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_E&amp;diff=113"/>
				<updated>2009-01-26T02:56:53Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: As of this writing, Ioke E will be the next release of the Ioke programming language.  See also: Future plans  Previous: Ioke S | Ioke E | Next: Ioke P&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke E will be the next release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
See also: [[Future plans]]&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke S]] | Ioke E | Next: [[Ioke P]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=112</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=112"/>
				<updated>2009-01-26T02:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.com Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [[Ioke S]]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [[Ioke E]], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=111</id>
		<title>Ioke S</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Ioke_S&amp;diff=111"/>
				<updated>2009-01-26T02:53:50Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: As of this writing, Ioke S is the latest release of the Ioke programming language.  Previous: Ioke 0 | Ioke S | Next: Ioke E&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, Ioke S is the latest release of the Ioke programming language.&lt;br /&gt;
&lt;br /&gt;
Previous: [[Ioke 0]] | Ioke S | Next: [[Ioke E]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=110</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=110"/>
				<updated>2009-01-26T02:52:12Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.com Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [[Ioke S]]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [Ioke E], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=109</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=109"/>
				<updated>2009-01-26T02:49:35Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.com Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [Ioke S]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [Ioke E], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Importing&amp;diff=108</id>
		<title>Guide:Importing</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Importing&amp;diff=108"/>
				<updated>2009-01-26T02:47:46Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Importing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Importing =&lt;br /&gt;
&lt;br /&gt;
To import new code into Ioke, the method &amp;lt;code&amp;gt;use&amp;lt;/code&amp;gt; should be used. The terminology is that you give &amp;amp;quot;use&amp;amp;quot; a name of a module to include, and if that module has already been included it will not be evaluated again. If it has not been included, &amp;lt;code&amp;gt;use&amp;lt;/code&amp;gt; will try to find the module using several different heuristics. It will add a &amp;lt;tt&amp;gt;.ik&amp;lt;/tt&amp;gt; to the name and try to look up a file of that name - but it will also try to look it up without a &amp;lt;tt&amp;gt;.ik&amp;lt;/tt&amp;gt;, if a full file name has been given. Several different places will be searched, and the exact order and what will be searched can be found by calling the &amp;lt;code&amp;gt;System loadPath&amp;lt;/code&amp;gt; method. This will return a list of all the places that Ioke uses to search for modules. This list can be modified to add more directories to the load path at runtime.&lt;br /&gt;
&lt;br /&gt;
If a module of the specified name can't be found, a condition will be signalled.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Aspects&amp;diff=107</id>
		<title>Guide:Aspects</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Aspects&amp;diff=107"/>
				<updated>2009-01-26T02:45:19Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Aspects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Aspects =&lt;br /&gt;
&lt;br /&gt;
In many circumstances you might want to do several different things in a specific method. That generally goes against good software engineering, that says every piece of code should only have one responsibility. Aspect oriented programming tackles this by allowing you to slice code along a different dimension compared to the regular object oriented paradigm. Ioke has a small version of this, that allow you to add advice to cells. This advice can be before, after or around. All of them will get access to the arguments given in the original message, but after-advice also gets access to the value returned from the main cell. Finally, around-advice also gets the responsibility to invoke the original cell, so an around-advice could choose to not invoke it at all, or it could invoke it with different arguments, or maybe invoke it several times.&lt;br /&gt;
&lt;br /&gt;
Ioke currently only allows you to add or remove advice. To be able to remove advice, you need to name it when adding it. Unnamed advice can not be removed. Advice can be wrapped. It will be applied in an outside-in approach, where the most recently added advice will execute first.&lt;br /&gt;
&lt;br /&gt;
The return value of before and after advice doesn't matter, but the return value of around-advice will be interpreted as the new return value of the message send.&lt;br /&gt;
&lt;br /&gt;
To manipulate advice in Ioke, you need to describe what to manipulate. This description will return a Pointcut, that can then be used to inject advice at that point. Pointcuts can be defined in several ways. The easiest is to define it in terms of a cell name. Using this approach is the only way to define advice for non-existent cells.&lt;br /&gt;
&lt;br /&gt;
To create a Pointcut, call before, after or around on the receiver where the Pointcut should belong. The arguments specify what should be matched by the pointcut. You can see some examples of pointcuts here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;; matches cells foo and bar&lt;br /&gt;
Text before(:foo, :bar)&lt;br /&gt;
&lt;br /&gt;
X = Origin mimic&lt;br /&gt;
; will not match anything&lt;br /&gt;
X around(matching: :anyFromSelf)&lt;br /&gt;
&lt;br /&gt;
X foo = 123&lt;br /&gt;
; will now match foo&lt;br /&gt;
X around(matching: :anyFromSelf)&lt;br /&gt;
&lt;br /&gt;
; any cell name matching the regexp&lt;br /&gt;
X after(matching: #/foo/)&lt;br /&gt;
&lt;br /&gt;
; matches any at all, except foo&lt;br /&gt;
X before(matching: :any, except: :foo)&lt;br /&gt;
; matches any at all, except anything that matches foo&lt;br /&gt;
X before(matching: :any, except: #/foo/)&lt;br /&gt;
&lt;br /&gt;
; use a block for matching&lt;br /&gt;
X around(matching: fn(x, x == :blurg))&lt;br /&gt;
&lt;br /&gt;
; use a list to provide alternatives&lt;br /&gt;
X before(matching: [#/foo/, #/bar/])&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see from these examples, the pointcuts can be fairly advanced and specific in what they match. The option to send in a block makes it possible to check any property while matching.&lt;br /&gt;
&lt;br /&gt;
OK, once you have a Pointcut, there are three different methods you can call. These are &amp;amp;lt;&amp;amp;lt;, add, and remove!. The first one adds an unnamed advice, the second adds a named advice and the third one removes a named advice. Advice is any object that can be activated or called, so a method, a block, a macro or a syntax is fine.&lt;br /&gt;
&lt;br /&gt;
It's time to see what it looks like to add advice. Before-advice is the easiest kind. The important thing to remember is that the code will get the same arguments as the original call, which means it will also signal an error if the arguments doesn't match.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;X before(:foo) &amp;amp;lt;&amp;amp;lt; method(x, &amp;amp;quot;got #{x}&amp;amp;quot; println)&lt;br /&gt;
X before(matching: :anyFromSelf) &amp;amp;lt;&amp;amp;lt; macro(&lt;br /&gt;
  &amp;amp;quot;called #{call message name}&amp;amp;quot; println)&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code doesn't do anything strange at all.&lt;br /&gt;
&lt;br /&gt;
Next up we have after-advice. The only difference here is that after-advice automatically gets a cell that is set to adviceResult, that can used inside the method.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;X after(:foo) &amp;amp;lt;&amp;amp;lt; method(+args,&lt;br /&gt;
  &amp;amp;quot;foo resulted in: #{aspectResult}&amp;amp;quot; println)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remember that the result value of before and after advice doesn't count. It is thrown away. But these methods can still affect things by side effects. They can also be used for validation. A condition signalled inside of an advice would have the same effect as if done in the method itself - namely interrupting the flow of control.&lt;br /&gt;
&lt;br /&gt;
The final advice is around advice. These are different in two ways. First, they get access to a cell called aspectCall, which can be used to invoke the real cell (and the next chain of advice, of course). The second difference is that the result of the around advice will be the return value from the cell. So, you can imagine the around-advice executing instead of the original code. If you forget to invoke it, the original cell won't be invoked at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;X around(:non_existant) &amp;amp;lt;&amp;amp;lt; method(&lt;br /&gt;
  42)&lt;br /&gt;
&lt;br /&gt;
X around(:foo) &amp;amp;lt;&amp;amp;lt; macro(arg1, arg2,&lt;br /&gt;
  &amp;amp;quot;before&amp;amp;quot; println&lt;br /&gt;
  res = aspectResult(arg2, arg1)&lt;br /&gt;
  &amp;amp;quot;got: #{res}&amp;amp;quot; println&lt;br /&gt;
  42)&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first piece of code show that you can actually use an around advice around something that doesn't exist. But if you do call aspectCall inside of it, that will generate a NoSuchCell condition, of course. In the second example we first log some information, then invoke the original code with switched argument order, saves away the result, prints the result, and finally returns 42. There you can see most of the things that can be done inside of an around macro.&lt;br /&gt;
&lt;br /&gt;
The aspect system in Ioke is implemented in Ioke itself, and is fairly small at the moment. The guiding principle behind it is that it shouldn't have an impact on code that doesn't use it. It is a highly useful feature that makes it possible to decompose code substantially. As an example of a common place for aspect usage is initialization. This is defined as an around-advice that looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Origin around(:mimic) &amp;amp;lt;&amp;amp;lt; method(+rest, +:krest, &lt;br /&gt;
  newMimic = aspectCall&lt;br /&gt;
  if(newMimic cell?(:initialize),&lt;br /&gt;
    newMimic initialize(*rest, *krest))&lt;br /&gt;
  newMimic)&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note first that the around advice takes any kind of arguments, but doesn't send them along to mimic. Instead it checks if there is an initialize-cell, and in that case invokes it with the arguments given to the mimic call. It finally returns the original result.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=106</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=106"/>
				<updated>2009-01-26T02:43:28Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Execution model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    program       ::=  messageChain?&lt;br /&gt;
    messageChain  ::=  expression+&lt;br /&gt;
    expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
    literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
    message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
    commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
    brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
    terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
    comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;amp;quot;foo().bar(quux(42)).baaz()&amp;amp;quot; would be expressed as &amp;amp;quot;foo() bar(quux(42)) baaz()&amp;amp;quot;, or more succinctly &amp;amp;quot;foo bar(quux(42)) baaz&amp;amp;quot; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [[Guide:Code|code]].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [[Guide:Assignment|assignment]]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way a Ioke program works is very simple. Everything executes based on two things: the the context, or the ground, and the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available to most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;lt;code&amp;gt;foo bar(flux bar) quux&amp;lt;/code&amp;gt; involves 5 different messages:&lt;br /&gt;
&lt;br /&gt;
# The message &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;foo&amp;lt;/code&amp;gt; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message is used as the argument value given to the outside &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; method.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;quux&amp;lt;/code&amp;gt; is sent to the result of the initial &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a [http://ioke.org/dok/kinds/Condition/Error/NoSuchCell.html &amp;lt;code&amp;gt;Condition Error NoSuchCell&amp;lt;/code&amp;gt;] condition.&lt;br /&gt;
&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [[Guide:Code|code]].&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=105</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=105"/>
				<updated>2009-01-26T02:41:16Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Execution model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    program       ::=  messageChain?&lt;br /&gt;
    messageChain  ::=  expression+&lt;br /&gt;
    expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
    literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
    message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
    commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
    brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
    terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
    comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;amp;quot;foo().bar(quux(42)).baaz()&amp;amp;quot; would be expressed as &amp;amp;quot;foo() bar(quux(42)) baaz()&amp;amp;quot;, or more succinctly &amp;amp;quot;foo bar(quux(42)) baaz&amp;amp;quot; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [[Guide:Code|code]].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [[Guide:Assignment|assignment]]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way a Ioke program works is very simple. Everything executes based on two things: the the context, or the ground, and the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available to most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;lt;code&amp;gt;foo bar(flux bar) quux&amp;lt;/code&amp;gt; involves 5 different messages:&lt;br /&gt;
&lt;br /&gt;
# The message &amp;lt;code&amp;gt;foo&amp;lt;code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;foo&amp;lt;code&amp;gt; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; is sent to &amp;lt;code&amp;gt;Ground&amp;lt;/code&amp;gt;, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; is sent to the result of the &amp;lt;code&amp;gt;flux&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message is used as the argument value given to the outside &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; method.&lt;br /&gt;
# The message &amp;lt;code&amp;gt;quux&amp;lt;/code&amp;gt; is sent to the result of the initial &amp;lt;code&amp;gt;bar&amp;lt;/code&amp;gt; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a &amp;lt;code&amp;gt;Condition Error NoSuchCell&amp;lt;/code&amp;gt; condition.&lt;br /&gt;
&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [[Guide:Code|code]].&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=104</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=104"/>
				<updated>2009-01-26T00:50:41Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    program       ::=  messageChain?&lt;br /&gt;
    messageChain  ::=  expression+&lt;br /&gt;
    expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
    literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
    message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
    commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
    brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
    terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
    comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;amp;quot;foo().bar(quux(42)).baaz()&amp;amp;quot; would be expressed as &amp;amp;quot;foo() bar(quux(42)) baaz()&amp;amp;quot;, or more succinctly &amp;amp;quot;foo bar(quux(42)) baaz&amp;amp;quot; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [[Guide:Code|code]].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [[Guide:Assignment|assignment]]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way an Ioke program work is very simple. Everything executes based on two things. The first is the context, or the ground, and the second is the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called Ground. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available in most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;amp;quot;foo bar(flux bar) quux&amp;amp;quot; involves 5 different messages.&lt;br /&gt;
&lt;br /&gt;
# The message &amp;amp;quot;foo&amp;amp;quot; is sent to Ground, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;foo&amp;amp;quot; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;amp;quot;bar&amp;amp;quot; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;amp;quot;flux&amp;amp;quot; is sent to Ground, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;flux&amp;amp;quot; message.&lt;br /&gt;
# The result of the &amp;amp;quot;bar&amp;amp;quot; message is used as the argument value given to the outside &amp;amp;quot;bar&amp;amp;quot; method.&lt;br /&gt;
# The message &amp;amp;quot;quux&amp;amp;quot; is sent to the result of the initial &amp;amp;quot;bar&amp;amp;quot; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a Condition Error NoSuchCell condition.&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [[Guide:Code|code]].&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=103</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=103"/>
				<updated>2009-01-26T00:46:11Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    program       ::=  messageChain?&lt;br /&gt;
    messageChain  ::=  expression+&lt;br /&gt;
    expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
    literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
    message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
    commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
    brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
    terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
    comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;amp;quot;foo().bar(quux(42)).baaz()&amp;amp;quot; would be expressed as &amp;amp;quot;foo() bar(quux(42)) baaz()&amp;amp;quot;, or more succinctly &amp;amp;quot;foo bar(quux(42)) baaz&amp;amp;quot; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [#Code code].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [http://{{SERVERNAME}}/#assignment assignment]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way an Ioke program work is very simple. Everything executes based on two things. The first is the context, or the ground, and the second is the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called Ground. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available in most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;amp;quot;foo bar(flux bar) quux&amp;amp;quot; involves 5 different messages.&lt;br /&gt;
&lt;br /&gt;
# The message &amp;amp;quot;foo&amp;amp;quot; is sent to Ground, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;foo&amp;amp;quot; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;amp;quot;bar&amp;amp;quot; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;amp;quot;flux&amp;amp;quot; is sent to Ground, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;flux&amp;amp;quot; message.&lt;br /&gt;
# The result of the &amp;amp;quot;bar&amp;amp;quot; message is used as the argument value given to the outside &amp;amp;quot;bar&amp;amp;quot; method.&lt;br /&gt;
# The message &amp;amp;quot;quux&amp;amp;quot; is sent to the result of the initial &amp;amp;quot;bar&amp;amp;quot; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a Condition Error NoSuchCell condition.&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [http://{{SERVERNAME}}/#code code]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=DokGen&amp;diff=102</id>
		<title>DokGen</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=DokGen&amp;diff=102"/>
				<updated>2009-01-26T00:43:30Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DokGen is the tool that is used to generate the reference documentation for Ioke, and it generates output similar to [http://rdoc.sourceforge.net/ RDoc].&lt;br /&gt;
&lt;br /&gt;
Its goal is to be a general purpose tool for any Ioke application. It extracts the documentation information from defined objects and then generates an HTML structure from it that can be easily navigated. If specs are available for objects and methods, it will try to incorporate these together with the documentation. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now.&lt;br /&gt;
&lt;br /&gt;
At the moment, running the &amp;lt;tt&amp;gt;dokgen&amp;lt;/tt&amp;gt; script will create a directory called &amp;lt;tt&amp;gt;dok&amp;lt;/tt&amp;gt;, which contains the full documentation. It will use all specs it can find in the &amp;lt;tt&amp;gt;test&amp;lt;/tt&amp;gt; directory.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=101</id>
		<title>Guide:Libraries</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=101"/>
				<updated>2009-01-26T00:41:06Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* DokGen */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Libraries =&lt;br /&gt;
&lt;br /&gt;
Ioke ships with several small libraries that are useful for different tasks. The main ones are IIk, ISpec and DokGen, and these will be documented a bit more in this chapter. All of them are considered a core part of Ioke since the functionality they provide is tied to the distribution.&lt;br /&gt;
&lt;br /&gt;
== IIk ==&lt;br /&gt;
&lt;br /&gt;
{{main|Iik}}&lt;br /&gt;
&lt;br /&gt;
IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
== ISpec ==&lt;br /&gt;
&lt;br /&gt;
{{main|ISpec}}&lt;br /&gt;
&lt;br /&gt;
ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
== DokGen ==&lt;br /&gt;
&lt;br /&gt;
{{main|DokGen}}&lt;br /&gt;
&lt;br /&gt;
DokGen is the tool that is used to generate the reference documentation for Ioke, and it generates output similar to [http://rdoc.sourceforge.net/ RDoc]. Its goal is to be a general purpose tool for any Ioke application.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=ISpec&amp;diff=100</id>
		<title>ISpec</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=ISpec&amp;diff=100"/>
				<updated>2009-01-26T00:38:21Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ISpec is a minimal port of the [http://rspec.info Ruby RSpec] framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
The ispec command line tool takes one argument -- &amp;amp;quot;-f&amp;amp;quot; to specify which format to print in. The default is &amp;amp;quot;p&amp;amp;quot; for progress, which only shows one dot for each test run. The &amp;amp;quot;s&amp;amp;quot; alternative shows the longer spec format. To run all tests in a directory with spec format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ispec -fs test_dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command will find all files ending in _spec.ik and run the specs defined in them. If a single file is specified, only the tests in that file will run. If more than one directory or file is specified on the command line, all the tests will be run together. Provided the spec files all use the ispec module, the files can be run directly with the ioke-command too.&lt;br /&gt;
&lt;br /&gt;
A full test file utilizing most of the parts of ISpec looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;use(&amp;amp;quot;ispec&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
describe(Foo,&lt;br /&gt;
  it(&amp;amp;quot;should have the correct kind&amp;amp;quot;,&lt;br /&gt;
    Foo should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    Foo kind should == &amp;amp;quot;Foo&amp;amp;quot;&lt;br /&gt;
    Foo kind should match(#/Fo+/)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  it(&amp;amp;quot;should be possible to mimic&amp;amp;quot;,&lt;br /&gt;
    m = Foo mimic&lt;br /&gt;
    m should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    m should not be same(Foo)&lt;br /&gt;
    m should mimic(Foo)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should not return nil&amp;amp;quot;,&lt;br /&gt;
      Foo aMethod should not be nil&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    it(&amp;amp;quot;should return a number that can be multiplied&amp;amp;quot;,&lt;br /&gt;
      (Foo aMethod * 2) should == 12&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aBadMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should signal a condition&amp;amp;quot;,&lt;br /&gt;
      fn(Foo aBadMethod) should signal(Condition Error BadBadBed)&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code first makes sure to use ISpec, then describes Foo. The describe method takes either kinds or texts describing what's under test. This can be nested arbitrarily deep. A test is defined with the &amp;amp;quot;it&amp;amp;quot; method, which takes a text describing the test first, and the implementation of the test as the second argument. If the second argument is left out, the test is considered pending.&lt;br /&gt;
&lt;br /&gt;
Assertions are done using the &amp;amp;quot;should&amp;amp;quot; method. This returns an expectation that can check several different things against the original receiver. Using == is the simplest expectation and checks that a value equals another. By adding the not method call inbetween, the expectation is inversed. There are some predefined expectations. Except for ==, these are mimic, match and signal. The signal expectation makes sure that a condition is signalled in the code. The match expectation will check a text value against a regular expression. The mimic expectation checks whether an object mimics another.&lt;br /&gt;
&lt;br /&gt;
The words &amp;amp;quot;be&amp;amp;quot; and &amp;amp;quot;have&amp;amp;quot; are ignored in the expectations. They are so called fluff words - that are only there to make it more readable.&lt;br /&gt;
&lt;br /&gt;
If an expectation receives a message it doesn't know about, it uses pass to check a dynamic property. For example, something like &amp;amp;quot;foo should be same(x)&amp;amp;quot; will end up calling &amp;amp;quot;same?&amp;amp;quot; with x as an argument. The same thing happens in the above code to check for kind. There exists no kind expectation. Instead the kind checking will go check for &amp;amp;quot;kind?&amp;amp;quot;.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=ISpec&amp;diff=99</id>
		<title>ISpec</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=ISpec&amp;diff=99"/>
				<updated>2009-01-26T00:37:37Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
The ispec command line tool takes one argument -- &amp;amp;quot;-f&amp;amp;quot; to specify which format to print in. The default is &amp;amp;quot;p&amp;amp;quot; for progress, which only shows one dot for each test run. The &amp;amp;quot;s&amp;amp;quot; alternative shows the longer spec format. To run all tests in a directory with spec format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ispec -fs test_dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command will find all files ending in _spec.ik and run the specs defined in them. If a single file is specified, only the tests in that file will run. If more than one directory or file is specified on the command line, all the tests will be run together. Provided the spec files all use the ispec module, the files can be run directly with the ioke-command too.&lt;br /&gt;
&lt;br /&gt;
A full test file utilizing most of the parts of ISpec looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;use(&amp;amp;quot;ispec&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
describe(Foo,&lt;br /&gt;
  it(&amp;amp;quot;should have the correct kind&amp;amp;quot;,&lt;br /&gt;
    Foo should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    Foo kind should == &amp;amp;quot;Foo&amp;amp;quot;&lt;br /&gt;
    Foo kind should match(#/Fo+/)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  it(&amp;amp;quot;should be possible to mimic&amp;amp;quot;,&lt;br /&gt;
    m = Foo mimic&lt;br /&gt;
    m should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    m should not be same(Foo)&lt;br /&gt;
    m should mimic(Foo)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should not return nil&amp;amp;quot;,&lt;br /&gt;
      Foo aMethod should not be nil&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    it(&amp;amp;quot;should return a number that can be multiplied&amp;amp;quot;,&lt;br /&gt;
      (Foo aMethod * 2) should == 12&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aBadMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should signal a condition&amp;amp;quot;,&lt;br /&gt;
      fn(Foo aBadMethod) should signal(Condition Error BadBadBed)&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code first makes sure to use ISpec, then describes Foo. The describe method takes either kinds or texts describing what's under test. This can be nested arbitrarily deep. A test is defined with the &amp;amp;quot;it&amp;amp;quot; method, which takes a text describing the test first, and the implementation of the test as the second argument. If the second argument is left out, the test is considered pending.&lt;br /&gt;
&lt;br /&gt;
Assertions are done using the &amp;amp;quot;should&amp;amp;quot; method. This returns an expectation that can check several different things against the original receiver. Using == is the simplest expectation and checks that a value equals another. By adding the not method call inbetween, the expectation is inversed. There are some predefined expectations. Except for ==, these are mimic, match and signal. The signal expectation makes sure that a condition is signalled in the code. The match expectation will check a text value against a regular expression. The mimic expectation checks whether an object mimics another.&lt;br /&gt;
&lt;br /&gt;
The words &amp;amp;quot;be&amp;amp;quot; and &amp;amp;quot;have&amp;amp;quot; are ignored in the expectations. They are so called fluff words - that are only there to make it more readable.&lt;br /&gt;
&lt;br /&gt;
If an expectation receives a message it doesn't know about, it uses pass to check a dynamic property. For example, something like &amp;amp;quot;foo should be same(x)&amp;amp;quot; will end up calling &amp;amp;quot;same?&amp;amp;quot; with x as an argument. The same thing happens in the above code to check for kind. There exists no kind expectation. Instead the kind checking will go check for &amp;amp;quot;kind?&amp;amp;quot;.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=98</id>
		<title>Guide:Libraries</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=98"/>
				<updated>2009-01-26T00:36:59Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* ISpec */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Libraries =&lt;br /&gt;
&lt;br /&gt;
Ioke ships with several small libraries that are useful for different tasks. The main ones are IIk, ISpec and DokGen, and these will be documented a bit more in this chapter. All of them are considered a core part of Ioke since the functionality they provide is tied to the distribution.&lt;br /&gt;
&lt;br /&gt;
== IIk ==&lt;br /&gt;
&lt;br /&gt;
{{main|Iik}}&lt;br /&gt;
&lt;br /&gt;
IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
== ISpec ==&lt;br /&gt;
&lt;br /&gt;
{{main|ISpec}}&lt;br /&gt;
&lt;br /&gt;
ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
== DokGen ==&lt;br /&gt;
&lt;br /&gt;
{{main|DokGen}}&lt;br /&gt;
&lt;br /&gt;
DokGen is the tool that is used to generate the reference documentation for Ioke. The goal is that it will be a general purpose tool for any Ioke application. It extracts the documentation information from defined objects and then generates an HTML structure from it that can be easily navigated. If specs are available for objects and methods, it will try to incorporate these together with the documentation. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now. At the moment, running the dokgen script will create a directory called &amp;amp;quot;dok&amp;amp;quot; which contains the full documentation. It will use all specs it can find in the directory test.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=97</id>
		<title>Guide:Libraries</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=97"/>
				<updated>2009-01-26T00:36:28Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* IIk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Libraries =&lt;br /&gt;
&lt;br /&gt;
Ioke ships with several small libraries that are useful for different tasks. The main ones are IIk, ISpec and DokGen, and these will be documented a bit more in this chapter. All of them are considered a core part of Ioke since the functionality they provide is tied to the distribution.&lt;br /&gt;
&lt;br /&gt;
== IIk ==&lt;br /&gt;
&lt;br /&gt;
{{main|Iik}}&lt;br /&gt;
&lt;br /&gt;
IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
== ISpec ==&lt;br /&gt;
&lt;br /&gt;
ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
The ispec command line tool takes one argument -- &amp;amp;quot;-f&amp;amp;quot; to specify which format to print in. The default is &amp;amp;quot;p&amp;amp;quot; for progress, which only shows one dot for each test run. The &amp;amp;quot;s&amp;amp;quot; alternative shows the longer spec format. To run all tests in a directory with spec format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ispec -fs test_dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command will find all files ending in _spec.ik and run the specs defined in them. If a single file is specified, only the tests in that file will run. If more than one directory or file is specified on the command line, all the tests will be run together. Provided the spec files all use the ispec module, the files can be run directly with the ioke-command too.&lt;br /&gt;
&lt;br /&gt;
A full test file utilizing most of the parts of ISpec looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;use(&amp;amp;quot;ispec&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
describe(Foo,&lt;br /&gt;
  it(&amp;amp;quot;should have the correct kind&amp;amp;quot;,&lt;br /&gt;
    Foo should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    Foo kind should == &amp;amp;quot;Foo&amp;amp;quot;&lt;br /&gt;
    Foo kind should match(#/Fo+/)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  it(&amp;amp;quot;should be possible to mimic&amp;amp;quot;,&lt;br /&gt;
    m = Foo mimic&lt;br /&gt;
    m should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    m should not be same(Foo)&lt;br /&gt;
    m should mimic(Foo)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should not return nil&amp;amp;quot;,&lt;br /&gt;
      Foo aMethod should not be nil&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    it(&amp;amp;quot;should return a number that can be multiplied&amp;amp;quot;,&lt;br /&gt;
      (Foo aMethod * 2) should == 12&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aBadMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should signal a condition&amp;amp;quot;,&lt;br /&gt;
      fn(Foo aBadMethod) should signal(Condition Error BadBadBed)&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code first makes sure to use ISpec, then describes Foo. The describe method takes either kinds or texts describing what's under test. This can be nested arbitrarily deep. A test is defined with the &amp;amp;quot;it&amp;amp;quot; method, which takes a text describing the test first, and the implementation of the test as the second argument. If the second argument is left out, the test is considered pending.&lt;br /&gt;
&lt;br /&gt;
Assertions are done using the &amp;amp;quot;should&amp;amp;quot; method. This returns an expectation that can check several different things against the original receiver. Using == is the simplest expectation and checks that a value equals another. By adding the not method call inbetween, the expectation is inversed. There are some predefined expectations. Except for ==, these are mimic, match and signal. The signal expectation makes sure that a condition is signalled in the code. The match expectation will check a text value against a regular expression. The mimic expectation checks whether an object mimics another.&lt;br /&gt;
&lt;br /&gt;
The words &amp;amp;quot;be&amp;amp;quot; and &amp;amp;quot;have&amp;amp;quot; are ignored in the expectations. They are so called fluff words - that are only there to make it more readable.&lt;br /&gt;
&lt;br /&gt;
If an expectation receives a message it doesn't know about, it uses pass to check a dynamic property. For example, something like &amp;amp;quot;foo should be same(x)&amp;amp;quot; will end up calling &amp;amp;quot;same?&amp;amp;quot; with x as an argument. The same thing happens in the above code to check for kind. There exists no kind expectation. Instead the kind checking will go check for &amp;amp;quot;kind?&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== DokGen ==&lt;br /&gt;
&lt;br /&gt;
{{main|DokGen}}&lt;br /&gt;
&lt;br /&gt;
DokGen is the tool that is used to generate the reference documentation for Ioke. The goal is that it will be a general purpose tool for any Ioke application. It extracts the documentation information from defined objects and then generates an HTML structure from it that can be easily navigated. If specs are available for objects and methods, it will try to incorporate these together with the documentation. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now. At the moment, running the dokgen script will create a directory called &amp;amp;quot;dok&amp;amp;quot; which contains the full documentation. It will use all specs it can find in the directory test.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Iik&amp;diff=95</id>
		<title>Iik</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Iik&amp;diff=95"/>
				<updated>2009-01-26T00:34:31Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: IIk moved to Iik&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
IIk provides the possibility to exit using either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;close&amp;amp;quot;. Both of these will in fact signal a condition of kind &amp;amp;quot;IIk Exit&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
IIk will use readline if possible. That means that you can do the regular shell editing most other REPLs have support for, including using the up and down keys to scroll through earlier executed code.&lt;br /&gt;
&lt;br /&gt;
IIk has a simple debugger that will be invoked when a condition is not handled. This debugger allows you to execute any kind of code and also to invoke restarts. As an example, the code below refers to a cell that doesn't exist. A condition is signalled and the debugger invoked. I choose to invoke the restart named useValue and provide the value 42. That value is returned and I'm back at the IIk prompt. In the next line I do the same thing again with the same name. This time I choose the storeValue restart and provide the value 43. And after that there exists a cell with the name foo and the value 43.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 1&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 42&lt;br /&gt;
  +&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 0&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 43&lt;br /&gt;
  +&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; 43&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Ioke debugger is quite powerful. If you were to execute any other Ioke code, that code will actually be executed in the context of the place where the condition was signalled. So it is possible to fix more complicated things in this manner too.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=IIk&amp;diff=96</id>
		<title>IIk</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=IIk&amp;diff=96"/>
				<updated>2009-01-26T00:34:31Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: IIk moved to Iik&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Iik]]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=94</id>
		<title>Guide:Libraries</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Libraries&amp;diff=94"/>
				<updated>2009-01-26T00:32:39Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* IIk */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Libraries =&lt;br /&gt;
&lt;br /&gt;
Ioke ships with several small libraries that are useful for different tasks. The main ones are IIk, ISpec and DokGen, and these will be documented a bit more in this chapter. All of them are considered a core part of Ioke since the functionality they provide is tied to the distribution.&lt;br /&gt;
&lt;br /&gt;
== IIk ==&lt;br /&gt;
&lt;br /&gt;
{{main|Iik}}&lt;br /&gt;
&lt;br /&gt;
IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
IIk provides the possibility to exit using either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;close&amp;amp;quot;. Both of these will in fact signal a condition of kind &amp;amp;quot;IIk Exit&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
IIk will use readline if possible. That means that you can do the regular shell editing most other REPLs have support for, including using the up and down keys to scroll through earlier executed code.&lt;br /&gt;
&lt;br /&gt;
IIk has a simple debugger that will be invoked when a condition is not handled. This debugger allows you to execute any kind of code and also to invoke restarts. As an example, the code below refers to a cell that doesn't exist. A condition is signalled and the debugger invoked. I choose to invoke the restart named useValue and provide the value 42. That value is returned and I'm back at the IIk prompt. In the next line I do the same thing again with the same name. This time I choose the storeValue restart and provide the value 43. And after that there exists a cell with the name foo and the value 43.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 1&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 42&lt;br /&gt;
  +&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 0&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 43&lt;br /&gt;
  +&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; 43&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Ioke debugger is quite powerful. If you were to execute any other Ioke code, that code will actually be executed in the context of the place where the condition was signalled. So it is possible to fix more complicated things in this manner too.&lt;br /&gt;
&lt;br /&gt;
== ISpec ==&lt;br /&gt;
&lt;br /&gt;
ISpec is a minimal port of the Ruby RSpec framework for behavior-driven development. It supports the bare minimum to allow testing of Ioke itself. The current Ioke test suite is completely written in ISpec, and it seems to be a capable environment.&lt;br /&gt;
&lt;br /&gt;
The ispec command line tool takes one argument -- &amp;amp;quot;-f&amp;amp;quot; to specify which format to print in. The default is &amp;amp;quot;p&amp;amp;quot; for progress, which only shows one dot for each test run. The &amp;amp;quot;s&amp;amp;quot; alternative shows the longer spec format. To run all tests in a directory with spec format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;ispec -fs test_dir&amp;lt;/pre&amp;gt;&lt;br /&gt;
This command will find all files ending in _spec.ik and run the specs defined in them. If a single file is specified, only the tests in that file will run. If more than one directory or file is specified on the command line, all the tests will be run together. Provided the spec files all use the ispec module, the files can be run directly with the ioke-command too.&lt;br /&gt;
&lt;br /&gt;
A full test file utilizing most of the parts of ISpec looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;use(&amp;amp;quot;ispec&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
describe(Foo,&lt;br /&gt;
  it(&amp;amp;quot;should have the correct kind&amp;amp;quot;,&lt;br /&gt;
    Foo should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    Foo kind should == &amp;amp;quot;Foo&amp;amp;quot;&lt;br /&gt;
    Foo kind should match(#/Fo+/)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  it(&amp;amp;quot;should be possible to mimic&amp;amp;quot;,&lt;br /&gt;
    m = Foo mimic&lt;br /&gt;
    m should have kind(&amp;amp;quot;Foo&amp;amp;quot;)&lt;br /&gt;
    m should not be same(Foo)&lt;br /&gt;
    m should mimic(Foo)&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should not return nil&amp;amp;quot;,&lt;br /&gt;
      Foo aMethod should not be nil&lt;br /&gt;
    )&lt;br /&gt;
&lt;br /&gt;
    it(&amp;amp;quot;should return a number that can be multiplied&amp;amp;quot;,&lt;br /&gt;
      (Foo aMethod * 2) should == 12&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
&lt;br /&gt;
  describe(&amp;amp;quot;aBadMethod&amp;amp;quot;,&lt;br /&gt;
    it(&amp;amp;quot;should signal a condition&amp;amp;quot;,&lt;br /&gt;
      fn(Foo aBadMethod) should signal(Condition Error BadBadBed)&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
)&amp;lt;/pre&amp;gt;&lt;br /&gt;
This code first makes sure to use ISpec, then describes Foo. The describe method takes either kinds or texts describing what's under test. This can be nested arbitrarily deep. A test is defined with the &amp;amp;quot;it&amp;amp;quot; method, which takes a text describing the test first, and the implementation of the test as the second argument. If the second argument is left out, the test is considered pending.&lt;br /&gt;
&lt;br /&gt;
Assertions are done using the &amp;amp;quot;should&amp;amp;quot; method. This returns an expectation that can check several different things against the original receiver. Using == is the simplest expectation and checks that a value equals another. By adding the not method call inbetween, the expectation is inversed. There are some predefined expectations. Except for ==, these are mimic, match and signal. The signal expectation makes sure that a condition is signalled in the code. The match expectation will check a text value against a regular expression. The mimic expectation checks whether an object mimics another.&lt;br /&gt;
&lt;br /&gt;
The words &amp;amp;quot;be&amp;amp;quot; and &amp;amp;quot;have&amp;amp;quot; are ignored in the expectations. They are so called fluff words - that are only there to make it more readable.&lt;br /&gt;
&lt;br /&gt;
If an expectation receives a message it doesn't know about, it uses pass to check a dynamic property. For example, something like &amp;amp;quot;foo should be same(x)&amp;amp;quot; will end up calling &amp;amp;quot;same?&amp;amp;quot; with x as an argument. The same thing happens in the above code to check for kind. There exists no kind expectation. Instead the kind checking will go check for &amp;amp;quot;kind?&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== DokGen ==&lt;br /&gt;
&lt;br /&gt;
{{main|DokGen}}&lt;br /&gt;
&lt;br /&gt;
DokGen is the tool that is used to generate the reference documentation for Ioke. The goal is that it will be a general purpose tool for any Ioke application. It extracts the documentation information from defined objects and then generates an HTML structure from it that can be easily navigated. If specs are available for objects and methods, it will try to incorporate these together with the documentation. At the moment, there is no way to run dokgen on a subset of Ioke code, but that should be available very soon now. At the moment, running the dokgen script will create a directory called &amp;amp;quot;dok&amp;amp;quot; which contains the full documentation. It will use all specs it can find in the directory test.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Iik&amp;diff=93</id>
		<title>Iik</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Iik&amp;diff=93"/>
				<updated>2009-01-26T00:32:36Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IIk is the interactive Ioke prompt, which will run if you give no arguments to the ioke script. At the IIk prompt you can execute mostly all the same kind of code that could execute inside of an Ioke script file. The main difference is that this code will not be assigned to Ground, but instead will run in another context that is specific for the purposes of IIk.&lt;br /&gt;
&lt;br /&gt;
IIk provides the possibility to exit using either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;close&amp;amp;quot;. Both of these will in fact signal a condition of kind &amp;amp;quot;IIk Exit&amp;amp;quot;.&lt;br /&gt;
&lt;br /&gt;
IIk will use readline if possible. That means that you can do the regular shell editing most other REPLs have support for, including using the up and down keys to scroll through earlier executed code.&lt;br /&gt;
&lt;br /&gt;
IIk has a simple debugger that will be invoked when a condition is not handled. This debugger allows you to execute any kind of code and also to invoke restarts. As an example, the code below refers to a cell that doesn't exist. A condition is signalled and the debugger invoked. I choose to invoke the restart named useValue and provide the value 42. That value is returned and I'm back at the IIk prompt. In the next line I do the same thing again with the same name. This time I choose the storeValue restart and provide the value 43. And after that there exists a cell with the name foo and the value 43.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 1&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 42&lt;br /&gt;
  +&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 42&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
*** - couldn't find cell 'foo' on 'Ground_0x26E9F9' (Condition Error NoSuchCell)&lt;br /&gt;
&lt;br /&gt;
 foo                                              [&amp;amp;lt;init&amp;amp;gt;:1:0]&lt;br /&gt;
&lt;br /&gt;
The following restarts are available:&lt;br /&gt;
 0: storeValue           (Store value for: foo)&lt;br /&gt;
 1: useValue             (Use value for: foo)&lt;br /&gt;
 2: abort                (restart: abort)&lt;br /&gt;
 3: quit                 (restart: quit)&lt;br /&gt;
&lt;br /&gt;
 dbg:&amp;amp;gt; 0&lt;br /&gt;
  dbg::newValue&amp;amp;gt; 43&lt;br /&gt;
  +&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
+&amp;amp;gt; 43&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; 43&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Ioke debugger is quite powerful. If you were to execute any other Ioke code, that code will actually be executed in the context of the place where the condition was signalled. So it is possible to fix more complicated things in this manner too.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=92</id>
		<title>Guide:Syntax</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Syntax&amp;diff=92"/>
				<updated>2009-01-26T00:19:45Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: New page: = Syntax =  Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next me...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Syntax =&lt;br /&gt;
&lt;br /&gt;
Ioke has no keywords or statements. Everything is an expression composed of a chain of messages. A piece of code is represented as a chain of messages that links to the next message. The result of one message will be the receiver of the next message, until a &amp;amp;quot;.&amp;amp;quot; message is received. The &amp;amp;quot;.&amp;amp;quot; message is a terminator that throws away the current receiver. A newline will serve as a &amp;amp;quot;.&amp;amp;quot; message in the circumstances where it feels natural.&lt;br /&gt;
&lt;br /&gt;
An informal BNF description of Ioke looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;    program       ::=  messageChain?&lt;br /&gt;
    messageChain  ::=  expression+&lt;br /&gt;
    expression    ::=  message | brackets | literal | terminator&lt;br /&gt;
    literal       ::=  Text | Regexp | Number | Decimal | Unit&lt;br /&gt;
    message       ::=  Identifier ( &amp;amp;quot;(&amp;amp;quot; commated? &amp;amp;quot;)&amp;amp;quot; )?&lt;br /&gt;
    commated      ::=  messageChain ( &amp;amp;quot;,&amp;amp;quot; messageChain )*&lt;br /&gt;
    brackets      ::=  ( &amp;amp;quot;[&amp;amp;quot; commated? &amp;amp;quot;]&amp;amp;quot; ) | ( &amp;amp;quot;{&amp;amp;quot; commated? &amp;amp;quot;}&amp;amp;quot; )&lt;br /&gt;
    terminator    ::=  &amp;amp;quot;.&amp;amp;quot; | &amp;amp;quot;\n&amp;amp;quot;&lt;br /&gt;
    comment       ::=  &amp;amp;quot;;&amp;amp;quot; .* &amp;amp;quot;\n&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
What isn't visible here is that all whitespace -- except for newlines -- will work only as separators of messages, and is otherwise ignored. That means that message sending does not use the dot, as in most other languages. A phrase such as &amp;amp;quot;foo().bar(quux(42)).baaz()&amp;amp;quot; would be expressed as &amp;amp;quot;foo() bar(quux(42)) baaz()&amp;amp;quot;, or more succinctly &amp;amp;quot;foo bar(quux(42)) baaz&amp;amp;quot; in Ioke.&lt;br /&gt;
&lt;br /&gt;
All the types of literals are actually turned into a message to create that literal, so the canonical form of the message chain contains no literals, just a message to create that literal. Any message can have zero or more arguments given to it. Arguments are separated with comma. If there are no arguments to a message, the parenthesis can be left off, but they need to be there if there are arguments. Mostly any combination of characters can be used as an Identifier, with some exceptions.&lt;br /&gt;
&lt;br /&gt;
There used to be a parsing element called operators, but these have now been included into identifiers. They are not parsed differently at all, but the operator shuffling step will handle them differently. Specifically, operators can be used in infix, including having different precedence rules. Assignment is a specific form of operator which gets its own kind of shuffling. These are both described below.&lt;br /&gt;
&lt;br /&gt;
An identifier in Ioke can be one of several things. Ioke takes the rules for Java identifiers, and adds some more to them. All Unicode letters and digits can be part of an identifier, except for the first entry. Underscores are allowed, just like in Java. Ioke also allows colons as an identifier. Exclamation mark and question mark is allowed anywhere in the identifier except for in the beginning. Identifiers can be broadly classified into identifiers and operators, where operators can be any combination of several sigils. There are also some special operators that have restructions. These are: Opening and close brackets are not allowed, except together with its counterpart, so [ is not a valid identifier, while [] is. So is {}. () is not valid either. Two or more dots is a valid identifier. A hash sign can be followed by any operator char, but isn't parsed as an identifier by itself. Slash is not an operator char, but can be used as it except in combinations that look like regular expressions. The operator chars are: +, -, *, %, &amp;amp;lt;, &amp;amp;gt;, !, ?, ~, &amp;amp;amp;, |, ^, $, =, @, ', ` and :. These can be combined together in any order, and any number, except for the caveats noted before. That means the available operator space is infinite, and very wide. Combinations of letters and operator characters are generally not allowed, except for the exceptions with :, ! and ?. This is to make it possible to have infix operations without spaces in some situations.&lt;br /&gt;
&lt;br /&gt;
The two forms of brackets will get turned into a canonical form. Surrounding comma-separated message chains with square brackets is the same as calling the method [], giving it those message chains as argument. So [foo, bar, quux] is exactly the same as [](foo, bar, quux). The same is true for curly brackets.&lt;br /&gt;
&lt;br /&gt;
Comments start with semicolon and end at the first newline. They can be used mostly anywhere, except inside of literal texts. The hash sign followed by an exclamation mark is also a comment, to allow the shebang line in Unix scripts.&lt;br /&gt;
&lt;br /&gt;
How and when the actual evaluation of messages happen depend on what kind the message type is. If it's inactive, the value reflecting that cell will be returned. If it's active, the cell will be activated and the result of that activation returned. How the activation depends on what kind of code the cell contains. The various kinds of code is described more closely in the chapter about [http://{{SERVERNAME}}/#code code].&lt;br /&gt;
&lt;br /&gt;
== Literal values ==&lt;br /&gt;
&lt;br /&gt;
Ioke currently contains four different kinds of literals. There is a fifth quasi literal, that isn't exactly parsed as a literal, but will be evaluated differently based on its name. These literals are texts, regular expressions, integers and decimal numbers. Symbols are actually parsed as regular identifiers, but they are handled a bit differently during evaluation.&lt;br /&gt;
&lt;br /&gt;
=== Text ===&lt;br /&gt;
&lt;br /&gt;
A literal text in Ioke is what is generally called strings in most languages. As in most languages, text is written inside of double quotes. Any characters are valid inside of those double quotes. That includes newlines - so you can write a literal text that extends to several lines. There is no alternate syntax for text. As in most other languages, several escapes are valid inside of a text. Escapes are preceded by the backslash, and insert the character corresponding to the escape values. These escapes are:&lt;br /&gt;
&lt;br /&gt;
; \b&lt;br /&gt;
: Inserts the bell character, that is represented in ASCII by the decimal value 8.&lt;br /&gt;
; \e&lt;br /&gt;
: Inserts the character that is represented in ASCII by the decimal value 27. This value is used for sending escape values to the TTYs in some operating systems.&lt;br /&gt;
; \t&lt;br /&gt;
: Inserts the TAB character - ASCII decimal 9.&lt;br /&gt;
; \n&lt;br /&gt;
: Inserts the newline character - ASCII decimal 10.&lt;br /&gt;
; \f&lt;br /&gt;
: Inserts the form feed character - ASCII decimal 12.&lt;br /&gt;
; \r&lt;br /&gt;
: Inserts the carriage return character - ASCII decimal 13.&lt;br /&gt;
; \&amp;amp;quot;&lt;br /&gt;
: Inserts the double quote character - ASCII decimal 34.&lt;br /&gt;
; \\&lt;br /&gt;
: Inserts the backslash character - ASCII decimal 92.&lt;br /&gt;
; \[newline]&lt;br /&gt;
: Inserts nothing at all. Used to escape necessary newlines, without having them show up in the output text.&lt;br /&gt;
; \#&lt;br /&gt;
: Inserts a literal hash character - ASCII decimal 35.&lt;br /&gt;
; \uABCD&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the hexadecimal value of the four characters following the &amp;amp;quot;u&amp;amp;quot;. All four hexadecimal characters need to be specified.&lt;br /&gt;
; \7, \12, \316&lt;br /&gt;
: Inserts the Unicode codepoint corresponding to the octal value of the one, two or three octal characters. The maximum value allowed is \377, and the minimum is obviously \0.&lt;br /&gt;
Ioke also supports an alternative text syntax that can be used when the text in question contains many scare quotes. The alternative syntax starts with #[ and ends with ]. A right bracket will have to be escaped, but scare quotes doesn't have to be.&lt;br /&gt;
&lt;br /&gt;
The parsing of text will generate a message with name &amp;amp;quot;internal:createText&amp;amp;quot;. This message will get one argument that is the raw Java String corresponding to the text.&lt;br /&gt;
&lt;br /&gt;
Ioke allows automatic interpolation of arbitrary values in the same manner as Ruby. It uses the same syntax for this, which is the #{} syntax inside a text. These can be nested in any way. The elements will be parsed and sent as arguments to the message with name &amp;amp;quot;internal:concatenateText&amp;amp;quot;. So an Ioke text such as &amp;amp;quot;foo bar#{flux} will #{1+2}&amp;amp;quot; will generate the message internal:concatenateText(&amp;amp;quot;foo bar&amp;amp;quot;, flux, &amp;amp;quot; will &amp;amp;quot;, 1+(2), &amp;amp;quot;&amp;amp;quot;). As you can see, there is a small amount of waste in the way this is generated -- but the simple model makes it easy to understand. It's not guaranteed that this will remain the same, although the message will definitely remain.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;flax \&lt;br /&gt;
mux&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;quot;one two #{three} \b four&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
#[you don't really  &amp;amp;quot;#{1+2+3}&amp;amp;quot; believe that?]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Regular expressions ===&lt;br /&gt;
&lt;br /&gt;
Ioke has very capable regular expressions. Exactly what you can do with them can be found further down in this guide. The literal syntax allows regular expressions to be embedded in code directly. The syntax for this starts with a #/ and ends with another /. The last slash can optionally be followed by some flags that change the behavior of the expression. Regular expressions can also use an alternative syntax that starts with #r[ and ends with ]. Just as with Text, regular expressions can contain interpolation. This interpolation will be transformed into regular expressions and then combined with the outer regular expression. A few examples might be in order here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#//&lt;br /&gt;
#r[]&lt;br /&gt;
&lt;br /&gt;
#/foo/&lt;br /&gt;
#r[foo]&lt;br /&gt;
&lt;br /&gt;
#/fo+/x&lt;br /&gt;
#r[fo+]x&lt;br /&gt;
&lt;br /&gt;
#/bla #{&amp;amp;quot;foo&amp;amp;quot;} bar/&lt;br /&gt;
#r[bla #{&amp;amp;quot;foo&amp;amp;quot;} bar]&amp;lt;/pre&amp;gt;&lt;br /&gt;
The first example is an empty regular expression. The second is an expression matching the word &amp;amp;quot;foo&amp;amp;quot;. The third expression matches an &amp;amp;quot;f&amp;amp;quot; followed with one or more &amp;amp;quot;o&amp;amp;quot;. It also allows extended regular expression syntax, due to the x flag. The flags supported in Ioke are o, x, p, n, i, u, m and s. The meaning of these match the meaning of corresponding Ruby flags. Regular expressions allow most of the same escapes as Ioke text. Specifically, these escapes are supported: b, t, n, f, r, /, \ and newline. Unicode and octal escapes also work. The fourth example shows the insertion of a literal text inside of a regular expression.&lt;br /&gt;
&lt;br /&gt;
Ioke regular expressions will be transformed into a call to internal:createRegexp. This message expects two Java strings, one with the actual pattern, and one with the flags.&lt;br /&gt;
&lt;br /&gt;
=== Integers ===&lt;br /&gt;
&lt;br /&gt;
Ioke supports arbitrarily sized numbers. It also contains a numerical tower that can be more closely explored in the reference documentation. The numerical tower is based in Number. Number Real mimics Number. Number Rational mimics Number Real, and so does Number Decimal. Finally, Number Integer and Number Ratio both mimics Number Rational. The interesting parts of this tower is Number Integer, which corresponds to integers, Number Ratio, which is any ratio between two integers, and Number Decimal, which corresponds to decimal numbers. These are arbitrarily sized and exact. There are no floats or doubles in Ioke. There is also a potential place for Number Complex at the same layer as Number Real, although complex numbers are not currently implemented. There are also plans for implementing a unit system further down the line.&lt;br /&gt;
&lt;br /&gt;
Literal integers can be written using either decimal or hexadecimal notation. Hexadecimal notation begins with 0x or 0X and are then followed by one or more hexadecimal letters. They can be either upper or lower case. A decimal literal number is written using one or more decimal letters, but nothing else.&lt;br /&gt;
&lt;br /&gt;
There is no literal to create ratios - these can only be created by division of integers. Negative numbers have no literal syntax, but preceding a number with a minus sign will call the message - on the number and generate the negative value.&lt;br /&gt;
&lt;br /&gt;
A literal integer will be transformed into a call to internal:createNumber, which takes one native Java String from which to create the number.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;1234444444444444444444444444444444444444235234534534&lt;br /&gt;
&lt;br /&gt;
0&lt;br /&gt;
&lt;br /&gt;
0xFFFFF&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Decimals ===&lt;br /&gt;
&lt;br /&gt;
Literal decimal values can be written either using exponential notation, or using a decimal dot. A decimal dot notation can be combined with exponential notation. Exponential notation starts with a number or a decimal number, followed by lower or upper case E, followed by an optional sign, and then followed by one or more decimal letters.&lt;br /&gt;
&lt;br /&gt;
A literal decimal will be transformed into a call to internal:createDecimal, which takes one native Java String from which to create the decimal.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;0.0&lt;br /&gt;
&lt;br /&gt;
1E6&lt;br /&gt;
&lt;br /&gt;
1E-32&lt;br /&gt;
&lt;br /&gt;
23.4445e10&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Symbols ===&lt;br /&gt;
&lt;br /&gt;
Symbols aren't exactly syntax, but they aren't exactly messages either. Or rather, they are messages that will evaluate to the symbol that represent themselves. Symbol is a kind in Ioke. There are two kinds of symbols - the first one is simple symbols that can be parsed as is. The second is symbols that can't be parsed as is. Symbols are preceded by a colon and then directly followed by the symbol text. If it can't be parsed correctly, the value should be surrounded by quotes, and this will be turned into a call to the method :, which takes the text as argument. That means that you can actually get dynamic symbols by calling the : method.&lt;br /&gt;
&lt;br /&gt;
Some examples:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;:foo&lt;br /&gt;
&lt;br /&gt;
:flaxBarFoo&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
:&amp;amp;quot;mux mex mox \n ::::::::&amp;amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator shuffling ==&lt;br /&gt;
&lt;br /&gt;
One exception to the way message handling works in Ioke is operators. All the so called operators in this section is possible to call directly in message passing position too -- but to make it possible to use them in a more natural way, the parsing step will handle them a bit differently, and then do a shuffling step that actually takes operator precedence into account. So all the common operators will generally work as you expect them too -- although I recommend adding parenthesis when something is possibly unclear.&lt;br /&gt;
&lt;br /&gt;
Ioke has a slightly larger amount of operators than most other languages. Most of these are currently unused, but they are certainly available for use for any purpose the programmer wants to use it for. Many adherents of other languages (Java, I'm looking at you) claim that operator overloading is evil. I don't believe that is true, seeing as how it works so well in Ruby, so Ioke instead allow you quite large freedom with regards to operators.&lt;br /&gt;
&lt;br /&gt;
The precedence rules for regular operators can be found in the cell 'Message OperatorTable operators', which is a regular Dict that can be updated with new values. The new values will obviously not take effect until the current code has run, and a new parse is started.&lt;br /&gt;
&lt;br /&gt;
Note that the below is only the operators that have defined precedence rules. As noted in the section on syntax, you can use any operator you want really. It is easy to add new precedences to the table, either temporarily or permanently.&lt;br /&gt;
&lt;br /&gt;
At the time of writing, the available operators - in order of precedence - are these:&lt;br /&gt;
&lt;br /&gt;
* !&lt;br /&gt;
* ?&lt;br /&gt;
* $&lt;br /&gt;
* ~&lt;br /&gt;
* #&lt;br /&gt;
* **&lt;br /&gt;
* *&lt;br /&gt;
* /&lt;br /&gt;
* %&lt;br /&gt;
* +&lt;br /&gt;
* -&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;=&amp;amp;gt;&lt;br /&gt;
* &amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&lt;br /&gt;
* &amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ==&lt;br /&gt;
* !=&lt;br /&gt;
* ===&lt;br /&gt;
* =~&lt;br /&gt;
* !~&lt;br /&gt;
* &amp;amp;amp;&lt;br /&gt;
* ^&lt;br /&gt;
* |&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&lt;br /&gt;
* ?&amp;amp;amp;&lt;br /&gt;
* ||&lt;br /&gt;
* ?|&lt;br /&gt;
* ..&lt;br /&gt;
* ...&lt;br /&gt;
* =&amp;amp;gt;&lt;br /&gt;
* &amp;amp;lt;-&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&lt;br /&gt;
* -&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* !&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* %&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* #&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* @&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* /&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* *&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ?&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* |&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ^&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ~&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* =&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&lt;br /&gt;
* **&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&lt;br /&gt;
* ||&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&lt;br /&gt;
* $&amp;amp;gt;&amp;amp;gt;&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* /=&lt;br /&gt;
* %=&lt;br /&gt;
* and&lt;br /&gt;
* nand&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* ^=&lt;br /&gt;
* or&lt;br /&gt;
* xor&lt;br /&gt;
* nor&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
* &amp;amp;lt;-&lt;br /&gt;
* return&lt;br /&gt;
&lt;br /&gt;
And as mentioned above, all of these can be used for your own purpose, although some of them already have reserved meanings. This document will cover most of the used operators, while the rest can be found in the reference.&lt;br /&gt;
&lt;br /&gt;
Since this operator shuffling happens, that also means that an Ioke program has a canonical inner form that can differ from the source text. When you use introspection of any kind, you will get back that canonical form which might not look exactly like you expected. Similarly, if you ask some code to print itself, it will use the canonical form instead of the operator skin. Macros that modify message chains should work against the canonical form, and nothing else.&lt;br /&gt;
&lt;br /&gt;
What an operator does depends on the result of sending the message of that name to the receiver, just like regular messages. In fact, to Ioke there really isn't any difference, except that the parsing takes special notice about operators and assignment operators.&lt;br /&gt;
&lt;br /&gt;
== Assignment shuffling ==&lt;br /&gt;
&lt;br /&gt;
Much like with regular operators, trinary - assignment - operators are subject to a kind of shuffling. This shuffling differs from regular operator shuffling, in that it will shuffle around two things - the left hand side and the right hand side. This is true for every assignment operator except for the unary ones, which will only reshuffle one message.&lt;br /&gt;
&lt;br /&gt;
A few examples might make the translation easier to perceive. The first item is the readable form, while the second form is the canonical form:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;foo = 1 + 2&lt;br /&gt;
=(foo, 1 +(2))&lt;br /&gt;
&lt;br /&gt;
Ground foo *= &amp;amp;quot;text&amp;amp;quot;&lt;br /&gt;
Ground *=(foo, &amp;amp;quot;text&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
bar foo(123) = 42&lt;br /&gt;
bar =(foo(123), 42)&lt;br /&gt;
&lt;br /&gt;
flux++&lt;br /&gt;
++(flux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These examples show some more advanced details -- specifically the fact that assignment operators generally work on &amp;amp;quot;places&amp;amp;quot;, not on names or cells. This will be more explored in the chapter on [http://{{SERVERNAME}}/#assignment assignment]. The important thing to notice from the above examples is that for most assignments two things will be rearranged. For the unary operators only one thing will be moved.&lt;br /&gt;
&lt;br /&gt;
Just as with regular operators, the assignment operators have information in the 'Message OperatorTable' cell. The specific cell is 'Message OperatorTable trinaryOperators', and it matches an assignment operator to either the integer 1, or the integer 2. Everything with 1 will be matched as being unary assignment.&lt;br /&gt;
&lt;br /&gt;
The currently available assignment operators are:&lt;br /&gt;
&lt;br /&gt;
* =&lt;br /&gt;
* ++&lt;br /&gt;
* --&lt;br /&gt;
* +=&lt;br /&gt;
* -=&lt;br /&gt;
* /=&lt;br /&gt;
* **=&lt;br /&gt;
* *=&lt;br /&gt;
* %=&lt;br /&gt;
* &amp;amp;amp;=&lt;br /&gt;
* &amp;amp;amp;&amp;amp;amp;=&lt;br /&gt;
* |=&lt;br /&gt;
* ||=&lt;br /&gt;
* ^=&lt;br /&gt;
* &amp;amp;lt;&amp;amp;lt;=&lt;br /&gt;
* &amp;amp;gt;&amp;amp;gt;=&lt;br /&gt;
Just as with regular operators, what an assignment operator does depend on what the result is from sending the message of that name to the receiver object, just like with any type of message.&lt;br /&gt;
&lt;br /&gt;
== Inverted operators ==&lt;br /&gt;
&lt;br /&gt;
In addition to the regular binary operators and the trinary assignment operators, Ioke also sports inverted operators. These aren't actually used anywhere in the core distribution, but they might be useful at some time or another. The basic idea is that sometimes you want to have the right hand side of an expresssion become the receiver of an operator call, and the left hand side become the argument to the operator. Inverted operators allow this.&lt;br /&gt;
&lt;br /&gt;
As with both the binary and trinary operators, you can find and update information about inverted operators in the cell 'Message OperatorTable invertedOperators'. To make this a little less abstract, let us look at two simple examples and what they translate into:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;amp;quot;foo&amp;amp;quot; :: [1, 2, 3, 4] map(asText) &lt;br /&gt;
;; will be translated to&lt;br /&gt;
[1, 2, 3, 4] map(asText) ::(&amp;amp;quot;foo&amp;amp;quot;)&lt;br /&gt;
&lt;br /&gt;
;; provided we have an inverted&lt;br /&gt;
;; operator called 'doit'&lt;br /&gt;
abc foo quux doit another time&lt;br /&gt;
;; will be translated to&lt;br /&gt;
another time doit(abc foo quux)&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Execution model ===&lt;br /&gt;
&lt;br /&gt;
The way an Ioke program work is very simple. Everything executes based on two things. The first is the context, or the ground, and the second is the receiver. The first message sent in each message chain will have the ground as receiver. The default ground in Ioke source files is an object called Ground. This object is in the mimic chain for most regular objects created in Ioke, which means that things defined at the top level will generally be available in most objects. Inside of methods and blocks, the ground will be different. Exactly in what way is defined by the type of code executing.&lt;br /&gt;
&lt;br /&gt;
Every message in a chain will be sent to the receiver of that message. That receiver is the result of the last message, or the current ground if there was no previous message, or if that previous message was a terminator. So Ioke code like &amp;amp;quot;foo bar(flux bar) quux&amp;amp;quot; involves 5 different messages.&lt;br /&gt;
&lt;br /&gt;
# The message &amp;amp;quot;foo&amp;amp;quot; is sent to Ground, which is the current ground and also the default receiver.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;foo&amp;amp;quot; message. The value returned will be activated.&lt;br /&gt;
# The cell &amp;amp;quot;bar&amp;amp;quot; contains a method in this case, and that method expects one argument, so that forces evaluation of the arguments.&lt;br /&gt;
# The message &amp;amp;quot;flux&amp;amp;quot; is sent to Ground, since it's the ground and there is no prior message inside of an argument list.&lt;br /&gt;
# The message &amp;amp;quot;bar&amp;amp;quot; is sent to the result of the &amp;amp;quot;flux&amp;amp;quot; message.&lt;br /&gt;
# The result of the &amp;amp;quot;bar&amp;amp;quot; message is used as the argument value given to the outside &amp;amp;quot;bar&amp;amp;quot; method.&lt;br /&gt;
# The message &amp;amp;quot;quux&amp;amp;quot; is sent to the result of the initial &amp;amp;quot;bar&amp;amp;quot; message.&lt;br /&gt;
# The result of the quux message is thrown away, unless this code is part of a larger piece of code.&lt;br /&gt;
This description generally describes what happens in the case of this code. The more general control flow is this:&lt;br /&gt;
&lt;br /&gt;
# A message is encountered&lt;br /&gt;
# If the message is a symbol message, the corresponding symbol will be returned.&lt;br /&gt;
# Otherwise the name of the message will be looked up in the receiver, or in the receivers mimics.&lt;br /&gt;
# If the name is found and is not activatable, the value of that name (the cell) is returned.&lt;br /&gt;
# If the name is found and is activatable, it will be activated, with the current ground, receiver and message sent to the activatable object.&lt;br /&gt;
# If the name is not found, a second search is done for the name &amp;amp;quot;pass&amp;amp;quot;. If a pass is found, use that instead of the name of the original message, and go back to 4.&lt;br /&gt;
# If a pass is not found, signal a Condition Error NoSuchCell condition.&lt;br /&gt;
Exactly what happens when an object is activated depends on what kind of code gets activated. It's really up to the method, block or macro to handle evaluation of arguments in any way it likes - including not evaluating them. For a description of the default models available, see the chapter on [http://{{SERVERNAME}}/#code code]&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=91</id>
		<title>Guide:Introduction</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Guide:Introduction&amp;diff=91"/>
				<updated>2009-01-26T00:15:23Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
&lt;br /&gt;
Ioke is a general purpose language. It is a strongly typed, extremely dynamic, prototype object oriented language. It is [http://en.wikipedia.org/wiki/Homoiconicity homoiconic] and its closest ancestors are [http://iolanguage.com Io], [http://www.smalltalk.org Smalltalk], [http://www.ruby-lang.org Ruby] and [http://en.wikipedia.org/wiki/Lisp_programming_language Lisp] - but it's quite a distance from all of them. It looks a lot like Io, to a limit.&lt;br /&gt;
&lt;br /&gt;
Ioke is a ''folding'' language. This means it folds in on itself. You can create new abstractions covering any of the existing abstractions in the language. You can abstract over these, over and over again, until you have a language that lets you express what you want to express in a succinct and readable way. Ioke allows you to fold your code.&lt;br /&gt;
&lt;br /&gt;
Ioke is targeted at the Java Virtual Machine and is tightly integrated with the platform. Why the JVM? It's available everywhere, it gives several important features such as world class garbage collectors, capable thread schedulers and an amazing JIT compiler. All of these are things that serve Ioke well, without requiring direct development resources from the Ioke team. Access to the Java platform also means access to all existing libraries and functionality, with all that entails. The JVM is just a very pragmatic choice.&lt;br /&gt;
&lt;br /&gt;
You're probably reading this guide at [http://ioke.org/guide.html ioke.org]. That is the official home of the project, although some of the project functionality is hosted at [http://ioke.kenai.org Kenai], where such things as mailing lists and a bug tracker is available. The canonical source repository for Ioke is on [http://github.org/olabini/ioke/tree/master GitHub].&lt;br /&gt;
&lt;br /&gt;
The current version of Ioke is called [Ioke S]. The naming of Ioke will change regularly with major revisions. There are two different versions in play here. Ioke S is the name and version of the language and core libraries. The initial implementation for Ioke S is called &amp;lt;tt&amp;gt;ikj 0.2.0&amp;lt;/tt&amp;gt;, and the version numbers are not interdependent. The next major version of Ioke will be called [Ioke E], and you can find information about it in the chapter on [[#Future_plans|future plans]].&lt;br /&gt;
&lt;br /&gt;
This programming guide -- together with the reference for your current version -- should be the complete document needed to understand Ioke S, how to program in it, how to understand the names and concepts used, and also give an initial inkling on what I think is good taste.&lt;br /&gt;
&lt;br /&gt;
Note that I will use many names that aren't necessarily the same as the ones traditional programming languages use. These names will be made clear sooner or later in this document, but it might help some to jump forward to [[#Objects|Objects]], skim that bit, and then start over once words like ''Origin'', ''cell'' and ''mimic'' make sense.&lt;br /&gt;
&lt;br /&gt;
== Vision ==&lt;br /&gt;
&lt;br /&gt;
The evolution of programming languages is a steady progression of finding new ways to express abstractions naturally - in a way that doesn't stray too far away from the smaller details. A programming language has to make it possible to abstract away common things, while making it easy to customize these abstractions in very detailed ways. A programming language should be able to do this well without sacrificing readability and understandability. This tension lies at the core of programming.&lt;br /&gt;
&lt;br /&gt;
How do you create a language that makes it easy to express powerful concepts in a succinct way, while still making it easy to maintain and work with after the fact, without turning it into a new compression mode? How do you make it easy for a programmer to express high level abstractions that are abstractions of abstractions of abstractions?&lt;br /&gt;
&lt;br /&gt;
There are many open problems in programming language design. Concurrency is one of them, performance another. These are two areas Ioke does not address. Instead, Ioke is a remodeling of the core concepts and ideas embodied in other programming languages.&lt;br /&gt;
&lt;br /&gt;
Are still Lisp and Smalltalk the most powerful languages around, or are there ways of providing more expressiveness without sacrificing understandability? Is there a way to combine all the lessons learned from languages like Ruby and Python, and patch them back into a Lisp and Smalltalk core? Is it possible to do this while taking some of the benefits of Io? Can a language be both small, regular, homoiconic, reflective and easy to understand? I hope that Ioke is just that.&lt;br /&gt;
&lt;br /&gt;
Simplicity doesn't mean lack of power. Small, simple, orthogonal functionality can be more powerful than larger, complicated abstractions that don't fit together.&lt;br /&gt;
&lt;br /&gt;
Io explicitly states that the goal of the language is to refocus attention on expressiveness, and with Ioke I want to take that philosophy one step further.&lt;br /&gt;
&lt;br /&gt;
It's important to realize that an experiment like this doesn't necessarily have to mean the language can't be used for real projects. By wedding Ioke to the Java Virtual Machine, I make it easy to get access to good libraries and existing implementations on most platforms. In that way, Ioke can be used to create real systems, even though the ecosystem will initially be very small. And I think that this is necessary. How can you know if a language really is worthwhile or not, if you can't use it as a general purpose programming language? The Java platform makes this possible.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Ioke is very easy to get started with. The first step is to download a package. Which one you choose depends on what platform you're on, and whether you want to build Ioke yourself, or just start using it. This guide will only cover using a prebuilt version. Go to the [http://ioke.org/download.html download page], and grab one of the distributions. At the time of writing the full version of Ioke is Ioke S ikj 0.2.0. Choose the latest download in the 0.2-series for this document to apply.&lt;br /&gt;
&lt;br /&gt;
Once you have downloaded the distribution, you need to unpack it somewhere, and finally add the &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directory to your &amp;lt;tt&amp;gt;PATH&amp;lt;/tt&amp;gt; environment variable. There is also a &amp;lt;tt&amp;gt;jar&amp;lt;/tt&amp;gt; download that can be run directly. If you choose this option you don't get the benefits of having a home for Ioke, which in some cases might be inconvenient. Ioke can be run directly from the jar file, though.&lt;br /&gt;
&lt;br /&gt;
=== Running scripts ===&lt;br /&gt;
&lt;br /&gt;
To run an Ioke script, you can generally just use the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke helloWorld.ik&lt;br /&gt;
Hello world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also execute snippets of code on the command line using the &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; argument to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command. You can have several of these in the same line too:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ioke -e'&amp;amp;quot;Hello world&amp;amp;quot; println' -e'&amp;amp;quot;Goodbye world&amp;amp;quot; println'&lt;br /&gt;
Hello world&lt;br /&gt;
Goodbye world&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt;, be careful about what quoting style you use, since the shell sometimes can munge up your commands if you don't surround them correctly.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; command has several helpful command line options, which can change what happens during execution. These are:&lt;br /&gt;
&lt;br /&gt;
; -Cdirectory&lt;br /&gt;
: Switch to directory before executing any files and command line scripts. This will make the directory the initial current working directory for Ioke during the execution of the JVM.&lt;br /&gt;
; -d&lt;br /&gt;
: Enable debug output.&lt;br /&gt;
; -e script&lt;br /&gt;
: Execute script, as describe above. May occur more than once on a command line.&lt;br /&gt;
; -h&amp;lt;br /&amp;gt;&lt;br /&gt;
--help&lt;br /&gt;
: Display help information, including descriptions of these command line options.&lt;br /&gt;
; -Idirectory&lt;br /&gt;
: Add directory to the load path of Ioke. May occur more than once on a command line.&lt;br /&gt;
; -JjvmOptions&lt;br /&gt;
: Pass on options to the JVM. This can be used to change any runtime parameters that your JVM takes. May occur more than once. The options are provided directly after the -J, so if you want to change the maximum amount of memory used, you can do that writing -J-Xmx128M.&lt;br /&gt;
; --copyright&lt;br /&gt;
: Print copyright information and exit.&lt;br /&gt;
; --version&lt;br /&gt;
: Print version information and exit&lt;br /&gt;
; --server&lt;br /&gt;
: Run the JVM in server Hotspot mode&lt;br /&gt;
; --client&lt;br /&gt;
: Run the JVM in client Hotspot mode (the default)&lt;br /&gt;
; --&lt;br /&gt;
: Mark the end of options to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, anything after this are options to be sent to the code running.&lt;br /&gt;
If you provide the name of a script file on the command line, it should come after all the arguments to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script. Everything after the script will be added as data to the &amp;lt;code&amp;gt;System programArguments&amp;lt;/code&amp;gt; cell. You can use both one-line scripts with &amp;lt;tt&amp;gt;-e&amp;lt;/tt&amp;gt; and specify a script file. If so, the script file will be run after the one-line scripts.&lt;br /&gt;
&lt;br /&gt;
=== Interactive mode ===&lt;br /&gt;
&lt;br /&gt;
If no code to execute has been specified to the &amp;lt;tt&amp;gt;ioke&amp;lt;/tt&amp;gt; script, [[IIk|IIk - Interactive Ioke]] - will start. This is a REPL that allows the execution of arbitrary code in a shell that immediately displays the result. The main difference between running Ioke from a file and interactively is that the interactive prompt will show a notice of the result of the last operation after each execution. IIk will also invoke a debugger when a [[Conditions|condition]] is encountered. This debugger gives you the possibility to inspect what happened more closely. The final difference with IIk is that it does not execute code directly in Ground - which the top level inside an Ioke script will do. This difference is crucial, when considering namespacing issues.&lt;br /&gt;
&lt;br /&gt;
IIk will try to use Readline through JLine if your platform supports it.&lt;br /&gt;
&lt;br /&gt;
IIk will be more closely described later, but just to give you a glimpse, this is how a small session could look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;iik&amp;amp;gt; &amp;amp;quot;hello world&amp;amp;quot; println&lt;br /&gt;
hello world&lt;br /&gt;
+&amp;amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 10 * 20&lt;br /&gt;
+&amp;amp;gt; 200&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2&lt;br /&gt;
+&amp;amp;gt; 3/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 + 3/2&lt;br /&gt;
+&amp;amp;gt; 3&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; 3/2 * 3    &lt;br /&gt;
+&amp;amp;gt; 9/2&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo = &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; foo&lt;br /&gt;
+&amp;amp;gt; &amp;amp;quot;hello&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
iik&amp;amp;gt; exit&lt;br /&gt;
Bye.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you see the prompt &amp;amp;quot;iik&amp;amp;gt;&amp;amp;quot;, you know that IIk is waiting for input. The result of a computation is shown after the &amp;amp;quot;+&amp;amp;gt;&amp;amp;quot; sigil. You can exit from IIk by calling either &amp;amp;quot;exit&amp;amp;quot; or &amp;amp;quot;quit&amp;amp;quot;. There is also a restart named &amp;amp;quot;quit&amp;amp;quot; that can be invoked to quit IIk.&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=90</id>
		<title>Template:Main</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=90"/>
				<updated>2009-01-25T23:51:06Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;''Main article: [[{{{1}}}]]&amp;lt;/div&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To link to a &amp;quot;main article&amp;quot; on a topic, use &amp;amp;#123;{main|The other article}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tl|Further}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Section templates|{{PAGENAME}}]]&lt;br /&gt;
[[Category:List templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=89</id>
		<title>Template:Main</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=89"/>
				<updated>2009-01-25T23:50:26Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;''Main article: [[{{{1}}}]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To link to a &amp;quot;main article&amp;quot; on a topic, use &amp;amp;#123;{main|The other article}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tl|Further}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Section templates|{{PAGENAME}}]]&lt;br /&gt;
[[Category:List templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	<entry>
		<id>https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=88</id>
		<title>Template:Main</title>
		<link rel="alternate" type="text/html" href="https://ioke.org/wiki/index.php?title=Template:Main&amp;diff=88"/>
				<updated>2009-01-25T23:50:01Z</updated>
		
		<summary type="html">&lt;p&gt;Cv: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;:&amp;lt;div class=&amp;quot;noprint&amp;quot;&amp;gt;''Main article: [{{{1}}}]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;noinclude&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
To link to a &amp;quot;main article&amp;quot; on a topic, use &amp;amp;#123;{main|The other article}}.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* {{tl|Further}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Section templates|{{PAGENAME}}]]&lt;br /&gt;
[[Category:List templates|{{PAGENAME}}]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cv</name></author>	</entry>

	</feed>