Skip to content

GameEventScript 0.5.0

Latest

Choose a tag to compare

@schloepke schloepke released this 17 Nov 00:42
ecf9e2c

This release adds GES schemas (.gess) with exact bit-level encoding, deltas and
generated C# and Swift code, GES documents (.gesd), the Bytes type, the shared
Syntax module and the Generator package, and gives the C# and Swift ports the same
public names and byte-identical compiler output.

Breaking

  • Line breaks inside any parentheses or square brackets separate nothing, so parameter lists, selectors such as
    [:take highest⏎1] and parenthesized expressions may span lines in both ports; inside braces they separate
    statements as before.

  • The Swift parser rejects what the C# reference rejects: an operator tighter than the type operation after as, is
    or has value (a as :Number + 1), a second superscript or ^ after a power (a²², a² ^ b), :Numeric as a
    type, 5%abc and 90°x, roll without dice, and a dice count on the next line. Calls and lists count the
    nesting of their arguments and items, so deeply nested chains report parse.sourceNestingExceeded instead of
    exhausting the stack.

  • Program segment and section types (GesStringConstantSegment, GesCodeSegment, GesSourceMapSegment and the
    others) have no public constructors and their SliceEntry values no public setters; Programs come only from the
    Compiler and the Reader. Swift keeps those initializers behind @_spi(Compiler).

  • Program validation rejects binding argument names with a _number suffix and a second Record binding of the same name
    or a Record binding without an ID (InvalidProgram). A message-name handler records the label message whatever its
    source binding is called.

  • The new runtime limit MaxValueDepth (default 64) stops a handler that nests Lists, Maps, Records or Messages more
    than 64 levels deep, which could otherwise overflow the native stack when the value was converted, compared or
    released. Raise it in GesRuntimeLimits where deeper values are needed.

  • :contains any and :contains all with a Range of candidates, has any/has all over a binary64 Range and
    starts with/ends with between two Ranges charge MaxLoopIterations for every Range item they visit, and
    shuffling a Range longer than MaxRangeItems reports that limit and gives an empty List, as as :List does.

  • An external type's constructor parameter or field declared as a plain Number (Float without a unit) keeps a
    Quantity's unit instead of dropping it, as an unconstrained Point or Vector already did: 5m stays 5m as binary64.
    Declare a unit to convert, or convert the value in the host.

  • Swift [UInt8] converts to and from GES Bytes instead of a List of numbers.

  • Text such as "0x10" is now a hexadecimal number for parse, as :Number, as :Percentage,
    documents and Message JSON instead of Text or nothing.

  • C# GesValue.AsMap() returns only stored Map and Record data, as in Swift; an external
    value gives null. MaterializedMap() reads its fields.

  • :Vector(value) and :Point(value) with one positional argument are now the cast,
    so :Vector([1, 2]) is 1, 2, 0 instead of nothing and :Vector(:Dice[6, 3]) is
    6, 3, 0 instead of 9, 0, 0.

  • :Message rejects the labels value and tags in source; use with.

  • The literal nothing and a constant with that value are no tags: this is the new
    validate.invalidTag, and a tag value that is nothing at runtime makes the tag
    clause invalid instead of adding #nothing.

  • A send with an invalid tag clause sends nothing and continues; a result-bearing send
    is false. A statement send used to end the handler, in C# always and in Swift for a
    Message value.

  • Message names start uppercase: initialization and undeliverable are entry points
    only the host uses. parse and documents no longer recognize
    :Message(initialization()) and :Handler(undeliverable()), and in source a lowercase
    name is a variable or a call of a function or predicate. GameEventScriptMessage.Create
    and FromJson reject those names, CreateMessage returns nothing for them, and
    loading a Program with such an outbound binding or message shape fails.

  • A labeled :Range needs from and to, so :Range(from: 1) is an error.

  • value as :Record is validate.invalidTypeConstructor instead of a compiler failure
    with decode.invalidOperand.

  • Handlers print a space after each comma: :Handler(Done(value, _)).

  • Labeled Vector and Point components must be a run without gaps:
    :Vector(x: 1, z: 2) is validate.invalidTypeConstructor in source, stays Text
    for parse and is document.invalidLiteral in documents. The literals true
    and false are no components either, though a Boolean variable counts as 0 or 1.
    ConstructData no longer accepts vector and point. CreateVector and
    CreatePoint use ImmediateX 3 for labeled x, which never lifts; values above
    3 fail validation. Recompile .gesb files to get the :Vector(x: v, y: 3) fix.

  • A bare name without a visible binding of its own source is now the
    validation diagnostic validate.unresolvedVariable at the name, reported for
    every such name, instead of the first compile.unresolvedSymbol of lowering.
    The Syntax module reports it too, so editors see it while typing.
    $constants, calls, extension calls and inline-assembly operands are not
    affected; an unknown $constant remains compile.unresolvedSymbol.

  • Validation reports the rules of each source on its own first, source by source
    and in source order of their positions: spelling of names and labels,
    repeated parameters, arguments, fields and bindings, shadowing, system
    endpoint forms and removed type names. The program-wide rules follow. A
    program with errors of both kinds therefore lists its diagnostics in a new
    order; their codes and positions are unchanged.

  • The optional highlighter packages are renamed to the Syntax module, which
    will hold the shared lexer, parser and syntax tree: NuGet
    GameEventScript.SyntaxHighlighter becomes GameEventScript.Syntax (namespace
    GameEventScript.Syntax), and the SwiftPM product and module
    GameEventScriptSyntaxHighlighter become GameEventScriptSyntax. Type names
    such as GesSyntaxHighlighter are unchanged. Migrate by replacing the package
    reference and the using/import.

  • Highlighting is derived from the lossless syntax tree instead of the bundled
    TextMate grammars, in both ports. Spans carry a category and the diagnostics
    overlapping them, and GesHighlightResult.Diagnostics/diagnostics lists the
    document's syntax errors or, without those, its violated single-source rules
    as new GesHighlightDiagnostic values with UTF-16 ranges. The line API
    (HighlightLine/highlightLine), GesHighlightState, NextState/nextState,
    CreateState/makeState and the TextMate Scopes/scopes are removed;
    highlight the whole document after an edit and theme by Kind/kind. Swift
    GesHighlightingError loses expectedSingleLine and incompatibleState. Some
    categories become more precise: function and predicate names are Function,
    contextual keywords such as between, from or ascending are Keyword,
    brackets and braces are Symbol, extension names are Builtin, and GESA label
    definitions are Label. Input with statements outside a handler, as console
    input has, keeps its statement categories. The Swift module no longer imports
    Foundation, and scripts/sync-highlighter-grammars.py is removed; the TextMate
    grammars remain for the editor bundles.

  • Runtime now depends on the Syntax module, which owns the quantity unit table
    and the text and name rules. GesQuantityUnit and GesQuantityUnits move to
    the Syntax assembly in C# with the unchanged namespace GameEventScript.Api;
    Swift Runtime re-exports GesQuantityUnit, so source code is unchanged. The
    NuGet Runtime, Compiler and CSharpBridge packages declare the Syntax
    dependency, and the runtime, compiler and unity DLL sets now include
    GameEventScript.Syntax.dll, which manual DLL installations must copy too.

  • parse materializes at most MaxRangeItems Range items into Lists per
    invocation in total, so many :List(:Range(...)) forms in one Text cannot
    multiply the per-Range limit. Exceeding the total stops the handler with the
    MaxRangeItems runtime limit. This includes a single Range longer than the
    limit, such as parse ":List(:Range(1, 10001))" with the default limit, which
    previously produced an empty List and let the handler continue. Migrate by
    raising MaxRangeItems or keeping such Ranges lazy, for example
    :Range(1, 10001) without :List(...).

  • strict directly after parse is now the strict mode word. To parse a
    binding named strict, write parse (strict); parse strict alone is a
    syntax error.

  • A number directly followed by a unit spelling is now one quantity literal, so
    10m/s, 6m/s² or 120°/s are a speed, an acceleration and an angular speed
    rather than divisions by a binding s, 2/s is the rate 2Hz, and 2m² or
    2m^2 is an area rather than the square of 2m. Write 10m / s or 2 / s
    with whitespace to divide and (2m)² to square. Text such as '250ms' now
    parses as 0.25s instead of failing.

  • floor, ceil, truncate and the three round forms keep the unit of a
    quantity, at runtime and in constant folding: floor 2.5m is now 2m instead
    of the unitless 2, and round half even 2.5m/s is 2m/s. Percentages still
    round to unitless numbers. A rounded time such as floor 1.5s is therefore a
    valid send delay. Remove the unit explicitly with as :Quantity(none) where a
    plain number is needed.

  • Swift GesQuantityUnit has new cases for the added physical units, so an
    exhaustive switch over it must handle kilogram, newton, joule, watt,
    volt, ampere, hertz, squareMeter, cubicMeter, wattPerSquareMeter,
    kelvin, degreePerSecond, decibel, wattPerKelvin and joulePerKelvin
    (or add a default).
    C# GesQuantityUnit gains the same members; existing values keep their numbers.

  • Runtime observer callbacks report the host-local send ID of the message they
    describe: C# MessageEmitted(message, id, accepted),
    MessagePublished(message, id, result), DispatchStarted(message, id, dispatchSignatureId) and DispatchCompleted(message, id, dispatchSignatureId);
    Swift messageEmitted(_:id:accepted:), messagePublished(_:id:result:),
    dispatchStarted(_:id:signatureID:) and dispatchCompleted(_:id:signatureID:).
    Every queued emit or received message, processed publish, delayed send and
    initialization gets the next ID of its host, so a trace can match each dispatch
    to its emit, publish or delayed send; 0 marks an emit that was not queued or a
    publish the host did not accept. Messages themselves carry no ID.
    Migrate by adding the id parameter: every callback now has an empty default
    implementation in both ports, so an observer that keeps an old signature still
    compiles but no longer receives that callback.

  • Public API types are renamed so that only the three edge types keep the
    GameEventScript prefix: GameEventScriptHost, GameEventScriptProgram and
    GameEventScriptMessage. All other public types use Ges, identically in C#
    and Swift, for example GesContext, GesHostBuilder, GesMessageArgument,
    GesRuntimeLimits, IGesPublishSink (Swift: GesPublishSink) and
    GesSyntaxHighlighter. Deviating names: GameEventScriptBuilder becomes
    GesProgramBuilder, GameEventScriptInstance becomes GesProgramInstance,
    the C# GameEventScriptBytecodeInstructionUnit and Swift GesUnit become
    GesQuantityUnit, the concrete GameEventScriptExternalTypeCatalog becomes
    GesDeclaredExternalTypeCatalog (the C# interface is IGesExternalTypeCatalog,
    the Swift protocol GesExternalTypeCatalog), Swift GameEventScriptExtensionFault
    becomes GesExtensionFaultError and Swift GameEventScriptAPIError becomes
    GesApiError. Behavior is unchanged; migrate by renaming references.

  • Builders are created directly or through their target type, following each
    language's idiom. C#: new GesProgramBuilder() (the static Create() is
    removed) or, with C# 14, GameEventScriptProgram.CreateBuilder(); hosts via
    new GesHostBuilder() or GameEventScriptHost.CreateBuilder(). Swift:
    GesProgramBuilder() or GameEventScriptProgram.makeBuilder() (create() is
    removed); hosts via GesHostBuilder() or GameEventScriptHost.makeBuilder()
    (formerly createBuilder()). The Swift GameEventScriptHost initializer is no
    longer public; configure hosts through the builder. Swift factory methods use
    make: GesMessageSignature.makeMessage(_:) and makeSignatureId(name:parameterNames:).

  • Reading, encoding, validating and dumping Programs are members of
    GameEventScriptProgram; the separate reader, writer, validator and dumper
    types are no longer public. C#: GameEventScriptProgram.Read(bytes, options),
    program.Encode() (formerly ToArray), program.GetEncodedSize(),
    program.Write(destination), program.Validate() and program.Dump(...).
    Swift: GameEventScriptProgram.read(_:options:), program.encode() (formerly
    bytes), program.encodedSize(), program.write(into:), program.validate()
    and program.dump(includeInstructionAddresses:).

  • The Swift Program exposes the same segments as C#: metadata,
    stringConstants, uint16IndexLists, bindings, code, debugSymbols,
    sourceMap, sourceArchive and buildMetadata are segment types
    (GesStringConstantSegment, GesBindingSegment, GesCodeSegment, …) that are
    also random-access collections over their entries. The binding entry type is
    GesBindingSegment.Entry in both languages (formerly C#
    GameEventScriptBinaryBindEntry, Swift GameEventScriptBinding); Swift
    GameEventScriptSourceMap and GameEventScriptBuildMetadata become
    GesSourceMapSegment and GesBuildMetadataSegment. Swift
    GesDebugInfoOptions moves from the Compiler to the Runtime module, as in C#.

  • Message and value JSON are members of the encoded types; GameEventScriptMessageJson
    is removed. C#: message.ToJson(), GameEventScriptMessage.FromJson(json),
    value.ToJson() and GesValue.FromJson(json). Swift: message.json(),
    GameEventScriptMessage(json:), value.json() and GesValue(json:).

  • GesSymbolKind is renamed to GesDiagnosticSymbolKind in both languages to
    separate it from GesDebugSymbolKind.

  • Swift gains GesDiagnosticCodes with the same stable codes as C#, and
    GesOpaqueSection.flags is a GesSectionFlags option set instead of a raw
    UInt16, as in C#. The C# GesInstructionFlag enum is no longer public; both
    languages expose the raw UnitAndFlags/unitAndFlags byte.

  • Bridge types use the GesBridge prefix and identical names for shared roles:
    GesBridgeHostRunner, GesBridgeExtensionRegistry,
    GesBridgeExternalTypeRegistry, GesBridgeMessageHandler,
    GesBridgePublishSink and GesBridgeValueConversion (formerly
    GameEventScriptCSharp…/GameEventScriptSwift…). C# registries are created with
    GesBridgeExtensionRegistry.Create(types)/CreateBuilder() and
    GesBridgeExternalTypeRegistry.Create(types); the static GameEventScriptCSharpExtensions
    and GameEventScriptCSharpExternalTypes entry classes are removed. C# gains the
    public GesBridgeMessageHandler and GesBridgePublishSink delegate adapters.
    Swift descriptors become GesBridgeFieldBinding<Root>,
    GesBridgeConstructorBinding<Root>, GesBridgeTypeBinding<Root> and
    GesBridgeAnyTypeBinding; GesBridgeValueConvertible,
    GesBridgeConversionError and GesBridgeHostRunnerRegistration replace their
    GameEventScriptSwift… predecessors. Attributes and macros keep their names.

  • Swift bridge members no longer name the language: setSwiftValue(_:),
    swiftValue(at:as:), withSwiftArguments(_:) and the swiftArguments: labels of
    message, emit and publish conveniences become setNativeValue(_:),
    nativeValue(at:as:), withNativeArguments(_:) and nativeArguments:.

  • Swift no longer exposes runtime helper types that C# keeps internal:
    GesNumber, GesText and GesSpatialValue (use GesValue.x/y/z) are
    internal, and GesSeriesValue with GesValue.series(_:)/seriesValue is
    available only to the Compiler.

  • Swift reports the public value kind as GesValue.valueKind: GesBytecodeTypeKind,
    the same single type C# uses for ValueKind; GesValueKind and kind are no
    longer public. Integer and binary64 ranges are both .range (use
    integerRangeValue/floatRangeValue), and records and external values are
    .custom. GesMessageArguments.kindAt(_:) returns GesBytecodeTypeKind.

  • Swift maps follow the C# model of sorted keys with parallel values:
    GesValue.map(keys:values:) and GesValue.record(typeName:keys:values:) create
    them, and GesValueMap.key(at:)/value(at:) read them next to length,
    get(_:) and containsKey(_:). GesMapEntry, GesValueMap.entries and
    GesValue.mapEntries are no longer public.

  • C# GesValueMap.StorageLength is removed; it always equaled Length. Use
    Length instead.

  • Attributed C# extension parameters check units: a [GesParam] with a unit requires exactly
    that unit, and one without a unit a unitless argument; another unit gives nothing.

  • The C# GesBridgeHostRunner returns a runner-owned GesBridgeHostRunnerRegistration from Load and Subscribe, as
    the Swift runner does; its IsAttached, StartResult and Detach() take the runner's lock. GetStartResult,
    Detach(instance) and Unsubscribe(subscription) are removed, since the host's own handles bypassed the lock.

  • C# attributed extensions convert arguments strictly, as Swift does: a fraction, a Boolean or a Percentage no longer
    converts to an integer or number parameter, and a number no longer to a bool; such a call gives nothing.

  • C# GesBridgeExternalTypeRegistry.Create rejects fields and constructor parameters of CLR types without a conversion,
    such as decimal or enums, and external classes it does not register. A constructor argument that does not convert
    exactly, such as 2.7 for an int, is now runtime.externalConstructorFailed instead of a truncated value.

  • The end of console input (EOF) delivers scheduled delayed messages before the CLI exits, as a batch run does, so
    piped console scripts lose no timer or delayed ErrorCode; :quit still discards them.

  • Host configuration names now say what they configure, before 1.0 freezes them: MaxProcessedEventsPerRun is
    MaxProcessedMessagesPerRun, MaxQueuedMessagesPerRun is MaxQueuedMessages (it bounds the host's persistent queue,
    not one run), and WithRegistry / withRegistry is WithExtensionRegistry / withExtensionRegistry. Observer
    callbacks and diagnostics report the new limit names.

  • C# removes GesValue.AsNumeric, which duplicated AsNumber(), and GesValue.GesNumber, an alias of GesFloat.

  • Swift GesContext.extensionRegistry is no longer optional: a host without extensions has an empty registry, as in C#.

  • C# GesPoint and GesVector compare components with binary64 equality, as Swift does, so a NaN component makes two
    values unequal.

