Commit graph

611 commits

Author SHA1 Message Date
1cbebb1fab research: investigate narrowing conversion problem
as it turns out, this is a Bug in GCC 4.9 (resolved in 5.x)
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63723

Problem is, GCC emits a warning on narrowing conversions,
while the standard actually disallows them when building
objects from brace-enclosed initialisers.

Unfortunately GCC also emits such a warning from within
a SFINAE context, instead of letting those spurious dangerous
cases fail. So we end up with additional visitor double dispatch
paths, and a lot of additional warnings.

Temporary solution is to hack a custom trait, which
explicitly declares some conversions paths as "narrowing".
Probably this can be implemented in a way more intelligent
way (using std::numeric_limits), but this doesn't seem
worth the effort, since the problem will go away through
compiler evolution eventually.
2016-01-24 13:44:12 +01:00
f4bcdcf4e8 research: full solution, including double-dispatch converter stack
now we're able to construct suitable parameter values from the
arguments passed embedded in the GenNodes, as is demonstrated with the
EntryID<long> constructed from an ID-string. We really need a full-blown
double-dispatch, since the content type of the concrete GenNode is only
known at runtime (encoded in the RTTI)

There is still the problem with generating some spurions additional
conversion pathes, some of which are narrowing (and thus dangerous).
The copiler emits several warnings here, and all of them are justified.

