User Tools

Site Tools


at:tutorial:iat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
at:tutorial:iat [2009/02/09 13:57]
elisag add
at:tutorial:iat [2012/06/09 13:50] (current)
elisag
Line 1: Line 1:
 ====== Interactive AmbientTalk ====== ====== Interactive AmbientTalk ======
 +
  
 ===== Basic Usage ===== ===== Basic Usage =====
Line 11: Line 12:
 To start ''iat'', it suffices to execute it from the command-line, provided the ''java'' executable of a JDK1.3.3 or higher JVM is on your executable search path. The shell script that starts ''iat'' works as follows: To start ''iat'', it suffices to execute it from the command-line, provided the ''java'' executable of a JDK1.3.3 or higher JVM is on your executable search path. The shell script that starts ''iat'' works as follows:
  
 +<code>
 iat [options] [file] [arguments] iat [options] [file] [arguments]
 +</code>
  
 Perhaps the most useful usage of ''iat'' is to start it with an AmbientTalk source file as argument, e.g.: Perhaps the most useful usage of ''iat'' is to start it with an AmbientTalk source file as argument, e.g.:
Line 19: Line 22:
  
 This will make ''iat'' evaluate all of the contents of the file ''foo.at'' and print out the value of the last expression in the file. If ''-p'' was not specified on the command line, ''iat'' falls into a read-eval-print loop such that you can play around with the definitions loaded from the file. Any arguments following the filename are treated as arguments to the AmbientTalk program, not to ''iat''. They are accessible by evaluating ''system.getArgv()''. This will make ''iat'' evaluate all of the contents of the file ''foo.at'' and print out the value of the last expression in the file. If ''-p'' was not specified on the command line, ''iat'' falls into a read-eval-print loop such that you can play around with the definitions loaded from the file. Any arguments following the filename are treated as arguments to the AmbientTalk program, not to ''iat''. They are accessible by evaluating ''system.getArgv()''.
 +
 +To get an overview of all available options, execute:
 +
 +<code>
 +iat --help
 +</code>
 +
 +<note>
 +An explanation of all the iat command line parameters is available [[http://code.google.com/p/ambienttalk/wiki/CommandLineParameters|here]].
 +</note>
  
 ===== Shell Commands ===== ===== Shell Commands =====
Line 44: Line 57:
 The code between ''{'' and ''}'' basically serves as a callback function which will be invoked when the next line has been read. The reason for this callback-style read function is that AmbientTalk code may never be blocking. The rationale behind this execution model is explained later, in the [[actors|chapter on actors]]. The code between ''{'' and ''}'' basically serves as a callback function which will be invoked when the next line has been read. The reason for this callback-style read function is that AmbientTalk code may never be blocking. The rationale behind this execution model is explained later, in the [[actors|chapter on actors]].
  
-===== Command-line Parameters ===== 
- 
-To get an overview of all available options, execute: 
- 
-<code> 
-iat --help 
-</code> 
- 
-The most important options are explained below: 
-  * ''-i, --init init-file'': you can replace the intialisation code file that AmbientTalk uses to initialize the lexical root of each actor, which defaults to ''at/init/init.at''. This is useful for defining your own "language extensions". 
-  * ''-o, --objectpath objectpath'': the **object path** is for AmbientTalk what the class path is for Java. However, unlike Java's class path, which lists the locations of available Classes, the object path consists of ''name=directory'' pairs, separated by the system path separator ('':'' on *NIX/mac, '';'' on windows). For each such pair, a slot named ''name'' is added to the global ''lobby'' object, bound to a namespace pointing to the given directory. Hence, evaluating ''lobby.name.foo'' in AmbientTalk enables access to the file ''directory/foo.at''. Thanks to the object path, AmbientTalk programs remain free of absolute path names when loading other AmbientTalk files. 
-  * ''-n, --network name'': allows you to specify the name of the AmbientTalk overlay network to join. Only AmbientTalk VMs started using the same name will be discoverable and will be able to discover this VM. This is primarily useful for debugging or demo purposes, if you don't want other programs to interfere. 
at/tutorial/iat.1234184250.txt.gz ยท Last modified: 2009/02/09 13:58 (external edit)