R/MRatCalcpowered by RiX

RiX walkthrough 18 b

Exact, typed CSV interchange

Import typed measurements, inspect provenance, stream rows, and export without losing exact values.

Quote text and preserve exact values

CSV quotes fields containing commas, quotes, or line breaks. Canonical mode keeps exact numerator/denominator text and missing cells remain empty.

Runnable RiX

TSV selects tabs automatically. CRLF is always an explicit choice.

Runnable RiX

Import typed measurements

The schema makes conversion auditable: identifiers stay text, masses become exact rationals, and measurement bounds become rational intervals. The locale policy is part of the call, not hidden machine configuration.

Runnable RiX

The result contains 5/4, the interval 6/5:13/10, and a missing mass—not binary floating approximations. Inspect the retained comments and indexed key: value metadata:

Runnable RiX

Pull a bounded stream

Use the shared RowSource protocol when downstream work needs only a prefix or should avoid constructing a second full Relation. Typed conversion happens as each row is pulled.

Runnable RiX

Choose decimal output consciously

Locale mode can represent 3/2 exactly as 1,5. It refuses 1/3, because a finite decimal would not equal the known exact value. Canonical mode remains the lossless fallback.

Runnable RiX
text
.Plugin.Load("csv");
.csv.Render(.Table(["value"], [[1/3]]), {= decimal=:locale });

Make exceptional nesting visible

CSV is flat. The default error names the exact nested cell. If a consumer expects JSON-in-CSV, opt in; exact nested numbers receive lossless tags and the RenderResult records a diagnostic.

Runnable RiX