Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 16 Oct 22:26
· 242 commits to main since this release

Install

curl -fsSL https://raw.githubusercontent.com/orelang/ore/main/install.sh | sh

or brew install orelang/tap/ore; then ore update keeps it up to date.
Each archive carries its LLVM and lld.

For File
Linux x86-64 ore-v0.4.1-linux-amd64.tar.gz
Linux arm64 ore-v0.4.1-linux-arm64.tar.gz
macOS arm64 ore-v0.4.1-darwin-arm64.tar.gz
VS Code extension ore-vscode-v0.4.1.vsix
Zed extension ore-zed-v0.4.1.zip

The editor extensions run ore lsp, so ore must be on PATH. VS Code:
install "Ore" (orelang.ore) from the Marketplace or Open VSX, or
code --install-extension ore-vscode-v0.4.1.vsix. Zed: unzip
ore-zed-v0.4.1.zip and pick its directory in zed: install dev extension
(Zed builds it with Rust, which must be installed with rustup).

What is in 0.4.1

JavaScript's Date as a global class, and checker fixes.

  • Date is a global class, JavaScript's, written in Ore
    (runtime/core/date.ore): the constructors (new Date(), new Date(ms),
    new Date("2024-10-15T12:00Z"), new Date(2024, 9, 15, 12)), the
    statics Date.now(), Date.parse and Date.UTC, the getters and
    setters in local time and in UTC with fields out of range carrying over,
    toISOString, toJSON, toString, toDateString, toTimeString,
    toUTCString and toLocale*String (en-US, the only locale). Invalid
    dates have a NaN time value and toISOString panics with RangeError: Invalid time value. Local time comes from TZ or /etc/localtime,
    read from the TZif files of /usr/share/zoneinfo with their POSIX rules,
    and UTC without them. Date.parse reads the ECMAScript format and, as
    V8, what toString and toUTCString print and the common other forms.
    console.log prints a date as Node does, and JSON.stringify writes it,
    as its ISO string.
    Date.now() is still an int.
  • Generic classes can have static fields, class Box<T> { static count = 0 }:
    one for all instances, as in TypeScript, initialized where the class is
    declared, and read, assigned and updated from anywhere, its static and
    instance methods too. Their types cannot name the class's type
    parameters (ORE3082); ORE3079 is no longer reported.
  • The condition of a for narrows its update clause too, as in TypeScript,
    unless the body assigns the variable: for (let at = list; at !== null; at = at.next) no longer reports that at may be null.
  • typeof of a top-level const works in annotations: after the
    constant for any initializer (let x: typeof name with const name = "ore"), and before it, as in function signatures, when the initializer
    is made of literals, a template literal, new C(...) of a class that is
    not generic, or the name of another such constant.