Next

Prev

Prev-tail

Tail

Up

Chapter 31
Release Notes

This chapter lists the user-visible changes in Urbi SDK releases.

31.1 Urbi SDK 2.3

Released on 2010-09-28.

31.1.1 Fixes

31.1.2 New Features

31.2 Urbi SDK 2.2

Released on 2010-08-23.

31.2.1 Fixes

31.2.2 New Features

31.2.3 Documentation

31.3 Urbi SDK 2.1

Released on 2010-07-08.

31.3.1 Fixes

31.3.2 New Features

31.3.3 Optimization

31.3.4 Documentation

31.4 Urbi SDK 2.0.3

Released on 2010-05-28.

31.4.1 New Features

31.4.2 Fixes

31.4.3 Documentation

31.5 Urbi SDK 2.0.2

Released on 2010-05-06.

31.5.1 urbiscript

31.5.2 Fixes

31.5.3 Documentation

31.6 Urbi SDK 2.0.1

Released on 2010-05-03.

31.6.1 urbiscript

31.6.2 Documentation

31.6.3 Fixes

31.7 Urbi SDK 2.0

Released on 2010-04-09.

31.7.1 urbiscript

31.7.1.1 Changes

31.7.1.2 New features

31.7.2 UObjects

31.7.3 Documentation

31.8 Urbi SDK 2.0 RC 4

Released on 2010-01-29.

31.8.1 urbiscript

31.8.1.1 Changes

31.8.1.2 New objects

31.8.1.3 New features

31.8.2 UObjects

31.9 Urbi SDK 2.0 RC 3

Released on 2010-01-13.

31.9.1 urbiscript

31.9.1.1 Fixes

31.9.1.2 Changes

31.9.2 Documentation

31.10 Urbi SDK 2.0 RC 2

Released on 2009-11-30.

This release candidate includes many fixes and improvements that are not reported below. The following list is by no means exhaustive.

31.10.1 Optimization

The urbiscript engine was considerably optimized in both space and time.

31.10.2 urbiscript

31.10.2.1 New constructs

31.10.2.2 New objects

31.10.2.3 New features

31.10.2.4 Fixes

31.10.2.5 Deprecations

31.10.2.6 Changes

31.10.3 UObjects

31.10.4 Documentation

The documentation was fixed, completed, and extended. Its layout was also improved. Changes include, but are not limited to:

31.10.5 Various

31.11 Urbi SDK 2.0 RC 1

Released on 2009-04-03.

31.11.1 Auxiliary programs

31.11.2 urbiscript

31.11.2.1 Syntax of events

The keyword emit is deprecated in favor of !.



Deprecated Updated


emit e;

e!;

emit e(a);

e!(a);

emit e ~ 1s;

e! ~ 1s;

emit e(a) ~ 1s;

e!(a) ~ 1s;



The ? construct is changed for symmetry.



Deprecated Updated


at (?e)

at (e?)

at (?e(var a))

at (e?(var a))

at (?e(var a) if 0 <= a)

at (e?(var a) if 0 <= a)

at (?e(2))

at (e?(2))

This syntax for sending and receiving is traditional and can be found in various programming languages.

31.11.2.2 Changes

31.11.2.3 Fixes

31.11.3 URBI Remote SDK

The API for plugged-in UObjects is not thread safe, and never was: calls to the API must be done only in the very same thread that runs the Urbi code. Assertions (run-time failures) are now triggered for invalid calls.

31.11.4 Documentation

Extended documentation on: Comparable (Section 20.7), Orderable (Section 20.38).

31.12 Urbi SDK 2.0 beta 4

Released on 2009-03-03.

31.12.1 Documentation

An initial sketch of documentation (a tutorial, and the language and library specifications) is included.

31.12.2 urbiscript

31.12.2.1 Bug fixes

31.12.2.2 Changes

31.12.3 Programs

31.12.3.1 Environment variables

The environment variable URBI_ROOT denotes the directory which is the root of the tree into which Urbi was installed. It corresponds to the ”prefix” in GNU Autoconf parlance, and defaults to ‘/usr/local’ under Unix. urbiscript library files are expected to be in ¡URBI_ROOT¿/share/gostai/urbi.

The environment variable URBI_PATH, which allows to specify a colon-separated list of directories into which urbiscript files are looked-up, may extend or override URBI_ROOT. Any superfluous colon denotes the place where the URBI_ROOT path is taken into account.

31.12.3.2 Scripting

To enable writing (batch) scripts seamlessly in Urbi, urbi-console -f’/‘--fast’ is now renamed as ‘-F’/‘--fast’. Please, never use short options in batch programs, as they are likely to change.

Two new option pairs, ‘-e’/‘--expression’ and ‘-f’/‘--file’, plus the ability to reach the command line arguments from Urbi make it possible to write simple batch Urbi programs. For instance:

 
$ cat demo 
#! /usr/bin/env urbi-console 
cout << System.arguments; 
shutdown; 
 
$ ./demo 1 2 3 | grep output 
[00000004:output] ["1", "2", "3"]  

