Skip to content

Omasheet 0.1.13

Latest

Choose a tag to compare

@librasteve librasteve released this 02 Dec 17:06
· 10 commits to main since this release

Omasheet v0.1.13

Omasheet 0.1.13

Plots you declare in the file, sixteen kinds with curve fitting, and dozens of non-SI units that make Omasheet a working tool for conversions. Numbers also follow a published set of type laws.

Install or update

On macOS (Apple silicon or Intel) and on Omarchy and Arch Linux (x86_64 or aarch64):

curl -fsSL https://raw.githubusercontent.com/librasteve/omasheet/main/install.sh | bash

On Windows (64-bit), in PowerShell:

irm https://raw.githubusercontent.com/librasteve/omasheet/main/install.ps1 | iex

The macOS app and the Windows build are not code-signed. The installers fetch them in a way that avoids the Gatekeeper and SmartScreen warnings; a zip downloaded by hand will show them.

Plots

A plot is now part of the file, so the chart travels with the data and is rebuilt whenever the numbers change. plot Name declares one, with key: value controls (Plots):

plot Trend
type: line
data: Readings |> select(Time, Value, Limit)
title: Value and limit
fit: straight
  • Sixteen kinds, each for a question about the data:
    • Change over a sequence: line, step, area, stacked and waterfall (how a total is built up).
    • Comparing and ranking: bar, hbar (a ranking with the names read in full) and hstacked.
    • Share of a whole: pie and donut.
    • Spread and distribution: histogram, box (quartiles, median and outliers) and candle (a Scientific value drawn as its uncertainty, or open, high, low and close).
    • Two or three variables at once: scatter, bubble (height and size) and heatmap.
  • Curve fitting. fit: straight draws the least-squares line through each series, fit: quadratic the least-squares parabola, each with its equation, and fit: bezier a smooth curve through the points. On a log axis (logx, logy) a fit is a power law or an exponential. Read a trend, a rate or a prediction straight off the chart.
  • Honest charts. A value with an uncertainty gets an error bar, a column of quantities shows its unit at the axis (units), and origin makes an axis reach zero so a bar is not flattered.
  • Where they appear. The app has a plot pane (F7) beside the sheet: a click on a line, a bar or a heatmap cell lights its row in the sheet, and the settings pane changes the kind, palette and controls. A report draws a plot as an SVG where {{ Name }} is written (Reports). examples/plots.omx and examples/plots-report.md have one of each kind.
  • Seven palettes, ticks, labels, legend, width and height, and keyboard navigation of the plot.

Units: convert anything

Omasheet reads and converts the units people actually use, metric or not. 5kg + 300g is 5.3kg, (26.2mi).to('km') is a marathon in kilometres, and a sum or comparison converts the right side to the unit of the left. A dimension that does not match is an error that says so. A column declared Length, Mass or Pressure takes cells in any unit of its kind and shows them all in one.

  • Imperial and US units, which have none of the SI's neat prefixes and so are the usual reason to reach for a calculator:
    • Length: in ft yd mi fur ftm chain rod thou pica point.
    • Mass: oz lb st cwt ton lton gr ozt dwt slug.
    • Volume: gal qt pt cup floz tbsp tsp bbl impgal imppint cord.
    • Area: ac.
    • Speed, force, pressure, energy and power: mph fps lbf ozf psi btu hp.
    • Temperature: °F and °R.
  • Metric units that are not SI, each an exact multiple of an SI unit:
    • Length: au ly ld pc Å and the nautical mile nmi with the knot kn. ly, pc and yr take prefixes, so kpc, Mly and Gyr work.
    • Mass: the carat ct, kt and Mt.
    • Area: are and barn.
    • Pressure and power: atm, torr and the metric horsepower mhp (hp is the mechanical one).
    • Angle: gon, rev and rpm.
    • Radiation: rem, Ci and R.
    • Other: the jansky Jy, the tog, the sverdrup and the nit.
    • Time: min, h, d, wk and yr.
  • Computing units for the new world of AI: tok, flop, op and px, each its own dimension, with the rates tok.s^-1, FLOPS, OPS, IOPS and bps, and prices such as 3USD.Mtok^-1.
  • Scales: 5ppm is the number 0.000005, and Decimal[.1f; ppm] shows it so.
  • The results have a kind. The product or quotient of two named quantities is the kind of its dimension: Force * Length is an Energy, Length / Speed a Duration. Roots work too, 8m^3 ** (1/3) is 2m.
  • Shown as the SI recommends, m⋅s⁻¹ and kg⋅m², and read in that form too.
  • The unit picker is regrouped by hand (SI Base, Data, Angle, Timespan, Magnitude, Mechanical, Physical, Thermal, Electromagnetic, Astronomical, Chemical, Contextual and Radiation).
  • Left out on purpose: cgs units, the rad of dose, g0, kgf and solid-angle deg².

Durations

A Duration is a kind of Quantity, for time. It reads ISO 8601 (PT1H30M), a quantity of time (139s, 90min) and a signed clock form (+11:30). Two dates or times subtract to one, Duration / Duration is a number, and a column can be shown by Duration[iso], Duration[%H:%M:%S] or any unit.

Stricter type laws

Every number type now has a literal form that shows its type: 1 is an Integer, 1/1 a Fraction, 1.0 a Decimal, 1e0 a Float, 1.0(00)e0 a Scientific and 1+0i a Complex. With no format a number is shown in full in that form, a column you declare is strict about what it holds, and the optional general format gives a rounded display with a · wherever it cuts. The laws are published at omasheet.org/type-laws, and the post The Laws of Type Display explains why. The change is breaking, see below.

In the app

  • One app, many files. A new or opened file is a window of its own in the running app, and Cmd+Q on a Mac closes them all. A second launch hands its file to the running app.
  • Copy sheet, Paste sheet in a sheet tab's right-click menu, as one undo step, with a warning for the constants, functions and sheets the file lacks.
  • Copy a reference by a click on the name at the left of the formula bar.
  • Style bar and formats: Ctrl+Shift+F pastes a format, Percent takes a format (Percent[.1f]), and Data[*B] picks binary prefixes. Money passes through derived sheets and CSV and XLSX.
  • Set panels cascade and Escape closes them one at a time, wider columns, custom functions are added and removed in the functions dialog, and code in a cell is set apart.
  • Sequences go on in Unicode order: 'α' ... 'ω'.
  • Fixed: a row picked by number from a calculated sheet, Top[Item; 0], was refused as out of range.

Breaking

  • Typed columns are strict. A cell, an import or a formula result must be of the column's type and nothing is converted for you: 1 in a Decimal column is an error, so write 1.0 or .Decimal(). An undeclared column mixes types.
  • Display: with no format a number is shown in full. The old round-to-three-places display is the general format, and an import declares its number columns with it. general shows e notation below 1e-9 and from 1e10.
  • Decimal has one scale, eighteen places with twenty digits before the point, and Decimal[n] is gone. A product or quotient is rounded once to eighteen places, a tie to even. A format only shows places, Decimal[.2f]; round a value with round(x, 2). A literal with more places is a Fraction.
  • Duration shows seconds by default, Duration[s] in its head with numbers in its cells, where it showed PT1H30M. Ask for the old form with Duration[iso].
  • .Quantity and .Duration are gone: a Duration is already a quantity of time.
  • A comment line is //, not #, because a # line is a heading in Markdown.
  • value() takes plain numbers and gives the base number without its uncertainty: 10.5(3)kg.value() is 10.5.
  • Computing units tok, flop, op and px are new dimensions, so an existing name that used one now means the unit.
  • A version of Omasheet from before plots stops at a plot line.