Trying to keep it up, here’s an update on recent developments in Rapicorn and Beast.
Git Branches
For now, Rapicorn and Beast are using Git branches the following way:
-
Topic branches are created for each change. Where possible, commits should compile and pass all tests (i.e. pass
make check installcheck
). -
Once completed, topic branches are merged into the master branch. For intermediate merges of huge branches, I’ve recently been adding [ongoing] to the merge commit message. As an aside, branch merges should probably be more elaborate in the future to make devlog articles easier to write and potentially more accurate.
-
The master branch must always compile and pass all tests.
-
OpenHub: The OpenHub repo links have been adjusted to point at Rapicorn’s and Beast’s master branch. Because of problems with spammers and a corresponding reimplementations, code statistic updates on the OpenHub are platform currently stalled however. https://www.openhub.net/p/beast-bse https://www.openhub.net/p/rapicorn
Hello and goodbye clang++
Rapicorn C++11 code currently compiles with g++-4.7 and upwards. An initial attempt was made at making the C++11 code compile with clang++-3.4 but the incompatibilities are currently too numerous. A few good fixes have come out of this and are merged into master now, but further work on this branch probably has to wait for a newer clang++ version.
New Widgets
Rapicorn is growing more widgets that implement state rendering via SVG element matching. Recent additions are:
-
LayerPainter - A container that allows rendering widgets on top of each other.
-
ElementPainter - A container that displays state dependent SVG image elements.
-
FocusPainter - An ElementPainter that decorates its child according to focus changes.
IDL Improvements
Several changes around Rapicorn’s IDL compiler and support code made it into master recently:
-
The IDL layer got bind() and connect() mthods (on the ObjectBroker interface). This models the IDL setup phase after the zeromq API. Beast makes use of this when setting up IDL interface layers in the UI and in BSE.
-
The Python binding was rewritten using Cython. Instead of invoking a heap of generated Python glue code and talking to the message passing interfaces directly, the Python binding now sits on top of the C++ binding. This makes the end results operate much faster, is less complex on the maintenance side and more functional with regards to the Python API offered. As an added bonus, it also eases testing of the C++ bindings.
-
And just to prove the previous point, the new Cython port uncovered a major issue lurking in the C++ IDL handling of objects in records and sequences. At least since the introduction of remote reference counting, client side object handles and server side object references are implemented and treated in fundamentally different ways. This requires records (struct) and sequences (std::vector) to have separate implementation types on the client and server sides. Thus, the client and server types are now prefixed with ClnT_ and SrvT_ respectively. Newly generated typedef aliases are hiding the prefixes from user code.
-
IDL files don’t need ' = 0 ' postfixes for methods any more. After all, generating non-virtual methods wasn’t really used anyway.
-
The Enum introspection facilities got rewritten so things like the Enum name are also accessible now. This area probably isn’t fully finished yet, for future Any integration a more versatile API is needed still.
-
Auxillary information for properties is now accessible through an
aida_aux_data()
method on generated interfaces. -
Generated records now provide a template method
accept<>(Visitor)
to visit all record fields by value reference and name string. Exemplary visitor implementations are provided to serialize/deserialize records to XML and INI file formats.
BEAST Developments
For the most part, changes in Beast are driving or chasing Rapicorn at the moment. This means that often the tip of Rapicorn master is required to build Beast’s master branch. Here is why:
-
Beast now uses RAPIDRES(1) to embedd compressed files. Rapicorn::Blob and Rapicorn::Res make these accessible.
-
Beast now makes use of Rapicorn’s IDL compiler to generate beastrc config structures and to add a new ‘Bse’ IDL layer into libbse that allows the UI code to interface with Bse objects via C++ interfaces. Of course, lots of additional porting work is needed to complete this.
-
Beast procedures (a kind of 'remote method' implemented in C with lots of boilerplate code) are now migrated to C++ methods one by one which majorly simplifies the code base, but also causes lots of laborious adaptions on the call sites, the UI and the undo system. An excursion into the changes this brings for the undo implementation is provided in DevLog: A day of templates.
-
The GParamSpec introspection objects for properties that Beast uses for GUI generation can now be constructed from
aida_aux_data()
strings, which enabled the beastrc config structure migration. -
An explanatory file HACKING.md was added which describes the ongoing migration efforts and provides help in accessing the object types involved.
What’s next?
For the moment, porting the object system in Beast from GObject to IDL based C++11 interfaces and related procedure, signal and property migrations is keeping me more than busy. I’ll try to focus on completing the majority of work in this area first. But for outlooks, adding a Python REPL might make a good followup step. ;-)