* Update glam
* More work to avoid panics
* Clean up with new FallibleVec2Operations extension trait
* Fix compile error
* Fix typo
* Fix Nix compiling rust-gpu (#4621)
* Add a warning icon to Math node expressions with errors as tooltips
* Point at a parse error with carets under a repeat of the expression, as a compiler does
* Render fenced code blocks in tooltips and put the parse error snippet in one
* Quote tokens as code in chumsky's parse messages and in custom parser errors
* Report the parse error past an operator rather than the operator itself
* Add matrices to the math expression parser as a second sort beside values
* Add Transform input and output to the Math f(x) node
* Add ranges and boxes to the math expression parser with inside, clamp, and remap over them
* Add Transform lists to the Math f(…) node with reducers composing, averaging, and counting them
* Lex a number's trailing e as Euler's number unless an exponent's digits follow it
* Fix matrix inversion scaling, exact matrix powers, infinite shears, matrix means, kept axes, and the Transform default
* Make shared box parts flat, give composed regions their inner map's axes, and fix lone logic items, spaced ranges, and the Math f(…) tooltip
* Transpose across spaces, name fractional matrix powers, check matrix builtin arities when parsing, read range literals by their corners, and let host functions shadow matrix builtins
* Make inside and clamp hold a region's uncovered parts at zero, so a box contains only the points between its corners
* Require hosts to declare the functions they provide, name the region functions' syntax node after its builtin, and remap onto ranges with equal infinite corners
* Apply a matrix to the whole product after it, so M 2 v is M (2 v)
* Pin prefix NOT's precedence above products, comparisons, and AND with tests
* Rename inside to within, since a range's ends count and the geometry predicates with a point first use that name
* Keep a range's corners as written, so clamp orders an integer past the reals' limit exactly
* Give within a tolerance of a billionth of the region's scale, so a point a float error off an edge or a flat side counts
* Write a unit part as its basis alone, so the identity displays as [1;i;j;k]
* Add tests for product folds, mixed chains, remap, and rejected inputs
* Evaluate matrix operands, builder arguments, regions, and comparison chains on the stack instead of the heap
* Build the expression parsers once per thread, since building the combinator tree cost as much as parsing a short expression
* Compare a chain reducer's items by their order directly, and reject an item with no order rather than reading it as false
* Send a host-built list of builder arguments or regions past the stack buffers to the heap instead of rejecting it
* Fix the math expression parser giving a valid direction between multiple infinite vector parts
* Replace the math expression parser's if() with piecewise cases like {a if x > 0, b otherwise}
* Fix the math expression parser's error spans starting before whitespace and infinities displaying as inf
* Extend the math expression parser's value ladder past complex numbers to quaternions
* Add a vector function family (dot, cross, rotate, slerp, and more) to the math expression parser
* Let hosts read a math expression result as a 1D to 3D vector or weighted particle
* Let the 'Math f(x)' and 'Math f(…)' nodes take and output Vec2 values
* Remove unfulfillable dead_code expectations from methods reached only through replay
Add magnitude bars to the math expression parser, with abs() acting on each part
Magnitude bars `|x|` give the magnitude on every rung, with `|`
opening where an operand is expected and closing where an operator is,
and `||` reading as Or unless two magnitudes are open, while `abs()`
stays the absolute value of each part. The `real()`, `imag()`, and
`arg()` functions are removed in favor of the matrix literals and
`angle()` the specification defines for those readings.
Make math expression results climb into the complex plane instead of ever producing NaN
Every value is a quaternion in principle, so narrower storage is never
observable: a result whose imaginary part is zero is the real number,
`-0` is `0`, and a real input whose answer leaves the real line climbs
into the complex plane (`sqrt(-4)` is `2i`, `ln(-1)` is `iπ`, `asin(2)`
its complex value) instead of producing NaN. No operation returns NaN
at all: an indeterminate form like `0/0` or `∞ - ∞` is an evaluation
error, as is a NaN arriving through a host binding at its point of use.
Shadow the constants behind case-sensitive bindings, with the `\` prefix reaching the builtin
Constants resolve at evaluation time, after the environment, so a
binding of any spelling, word or typeset symbol, shadows the builtin of
exactly that spelling, and a host-supplied function likewise shadows a
builtin function. The `\` prefix, in LaTeX's habit, names the language's
own constant or function regardless of bindings (`\pi`, `\e`, `\sin`),
and is an error when no builtin has that name.
Lex the math expression parser's identifiers as Unicode identifiers
Names follow the `XID_Start XID_Continue*` rule of UAX #31, the same
one Rust spells, so letters from every script name a variable and
combining marks extend a name: a decomposed `é` is one name rather
than the constant `e` beside a stray mark. Digits of any script, lone
marks, invisible formatting characters like the right-to-left
override, and symbols including emoji can no longer begin a name,
which also leaves `#`, `$`, `~`, and `@` free to become namespace
prefixes once a host scope needs them. Rust's special case admitting a
leading underscore is deliberately not adopted.
Reads the character classes from unicode-ident, the table crate the
proc-macro stack already builds with, rather than hand-rolling the
ranges.
* Standardize on the 'nonzero' spelling in comments
* Fill small gaps in the math expression parser
Adds the unary plus operator, the `true` and `false` constants, the
`choose` and `pick` combinatorics functions, base-suffixed `logN`/
`rootN` function names with optional underscores and fractional bases
like `log3.25`, the typeset operator spellings (`−`, `×`, `⋅`, `÷`,
`∧`, `∨`, `¬`), and `Value` accessors reading results as `f32` and the
standard integer types. Constants match their lowercase spelling
exactly, since uppercase-initial names are reserved for matrices. The
`¬` spelling is the prefix logical not alone, never the postfix
factorial that `!` also spells, and punctuation never begins a name,
which leaves `#`, `$`, `~`, and `@` free to become namespace prefixes
once a host scope needs them.
Retires the `√` prefix operator, which is untypeable and duplicates
`sqrt()`, and removes the undocumented unitless `G` constant: its
9.80665 is the value of lowercase-g standard gravity under capital-G's
name, and gravity's proper home is the future unit system's `g`
acceleration unit.
Also covers the previously untested interaction between implicit
multiplication and unary minus with parenthesized operands (`2 (-3)`,
`-3(2)`) in the test suite.
* Fix parsing regressions, make parsing 2.5x faster than the old pest parser, and clean up the math-parser rewrite
* Fix review findings: whitespace-juxtaposed numbers, mixed real/complex logic, correctly rounded literals, unified NaN truthiness, and gcd/lcm range checks
* Improve perf of path bool lib
* Use swap remove
* Use outer/inner bounding box for inclusion testing
* Reuse allocations for hit testing
* Use direct root finding for inclusion testing
* Reuse bounding box
* Use faster hash and specify capacities
* Use hashmap based approach for find vertices
* Unroll find_vertecies loop and use 32 bit positions
* Tune initial vec capacities
* Remove unused bounding boxes
* Use smallvec for storing outgoing edges
* Improve allocations for compute_minor
* Use approximate bounding box for edge finding
* Transition aabb to use glam vecs
* Make find vertecies use 64 bit again this is slower but less likely to cause issues
* Improve intersection candidate finding
* Remove loop check in bit vec iter
* Special case cubic line intersections
* Optimize grid rounding and add debug output
* Remove file write
* Remove faulty line intersection
* Fix grid rounding
* Improve robustness and cleanaup code
* Make elided lifetime explicit
* Fix tests
* Fix a boolean ops crash
* Add comment
---------
Co-authored-by: Keavon Chambers <[email protected]>