Commit graph

14 commits

Author SHA1 Message Date
9665c5d320 Parameters: establish layered implementation order
Finally able to settle upon a layering for the implementation facilities

 Provision:: represents the core idea of a parameter
 Domain:: assumes the ability to handle typed values
 Disposition:: complete implementation capabilities

 BaseDomain:: establish type conversion functionality
 TypedEntity:: provide a type and ID descriptor and scale configuration
 ParamData:: full implementation based on an embedded value buffer
2026-09-01 22:55:56 +02:00
3bd64935f3 Parameters: reorganise TypeHandler interface
The original design (based on Alexandrescu) is more elegant,
but has the downside to bloat the VTable size due to the mix-in
arrangement used to generate the interface.

The ongoing design has revealed a tight constraint on element size
for the parameters; thus the change to a linearised inheritance chain.

The overall purpose remains the same: the ability to generate a
double-dispatch type conversion, so that the actual value type of the
parameter can be treated as an implicit implementation detail.
2026-09-01 20:46:40 +02:00
1f29d202b4 Parameters: look for a suitable arrangement of interfaces
While the role of all the relevant interfaces has been determined,
it still remains difficult to establish a sensible relationship.
Which one is the most fundamental interface?

After a lot of mulling, it seems that the `Provision` interface
should be used as foundation, since it describes the very core
of the parameter concept developed here -- even while the actual
form of the operations must be ''somewhat cunningly reversed'',
so that the knowledge regarding the underlying type can be
kept an opaque implementation detail.

The `Domain` interface would then be layered on top, and describes
the capability to transfer values between buffers marked with different
domains (which effectively requires a double-dispatch in the general case).
2026-09-01 01:53:43 +02:00
d582b95e7c Parameters: detailed the prototype design sketch (see #1431)
Last week, I resumed the work that had been suspended
due to my focus on this year’s Froscon talk (on `io_uring`).
I have reconsidered my previous design ideas and sought to
arrive at a coherent design. Nevertheless, these are preliminary,
exploratory design studies that should be regarded as a basis
for future work rather....
2026-08-31 00:24:37 +02:00
4cdf01bc72 Parameters: better API for opaque transfer
The type-independent data transfer is based on a double-dispatch,
which is implemented as visitor pattern; so the operation must start
from the source parameter's VTable and be ''deflected back'' to the receiver

This completes the base operations required to establish a »Domain« (data type)
Adding more test coverage to demonstrate usage patterns...
2026-07-25 21:52:51 +02:00
c60e7d35c6 Parameters: reconsider where to use the visitor-pattern
...turns out as better to code two distinct low-level operations,
albeit implemented by delegation to a single generic assignment implementation.

The visitor patter thus becomes relocated to the high-level interface,
allowing to assign one opaque parameter to another one
2026-07-24 19:44:20 +02:00
a37e99a643 Parameters: attempt to base all access on a single implementation
However then the problem is that we know ''our domain'' but not the ''other domain''...

... and thus this forces one direction to pass through a double dispatch
2026-07-23 01:46:27 +02:00
e48c03e35d Parameters: verify the clamping operation
- systematic testing of boundary values for various numeric types
 - verify even clamping of an uint-128 when targeting float
 - verify signed / unsigned of different rank
 - demonstrate the clamping now integrated into `extractAs()`

As an aside, move the `isNeg()` function (safe test for negative numbers)
into util.hpp and fix related bugs with unsigned there.
2026-07-22 23:10:02 +02:00
e3b6b87e93 Parameters: look for ways to properly clamp signed / unsigned
Signed and unsigned integral types have a partial overlap of definition domains,
yet due to the automatic promotion rules it is impossible to write
a domain clamping function directly, since `std::numeric_limits` returns
the domain boundaries in the given type, and `int(-1) < uint(0)`
evaluates to false, due to int being is promoted to uint.

The attempt to circumvent this problem here relies on a check if the
comparison crosses the zero point, and otherwise relies explicitly
on the promotion to the number with the larger domain.
2026-07-22 01:17:13 +02:00
11bb3bce73 Parameters: draft a family of pre-conditioning operations
- we need a generic operation to clamp to the smaller value domain
 - furthermore we need a virtual function to apply a type specific limiter

__TODO__: this draft does not handle properly signed vs. unsigned types
2026-07-21 01:34:37 +02:00
7d35790e11 Parameters: implement simple value extraction for base types
...so this is not yet a visitor, rather the building blocks required
to be able to extract values and to assign and conform values

And my intention is to build something akin to a set of conversion rules
2026-07-20 01:10:19 +02:00
82b7acac57 Parameters: pick up work on type handling experiments
...after an extended break where I focused on learning IO_URING,
which is the topic of my upcoming talk at Froscon-2026;
(I built a prototype to read and display video with async IO)

Today ''I have re-read my design notes'' and the analysis seems to hold up well;
furthermore I solved the coding problem how to generate type handlers for a list of types.
2026-07-19 22:48:50 +02:00
532408a305 Parameters: design sketch for base-domain and conversion
While it is unfortunate that I seem to get deeper and deeper into that topic...
 - it should be noted that data size matters most (pervasive use expected)
 - the design is leaning towards multiple functional closures
 - both together suggest to use a classical virtual interface, without much ado
 - yet parameters must be copyable values, to allow for evaluation graphs and snapshots
 - so this turns out as yet another use case for ''polymorphic values''
 - furthermore, fluid usage requires flexible conversions between result values
 - given the situation with numeric value types and strings, this implies ''to build a visitor''

🠲 ''putting that work aside for the moment, since I need to focus on my IO_URING research (for FrOSCon 26)''
2026-07-06 01:17:31 +02:00
5df0252cc1 Parameters: preliminary requirement analysis
In the current stage, a design-draft is required that is sufficiently adequate
to be used as code placeholder and to evolve into the full specification eventually.

 - we need a single parameter container type with value semantics
 - parameters must support a selection of basic value types, with conversions
 - the value range can be limited, and a parameter can be associated
   with a ''Scale'' (stepped, continuous, logarithmic)
 - a parameter can be linked to a functional source
 - parameters are (virtually) copyable
2026-07-03 19:55:55 +02:00