This chapter (also known as the Urbi ChangeLog, or Urbi NEWS) lists the user-visible changes in Urbi
SDK releases.
Released on 2011-XX-YY.
This release includes major changes and incompatibilities with urbi 2. A transition guide can be
found in 17.
- Function evaluation no longer occurs if parenthesis are omitted.
- Proper properties (slot with an associated getter and setter functions) have been
implemented: 7.8.
- Slots, the objects that holds the properties are now accessible in urbiscript through
Slot.getSlot and Slot.setSlot. The old Slot.getSlot and Slot.setSlot functions
are renamed to Slot.getSlotValue and Slot.setSlotValue. Properties are the slots of
the slot object, so x->foo is the same thing as getSlot("x").foo, or &x.foo.
- Code can be organized into packages that can be imported: 8.
- All the urbiscript and C++ notification mechanisms (at, UNotifyChange, changed event)
were unified in an unique system using Subscriptions on Events.
- Vector and Matrix provide support for efficient linear algebra operations.
- Type constraints can be set on function arguments(20.3.2.2) and slots (Slot.type).
- stopif20.10.8 and freezeif20.10.9 now accept event and condition with duration as
argument.
- The indentation of the Emacs urbiscript mode is fixed.
- File.asPath was documented, but not implemented.
- List.sort no longer crashes when the predicate is not a strict weak ordering.
- Don’t execute the body of a finally a second time when an exception is raised inside the
finally clause.
- Do not emit Tag.leave events when a frozen tag waiting to execute statements is stopped.
- Avoid unexpected execution of code caused by Barrier.signal (or Barrier.signalAll)
and a stop of the code waiting on the barrier.
- Be independent of changes of locale settings (such as input/output format for floats) in
C++ user code.
- Restore proper behavior on closed standard input.
- When setting a property on an inherited slot, really duplicate the slot instead of making
an alias (Object.setProperty).
- Declaring constant variables (or slots) without an initial value is a syntax error (see the
constant property, Section 20.4.2).
- Copy-on-write does not apply to slots declared constant (Object.updateSlot).
Please, pay attention to these changes, as your code may have to be adjusted.
- The class syntax can now be used to inherit from primitives.
- The implicit empty statement, which was warned about:
if (true) else 12;
[00011780:warning] !!! implicit empty statement. Use ’{}’ to make it explicit.
is now an error:
if (true) else 12;
[00003258:error] !!! syntax error: unexpected else
Write if (true) {} else 12;. As a consequence if (x) &y; is no longer ambiguous:
its unique interpretation is if (x) { &y }; and no longer { if (x) {} } & y;:
{ if (true) &true else &false } === &true;
{ if (false) &true else &false } === &false;
- Implicit tags are restricted to single identifiers in interactive sessions. In other words, in the Urbi
shell you may expect tags to be automatically created:
assert (!hasSlot("foo"));
foo: 123;
[00003258] 123
assert (hasSlot("foo") && foo.isA(Tag));
This is no longer valid for complex tags, nor when used deeper in the code:
bar.baz: echo(2);
[00015621:error] !!! lookup failed: bar
class Foo { function f() { t1: echo (12) } }|;
Foo.f;
[00015631:error] !!! lookup failed: t1
[00015631:error] !!! called from: f
See Section 20.10.1 for details.
- Drop support for the obsolete Urbi SDK 1 syntax for events: at (?e) and emit e
instead of at (e?) and e! (Section 16.3). As a consequence, emit is now a regular
identifier.
- Drop support for the obsolete loopn keyword, replaced by for since Urbi SDK 2.0
(Section 16.7).
- Features (basename, lastModifiedDate) of Directory and File which are actually
related to Path are deprecated: use f.asPath.basename or f.asPath.lastModifiedDate
instead.
- FormatInfo supports positional arguments:
"%2%, %|1$10|!" % ["world", "Hello"] == "Hello, world!";
- Opened Streams (InputStream and OutputStream) can no longer be cloned.
- InputStream and OutputStream are no longer pre-opened (to standard input and
output).
- InputStream.get (and InputStream.getChar, InputStream.getLine) now returns nil instead
of void when it reaches the end of file. To provide backward compatibility with previous code
such as:
var i = InputStream.new(File.new("file.txt"))|;
var x;
while (!(x = i.get.acceptVoid).isVoid)
cout << x;
i.close;
nil.isVoid now returns true and issues a warning: eventually it will return again false.
Rewrite your code as:
var i = InputStream.new(File.new("file.txt"))|;
var x;
while (!(x = i.get).isNil)
cout << x;
i.close;
- Object.asToplevelPrintable was deprecated in favor of Object.asTopLevelPrintable, for
consistency (with Channel.topLevel for instance). Because this backward compatibility function
may also hide failures (e.g., if you refine it using its former name), it is removed.
- Object.’^’ implements the Boolean exclusive or (not to be confused with the bitwise exclusive
or, Float.’^’).
- When destroyed, Streams (including InputStreams and OutputStreams), are closed if not
already closed.
- Subscription replaces former UConnection.
- The internal functions System.backtrace, System.jobs, and System.aliveJobs are removed in
favor of Job.backtrace, Job.jobs and Job.jobs.size.
- System.currentRunner is deprecated in favor of Job.current.
- System.getenv, System.setenv, System.unsetenv are deprecated in favor of System.env.
- System.shutdown now accepts the exit status as argument.
- System.spawn is deprecated in favor of Code.spawn.
- accepts an optional maximum queue size.
- The undocumented yield_until_things_changed was removed from the UObject API,
this feature was not safe.
- To augment legibility, underscores can be used to separate groups of digits in numbers
(Section 20.1.6.4).
123_456_789 == 123456789;
12_34_56_78_90 == 1234567890;
1_2__3___45 == 12345;
1_2.3__4 == 12.34;
0xFFFF_FFFF == 0xFFFFFFFF;
1e1_0 == 1e10;
- Comparisons can be chained, with guaranties over the order and number of evaluations of the
operands (Section 20.1.8.6):
function v(x) { echo(x) | x }|;
v(1) == v(2) < v(3) < v(4) || v(10) < v(11) != v(12) <= v(13);
[00033933] *** 1
[00033933] *** 2
[00033933] *** 10
[00033933] *** 11
[00033933] *** 12
[00033933] *** 13
[00033933] true
- In addition to postfix increment/decrement operators, prefix operators are supported and
redefinable (Section 20.1.8.3).
var x = 0;
++x == 1; x++ == 1; x == 2;
--x == 1; x-- == 1; x == 0;
- The timeout construct now features optional catch, else, and finally clauses, modeled after
the syntax of try-blocks. See Listing 20.10.7.
function testTimeOut(var duration)
{
timeout (1s) { echo("computation"); sleep(duration); "body-value" }
catch { echo("interrupted!"); "catch-value" }
else { echo("completed"); "else-value" }
finally { echo("finally"); "finally-value" }
}|;
// Run till completion.
testTimeOut(0s);
[00000264] *** computation
[00000265] *** completed
[00000265] *** finally
[00000265] "else-value"
// Interrupted before completion.
testTimeOut(2s);
[00000266] *** computation
[00001267] *** interrupted!
[00001270] *** finally
[00001271] "catch-value"
- The C++ classes USound and UImage now properly initialize their instances to empty
sound/image.
- Add gdb extensions to improve debug experience of Urbi and urbiscript (Section 18.4).
Urbi objects are pretty printed when accessed and commands are available for printing
the backtrace of the current Job and for adding/removing breakpoints on urbiscript.
- The various flavors syntactic constructs are better documented, see Section 20.14.
- Extended description of Group.
- String.isAlnum, String.isAlpha, String.isCntrl, String.isDigit, String.isGraph,
String.isLower, String.isPrint, String.isPunct, String.isSpace, String.isUpper
and String.isXdigit.
- Extended description of bitwise operators (Section 20.1.8.4).
- Completion and fixes of the description of the operators in general (Section 20.1.8).
- Better description of closure vs. function (Section 20.3.6).
- Formal description of the grammar has started, but is yet to finish (Listing 29).
- Extended description of Event.
- The logging categories used by Urbi SDK (Section 21.36.2).
- The command line interface of UObjects launched by urbi-launch (Section 19.5.3).
- Bibliography, Section 32.
- Object.asPrintable, Object.asString, Object.asTopLevelPrintable.
- System.currentRunner.
Released on 2012-01-27.
This release fixes some packaging-related minor issues.
- The source tarballs are significantly smaller.
- Some public C++ headers used to depend on private ones; this is fixed.
- In-place builds from the source tarballs (i.e., when compiling in the same directory as the
source) work. Yet, we still discourage them (Listing 18).
- The test suite properly skips tests when some preconditions are not met (e.g., Java support
not compiled in, or running as root, or socat not being available).
- Windows packages with the installer now have some urbiscript files (namely ‘platform.u’)
which properly depend on whether you are using the debug or release flavor.
- GeSHi support is properly installed.
- When defining functions, their qualified name may start with this:
function this.foo() { echo("foo"); }|;
this.foo();
[00016170] *** foo
- Timestamps now use a monotonic clock, insensitive to wall clock changes (fired by ntpdate for
instance).
- Compatibility with Clang++ 2.1 and GCC 4.6.
- Compatibility with Boost 1.48. Beware that because of bugs in Boost.Foreach
(see Ticket 6131 ),
Urbi SDK now defines a macro foreach much more widely than before. Never include
‘boost/foreach.hpp’, rather, use ‘libport/foreach.hh’.
- Thanks to Adam Oleksy, we now provide Debian and RedHat packages.
- urbi-launch-java supports the new option ‘[’C]check which checks if Java support is
available.
- We now use the version 8 of the Independent JPEG Group’s (IJG) ‘libjpeg’.
- To improve performances, the Boolean operators && and || can no longer be overridden.
In other words, a && b no longer maps to a.’&&’(b), but to if (a) b else a (with
provisions to avoid multiple computations of a).
- System.timeReference is a Date.
Released on 2011-11-17.
This release back-ports several fixes from the forthcoming next major release of Urbi, to the 2.7
family.
- Freezing an event handler could prevent other event handlers to function properly.
- The indentation of the Emacs urbiscript mode is fixed (contributed by Jeremy W.
Sherman).
- Binding a single UVar several times not longer crashes.
- Handling of text and binary files on Windows should no longer be a problem.
- Disconnection of remote UObjects behaves properly.
- In Windows packages, the suffixes of the library (e.g., ‘-vc90-d’) are restored.
- Boost requirement is now 1.40 instead of 1.38.
- The binary packages for Windows, Mac OS X, Debian Etch are built with Boost 1.47 (from
Boost Pro, MacPorts, and install by hand).
- The binary packages for GNU/Linux Ubuntu Lucid are built with the packaged version of
Boost: 1.40.
- All the binary packages are now built with ROS Diamondback instead of ROS CTurtle.
- We now provide pkg-config files: ‘libport.pc’ and ‘urbi.pc’. Since binary packages are
relocatable, it should be noted that the prefix is most probably wrong, so it should be defined
at runtime as the output of the urbi’s (and urbi-launch’s) new option ‘print-root’:
$ pkg-config urbi --cflags
-I/prefix/include
# But urbi was installed in /usr/local, not in /prefix.
# There is nothing there.
$ ls /prefix/include
ls: /prefix/include: No such file or directory
# Let urbi give urbi-root (or urbi-prefix) to pkg-config:
pkg-config --define-variable=prefix=$(urbi --print-root) urbi --cflags
-I/usr/local/bin/../include
# This time, it exists.
$ ls /usr/local/bin/../include
boost jconfig.h jmorecfg.h libport urbi
gostai jerror.h jpeglib.h serialize
- GeSHi (Generic Syntax Highlighter)
support to display colored urbiscript on websites using php.
- Instructions to build Urbi SDK are more precise. The requirements should be easier to
find (Section 18.1).
- Formatting of the naming standard is improved (Section 23).
- Instruction for exchanging UObject between UObjects have been clarified (Section 25.14).
- Various errors in the documentation of UObject were fixed.
Released on 2011-10-07.
- File descriptor leaks when using Process.
- Compatibility with Boost 1.46.
- Binary packages now include simple aliases to the Boost libraries (e.g., you may use
‘-lboost_date_time’ instead of ‘-lboost_date_time-gcc44-mt-1_38’).
- Binary packages on Ubuntu Lucid now use its native Boost libraries (1.40) instead of Boost
1.38, and were built with ROS Diamondback.
Released on 2011-05-13.
There was no public release of Urbi SDK 2.7.2.
Released on 2011-03-17.
- Crash when stopping a UObject threaded function via a tag.
- On Mac OS X, umake and friends pass the ‘-arch’ option. It is now easier to use on a 64
bit computer an Urbi SDK package built on a 32 bit one.
- The default activation for GD_CATEGORY is computed from the first character:
‘Libport.Path’ is equivalent to ‘-*,+Libport.Path’, and ‘-Urbi*’ is equivalent to
‘+*,-Urbi*’. See Section 19.1.2.
- System.requireFile supports the same arguments as System.load.
Released on 2011-03-10.
Many optimizations have been implemented, and users should observe a significant speedup.
Particularly, the threaded support in UObjects has been modified to perform all operations
asynchronously, instead of locking the engine.
- WeakDictionary, WeakPointer are removed. UVar.notifyAccess, UVar.notifyChange, and
UVar.notifyChangeOwned no longer need a handler as first argument. Instead of:
var myHandle = WeakPointer.new();
&sensorsLoad.notifyChange(myHandle,
closure() { if (sensorsLoad) sensorsOn else sensorsOff; });
write:
&sensorsLoad.notifyChange(closure()
{ if (sensorsLoad) sensorsOn else sensorsOff; });
Backward compatibility is ensured, but a warning will be issued.
- Dictionary Duplicate keys in Dictionary literals are now an error. Instead of setting the value
of the last occurrence, it will throw an error.
["one" => 1, "one" => 2];
[00000001:error] !!! duplicate dictionary key: "one"
- The functions urbi::convertRGBtoYCrCb and urbi::convertYCrCbtoRGB have been renamed as
urbi::convertRGBtoYCbCr and urbi::convertYCbCrtoRGB (i.e., a change from ‘YCrCb’ to
‘YCbCr’). Because the previous behavior of these functions was incompatible with their names,
after careful evaluation, it was decided not to maintain backward compatibility: it is better to
make sure that code that depends on these functions is properly adjusted to their
semantics.
- Logger provides a logging service:
var logger = Logger.new("Category")|;
logger.dump << "Low level debug message"|;
// Nothing displayed, unless the debug level is set to DUMP.
logger.warn << "something wrong happened, proceeding"|;
[ Category ] something wrong happened, proceeding
logger.err << "something really bad happened!"|;
[ Category ] something really bad happened!
- Profile and Profile.Function replace the former Profiling object.
- Stream, common prototype to InputStream and OutputStream.
- System.sleep’s argument now defaults to Float.inf.
- Controlling the maximum queue size for UObject threaded notifies and bound functions is now
possible, see Section 25.4.3.
- at now comes in synchronous and asynchronous flavors, see Listing 20.11.1.3.
- A new construct, watch, creates an event that allows to monitor any change of an expression
(Listing 20.11.3).
var x = 0|;
var y = 0|;
var e = watch(x + y)|;
at (e?(var value))
echo("x + y = %s" % value);
x = 1|;
[00000000] *** x + y = 1
y = 2|;
[00000000] *** x + y = 3
- Gostai Editor for Windows was updated to 2.5. It now includes advanced search and replace
features with regular expression support and a “find in all opened documents” option. “Goto
line” menu has also been added.
- Gostai Console 2.6 for Windows now offers autocompletion of urbiscript slot names.
- To make simpler to install several versions of Urbi SDK, the Windows installers now include the
version number in the destination path.
Released on 2011-01-06.
This release features several deep changes that are not user visible, but which provide significant
optimizations. Several bugs have been fixed too.
- Improper behavior when there are several concurrent at (exp ∼ duration).
- System interruptions with Control-C sometimes failed.
- Remote UObjects exit properly when the server shuts down.
- Binary packages provide RTP support for all the architectures.
- The usual C++ syntax to declare classes with multiple inheritance is supported, see
Section 20.1.6.8.
- A literal syntax for strict variadic functions has been added, see Section 20.3.7. For instance
function variadic(var a1, var a2, var a3, var args[])
{
echo("a1 = %s, a2 = %s, a3 = %s, args = %s"
% [a1, a2, a3, args]);
}|
variadic(1, 2, 3);
[00000002] *** a1 = 1, a2 = 2, a3 = 3, args = []
variadic(1, 2, 3, 4);
[00000002] *** a1 = 1, a2 = 2, a3 = 3, args = [4]
variadic(1, 2, 3, 4, 5);
[00000002] *** a1 = 1, a2 = 2, a3 = 3, args = [4, 5]
This is faster than using lazy functions and call messages.
- Directory objects have new features for creation, modification and deletion.
Directory.createAll("dir1/dir2/dir3")|;
Directory.new("dir1").rename("dir")|;
Directory.new("dir/dir2").copy("dir/dir4")|;
Directory.new("dir").removeAll;
- Directory.size, File.size, Directory.lastModifiedDate, File.lastModifiedDate.
Released on 2010-12-07.
- Memory consumption at start-up is reduced.
- urbi-launch and urbi-send support ‘-m’/‘--module=file ’, to load a module
(Section 19.5, Section 19.8).
- The search paths for urbiscript files and for UObject files can be changed from urbiscript
(System.searchPath, UObject.searchPath).
- New syntactic sugar for Object.getSlot: o.&name is equivalent to o.getSlot("name") (and
&name is equivalent to getSlot("name"))). For instance, instead of
function Derive.init(var arg)
{
Base.getSlot("init").apply([this, arg]);
};
function Foo.’==’(var that)
{
getSlot("accessor") == that.getSlot("accessor");
};
write
function Derive.init(var arg)
{
Base.&init.apply([this, arg]);
};
function Foo.’==’(var that)
{
&accessor == that.&accessor;
};
- Dictionary keys can now be arbitrary objects. Objects hashing can be overridden. See
Object.hash.
- Global.warn sends messages prefixed with !!! (as error messages), instead of ***.
- Hash, type for hash codes for Dictionary.
- List.insertUnique inserts a member if it’s not already part of the list.
- Object.hash, Float.hash, String.hash, List.hash.
- Object.removeLocalSlot. It raises an error when asked to remove of a non-existing slot. Please
note that, contrary to what its name suggests, Object.removeSlot is only removing local slots.
Using Object.removeLocalSlot is encouraged.
- System.eval, System.load, and System.loadFile accept an optional second argument, the
context (this) of the evaluation.
- More types of empty statements are warned about. For instance Urbi used to accept silently
if (foo);. It now warns about the empty body, and recommends if (foo) {};.
- Dictionary.erase raises an error if the key does not exit.
- Exception.ArgumentType is deprecated, use Exception.Argument that wraps around any
Exception instead.
- Object.getProperty raises an error if the property does not exist. It used to return void.
- Object.removeSlot warns when asked to remove of a non-existing slot, and Object.removeSlot
about non-existing properties.
removeSlot("doesNotExist")|;
[00000002:warning] !!! no such local slot: doesNotExist
[00000002:warning] !!! called from: removeSlot
In the past, it used to accept this silently; in the future, this will be an error, as with
Object.removeLocalSlot. Use Object.hasLocalSlot or Object.hasProperty beforehand, if
needed.
- A warning is now issued when the evaluation of the condition of an at statement yields an Event
and no question mark was used, since this is most likely an oversight.
var e = Event.new|;
// This is not the correct way to match an event.
at (e) echo("Oops.");
[00000002:warning] !!! at (<event>) without a ’?’, probably not what you mean
[00000003] *** Oops.
// This is.
at (e?) echo("Okay.");
- File.rename returns this.
Released on 2010-10-20.
Released on 2010-09-28.
- Date.asFloat is restored.
- File.create empties existing files first.
- Lobby.lobby always returns the current lobby, even if invoked on another lobby.
- Object.inspect works properly, even if the target is a remote lobby.
- Regexp.matchs renamed as Regexp.matches.
- System.version Really returns the current version.
- Fix multiple race conditions in RTP handling code preventing proper initialization of
remote UObjects.
- Fix Windows deployment to have both debug and release UObjects installed.
- Fix urbi-sound in the liburbi examples.
- Fix server mode of ‘urbi-launch --remote’.
- The documentation of Urbi SDK Remote, our middleware layer to communicate with an
Urbi server — either by hand or via the UObjects —, is included in the binary packages
(in ‘share/doc/urbi-sdk/sdk-remote.htmldir/index.html’. It is also available on-line
at https://github.com/jcbaillie/urbi/urbi/3.0.0/doc/sdk-remote.htmldir.
- In addition to Gostai Console 2.5, Windows installers now include Gostai Editor 2.4.1.
- By popular demand, all the Boost libraries (1.38) are included in the binary packages. We
used to provide only the headers and libraries Urbi SDK depends upon. Boost.Python,
because it has too many dependencies, is not included.
- When launched with no input (i.e., none of the options ‘-e’/‘--expression’, ‘-f’/‘--file’,
‘-P’/‘--port’ were given), the interpreter is interactive.
- Assignment operators such as ’+=’ are redefinable. See Section 20.1.8.2.
- Date.’-’ accepts a Duration or a Float in addition to accepting a Date.
- Date.year, Date.month, Date.day, Date.hour, Date.minute, Date.second slots allow
partial modifications of Date objects.
- Float.fresh generates unique integers.
- InputStream.close.
- List.’+=’.
- Support for else in try blocks (Section 20.8.2). Run only when the try block completed
properly.
// Can we run "riskyFeature"?
try { riskyFeature } catch { false } else { true };
[00004220] false
function riskyFeature() { throw "die" }|;
try { riskyFeature } catch { false } else { true };
[00004433] false
riskyFeature = function () { 42 }|;
try { riskyFeature } catch { false } else { true };
[00004447] true
- Support for finally in try blocks (Section 20.8.4). Use it for code that must be run whatever
the control flow can be. For instance:
try { echo(1) } catch { echo(2) } else { echo(3) } finally { echo(4) };
[00002670] *** 1
[00002670] *** 3
[00002670] *** 4
try { throw 1 } catch { echo(2) } else { echo(3) } finally { echo(4) };
[00002671] *** 2
[00002671] *** 4
- System.eval and System.load report syntax warnings.
System.eval("new Object");
[00001388:warning] !!! 1.1-10: ‘new Obj(x)’ is deprecated, use ‘Obj.new(x)’
[00001388:warning] !!! called from: eval
[00001388] Object_0x1001b2320
- New functions as and fill on UVar to ease access to the generic cast system.
- Add support to boost::unordered_map to UObject casting system.
- Optimize remote UObjects: notifies between two objects in the same process instance are
transmitted locally.
- Provide a CustomUVar class to ease encapsulation of custom data in UVar.
- Bind the constant property on UVar.
Released on 2010-08-23.
- Pressing C-c in the urbiscript shell (‘urbi -i’) interrupts the foreground job, and clears the
pending commands. A second C-c in a row invokes System.shutdown, giving a chance to
the system to shut down properly. A third C-c kills urbi/urbi-launch. See Section 19.3.2
for more details.
- Closing the standard input (e.g., by pressing C-d) in interactive sessions shuts down the
server.
- Remote UObjects now support the RTP protocol to exchange value with the engine
(Section 25.17).
- NotifyChange/access callbacks can now take any type as argument. UVar& still has the
previous behavior. For any other type, the system will try to convert the value within the
UVar to this type.
- CallMessage.eval.
- Float.ceil, Float.floor, Float.isInf, Float.isNan.
- Traceable.
- Improved context (the call stacks) when error are reported. Especially when using
System.eval or System.load.
- at (expression) — as opposed to at (event?) — implementation has been improved:
the condition will now be reevaluated even if a parameter not directly in the expression
(in the body of a called function, for instance) is modified.
- Regexp.matchs.
- Date objects now have microsecond resolution and have bit slightly revamped to not rely
on Unix’s epoch.
- UVars now have the timestamp of their latest assignment.
Released on 2010-07-08.
- Lobby.connectionTag monitors the jobs launched from the lobby, but can no longer kill
the lobby itself.
- ‘123foo’ is no longer accepted as a synonym to ‘123 foo’. As a consequence, in case you
were using x = 123cos: 1, convert it to x = 123 cos: 1.
- Some old tools that no longer make sense in Urbi SDK 2.0 have been removed:
umake-engine, umake-fullengine, umake-lib, umake-remote. Instead, use umake, see
Section 19.10.
- On Windows urbi-launch could possibly miss module files to load if the extension
(‘.dll’) was not specified. One may now safely, run ‘urbi-launch my-module’ (instead of
‘urbi-launch my-module.dll’ or ‘urbi-launch my-module.so’) on all the platforms.
- Regexp.asPrintable, Regexp.asString, Regexp.has.
- System.Platform.host, System.Platform.hostAlias, System.Platform.hostCpu,
System.Platform.hostOs, System.Platform.hostVendor.
- UObject init method and methods bound by notifyChange no longer need to return an
int.
- Channel.Filter, a Channel that outputs text that can be parsed without error by the
liburbi.
- RangeIterable.all, RangeIterable.any, moved from List.
- Support for ROS, the Robot Operating System. See Listing 12 for an introduction, and
Section 22 for the details.
- Lobby.lobby and Lobby.instances, bounced to from System.lobby and
System.lobbies.
- Tag.scope, bounced to from System.scopeTag.
- The main loop was reorganized to factor all socket polling in a single place: latency of
Socket is greatly reduced.
Released on 2010-05-28.
- Container, prototype for Dictionary, List derive.
- e not in c is mapped onto c.hasNot(e) instead of !c.has(e).
- Float.limits
- Job.asString
- IoService
- Event.’<<’
- List.argMax, List.argMin, List.zip
- Tuple.’+’
- Tuple.’*’
- Assertion failures are more legible:
var one = 1|;
var two = 2|;
assert (one == two);
[00000002:error] !!! failed assertion: one == two (1 != 2)
instead of
assert (one == two);
[00000002:error] !!! failed assertion: one.’==’(two)
previously. As a consequence, System.assert_op is deprecated. The never documented following
slots have been removed from System: assert_eq, assert_ge, assert_gt, assert_le,
assert_lt, assert_meq, assert_mne, assert_ne.
- List.’<’ and Tuple.’<’ implement true lexicographic order: [0, 4] < [1, 3] is true.
List comparison used to implement member-wise comparison; the previous assertion was
not verified because 4 < 3 is not true.
- Mutex.asMutex is fixed.
- Directory events were not launched if a Directory had already been created on the same
Path.
- waituntil no longer ignores pattern guards.
Released on 2010-05-06.
- ‘make install’ failures are addressed.
- freezeif can be used more than once inside a scope.
Released on 2010-05-03.
- Minor bug fixes.
- The short option ‘-v’ is reserved for ‘--verbose’. Tools that mistakenly used ‘-V’ for
‘--verbose’ and ‘-v’ for ‘--version’ have been corrected (short options are swapped).
Use long options in scripts, not short options.
- Lobby.echoEach: new.
- String.closest: new.
- Tuple.size: new.
- Closures enclose the lobby. Now slots of the lobby in which the closure has been defined
are visible in functions called from the closure.
Released on 2010-04-09.
- Dictionary can now be created with literals.
|
|
Syntax | Semantics |
|
|
[ => ] | Dictionary.new |
["a" => 1, "b" => 2, "c" => 3] | Dictionary.new("a", 1, "b", 2, "c", 3) |
|
|
|
- Float.srandom
- List.subset
- Object.getLocalSlot.
- String escapes accept one- and two-digit octal numbers. For instance "\0", "\00" and "\000" all
denote the same value.
- Tuple can now be created with literals.
|
|
Syntax | Semantics |
|
|
() | Tuple.new([]) |
(1,) | Tuple.new([1]) |
(1, 2, 3) | Tuple.new([1, 2, 3]) |
|
|
|
- Location.’==’.
- type replaces ’$type’
- Remote timers (USetUpdate, USetTimer) are now handled locally instead of by the kernel.
- UVars can be copied using the UVar.copy method.
- New UEvent class, similar to UVar. Can be used to emit events.
- Added support for dictionaries: new UDictionary structure in the UValue union.
Released on 2010-01-29.
- ’$id’ replaces id
- List derives from Orderable.
- The UObject API is now thread-safe: All UVar and UObject operations can be performed
from any thread.
- You can request bound functions to be executed asynchronously in a different thread by
using UBindThreadedFunction instead of UBindFunction.
Released on 2010-01-13.
- ‘local.u’ works as expected.
- Lobby.quit replaces System.quit.
- Socket.connect accepts integers.
- UObject remote notifyChange on USensor variable now works as expected.
- UObject timers can now be removed with UObject::removeTimer().
- Socket provides a complete example.
- The Naming Standard documents the support classes provided to ease creation of the
component hierarchy.
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.
- assert { claim1; claim2;... };
- every|
- break and continue are supported in every| loops.
- for(num) and for(var i: set) support the for&, for| and for; flavors.
- for(init; cond; inc) supports the for| and for; flavors.
- non-empty lists of expressions in list literals, in function calls, and non-empty lists of
function formal arguments may end with a trailing optional comma. For instance:
function binList(a, b,) { [a, b,] } | binList(1, 2,)
is equivalent to
function binList(a, b) { [a, b] } | binList(1, 2)
- consecutive string literals are joined into a unique string literal, as in C++.
- at constructs do not leak local variables anymore.
- Each tag now has its enter and leave events.
- File.content reads the whole file.
- Invalid assignments such as f(x) = n are now refused as expected.
- Handle UObject destruction. To remove an UObject, call the urbiscript destroy method.
The corresponding C++ instance will be deleted.
- Add UVar::unnotify(). When called, it removes all UNotifyChange registered with the
UVar.
- Bound functions using UBindFunction can now take arguments of type UVar& and
UObject*. The recommended method to pass UVars from urbiscript is now to use
camera.getSlot("val") instead of camera.val.
- Add a 0-copy mode for UVars: If ‘UVar::enableBypass(true)’ is called on an UVar,
notifyChange on this UVar can recover the not-copied data by using UVar.get(), returning
an UValue&. However, the data is only accessible from within notifyChange: reading the
UVar directly will return nil.
- Add support for the changed! event on UVars. Code like:
at (headTouch.val->changed? if headTouch.val)
tts.say("ouch");
will now work. This hook costs one at per UVar; set UVar.hookChanged to false to disable
it.
- Add a statistics-gathering tool. Enable it using uobjects.enableStats. Reset counters by
calling uobjects.clearStats. uobjects.getStats will return a dictionary of all bound C++
function called, including timer callbacks, along with the average, min, max call durations, and
the number of calls.
- When code registered by a notifyChange throws, the exception is intercepted to protect other
unrelated callbacks. The throwing callback gets removed from the callback list, unless the
removeThrowingCallbacks on the UVar is false.
- the environment variable URBI_UOBJECT_PATH is used by urbi-launch and urbiscript’s loadModule
to find uobjects.
- fixed multiple notifications of event trigger in remote UObjects.
- Many other bug fixes and performance improvements.
- an exception is now thrown if the C++ init method failed.
The documentation was fixed, completed, and extended. Its layout was also improved. Changes
include, but are not limited to:
- various programs: urbi, urbi-launch, urbi-send etc. (Section 19).
- environment variables: URBI_UOBJECT_PATH, URBI_PATH, URBI_ROOT (Section 19.1).
- special files ‘global.u’, ‘local.u’ (Section 19.2).
- k1-to-k2: Conversion idioms from urbiscript 1 to urbiscript 2 (Listing 16).
- FAQ (Section 14)
- stack exhaustion
- at and waituntil: performance considerations
- Specifications:
- tutorial:
- Text files are converted to DOS end-of-lines for Windows packages.
- urbi-send supports ‘--quit’.
- The files ‘global.u’/‘local.u’ replace ‘URBI.INI’/‘CLIENT.INI’.
- urbi supports ‘--quiet’ to inhibit the banner.
Released on 2009-04-03.
- urbi-send no longer displays the server version banner, unless given ‘-b’/‘--banner’.
- urbi-console is now called simply urbi.
- urbi.bat should now work out of the box under windows.
- The keyword emit is deprecated in favor of !: instead of emit e(a);, write e!(a);. The
? construct is changed for symmetry: instead of at (?e(var a)), write at (e?(var a)).
See Section 16.3 for details. This syntax for sending and receiving is traditional and can
be found in various programming languages.
- System.Platform enhances former System.platform. Use System.Platform.kind
instead of System.platform.
- Under some circumstances successful runs could report “at job handler exited with
exception TerminateException”. This is fixed.
- Using waituntil on an event with no payload (i.e., waituntil(e?) ...;) will not cause
an internal error anymore.
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, Orderable.
Released on 2009-03-03.
An initial sketch of documentation (a tutorial, and the language and library specifications) is
included.
- Bitwise operations.
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.
- System.PackageInfo.
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.
- Precedence of operator **.
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).
- whenever now properly executes the else branch when the condition is false. It used to
wait for the condition to be verified at least once before.
- String.asFloat.
This new method has been introduced to transform a string to a float. It raises a
PrimitiveError exception if the conversion fails:
"2.1".asFloat;
[00000002] 2.1
"2.0a".asFloat;
[00000003:error] !!! asFloat: invalid number: "2.0a"
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
urbi-console arg1 arg2...
is equivalent to running
urbi-launch --start -- arg1 arg2...
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;’
Released on 2009-01-05.
A new document, ‘FAQ.txt’, addresses the questions most frequently asked by our users during the
beta-test period.
- If a file loaded from ‘URBI.INI’ cannot be found, it is now properly reported.
-
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.
Released on 2008-11-03.
-
- 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).
-
- 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
-
- 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.
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.