Skip to content

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Numlex

Numlex

A simple and elegant notepad-based calculator to create and manage sheets with real-time evaluation of mathematical expressions.

Architecture

Numlex is a native Swift 6 / SwiftUI macOS app (macOS 26, Liquid Glass). The calculation engine is a pure, evaluation-free domain parser in Sources/NumlexCore — no scripting, no web view.

  • Sources/NumlexCore/Engine/ — tokenizer, parser and evaluator. Grammar: parentheses, decimal numbers, unary +/-, + - * / ^ % (postfix percent), variables and name = expression assignments, headings (// Title), # notes. Strict errors instead of silent coercion; rounding respects settings.
  • Sources/NumlexCore/Engine/Conversions.swift — unit conversions (10 km to meter, 100 C to F, …) and currency USD/EUR/RUB via Rates.
  • Sources/NumlexCore/Services/ — JSON persistence in Application Support, live rates from the open.er-api.com endpoint (cached 1 h, 5 s timeout, offline-safe).
  • Sources/NumlexCore/Localization.swift — interface translations (en/ru/de/it/fr/ch).
  • Sources/NumlexApp/ — SwiftUI app: sidebar with sheet management (create, rename, delete, import/export .nlx), native NSTextView notebook editor with line numbers and syntax tinting, live results column with row alignment, settings scene (language, font size, line spacing, decimal places, rates).

Prerequisites

  • macOS 26 with Xcode Command Line Tools (xcode-select --install)
  • Swift 6 toolchain

Build

swift build            # debug
swift build -c release # release

Tests

The engine test suite is registered with Swift Testing (Tests/NumlexCoreTests) and shares its 35 cases with a standalone runner (Tests/NumlexTestKit).

swift test             # Swift Testing suite (full Xcode toolchain)
swift run NumlexTests  # standalone runner — works with Command Line Tools only

Package a .app bundle

Scripts/build-app.sh [debug|release]

Produces .build/Numlex.app (signed with an ad-hoc identity) and prints its path.

Releases

Used by

Contributors

Languages