E.g. it would be possible to pass an int64_t in the GenNode and initialise
a short from it. This might be convenient at times, but I tend rather to
be prohibitive here and thus consider to built in distinct limitations
on the allowed conversions.
2016-01-24 00:15:19 +01:00
a95103eb3b research: define new metaprogramming task
need to bridge between generic typing of tuples
and the DOM-like typing of UI-Bus messages
2016-01-23 11:57:19 +01:00
fd2d56ca45 refactoring(#988): switch function-closure to std::tuple
not sure yet if any of this works, because the
technicalities of dealing with variadic types are
quite different to our LISP-style typelist processing.

The good news is that with variadic templates it is
indeed possible, to supply dynamically picked arguments
to another function taking arbitrary arguments.

This all relies on the feature to unpack argument packs,
and, more specifically, about the possiblity to "wrap"
this unpacking around interspersed function call syntax

template<size_t...i>
Xyz
do_something(MyTuple myTuple)
  {
    return Xyz (std::get<i> (myTuple) ... );
  }

Here the '...' will be applied to the i... and then
the whole std::get-construct will be wrapped around
each element. Mind bogging, but very powerful
2016-01-19 03:56:53 +01:00
a5ca8ed3b1 ...and back to #975 : draft command invocation on UI elements
First part is to define the steps (the protocol) at the
model element level, which gets a command prepared and invoked.

Test fails still, because there is no actual argument binding
invoked in the TestNexus
2016-01-12 02:14:06 +01:00
2e4d74747e implement logging overrides in the Test-Nexus implementation
the actual functionality is forwareded to the base class,
which is the regular Nexus Hub
2016-01-02 19:16:37 +01:00
dddcbe9994 DOC: supply basics of UI-Bus and generic UI-element protocol
the initial draft of this concept is in place now, and
the first round of unit tests pass. I've got some understanding
of the purpose of the interactions and involved elements
and I'm confident this design is evolving in a sane way.

Note: extensive documentation is in the TiddlyWiki,
here I've just pasted and reworded some paragraphs from there
and integrated them into the Doxygen docs
2015-12-27 01:58:15 +01:00
b9ef66b221 provide and cover a mock implementation of receiving notification messages 2015-12-26 04:40:38 +01:00
9aa1fec369 UI-Element protocol: clarify the role of the doExpand() extension point
and let the concrete extension point decide if the corresponding
state change was actually relevant and should be persisted
2015-12-26 00:59:16 +01:00
449fa16444 WIP: draft of the UI backbone setup
- front-end handle
- Nexus == routing hub
- CoreService == service access point for command invocation
2015-12-19 03:40:19 +01:00
0f793e0a79 untangle the setup of test nexus 2015-12-18 19:50:57 +01:00
af98d75da4 consider the bus side of the generic UI base in more detail
especially define the outline of the bus communication
and connection management
2015-12-18 01:02:19 +01:00
a9a6aabcbc return to topic: UI element protocol
next step will be to rig the mock element and set up
and cover the basic / generic element behaviour

This changeset
 - adapts the (planned) unit test to the semantic of
   the EventLog, which is now fully implemented

 - adjusts the function names on the public Tangible interface,
   to be better in line with the naming convention of the
   corrsponding operations on the UI-Bus:

   * "mark" operations are towards the UI element
   * "note" messages are from the UI element towards some
     state manager, which can be reached via the bus
2015-12-16 02:16:53 +01:00
2704ad4512 decide upon the actual mechanics of command binding and invocation 2015-11-28 08:15:32 +01:00
42cec6d604 decision to follow the generic approach (#978, #979) 2015-11-28 05:51:53 +01:00
7b16c6b130 fundamental concerns regarding command binding
prompted by first attempt to define the Tangible interface...
ZOMG! And I thought I might be able just to code-up that stuff
2015-11-28 01:20:40 +01:00
25805635ff WIP: test-driven brainstorming -- a framework for event log verification
this is a recipe for writing UI related tests
2015-11-27 02:38:23 +01:00
bb627fc1f8 draft of the UI-Bus communication structure
what you see here now is just the tip of the icebearg...
If we follow this route, the Lumiera UI will become way more
elaborate and responsive than average desktop applications
2015-11-26 21:10:38 +01:00
16c01ab2bd planning the fundamentals of UI-Bus communication 2015-11-25 00:20:56 +01:00
d305254837 planning generic UI element behaviour 2015-11-21 05:10:36 +01:00
6a0b9980e3 After a looong break.... start reading code
wtf was I doing before that damn release and packaing business
2015-11-21 03:39:07 +01:00
60b6267eac DOC: after release 0.pre.03 -- checklist with steps for release preparation 2015-11-20 06:12:59 +01:00
96a4704738 DOC: some problems when building with GCC-5 2015-11-20 05:34:11 +01:00
313eeba70a post-release: Merge hotfixes from release branch 2015-11-15 07:05:13 +01:00
e856283c48 build on Mint 2015-11-05 03:30:46 +01:00
8a707f3a41 post-release: tighten library dependencies
NOTE: we have the policy to always support current Debian/stable
amd at least one Ubuntu LTS release, unless hard dependency problems prevent that.
Currently, Ubuntu/Trusty is already a bit dated, but the only problematic dependency
could be libboost (1.54 in Trusty, 1.55 in Jessie).
GCC-4.8 can be replaced by GCC-4.9 in Trusty without problems

It is always a bit tricky to find out the precise lower boundary,
so we try to upgrade these requirements as our platform progresses.
For now we have used the level available on Ubuntu/Trusty to set
the lower constraints for most libraries
2015-11-03 03:39:00 +01:00
3248741db1 upgrade current release to 0.pre.03 2015-11-02 22:25:54 +01:00
03eb0ff8f1 Pre-release 0.pre.03
This is a development snaphot pre release of Lumiera.
It features codebase maintenance, upgrade to C++14 and GTK-3
and some work towards a Proc-GUI connection (unfinished)

Update README, AUTHORS, LICENSE and similar release docs.
2015-11-02 22:19:26 +01:00
12cefe914e release prep: clean-up obsolete information 2015-11-02 21:14:24 +01:00
4a3b077824 Bugfix: find verb should check for ID match
because otherwise we'd need to send a whole subtree
over the wire and then descend into it just to find an element.

This too is a ripple effect of making '==' deep
2015-11-01 23:11:55 +01:00
34d79ee8df tree-diff-application: unit test PASS
well... this was quite a piece of work
Added some documentation, but a complete documentation,
preferably to the website, would be desirable, as would
be a more complete test covering the negative corner cases
2015-11-01 07:03:47 +01:00
c94bbcbb15 extend storage arrangement to deal with nested child objects
It is difficult to reconcile our general architecture for the
linearised diff representation with the processing of recursive,
tree-like data structures. The natural and most clean way to
deal with trees is to use recursion, i.e. the processor stack.
But in our case, this means we'd have to peek into the next
token of the language and then forward the diff iterator
into a recursive call on the nested scope. Essentially, this
breaks the separation between receiving a token sequence and
interpretation for a concrete target data structure.

For this reason, it is preferrable to make the stack an
internal state of the concrete interpreter. The downside of
this approach is the quite confusing data storage management;
we try to make the role of the storage elements a bit more
clear through descriptive accessor functions.
2015-10-30 03:11:33 +01:00
4356315021 diff-language interpreter: prefer to take payload by const&
each language token of our "linearised diff representation"
carries a payload data element, which typically is the piece
of data to be altered (added, mutated, etc).

Basically, these elements have value semantics and are
"sent over wire", and thus it seems natural when the
language interpreter functions accept that piece of payload
by-value. But since we're now sending GenNode elements as
parameter data in our diff, which typically are of the
size of 10 data elements (640 bit on a 64bit machine),
it seems more resonable to pass these argument elements
by const& through the interpreter function. This still
means we can (and will indeed) copy the mutated data
values when applying the diff, but we're able to
relay the data more efficiently to the point where
it's consumed.
2015-10-24 02:42:13 +02:00
e438a9fe51 chosing an implementation approach for tree-diff-application 2015-10-23 19:24:34 +02:00
c90e6a6f65 on second thought: yet a better solution
...is to let the diff applicator work *on* a Rec::Mutator
This is outright natural -- why is it that I needed 2 days
to come up with this solution?
2015-10-23 01:32:47 +02:00
eabeee3b7b decide on the implementation approach for tree diff application
this boils down to the two alternatives
 - manipulate the target data structure
 - build an altered copy

since our goal is to handle large tree structures efficiently,
the decision was cast in favour of data manipulation
2015-10-23 00:40:02 +02:00
2704b38da6 WIP rework demonstration diff to be valid type-wise
so basically it's time to explicate the way
our diff language will actually be written.

Similar to the list diff case, it's a linear sequence
of verb tokens, but in this case, the payload value
in each token is a GenNode. This is the very reason
why GenNode was conceived as value object with an
opaque DataCap payload
2015-10-09 03:03:27 +02:00
6ecd24a0a0 Design: pick up the task of defining a Tree Diff Language 2015-10-02 02:49:15 +02:00
0d10e62851 WIP: draft a monad-like scope expanding iterator implementation
Initially I intended just to supply an addapter to use
the monadic IterExplorer for this recursive expansion
of GenNode contents. Investigating this approach was
relevant to highlight the minimum requirements for
such an evaluation mechanics: since our GenNode
is an hierarchical structure without back-links,
we are bound to use a stack at some point. And
since an Iterator is a materialised continuation,
we can not use the processor stack and are forced
to represent this stack in memory.

Yet, on second thought, we do not need the full power
of the IterExplorer monad; especially we do not need
to bind arbitrary functions into the monad, just one
single scope exploring function, implemented as
Variant visitor. Based on these observations, we can
"inline" the monad structure into a double nested
iterator, where the outer capsule carries a stack
of scopes to be explored.
2015-09-11 04:06:51 +02:00
be70e58441 considering how to implement the GenNode sequence iteration
remembered that some years ago I had to deal with a very similar problem
for planning the frame rendering jobs. It turned out, that the
iterator monad developed for this looks promising for our task at hand
2015-08-31 03:34:23 +02:00
aa96cb6dd1 implement full data-based equality for GenNode
initially my intention was to use the ID for equality test.
But on a second thought, this seemed like a bad idea, since
it confuses the concepts of equality and identity.

Note: at the moment, I do not know if we even need an equality test,
so it is provided here rather for sake of completeness. And this
means even more that we want an 'equality' implementation that
does what one would naively expect: compare the object identity
*and* compare the contents.
2015-08-28 16:12:04 +02:00
a56226f297 Record "object" representation now finished and passes Test 2015-08-17 22:13:36 +02:00
7650b36f1e Generic Record: finish implementation of Mutator
especially setting (changing) attributes turned out to be tricky,
since in case of a GenNode this would mean to re-bind the hash ID;
we can not possibly do that properly without knowing the type of the payload,
and by design this payload type is opaque (erased).

As resort, I changed the semantics of the assign operation:
now it rather builds a new payload element, with a given initialiser.
In case of the strings, this ends up being the same operation,
while in case of GenNode, this is now something entirely different:
we can now build a new GenNode "in place" of the old one, and both
will have the same symbolic ID (attribute key). Incidentally,
our Variant implementation will reject such a re-building operatinon
when this means to change the (opaque) payload type.

in addition, I created a new API function on the Mutator,
allowing to move-in a complete attribute object. Actually this
new function became the working implementation. This way, it is
still possible to emplace a new attribute efficiently (consider
this to be a whole object graph!). But only, if the key (ID)
embedded in the attribute object is already what is the intended
key for this attribute. This way, we elegantly circumvent the
problem of having to re-bind a hash ID without knowing the type seed
2015-08-17 20:31:07 +02:00
61b6868bff pick up work where I left one month ago
OMG, what was all this about?
OK... this cant possibly work this way.
At least we need to trim after splitting the attributes.
But this is not enough, we want the value, which implies
to make the type flexible (since we cant return a const& to
a substring extracted on-the-fly)
2015-08-17 01:22:01 +02:00
24d7f55935 Merge Platform upgrade and Diff-Framework development 2015-08-16 01:42:26 +02:00
430107fcd8 draft impl of Record<string>
this specialisation of the Record template is provided as
default implementation for simple unit tests
2015-08-16 01:35:31 +02:00
bfb7bbd2f5 implement Record: operator string() for diagnostics 2015-08-16 01:35:30 +02:00
5b0d58518e WIP: stub GenNode ref 2015-08-16 01:35:30 +02:00
d92878876a WIP: attempt to define the object builder invocation chain
TODO still unresolved issues with the bootstrap.
Looks like we shall not initiate from the basic Rec(),
but reather require an explicit construction.
2015-08-16 01:35:30 +02:00
8e990fc04d WIP: simple implementation / stubbing
especially I've now decided how to handle const-ness:
We're open to all forms of const-ness, the actual usage decides.
const GenNode will only expose a const& to the data values

still TODO is the object builder notation for diff::Record
2015-08-16 01:35:30 +02:00