This chapter lists the user-visible changes in Urbi SDK releases.
Released on 2010-07-08.
Released on 2010-05-28.
var one = 1|;
var two = 2|;
assert (one == two);[00000002:error] !!! failed assertion: one == two (1 != 2)
instead of
previously. As a consequence, System.assert_op is deprecated. The never documented following slots have been removed from System (??sec:std-System): assert_eq, assert_ge, assert_gt, assert_le, assert_lt, assert_meq, assert_mne, assert_ne.
Released on 2010-05-06.
Released on 2010-05-03.
Released on 2010-04-09.
| Syntax | Semantics |
| [ => ] | Dictionary . new |
| ["a" => 1, "b" => 2, "c" => 3] | Dictionary . new ( " a " , 1, " b " , 2, " c " , 3) |
| Syntax | Semantics |
| () | Tuple . new ([]) |
| (1,) | Tuple . new ([1]) |
| (1, 2, 3) | Tuple . new ([1, 2, 3]) |
Released on 2010-01-29.
Released on 2010-01-13.
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.
The urbiscript engine was considerably optimized in both space and time.
is equivalent to
write (note the change in the separator)
or
The documentation was fixed, completed, and extended. Its layout was also improved. Changes include, but are not limited to:
Released on 2009-04-03.
The keyword emit is deprecated in favor of !.
| Deprecated | Updated |
| emit e; | e !; |
| emit e(a); | e !( a ); |
| emit e ~ 1s; | e ! ~ 1 s; |
| emit e(a) ~ 1s; | e !( a ) ~ 1 s; |
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.
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.
Extended documentation on: Comparable (??sec:std-Comparable), Orderable (??sec:std-Orderable).
Released on 2009-03-03.
An initial sketch of documentation (a tutorial, and the language and library specifications) is included.
The native ”long unsigned int” type is now used for all the bitwise operations (&, |, ^, compl, <<, >>). As a consequence it is now an error to pass negative operands to these operations.
This new object provides version information about the Urbi package. It is also used to ensure that the initialization process uses matching Urbi and C ++ files. This should prevent accidental mismatches due to incomplete installation processes.
In conformance with the usage in mathematics, the operator ** now has a stronger precedence than the unary operators. Therefore, as in Perl, Python and others, ’-2 ** 2 == -4’ whereas it used to be equal to ’4’ before (as with GNU bc).
This new method has been introduced to transform a string to a float. It raises a PrimitiveError exception if the conversion fails:
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.
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"]
urbi-console is now a simple wrapper around urbi-launch. Running
is equivalent to running
The command line interface of urbi-sendbin has been updated. urbi-send now supports ‘-e’/‘--expression’ and ‘-f’/‘--file’. For instance
Released on 2009-01-05.
A new document, ‘FAQ.txt’, addresses the questions most frequently asked by our users during the beta-test period.
The syntax ”new myObject(myArgs)” has been deprecated and now gives a warning. The recommended ”myObject.new(myArgs)” is suggested.
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.
The new __HERE__ pseudo-symbol gives the current position. It features three self explanatory slots: ”file”, ”line”, and ”column”.
It is now possible to define the ”()” operator on objects and have it called as soon as at least one parameter is given:
The ”catch(ˇtypeż ˇnameż)”, which was used to catch exceptions if and only if they inherited ˇtypeż, has been removed. This behavior can be obtained with the more general guard system:
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.
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.
Some large floating point values could not be displayed correctly at the top level of the interpreter. This limitation has been removed.
Parentheses around variables bindings (”var x”) are no longer required in event matching:
instead of:
Bindings performed in ”waituntil” constructs are now available in its context:
Now uses an index as its first argument and inserts the given element before the index position:
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:
It is now possible to get the search path for files such as ‘urbi.u’ or ‘URBI.INI’ by using System.searchPath.
Now returns ”nil” if a variable cannot be found in the environment instead of ”void”. This allows you do to things such as:
while previously you had to retrieve the environment variable twice, once to check for its existence and once to get its content.
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.
Now silently accepts non-existing slot names instead of signaling an error.
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:
Remote bound methods can now return void.
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 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:
is now safe.
Released on 2008-11-03.
”object” and ”from” are now regular identifiers and can be used as other names. For example, it is now legal to declare:
Only integral numbers are supported.
”String” now has a ”asList” method, which can be used transparently to iterate over the characters of a string:
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:
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.
Tags were displayed as Tag_0xADDR which did not make their ”name” slot apparent. They are now displayed as ”Tagˇnameż”:
If an exception is thrown and not caught during the execution of an ”every” block, the ”every” expression is stopped and the exception displayed.
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).
As was done on 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.
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:
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’.
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.
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.
In some cases, the __name macro could not be used with plugged uobjects, for example in the following expression:
This has been fixed. __name contains a valid slot name of uobjects.
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.