Commit graph

28 commits

Author SHA1 Message Date
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
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
1fa7a4a437 WIP: define the full set of default copy operations explicitly
on a second thought, this "workaround" does not look so bad,
due to the C++11 feature to request the default implementation explicitly.
Maybe we'll never need a generic solution for these cases
2015-08-16 01:35:30 +02:00
f15266e435 GenNode(#956): define the ctors
implies decision on the ID representation
2015-08-16 01:35:30 +02:00
7ea4f739bd introduce a new header for #984 2015-08-16 01:35:29 +02:00
248fbef9b4 WIP: draft a DSL for simplified definition of literal records
This is just a draft for now -- kindof a by-catch, since it is
chep to build that DSL on top of the Rec::Mutator.
This DSL could be of value later, when it comes to define
some configuration data inline, in a copact and clear fashion,
without the need to use a bridge to/from JSON
2015-08-16 01:35:29 +02:00
b81419ad63 WIP: decide to implement the record ref as simple referenc wrapper 2015-08-16 01:35:29 +02:00
c70ad01ad3 resolve some conflicts in the design of the "External Tree Representation"
for the purpose of working out the inner logic, I frequently use the
help of a mindmap -- so why not commiting this alongside? For sure,
it is preliminary and the worked out concepts will be cast in code
and documented on the website. Yet the thought-process leading to
these decisions might be of some interest, at least for myself.
2015-08-16 01:35:29 +02:00