Added

  • Schema computed fields take the script language's functions and powers: sqrt/√, cbrt/∛, sin, cos, tan,
    asin, acos, atan, atan2, hypot, exp, ln, ^, ², ³, floor, ceil, truncate, round half …, rad
    and deg, with the language's units (the root of m² is m). A square root is correctly rounded and bit-identical
    everywhere; the other functions may differ in their last bits between platforms, as in scripts. A field named like a
    GES keyword is read in backticks, such as `length` / 2.

  • Names in backticks: any GES keyword written in backticks is a plain name wherever a name stands (bindings, parameters,
    labels, record fields, member access, map keys), so a field named length or if can be declared and read, and a
    backticked e reads a field while plain e stays Euler's number. Argument-label words such as length, e or abs also
    name record fields and members without backticks.

  • Extension functions declared with Swift @GesFunction or C# [GesFunction] may take one GesRandomGenerator
    parameter in any position, which receives the call's seeded generator; it is no script argument and does not count
    toward labels, arity or C#'s four-parameter limit.

  • Packed schemas: packed schema :Name or packed(8|16|32|64) schema :Name declares a record of fixed-width fields
    (integers and stepped numbers with fixed ranges, Booleans, closed Tags, Flags, other packed schemas) of at most 64
    bits, schema.packedField and schema.packedTooWide otherwise. Its wire encoding is unchanged and equals the word in
    little-endian order; its delta changes the word as a whole. Generated code holds it as one word: a Swift struct over
    rawValue that is Hashable, Sendable and Codable, or a C# struct over RawValue, with checked field properties,
    checked and unchecked creation from a raw word, and Lists of them as arrays of words that read and write a word at a
    time. GesSchema.PackedWidth/PackedBits and GesBitReader.RemainingBits (Swift packedWidth, packedBits,
    remainingBits) are new.

  • ges schema generate --models <namespace> (GesSchemaGenerateOptions.Models): wire code shares the packed types of
    model code in that namespace and converts every wire record with a model directly to and from it, without GES values:
    C# ToModel()/CopyFrom(model), Swift toModel()/read(model:)/init(wire:), guarded by the schema hash.

  • Swift wire code generated with --namespace and --models converts to and from models at file scope, also in split
    files, and names wire and model types so that neither hides the other. A packed wire root shared with the models gets
    its wire members as static members of an enum <Name>Wire in the wire namespace, as C# does with its class, so that
    several wire generations of a module can share the model, with copy and quantize as in C#. A Swift file declares its
    namespace enums and then extends the whole namespace, as split files do, so that names of enclosing namespaces cannot
    hide the other side's. --models naming the wire namespace itself, a namespace that continues the other side's with the
    name of a type there (a <Name>Wire or a type of any model group included), a <Name>Wire that another type already
    names, a namespace starting with a Swift type name that generated code uses and, in Swift, a wire type or nested type
    that would hide a namespace the code names are generate.nameCollision; Swift namespaces of wire code with models and of
    its models start with an uppercase letter (generate.invalidNamespace).

  • Swift wire code with --models extends the namespace components it shares with the models' namespace instead of
    declaring them again, and ges schema generate --extend-namespace <A> (GesSchemaGenerateOptions.ExtendNamespace)
    makes any Swift generation extend the leading part A of its namespace that another generation declares, so
    generations such as Game.World and Game.Panels, or two in Game, can share one module.

  • Both CLIs have bench, an in-process benchmark of a compiled program: it loads the program once, warms it up and
    times every further run of the entry message, then reports min, median, mean, p95, max and standard deviation, a
    checksum of the console output, and on .NET the allocations and collections per run and the tiering settings, as
    text or JSON. scripts/bench-compare.py compares the Swift CLI, the .NET JIT with and without tiered compilation,
    ReadyToRun and NativeAOT on the same binary.

  • :Bytes, an immutable byte sequence: literals :Bytes[0xa0, 183] and :Bytes("a0b7"), as :Bytes
    from integer Lists and hexadecimal Text, as :Text/parse/documents, count, in, indexing,
    iteration, equality and order, :take/:drop first/last slices, + concatenation and UTF-8
    conversion with :Bytes(utf8: text) and :Text(utf8: bytes). Message JSON writes Bytes as Base64, schemas add :Bytes max n with
    generated WriteBytes/ReadBytes code, and the Bridges map C# byte[] and Swift [UInt8].

  • ges schema generate --model <group> --values gives every model type toValue() and init(value:) (C# ToValue() and
    FromValue(value)) with the plain Record that wire --values reads and writes, so models and wire records convert
    through one value instead of hand-written copies. A nested field that does not convert reports its path, such as
    entries[].level, as the wire value path does.

  • Schema union alternatives take labels, as in :Text max 64 | bind: :Loadout_UnitBind: generated code names the
    alternative .bind (C# Bind) instead of after its type; the label changes no bytes and no hash.

  • Schema tag sets tags :Mount as (#front, #rear): a field, list element or alternative of type :Mount is that
    :Tag(...) in place, with the same bytes and hash, and generated code declares one Mount enum for every field of it
    instead of one per field.

  • Schemas take the fields of another schema with with :Unit_Common, optionally all optional and
    without (id); an abstract schema only lends its fields. The record stays flat and hashes like written fields.
    Generated models adopt a protocol (C# interface) per schema they take unchanged; GesSchema.IsAbstract and Takes
    (Swift isAbstract, takes) describe it, and misuse of an abstract schema is schema.invalidAbstract.

  • Schema fields computed by an expression, as in script records: power: :Quantity(W) computed by 0W when duration <= 0s, otherwise energy / duration. The subset reads fields, lets and constants with arithmetic and comparisons in units,
    when … otherwise, min of, max of, clamp, abs, default, has value and list sums and counts; binding checks
    types and units, and the expression belongs to the hash. Computed fields are never encoded, decoding adds them, a
    document that sets one fails, and generated models and wire records give them as read-only properties that compute the
    bits of the virtual machine. GesSchema.ComputedFields (Swift computedFields) describes them; mistakes are
    schema.invalidExpression, and a required field that reads an optional field without has value or default is
    schema.computedMayBeAbsent. Generated code is plain binary64 and Boolean code in the language's own operators, such as
    duration <= 0.0 ? 0.0 : energy / duration, with a small GesComputed helper type for the rules plain code lacks;
    only a field where whole numbers beyond 2^53 could meet keeps the exact-value helpers.

  • Computed fields may be spatial: :Vector, :Point, :Box, :Disc and :Poly, built with the constructors of scripts,
    as in size: :Vector(m) computed by :Vector(x: (arena.columns - 1) * arena.spacing, y: (arena.rows - 1) * arena.spacing)
    or bounds: :Box(m) computed by :Box(lower: origin, upper: origin + size). Later fields read their parts (size.x,
    bounds.center, zone.radius, shape.points[:count]), vectors and points take the arithmetic of the virtual machine,
    abs of a vector is its correctly rounded length, and :Poly(points:) takes a list of points, a list field of Points or
    a projection list[:select item => point]. Generated models and wire records give them as GesVector, GesPoint,
    GesBox, GesDisc and GesPoly properties.

  • A schema union may span lines: a | may end a line or start the next one, with comments and blank lines between the
    alternatives, in fields, arguments and List elements. ges schema format breaks a union before each further
    alternative once it no longer fits 100 columns or holds an axis block.

  • ges schema generate --model <group> --documents (option Documents) lets models read GES document text: each root gets
    C# FromDocument(text) (Swift init(document:)) and the generation a type that reads any root by its :Schema(:Name)
    header: Document inside the namespace, ModelDocument without one. The document is checked against the embedded schemas, defaults apply, and errors carry their
    document.* or wire.* code, line, column and field path; a missing or other header is the new
    document.schemaMismatch. The Runtime's GesSchemaDocument does this for generated code, and GesDocumentException.Path
    (Swift GesDocumentError.path) names the field.

  • Schema type :Disc(unit) { x ..., y ..., radius ... } holds the geometry library's GesDisc: its centre as a Point of
    the axes x and y, then its radius, binary64 without a block. The value path, documents ([center: ..., radius: ...]),
    deltas, dumps, generated wire code and models handle it like a Box.

  • Schema types :Box(unit) { ... } and :Poly(unit) max n { ... } hold the geometry library's GesBox and GesPoly
    with per-axis constraints like :Point. A Box encodes its corners lower and upper as two Points and its value
    orders them; a Poly encodes its points in the plane z = 0 as a List of x and y. The value path converts the library's
    external values, documents write a Box as the Map of its corners and a Poly as the List of its points, generated wire code
    holds GesBox and the reusable Points of a Poly with a GesPoly view, and models hold GesBox and GesPoly.
    The built-in names Box, Poly and Disc are reserved: a schema, message or message set of that name is
    schema.duplicateName.

  • Recursive schema Lists: units: :List(:Loadout_Bind) max 16 depth 3 in :Loadout_Bind holds records of that schema
    up to three deep, so a tree needs one schema instead of one per level. The wire encoding is that of one schema per
    level; a record deeper than the depth fails with the new wire.tooDeep, whose message names the depth, such as
    wire.tooDeep at 'units[].units[].units': deeper than depth 3 (GesWireException.Detail, Swift
    GesWireError.detail), and a document with document.tooDeep. Generated code of the recursive schema takes the level
    of each record; every other schema generates the same code as before. GesSchemaType.Depth (Swift depth) describes it.
    The element may also be a union of scalars and the schema itself, units: :List(id: :Text max 64 | bind: :Loadout_Bind) max 16 depth 3, so a document writes a unit as its id alone or as a bind; at the depth the List holds neither.

  • ges schema generate -d <dir> (--out-dir) writes one file per declaration, or per .gess with --split file,
    plus a shared _<Namespace> file and the manifest .ges-generated.json; a later run removes files the manifest owns and
    no longer needs, warns about foreign files with cli.unowned, and --check compares the whole directory.
    GesSchemaGenerator.GenerateFiles and GenerateModelFiles (Swift generateFiles, generateModelFiles) return the
    files for build integrations, selected by GesSchemaGenerateOptions.Split.

  • Schema fields take defaults, as in efficiency: :Percentage default 100% or maxPower: :Quantity(W) default power:
    a literal, a constant, a let or a sibling field of the same type fills in what a value, model value or document leaves
    out, while the wire still carries every field. Generated models take defaults as initializer arguments, describe them
    and add them to the layouts; GesSchemaFieldInfo.Default (Swift defaultValue) describes them. Invalid defaults are
    schema.invalidDefault.

  • A schema field whose type is a schema takes a record literal as its default, as in
    electricity: :Unit_Consumer default [efficiency: 90%] or default [:]: the fields it names take its values, nested
    records take nested literals, and every other field takes its own default. Each value is checked like a default of its
    field, and a literal that leaves out a required field without a default is schema.invalidDefault. Generated models
    default such a field to an initializer call (Swift Unit_Consumer(efficiency: 0.9), C#
    new Unit_Consumer(efficiency: 0.9)); GesSchemaDefaultKind.Record with GesSchemaDefaultInfo.Entries describes
    it, and layouts list its entries.

  • Schemas declare constants with let retention be 2s inside their braces. Its fields can name a let as a bound, step,
    delta range or max; generated wire and model types declare it as a static member in base units, and it belongs to
    the hash. GesSchema.Constants (Swift constants) describes them.

  • Generated model types carry their SchemaHash (Swift schemaHash), as wire records do.

  • Generated model reading reports a required field without a key as wire.missingField and nothing where a value is
    required as wire.nothingValue, as the wire value path does, instead of wire.typeMismatch.

  • Generated wire records fill a list of reused elements with Set<Field>Count(count) (Swift set<Field>Count(_:)), and
    a list of Text or open Tag elements also reads and sets as strings with <Field>Values (Swift <field>Values).

  • Generated wire records count their exact size with ByteCount() and DeltaByteCount(baseline) (Swift
    encodedByteCount() and deltaEncodedByteCount(against:)), and ToBytes/encoded() and the delta forms allocate only
    that size instead of MaxByteCount: a record with a 4 MiB :Bytes limit that holds 1 KB allocates 1 KB. They build on
    the new counting GesBitWriter.Counting() (Swift counting()).

  • Schema maximums accept digit separators, such as :List(:Text max 1_024) max 10_000.

  • Schema :Flags(#a, #b) with up to 64 members: one bit per member on the wire, a script flag Map such as
    [armed:] in the value path and documents, WriteFlags/ReadFlags (Swift writeFlags/readFlags) masks, and
    generated C# [Flags] enums and Swift OptionSet types.

  • Hexadecimal integer literals such as 0xff_88_00 in source, parse, numeric text casts and
    documents: exact Int64 values with _ between digits, without unit or percentage suffix.

  • Schema roles: wire(group) marks a schema, message or message set as a wire root and
    model(group) a schema as a model root, optionally in a group (default without one).
    ges schema layout and generate take --wire <group> and --model <group>, and the
    Generator adds WireRoots, ModelRoots, ModelLayout and GenerateModels. A wire root that
    reaches a document-only type fails reading with schema.notEncodable, so ges schema check
    reports it; schema.invalidRole and schema.duplicateRole report misplaced roles. Roles change
    no hash.

  • ges schema generate --model writes plain model types: Swift Hashable, Sendable, Codable
    structs with a memberwise init (Identifiable with a key), C# 9 classes with value equality,
    with enums for closed tags and unions, and no ranges, steps or parameters needed.

  • Swift extensions declared with macros: @GesExtension, @GesFunction and @GesPredicate
    generate gesExtensions() with signatures from the declarations, strict conversions, declared
    units and nothing for an argument that does not convert; instance methods yield an instance
    gesExtensions(). The C# attributes gain [GesPredicate], nullable, Text, spatial and shape
    parameters and results, [GesFunction(name, unit)] and AddInstance(instance).

  • ges schema generate --model --bindings offers generated models to scripts as external types:
    a generated GesTypes catalog and registry, ToGesValue/FromGesValue (Swift gesValue()/
    init?(gesValue:)) and a :Name(fields: map) constructor, without the Bridge, macros or Reflection.

  • GesDisc in both runtimes, a filled circle in the plane z = 0, which the geometry library offers to scripts as
    :Disc(center: p, radius: r) and :Disc(radius: r) around the origin (a Percentage radius is its unitless ratio,
    as the declared Number type converts it), with center, bounds, area, distance,
    inset, nearest, contains and intersects with discs, 2D boxes and polygons.

  • GesBox and GesPoly in both runtimes, and GesGeometryLibrary, which offers them to
    scripts as the external types :Box and :Poly with the functions :geometry.size, center,
    union, inset, nearest, bounds, area, distance, centroid, contains and
    intersects; an invalid polygon gives nothing.

  • GesPoint and GesVector in both runtimes: unitless spatial values with the language's
    affine arithmetic, length, distance, normalized, dot and cross, and conversions to
    and from GesValue with an explicit unit.

  • Host conveniences on the spatial values: Swift +=, -=, *= and /= on GesPoint and GesVector
    (C# derives them from the operators), the component bounds MinX through MaxZ (Swift minX through maxZ) of
    GesBox, and GesBox.FromSize (Swift init(size:)), the box from the origin to a size. Scripts are unchanged.

  • External values have three explicit read paths in both ports: ExternalValue returns the
    host object, ReadField(name) runs one getter and MaterializedMap() runs all of them.
    C# adds these and GesValue.GesExternal(value); Swift adds readField(_:) and the protocol
    GesFatalRuntimeError, the counterpart of GesFatalRuntimeException, so a host can read
    the diagnostic of a failing getter, and a host's own conforming error keeps its diagnostic.

  • Hosts build Maps and Records from ordered entries in the Runtime: C#
    GesValue.GesMap(("a", x), ("b", y)) and GesValue.GesRecord("Hit", ("a", x)), Swift
    .map([("a", x)]) and .record(typeName: "Hit", [("a", x)]).

  • value["name"] reads the field of a Record, the entry of a Map or the coordinate of a
    Point or Vector and can be chained; everything else gives Nothing, without calling
    external field getters.

  • GesValueMap can be traversed in canonical key order: foreach in C#, without
    allocating, and for (key, value) in map in Swift.

  • ges schema generate (and dotnet ges schema generate) writes C# 9 or Swift 6 code for schema
    roots: a type per schema that writes and reads its records with the same bytes, error codes and
    paths as GesSchemaWriter and GesSchemaReader, without allocating, with parameters as constants.
    Schemas with Text, List or Dice become classes whose storage grows on demand and is reused;
    messages and message sets are supported too. Schemas write and read deltas with the bytes of
    GesSchemaDelta, lists with keyed elements included, and records compare by wire values
    (WireEquals), quantize and copy into existing storage. --values adds the conversion to and
    from GES values and messages through the value path. Generated Swift classes skip dynamic
    exclusivity checks, which halves their time; --checked-exclusivity keeps them. --namespace,
    --access internal and --check for checked-in output are supported.

  • ges schema layout (and dotnet ges schema layout) prints the language-neutral generation
    layout of one or more roots, or of every declaration with --all-roots: every reached type with
    its bound encodings, hashes and the parameters its constants depend on. A type that several roots
    share appears once, and both CLIs print identical JSON.

  • New Generator package: the NuGet package GameEventScript.Generator and the SwiftPM product
    GameEventScriptGenerator expose GesSchemaGenerator.Layout and Generate (Swift layout and
    generate) with GesSchemaGenerateOptions, so build integrations such as a Unity editor menu,
    an MSBuild target or a SwiftPM plugin generate schema code without the CLI. It depends on Runtime
    and Syntax only and games never ship it; the DLL distribution adds a generator set for a Unity
    Editor folder.

  • Schema bit primitives: GesBitWriter and GesBitReader write and read values of 0 to 64
    bits in the wire format's bit order, and GesWireRules holds its Text, tag, quantization and
    wrapping rules and the delta range over plain operands. GesWireException (Swift GesWireError) can be created
    from a code and a path, and every wire.* code is a public constant. The schema writer and
    reader now build on these primitives, without loss in speed.

  • Schema deltas work element by element for a list whose elements have a key, when the keys of
    baseline and record ascend strictly; otherwise the list is replaced as a whole. The limit of
    MaxByteCount rises from 1 MiB to 64 MiB. GesSchemaDelta.Encode uses its buffer as scratch
    space, so size it with MaxByteCount: a smaller buffer can fail with wire.bufferTooSmall
    even when the delta would fit.

  • Schema deltas: GesSchemaDelta converts between full records and deltas against a baseline
    record without allocating, GesSchemaValues does so for values, and ges schema dump --baseline
    makes a delta readable. A decoder accepts only the canonical form (wire.invalidDelta), a
    record with another key is wire.keyMismatch, and a target buffer that overlaps an input is
    wire.overlappingBuffers.

  • Type, message and handler names can join segments with single underscores, such
    as :Unit_Weapon and Unit_Fire. Each segment starts with an uppercase letter,
    so :Unit_1 and Unit__Fire stay invalid; use :Unit_Type1. The underscore
    forms no hierarchy: is :Unit is false for a :Unit_Weapon.

  • GES schemas (.gess) describe data formats and yield a very compact binary encoding for
    server-driven multiplayer games: ranges, steps and wrapping values with exact quantization,
    closed tag sets, tags, lists, Dice and text with hard limits, optional fields, unions, nested schemas, keys,
    messages and message sets, parameters bound per session, and a canonical FNV-1a 64 hash. In
    Runtime, GesSchemaSet, GesSchema (a read-only description with its fields), GesBoundSchema, GesSchemaWriter, GesSchemaReader and
    GesSchemaDump use no VM, and the writer and reader allocate nothing on success; GesSchemaValues
    converts Records and Messages. Schemas also check documents, including union types, through
    CheckDocument. The CLIs add schema check, format, hash, canonical and dump.

  • cm is a prefixed literal spelling of the meter, like km and mm: 150cm is
    1.5m. It adds no unit, :Quantity(cm) remains invalid, and printing documents
    does not choose it.

  • Link failures of an import that the source calls carry one diagnostic per
    call site with its source location, in source order:
    GesDynamicLinkException.Diagnostics and Swift
    GesDynamicLinkError.diagnostics, whose first entry remains
    Diagnostic/diagnostic. The message names the import, for example
    Unknown extension :navigation.nope(x). Columns need the SourceArchive;
    without a SourceMap the single diagnostic keeps only the symbol. Both CLIs
    print every call site.

  • GES document highlighting: GesSyntaxLanguage.Gesd (Swift .gesd) categorizes
    .gesd text and reports its first document error as a diagnostic with a UTF-16
    range, in both Syntax packages. The CLIs add document check and document format for .gesd files and the console command :show <file>, which
    highlights a .ges, .gesa or .gesd file and marks its errors. TextMate,
    Sublime Text, bat and VS Code grammars cover .gesd files.

  • The VS Code extension opens .gesb files in a read-only viewer: segments with
    offsets and sizes, inbound and outbound messages, functions, predicates, records,
    extensions, external types, embedded sources and texts. The viewer needs neither
    the CLI nor workspace trust; GES: Show Assembler Dump opens the ges dump output.

  • parse strict input recognizes the same literals as parse, but produces
    nothing instead of the original Text when the input is not a complete data
    literal: parse strict "standard" and parse strict "[1, 2" are nothing,
    while parse strict "'standard'" is the Text standard. The bytecode encodes
    it as ParseLiteral with the Strict flag (mode=Strict in GESA, #strict in
    inline assembly).

  • GES documents (.gesd): human-editable data files whose values are written
    like GES literals, such as maxForce: 21.4kN or mount: :Vector(x: 0m, y: -0.8m).
    C# GesDocument.Parse(text)/document.Print() and Swift
    GesDocument(parsing:)/document.text() read and print them. The root is a
    Map or, with a :Schema(:TypeName) header, a Record; :Schema('file.gess')
    references a schema file. Entries are separated by commas or line breaks,
    // comments are allowed, and reading is strict: unquoted Text, duplicate
    keys and explicit forms or number tokens that construct nothing, such as
    :Range(1) or NaN, fail with
    a GesDocumentException/GesDocumentError carrying a stable document.*
    code, line and column. Printing writes exact prefixed units such
    as 1kW or 250ms and reads back bit-identically in every implementation;
    GesValue.Format()/formatted() print a single value. Schemas are only
    referenced, not validated.

  • Literal parsing without a Host for extensions, configuration and other
    embedding code: C# GesValue.ParseLiteral(text) and
    GesValue.ParseLiteralStrict(text), Swift GesValue(literal:) and
    GesValue(strictLiteral:). They follow parse and parse strict, return
    null/nil for unrecognized strict input, never run constructors, and throw
    GesLiteralLimitException/GesLiteralLimitError when a parsing limit is
    exceeded, including more than 10,000 items materialized from Ranges in total.

  • Physical units in C# and Swift: meter per second (m/s), meter per second
    squared (m/s², ASCII m/s^2), kilogram (kg), newton (N), joule (J),
    watt (W), volt (V), ampere (A), hertz (Hz), square meter (m², ASCII
    m^2), cubic meter (m³, ASCII m^3), watt per square meter (W/m², ASCII
    W/m^2), kelvin (K), degree per second (°/s, ASCII deg/s), decibel
    (dB), watt per kelvin (W/K) and joule per kelvin (J/K), next to meters, seconds and degrees (ASCII deg). Literals accept the
    prefixed spellings km, mm, cm², km², ms, t, kN, kJ, MJ, mW,
    kW, MW, mW/m², kW/m², mW/K, kW/K, MW/K, kJ/K, MJ/K, kV,
    kHz, Wh and kWh, which normalize
    exactly to the base unit, and /s after a number for a rate such as 4/s.
    Products and quotients follow a closed derivation table, for example
    10m / 2s is 5m/s, 2kg * 3m/s² is 6N, 2m * 3m is 6m², 10W / 2m²
    is 5W/m², 10W / 2K is 5W/K and 1 / 2s is 0.5Hz (formerly nothing); other combinations of
    two units remain nothing. Squares and cubes follow the same table and roots
    invert them, so (3m)² is 9m² and sqrt 16m² is 4m (formerly NaN).
    Decibel levels add and scale by numbers but derive with no other unit and
    give nothing with a percentage. Every unit works in :Quantity(...), text
    formatting and parsing, message JSON, vectors and points, inline assembly
    (#meterPerSecond) and host APIs, including Swift
    @GesField(unit: .meterPerSecond). The UnitIds are 0 to 18; the formerly
    reserved bit, byte and bit-per-second ids 13 to 15 now hold the square meter,
    cubic meter and watt per square meter. Swift GesQuantityUnit is now
    Sendable.

  • Runtime observers can follow delayed messages. C# MessageScheduled(message, id, deadline, publish) / Swift messageScheduled(_:id:deadline:publish:) reports
    each accepted emit … after or publish … after once, with its send ID and its
    absolute deadline in microseconds on the host clock.
    MessageDiscarded(id) / messageDiscarded(id:) reports every queued,
    pending-initialization or delayed message removed before it was dispatched,
    such as after a failed initialization, so each send ID ends in a dispatch or a
    discard. Hosts without an observer behave as before. ges run --verbose
    traces them as schedule #<id> … at <local time> and discard #<id> and shows
    the send ID on emit, publish and dispatch lines.

  • C# IGesRuntimeObserver gives every callback an empty default implementation,
    like Swift, so an observer implements only the callbacks it needs.

  • Swift GesBitWriter.writeBytes(_:) and GesBitReader.readBytes(_:into:path:) take a [UInt8]; generated Swift
    wire code uses them, so a counting writer skips the bytes of a Text or Bytes at once and byte-aligned reads copy them.

  • The C# runner subscribes by exact signature with optional tag filters, as the Swift runner does.

  • C# external-type fields and constructor parameters accept float, GesPoint, GesVector, GesBox, GesPoly and
    nullable value types, and a [GesConstruct] factory may return an instance of a derived class.

  • Verbose traces and the paths of :list, :source and :show escape only quotes, backslashes and control characters
    in both CLIs, so Unicode text stays readable; the C# CLI escaped all non-ASCII text and <, >, ' before.

  • The Swift Runtime explains every Program format error and reached runtime limit with a specific message, as C#
    does, instead of a generic one.

Changed

  • A power with the exponent 0.5, as sqrt and √ compute it, is now the correctly rounded square root in both virtual
    machines, so its bits no longer depend on the platform's pow.
  • Host.Load and the writer no longer validate a Program again that the Reader, the Compiler or an earlier validation
    already accepted, so loading one Program into many hosts costs no repeated pass. A VM reset clears only the registers
    the last handler used instead of the whole register file.
  • C# writes an extension's result into its destination register when the call returns, as Swift does, instead of during
    the call. GesValueArguments is valid only during the extension call: C# throws InvalidOperationException and
    Swift reads it as empty with Nothing items when it is kept longer.
  • The GesRuntimeLimits documentation states what each limit counts; the unused call-depth bookkeeping of the runtime
    budget is gone. Swift GesValue and GameEventScriptMessage document why they are not Sendable and how to forward
    a message across isolation domains as a JSON snapshot.
  • Swift Syntax, Runtime and Compiler no longer use Foundation. The Card Lab
    WebAssembly module shrinks from about 71 MB to about 19 MB. Highlighting the
    shared corpus is about 20 times faster in Swift and 3.5 times faster in C#.
  • A delayed emit after … without recipients now behaves like the same emit
    without after: it is not scheduled and is observed as not queued, so it no
    longer keeps the host waiting, counts towards the queue limit or appears in
    NextMessageDelay. Its script result stays true. Delayed publishes are still
    scheduled for the outbound sink.
  • The root SwiftPM package now exposes only the four libraries. Build ges from
    implementation/swift/GameEventScriptTool, or install it via Homebrew, the
    install script or standalone downloads. The root macOS minimum is now 10.15;
    the separate CLI retains its 10.15.4 minimum.
  • Swift GameEventScriptProgram is now an immutable final class, so hosts and
    callers share a single Program instance. Program contents, binary encoding and
    copy-on-write isolation of returned arrays are unchanged.
  • Script handlers execute faster in both runtimes. Integer arithmetic and
    integer range loops write results in place, constant map literals and data
    constructions no longer redo per-execution work, and sorting numeric keys is
    no longer quadratic. The Swift VM additionally mutates registers in place
    without per-access exclusivity checks or reference counting on integer paths.
    Behavior and results are unchanged.
  • Both compilers move loop-invariant constant loads and arithmetic in front of
    their loop, so loops execute fewer instructions. Random draws, messages and
    host calls stay in place and results are unchanged; executed opcode counts
    drop and register requirements can grow slightly.
  • The C# and Swift compilers now produce byte-identical Programs for the same
    sources and compilation options, including debug symbols, source maps and
    source archives. Only BuildMetadata differs to identify the producing compiler.
  • The Swift compiler now writes the BuildMetadata section with compiler ID
    steph.ges.compiler.swift and version 0.1.0, as the binary format requires
    of every port. Runtime behavior does not depend on it.

Fixed

  • A random scope that a handler leaves open is reported as runtime.randomScopeImbalance even when an earlier handler of
    the same message failed; before, any earlier error in the frame suppressed it.

  • A publication that only an outbound sink would receive and that a failed initialization discards now reports
    MessageDiscarded with its send ID, so every issued send ID reaches an observer callback.

  • The Swift parser leaves the token after a missing dice pattern unread, as C# does, so a closing brace there still ends
    the handler, and the Swift binder accepts a line break after the _ of an unlabeled Record field.

  • The source range of random from … to … starts at random in both ports, also when a line break follows it, so
    diagnostics and the SourceMap point at the whole expression.

  • The Swift VM reports runtime.invalidRecordConstructor and runtime.instructionPointerOutOfRange like C#, and a
    Publish without an outbound binding is ignored as in C# instead of raising an uncatalogued code.

  • nothing = nothing and nothing <> nothing fold to nothing, as the VM computes them, and C# folds dice pattern faces
    such as [:has pair of (1.5 + 1.5)] as Swift does; (50%) / (true) folds to 50%.

  • A negated decimal random bound such as random from -20.0 to -10.0, a decimal constant and random 1 to pi draw
    binary64 values in both ports.

  • C# types constants in function and predicate bodies by their literal and let bindings by their value, as Swift does,
    so predicate active() be $flag compiles and emit after $delay with a unitless constant is
    validate.invalidTypeConstructor in both ports.

  • Swift rejects :Record and unknown quantity units as parameter types like C#, lowers fold seeds and unit-literal
    indexes like C#, and reports an unresolved labeled call as compile.unresolvedSymbol.

  • emit emit Done() compiles in both ports instead of crashing the syntax binder.

  • The branch simplification inverts only exact branch pairs, so a nothing condition keeps its branch.

  • compare-compiler-output.py --mutants N compiles seeded broken variants of corpus programs with both CLIs.

  • C# compiles a call whose unlabeled first argument is followed by labeled ones, such as scale(2, factor: 3) for
    scale(_ value, factor), as Swift does.

  • Unparenthesized extension calls such as :math.double pi take the same operands in both ports.

  • Both parsers report the same positions and recover alike for broken sources; test-syntax-roundtrip.py --mutants
    compares seeded broken variants of the corpus in test-swift.sh.

  • on Start as incoming_1 compiles to a Program that loads; before, linking failed with an argument exception.

  • Program validation is linear in the Program size: a long register or label list shared by many instructions, many
    source lines and many mappings no longer make C# validation take minutes to hours. Encode()/ToArray() validate
    once, and the reader copies pools without per-element calls.

  • parse of a form with many labels checks them through a set instead of quadratically, in both ports.

  • The Swift Program reader rejects counts and lengths above Int.max on 32-bit targets such as wasm32 with the format
    error instead of trapping.

  • Start() completes an initial group with more initializations than MaxProcessedEventsPerRun instead of failing
    with runtime.initializationLimitReached; the limit paces ordinary pumps only.

  • Choosing items at random from a long Range no longer allocates one entry per Range item, and integer Ranges answer
    has any, has all, starts with and ends with from their bounds.

  • Delayed messages are kept in a heap, so scheduling them in falling deadline order and delivering many at once no
    longer take quadratic time; equal deadlines still keep their scheduling order.

  • C# :distinct, :distinct by, :group by, :map by and Map union index their keys once they hold sixteen, so large
    results no longer take quadratic time.

  • The C# CLI builds with .NET SDK 10.0.404, so the Windows archives and the AOT tool packages
    contain .NET 8.0.34 instead of 8.0.25, which had known vulnerabilities such as CVE-2026-111497.
    The libraries keep their .NET Standard 2.1 target.

  • The CLI overview lists ges schema layout and generate, and ges run --help lists the
    console commands :edit, :save and :quit!.

  • External field values are no longer cached, so they can change between handlers. In C#,
    a script's field read runs only that field's getter instead of all of them, so a failing
    getter affects only its own field.

  • Swift matches external field names by Unicode scalars, not by canonical equivalence.

  • C# GesValue.GesRecord(typeName, keys, values) keeps the last value of a duplicate name,
    like GesMap and Swift; it used to keep both entries.

  • :Vector(x: 1) and :Point(x: 1m) compile in C# like in Swift, and
    :Vector(x: v, y: 3) with a Vector v is nothing instead of writing 3 into z.

  • The Swift compiler accepts the source short form :Message(Done), like the C#
    compiler.

  • :Series(kind: fibonacci) compiles without quotes, and parse and documents read
    :Series(offset: 2, kind: fibonacci).

  • In Swift, a statement emit or publish of a Handler value no longer sends a message,
    like in C#.

  • A line break may stand before the comma of a further tag inside :Message(...).

  • :Quantity(km)(1) reports validate.invalidTypeConstructor in Swift like in C#, and
    a :Quantity(m) without a value reports at its start in C# like in Swift.

  • :Message(...), :Handler(...) and :Series(...) can span lines like other
    type constructors. Depending on the form, a line break made the value nothing
    in C# or was a syntax error in one or both compilers.

  • Swift link diagnostics for exceeded register and call-stack limits and a full
    initialization queue now carry a message, as in C#, instead of an empty one.

  • C# syntax errors that name an unexpected token, such as Unexpected token '}',
    now range over that token, as in Swift, instead of having no length; their
    start positions are unchanged.

  • Unbraced for and random with bodies open a scope of their own during
    validation, as braced bodies do: a binding there no longer escapes into the
    enclosing scope or repeats the loop binding, and shadows it instead.

  • :sum and :average without a binding no longer report that they shadow an
    enclosing binding named value.

  • A repeated parameter of a :Handler(Msg(...)) data form is reported at the
    parameter instead of the start of the source.

  • Swift no longer accepts pair of a kind, which only the counts from three
    take, and reads the face after pair of as an expression also when it starts
    with a binding named a.

  • The Swift compiler treats a backslash in a source Text literal as ordinary
    text, as the language specifies and C# does, so 'C:\' and "path\" compile.
    Before, the backslash escaped the closing quote and the literal failed with
    parse.syntax.

  • The Swift compiler rejects a vertical tab or form feed between tokens with
    parse.syntax, like C#; only space, tab and the line breaks LF, CRLF and CR
    are source whitespace.

  • C# parse and GesValue.ParseLiteral no longer accept whitespace between :
    and a type name, such as : Number(5), matching Swift and the source type
    syntax; such input now fails recognition like any other malformed literal.

  • C# external field reads now follow the field's declared type, as in Swift:
    a field declared Float<Watt> that returns the integer 3 reads as 3W,
    and the same applies to Map conversion, keys, values, entries and iteration.
    Before, C# returned the raw field value.

  • External type fields and constructor parameters declared as Tag keep a Tag
    value unchanged; before, C# turned it into nothing and Swift into the Tag
    #nothing. nothing stays nothing under every declared type, so a missing
    optional Tag field in Swift no longer reads as #nothing, and a Boolean
    constructor parameter no longer turns nothing into false.

  • The Swift compiler no longer exhausts small thread stacks on deeply nested
    sources. Its parser and compiler passes need far less stack per nesting level,
    so sources at the expression and statement nesting limits compile on a 512 KB
    thread, the stack of Swift concurrency tasks, also in Debug builds. Before,
    about 25 nested calls could crash an unoptimized build there.

  • The Swift compiler rejects reserved keywords such as empty, record or if
    as argument labels, map literal keys and extension function names with
    parse.syntax, like the C# compiler; to, nothing, the math constants and
    prefix intrinsic names stay valid labels. It also accepts ° (degree)
    wherever an identifier is expected, such as a map key.

  • The Swift compiler reports every diagnostic of a failing phase, as C# does,
    instead of only the first: the parser resumes after a syntax error at the next
    declaration or statement, and validation reports all semantic errors in the
    order that specs/Diagnostics.md defines. Call, arity and is-predicate
    checks now run during validation, so they appear in that list.

  • The C# compiler rejects records with a repeated field name or an unknown field
    type, as Swift does. A field type may be a built-in type, a record of the
    program or a configured external type.

  • Both compilers reject :Integer and :Float wherever a type is named; use
    as :Number to convert and is integer or is fractional to check. Casts and
    checks to other custom types bound only at run time remain valid.

  • ln, exp, roots and powers without an exactly representable integer result
    are no longer folded at compile time; they run on the target platform's math
    library, so a constant such as ln 2 and ln x for x = 2 always agree
    within one execution. Their exact inner terms are still folded.

  • Constant folding of integer products with a unit is exact like VM execution:
    3000000000m * 3000000001 stays 9000000003000000000m instead of being
    rounded through binary64; only an Int64 overflow falls back to binary64.

  • When a source exceeds the nesting limit, both compilers still report the
    syntax errors found before it in that source.

  • Both compilers no longer hang on a module declaration after another
    declaration or on a repeated one; it is now a parse.syntax error at the
    module keyword.

  • Compiler diagnostics in C# and Swift start at the same, most specific source
    position: the offending token, the repeated or misnamed parameter, argument,
    condition or binding, the failing call or constructor, or the first construct
    that exceeds the nesting limit.

  • A Swift @GesFunction or @GesPredicate with an Optional parameter receives nil for nothing instead of being
    skipped.

  • A Swift runner delivers delayed work after the last outside reference to it is gone, as the C# runner does.

  • The Swift console answers each piped line at once instead of waiting for 4096 bytes or the end of the input.

  • The C# CLI ends with status 1 when stdout is a closed pipe, as Swift does, instead of returning the script's code.

  • :save writes through a symbolic link to its target and keeps the file's permissions in both CLIs.

  • C# diagnostics no longer end in an empty [program=], and an I/O error without a file has no leading colon.

  • The C# console's waiting prompt indents continuation lines without ... markers.

  • The specifications define the typed value reads (AsInteger, AsNumber, AsBoolean, AsText) of both ports, why
    ValueKind uses the bytecode type kinds and which of them a host observes, the module graph with Syntax and
    Generator, the anonymous name of an empty Program, InvalidProgram for duplicate callable signatures and Record
    names, reserved section types as unknown sections, and the instruction flag bits; stale runner names and a Swift
    Host initializer are gone.

  • The public C# Runtime types document what each member does instead of generated placeholder text.

  • Swift CI runs the Swift port on Linux in the release image of the static CLI (package tests, the supported corpus,
    CLI process checks) and builds the libraries with the declared minimum Swift 6.0; a Linux-only Swift test that did
    not compile is fixed.

  • Publication requires the tagged commit on main with successful C# CI and Swift CI runs, and the C# release workflow
    also runs the zero-allocation gate and the reproducibility check.

  • An interrupted NuGet or CLI download publication can be resumed by running it again; identical published packages
    and downloads are skipped and differing ones stop the run.

  • C# CI runs the guide examples, the timing-only performance scenarios without timing and a license header gate for
    Swift, C, Python, GES and web sources; Swift CI runs the Swift guide examples and treats guide example edits as
    code.

  • The Conformance runner scales its batch deadline with the selected cases and prints how long a batch took.

  • Workflow container images are pinned by digest and every job has a timeout.

  • Swift list + value and zip check MaxValueDepth like every other construction, where a deep fold crashed the Swift
    process. C# Bytes answer :contains any, :contains all, [:first], [:last] and [:single] as Swift does, and C#
    external type constructors take Bytes parameters.

  • The C# CLI writes a script's output to a redirected file at the shared offset, so a later writer no longer overwrites
    it, and it formats canonical decimals, schema hashes and generated code culture-invariantly, where a locale with the
    minus sign U+2212 changed them. bench --entry initialization is cli.missingEntry instead of a crash.

  • The release gate requires the native jobs of Swift CI to have run, not only a successful run that skipped them.

  • The Swift compiler assigns binding IDs per kind with counters, as C# does, instead of in quadratic time.

  • The DLLs in the C# packages carry the time of the packed commit, or the current time for uncommitted changes, instead
    of a fixed date, so MSBuild's copy into a build output replaces the DLL of an older package version of the same size.

  • A unary intrinsic with a parenthesized operand, such as floor(x), and an intrinsic call such as atan2(y, x) are power
    bases in both ports: floor(x) ^ 2 is (floor x) ^ 2. C# rejected both, and Swift accepted -x² ^ 2 and floor x² ^ 2,
    which are syntax errors.

  • The compiler no longer overflows its native stack when a predicate, local binding or send delay takes its type from a
    long chain of function calls; result types are inferred iteratively and once per callable.

  • parse and parse strict stop with MaxRangeItems when Range item counts near the Int64 maximum add up, instead of
    trapping (Swift) or returning a partial value (C#).

  • Swift: let pulse be pulse() calls the function pulse instead of binding the new local as a Handler, and an alias of
    a Handler binding keeps its signature, so a call through it with a mismatched label yields nothing, as in C#.

  • :Number(0, "s") and other literal time units are accepted as send delays.

  • Floating Range selectors (take/drop first/last, highest/lowest, :reverse, :sort) return exactly the items of the
    materialized List; when no Range reproduces them, they return a List.

  • :sort, :order by and :take/:drop highest/lowest order integers beyond 2^53 exactly, as < and > do.

  • parse recognizes Record constructors whose names start with Vector or Point, such as :VectorClock(1).

  • Message JSON readers reject \u escapes that are not exactly four ASCII hex digits, such as \u+061.

  • Generated models read a document union as the alternative its schema check chose, also inside explicit :List and
    :Record forms.

  • Swift generation with --models no longer fails on an optional union without a :Nothing alternative, and the Swift
    direct wire-to-model conversion keeps an absent field absent when it defaults to a sibling.

  • C# --bindings code for packed models compiles.

  • An empty packed schema generates compiling C# and Swift code, and a packed root field named like a wire member, such as
    encoded, is generate.nameCollision.

  • Packed models report a value outside a field's range as wire.outOfRange at the field's path in both languages.

  • A .gesd file reference :Schema('file.gess') selects a single recursive root schema.

  • Program validation takes linear time for call graphs with many repeated calls (C#) and for source maps with many
    archived sources (Swift).

  • Program validation rejects a message-name handler binding whose argument names are not exactly message with
    InvalidProgram, instead of reading such a .gesb file without error.

Migrating from 0.4.0

  • Upgrade the GES libraries together and recompile scripts with the matching
    Compiler and Runtime. GESB remains V1; the tested 0.4.0 upgrade covers selected
    consumers and frozen fixtures, not arbitrary old Programs.
  • Replace the optional highlighter packages with the Syntax module and apply the
    renamed public types listed under Breaking; the C# and Swift ports now use
    the same names for corresponding types.
  • Perform a clean rebuild of C# consumers after updating packages.