31.12.3.3 urbi-console

urbi-console is now a simple wrapper around urbi-launch. Running

 
urbi-console arg1 arg2...  

is equivalent to running

 
urbi-launch --start -- arg1 arg2...  

31.12.3.4 Auxiliary programs

The command line interface of urbi-sendbin has been updated. urbi-send now supports ‘-e’/‘--expression’ and ‘-f’/‘--file’. For instance

 
$ urbi-send -e var x; -e "x = $value;" -e shutdown;  

31.13 Urbi SDK 2.0 beta 3

Released on 2009-01-05.

31.13.1 Documentation

A new document, ‘FAQ.txt’, addresses the questions most frequently asked by our users during the beta-test period.

31.13.2 urbiscript

31.13.2.1 Fixes

31.13.2.2 Changes
new syntax revamped

The syntax ”new myObject(myArgs)” has been deprecated and now gives a warning. The recommended ”myObject.new(myArgs)” is suggested.

delete has been removed

delete was never the right thing to do. A local variable should not be deleted, and a slot can be removed using Object.removeSlot. The construct ”delete object” has been removed from the language.

__HERE__

The new __HERE__ pseudo-symbol gives the current position. It features three self explanatory slots: ”file”, ”line”, and ”column”.

Operator ”()”

It is now possible to define the ”()” operator on objects and have it called as soon as at least one parameter is given:

 
class A { 
  function ’()’ (x) { echo("A called with " + x) }; 
}|; 
A; 
[00000001] A 
A(); 
[00000002] A 
A(42); 
[00000003] *** A called with 42  
catch(type name syntax removed

It was used to catch exceptions if and only if they inherited type. This behavior can be obtained with the more general guard system:

 
catch (var e if e.isA(<type>)) 
{ 
  ... 
}  
Pattern matching and guards in catch blocks

Exception can now be filtered thanks to pattern matching, just like events. Moreover, the pattern can be followed by the ”if” keyword and an arbitrary guard. The block will catch the exception only if the guard is true.

 
try 
{ ... } 
catch ("foo") // Catch only the "foo" string 
{ ... } 
catch (var x if x.isA(Float) && x > 10) // Catch all floats greater than 10 
{ ... } 
catch (var e)  // Catch any other exception 
{ ... }  
Parsing of integer literals

The parser could not read integer literals greater than 2**31-1. This constraint has been alleviated, and Urbi now accepts integer literals up to 2**63-1.

Display of integer literals

Some large floating point values could not be displayed correctly at the top level of the interpreter. This limitation has been removed.

Variables binding in event matching

Parentheses around variables bindings (”var x”) are no longer required in event matching:

 
at (?myEvent(var x, var y, 1))  

instead of:

 
at (?myEvent((var x), (var y), 1))  
Waituntil and bindings

Bindings performed in ”waituntil” constructs are now available in its context:

 
waituntil(?event(var x)); 
// x is available 
echo (x);  
List.insert” method

Now uses an index as its first argument and inserts the given element before the index position:

 
["a", "b", "c"].insert(1, "foo"); 
[00000001] ["a", "foo", "b", "c"]  
List.sort” method

Now takes an optional argument, which is a function to call instead of the ”¡” operator. Here are two examples illustrating how to sort strings, depending on whether we want to be case-sensitive (the default) or not:

 
["foo", "bar", "Baz"].sort; 
[00000001] ["Baz", "bar", "foo"] 
["foo", "bar", "Baz"].sort(function(x, y) {x.toLower < y.toLower}); 
[00000002] ["bar", "Baz", "foo"]  
System.searchPath” method

It is now possible to get the search path for files such as ‘urbi.u’ or ‘URBI.INI’ by using System.searchPath.

System.getenv” method

Now returns ”nil” if a variable cannot be found in the environment instead of ”void”. This allows you do to things such as:

 
var ne = System.getenv("nonexistent"); 
if (!ne.isNil) do_something(ne);  

while previously you had to retrieve the environment variable twice, once to check for its existence and once to get its content.

Control.disown

It is now possible to start executing code in background while dropping all the tags beforehand, including the connection tag. The code will still continue to execute after the connection that created it has died.

Object.removeSlot

Now silently accepts non-existing slot names instead of signaling an error.

Semaphore.criticalSection

It is now possible to define a critical section associated with a semaphore. The Semaphore.acquire method will be called at the beginning, and if after that the operation is interrupted by any means the Semaphore.release operation will be called before going on. If there are no interruption, the Semaphore.release operation will also be called at the end of the callback:

 
var s = \refSlot[Semaphore]{new}(1); 
s.criticalSection(function () { echo ("In the critical section") });  
System.stats” Its output is now expressed in seconds rather than milliseconds, for consistency with the rest of the kernel.

31.13.3 UObjects

void
The error message given to the user trying to cast a void UVar has been specialized.

Remote bound methods can now return void.

Coroutine interface

The functions yield(), yield_until(), and yield_until_things_changed() have been added to the UObject API. They allow the user to write plugin UObject code that behaves like any other coroutine in the kernel: if yield() is called regularly, the kernel can continue to work while the user code runs. Meaningful implementation for these functions is provided also in remote mode: calling yield() will allow the UObject remote library to process pending messages from within the user callback.

Remote UObject initialization

Remote UObject instantiation is now atomic: the API now ensures that all variables and functions bound from the UObject constructor and init are visible as soon as the UObject itself is visible. Code like:

 
waituntil(uobjects.hasSlot("MyRemote")) | var m = \refSlot[MyRemote]{new}();  

is now safe.

31.13.4 Auxiliary programs

urbi-launch
Now, options for urbi-launch are separated from options to give to the underlying program (in remote and start modes) by using ‘--’. Use ‘urbi-launch --help’ to get the full usage information.

31.14 Urbi SDK 2.0 beta 2

Released on 2008-11-03.

31.14.1 urbiscript

”object” and ”from” as identifiers

”object” and ”from” are now regular identifiers and can be used as other names. For example, it is now legal to declare:

 
var object = 1|; 
var from = 1|;  
Hexadecimal literals It is now possible to enter (integral) hexadecimal numbers by prefixing them with ”0x”, as in:

 
0x2a; 
[00000001] 42  

Only integral numbers are supported.

31.14.2 Standard library

String.asList

”String” now has a ”asList” method, which can be used transparently to iterate over the characters of a string:

 
for (var c: "foo") echo (c); 
[00000001] *** f 
[00000002] *** o 
[00000003] *** o  
String.split method Largely improved.
”min” and ”max”

It is now possible to call ”min” and ”max” on a list. By default, the ”¡” comparison operator is used, but one explicit ‘lower than’ function can be provided as ”min” or ”max” argument should one be needed. Here is an example on how to compare strings in case-sensitive and case-insensitive modes:

 
["the", "brown", "Fox"].min; 
[00000001] "Fox" 
["the", "brown", "Fox"].min(function (l, r) { l.toLower < r.toLower }); 
[00000002] "brown"  

Global functions ”min” and ”max” taking an arbitrary number of arguments have also been defined. In this case, the default ”¡” operator is used for comparison:

 
min(3, 2, 17); 
[00000001] 2  
Negative indices

It is now possible to use negative indices when taking list elements. For example, -1 designates the last element, and -2 the one before that.

 
["a", "b", "c"][-1]; 
[00000001] "c"  
Tag names

Tags were displayed as Tag_0xADDR which did not make their ”name” slot apparent. They are now displayed as ”Tag¡name¿”:

 
Tag.new; 
[00000001] Tag<tag_1> 
Tag.new("mytag"); 
[00000002] Tag<mytag>  
”every” and exceptions

If an exception is thrown and not caught during the execution of an ”every” block, the ”every” expression is stopped and the exception displayed.

31.14.3 UObjects

”UVar::type()” method

It is now possible to get the type of a ”UVar” by calling its ”type()” method, which returns a ”UDataType” (see ‘urbi/uvalue.hh’ for the types declarations).

31.14.4 Run-time

Stack exhaustion check on Windows

As was done on GNU/Linux already, stack exhaustion condition is detected on Windows, for example in the case of an infinite recursion. In this case, SchedulingError will be raised and can be caught.

Errors from the trajectory generator are propagated

If the trajectory generator throws an exception, for example because it cannot assign the result of its computation to a non-existent variable, the error is propagated and the generator is stopped:

 
xx = 20 ampli:5 sin:10s; 
[00002140:error] !!! lookup failed: xx  

31.14.5 Bug fixes

Support for Windows shares

Previous versions of the kernel could not be launched from a Windows remote directory whose name is starting with two slashes such as ‘//share/some/dir’.

Implement ”UVar::syncValue()” in plugged uobjects

Calling ”syncValue()” on a ”UVar” from a plugged UObject resulted in a link error. This method is now implemented, but does nothing as there is nothing to do. However, its presence is required to be able to use the same UObject in both remote and engine modes.

”isdef” works again

The support for k1 compatibility function ”isdef” was broken in the case of composed names or variables whose content was ”void”. Note that we do not recommend using ”isdef” at all. Slots related methods such as ”getSlot”, ”hasSlot”, ”locateSlot”, or ”slotNames” have much cleaner semantics.

”__name” macro

In some cases, the __name macro could not be used with plugged uobjects, for example in the following expression:

 
send(__name + ".val = 1;");  
This has been fixed. __name contains a valid slot name of uobjects.

31.14.6 Auxiliary programs

The sample programs demonstrating the SDK Remote, i.e., how to write a client for the Urbi server, have been renamed from urbi* to urbi-*. For instance urbisend is now spelled urbi-send.

Besides, their interfaces are being overhauled to be more consistent with the Urbi command-line tool-box. For instance while urbisend used to require exactly two arguments (host-name, file to send), it now supports options (e.g., ‘--help’, ‘--port’ to specify the port etc.), and as many files as provided on the command line.