Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ktsu-dev/Semantics
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.0
Choose a base ref
...
head repository: ktsu-dev/Semantics
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.0
Choose a head ref
  • 9 commits
  • 19 files changed
  • 5 contributors

Commits on Sep 10, 2026

  1. [bot][skip ci] Update Metadata

    Github Actions
    Github Actions committed Sep 10, 2026
    Configuration menu
    Copy the full SHA
    45ef5ce View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2026

  1. Bump the ktsu group with 3 updates

    Bumps ktsu.RoundTripStringJsonConverter from 1.0.56 to 1.0.57
    Bumps ktsu.SourceGeneratorToolkit from 1.0.1 to 1.0.2
    Bumps ktsu.SourceGeneratorToolkit.Testing from 1.0.1 to 1.0.2
    
    ---
    updated-dependencies:
    - dependency-name: ktsu.RoundTripStringJsonConverter
      dependency-version: 1.0.57
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: ktsu
    - dependency-name: ktsu.SourceGeneratorToolkit
      dependency-version: 1.0.2
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: ktsu
    - dependency-name: ktsu.SourceGeneratorToolkit.Testing
      dependency-version: 1.0.2
      dependency-type: direct:production
      update-type: version-update:semver-patch
      dependency-group: ktsu
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Sep 11, 2026
    Configuration menu
    Copy the full SHA
    6aa77c9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #212 from ktsu-dev/dependabot/nuget/ktsu-dd73d67936

    Bump the ktsu group with 3 updates
    github-actions[bot] authored Sep 11, 2026
    Configuration menu
    Copy the full SHA
    9aac54b View commit details
    Browse the repository at this point in the history
  3. Bump Polyfill from 11.2.0 to 11.3.0

    ---
    updated-dependencies:
    - dependency-name: Polyfill
      dependency-version: 11.3.0
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Sep 11, 2026
    Configuration menu
    Copy the full SHA
    cb5d8c9 View commit details
    Browse the repository at this point in the history
  4. Merge pull request #213 from ktsu-dev/dependabot/nuget/Polyfill-11.3.0

    Bump Polyfill from 11.2.0 to 11.3.0
    github-actions[bot] authored Sep 11, 2026
    Configuration menu
    Copy the full SHA
    8b64e6c View commit details
    Browse the repository at this point in the history
  5. Add Semantics.Cpp: the C++ projection of the quantity vocabulary [minor]

    The .NET side of this library has always been generated from dimensions.json.
    Holotype needs the same vocabulary in C++, and the alternative to generating it
    is that someone writes 162 classes by hand and they drift - which is the failure
    this repository exists to avoid, in a second language.
    
    Two layers, because neither can do the other's job.
    
    The structural layer is Quantity<D> over a Dimension of eight integer exponents.
    It is shipped as a prelude rather than generated: no part of it is derived from
    the metadata, and eight integers and the four ways to combine them are the same
    whatever dimensions.json says. What it buys is that a product nobody declared
    still has a type.
    
    The nominal layer is one class per dimension and per named overload, and it is
    what the exponents cannot do. Measured against the real metadata, 72 dimensions
    share 63 exponent vectors: Area and NuclearCrossSection, Torque and Energy,
    AbsorbedDose and EquivalentDose are each one vector between two names, and only
    naming them separates them.
    
    The metadata gains an angle exponent, carried by AngularDisplacement,
    AngularVelocity, AngularAcceleration and AngularJerk. Without it an angle is the
    same type as a ratio and an angular speed the same type as a frequency; with it,
    61 distinct exponent vectors become 63. Nothing on the .NET side depends on it
    yet; it travels through DimensionInfo, which is why the generated C# moves.
    
    A relationship is checked before it is emitted. The operator is written as
    Result{ lhs.value() * rhs.value() }, so the exponents have to agree with the
    declared result or it does not compile - which turns every claim in `integrals`
    and `derivatives` into something checkable rather than something asserted. Four
    are refused, each by name with both dimensions written out:
    
      Torque * AngularDisplacement -> Energy
      MomentOfInertia * AngularVelocity -> AngularMomentum
      MomentOfInertia * AngularAcceleration -> Torque
      Sensitivity * Pressure -> ElectricPotential
    
    The first three are not fixable by choosing different angle exponents, and that
    is provable rather than a matter of taste: Torque * AngularDisplacement -> Energy
    forces torque's angle exponent to -1, and Force x Length -> Torque forces it to
    0. It is the r x F versus tau . theta contradiction, and it is why SI keeps the
    radian dimensionless.
    
    The fourth has nothing to do with angle and was already wrong: Sensitivity is
    declared as A/Pa while the relationship treats it as V/Pa. One of the two is a
    mistake and which one is a physics call, so it is reported rather than guessed
    at. Nothing had ever multiplied the exponents out before, so nothing had noticed.
    
    How the generated code is written is measured rather than chosen, and the header
    of CppQuantityGenerator says so: the same vocabulary written two ways measured
    0.9896 and 1.4004 against bare floats on MSVC while GCC and clang folded both
    away, so the wrong formulation passes on three compilers of four.
    
    Sixteen tests, two of which are the ones that matter: the whole vocabulary is
    compiled with g++ -std=c++20 -Wall -Wextra, and a product whose exponents do not
    match its result type is required to be rejected by the compiler. Without the
    second, the first would only prove the headers parse.
    
    Two things are deliberately not here. The vector forms are distinct classes too -
    122 dimension-and-form entries against the 72 magnitudes projected here - and
    they need componentwise operations, which have a rule of their own; half-doing
    them would be worse than not starting. And the magnitude guard rides in the
    member initialiser rather than the constructor body, because ktsu.Coder has no
    expression-statement node, so a call made for its effect is not something the AST
    can currently say.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01UGHDsYaaTQdzVR4XBR6miu
    claude committed Sep 11, 2026
    Configuration menu
    Copy the full SHA
    1855a5e View commit details
    Browse the repository at this point in the history
  6. Address code-quality findings on the C++ projection

    The `Path.Combine` calls are the substantive one: `Combine` silently discards
    every argument before a rooted one, so a name that turned out to be rooted --
    a generated file name, a PATH entry -- would write or read somewhere other
    than where the call reads as writing. `Path.Join` concatenates instead, which
    is what all of these actually mean. `Find` takes the executable's file name
    for the same reason, since a PATH entry is the directory.
    
    `ResolveRelationships` filters with `OfType` rather than an `if` inside the
    loop, which drops the null and the null-forgiving both.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01UGHDsYaaTQdzVR4XBR6miu
    matt-edmondson and claude committed Sep 11, 2026
    Configuration menu
    Copy the full SHA
    efe430c View commit details
    Browse the repository at this point in the history
  7. Merge pull request #214 from ktsu-dev/claude/blissful-euler-fzuap2

    Add Semantics.Cpp: the C++ projection of the quantity vocabulary
    matt-edmondson authored Sep 11, 2026
    Configuration menu
    Copy the full SHA
    d95b083 View commit details
    Browse the repository at this point in the history
  8. [bot][skip ci] Update Metadata

    Github Actions
    Github Actions committed Sep 11, 2026
    Configuration menu
    Copy the full SHA
    fa79094 View commit details
    Browse the repository at this point in the history
Loading