Changelog

Release notes for SUB. This page mirrors docs/RELEASE_NOTES.md in the repository — that file is the authoritative source. Each release includes all three tools: subi (interpreter), subc (native compiler), and sub (transpiler).

Unreleased

Added

  • New stdlib modules: path (path_join, dirname, basename, extension, stem, is_absolute, normalize), format (fmt, pad_number, repeat_char, table_row, table_rule), testing (assert, assert_eq, assert_ne, assert_true, assert_false, test, summary), encoding (hex_encode, hex_decode, url_encode), collections (set_union, set_intersection, set_difference, set_has, peek, peek_front)
  • math: sign_float, clamp_float, modulo, cbrt
  • strings: is_alpha, is_digit, is_numeric, snake_case, camel_case, slugify, escape_html, indent, is_palindrome, common_prefix, common_suffix
  • io: progress, plain

Fixed

  • Parser now returns NULL on syntax errors; sub/subc/subi abort with a non-zero exit instead of generating output
  • append() is now recognized by semantic analysis (an undocumented alias for push())
v1.0.11

Fixes the Windows regression-test failures (the C backend and the net checks disagreed with Windows' C type model).

C backend on LLP64

Windows' C compiler is LLP64: long is 32-bit there, while Linux and macOS are LP64 where long is 64-bit. The C backend used long everywhere, so subc --via-c silently truncated 64-bit integers on Windows. The emitted C now uses long long for every SUB integer, which is 64-bit on all three platforms.

Networking checks on Windows

net_fetch/net_post are POSIX-socket builtins; the Windows build compiles them to the documented runtime-error stub. The test suite now asserts the stub's behaviour on Windows (and skips, with a reason, the loopback flow the hosted macOS runners' firewall blocks) instead of failing checks that were never meant to run there.

v1.0.10

FreeBSD is now a first-class release platform.

  • pkg(8) package (installer/bsd/build-txz.sh): sub-lang-<version>-amd64.pkg, installed with sudo pkg install ./sub-lang-*-amd64.pkg. Native manifest with file digests, tools in /usr/local/bin, stdlib in /usr/local/lib/sub/stdlib where import looks for it, and man pages.
  • The release workflow builds it on a real FreeBSD 14 VM (vmactions) with base clang (gmake CC=cc), and verifies the package layout after packing.
  • subc on FreeBSD compiles through the C backend (subc --via-c); the direct machine-code emitter is x86-64 Linux ELF only. subi and sub work everywhere.
  • The universal installer/install.sh now detects FreeBSD and pulls the sub-freebsd-x86_64 archive from the latest release.
v1.0.9

Installers. Every supported platform now has a package that installs the toolchain properly instead of an archive to unpack by hand, and each one is built, inspected and installed by CI on every push.

Windows

The .msi carries the project's own artwork: the dragon on the welcome and finish pages, the logo in the banner across every other page. .sb files get an icon — the association pointed at subi.exe for its icon, and MinGW links the executables with no resource section, so Explorer drew the blank generic document. The installer now ships sub-lang.ico and points the association at that.

Linux Packages & Formats

  • .deb for Debian, Ubuntu, Mint and derivatives, on x86-64 and arm64.
  • .rpm for Fedora, RHEL, CentOS Stream, openSUSE and derivatives, on x86-64 and aarch64, with the matching .src.rpm.
  • Arch Linux PKGBUILD (installer/arch/PKGBUILD) — build with makepkg -si.
  • Alpine Linux APKBUILD (installer/alpine/APKBUILD) — build with abuild -r.
  • AppImage (installer/appimage/build-appimage.sh) — standalone universal Linux binary.
  • Universal Shell Installer (installer/install.sh):
    curl -fsSL https://raw.githubusercontent.com/subhobhai943/sub-lang/main/installer/install.sh | sh

All Linux packages install sub, subc and subi, the standard library, man pages for all three tools, and desktop entry and MIME types with logos so .sb files show the SUB icon in file managers and offer the interpreter to open them.

The .deb was installing into /usr/local, which Debian policy reserves for the local administrator. It installs into /usr now, with stripped binaries and clean lintian validation.

macOS

A .pkg installer, with the welcome page, licence agreement and summary that productbuild gives you, over the project's artwork. It installs into /usr/local, which is on the default PATH. It declares itself Apple Silicon only, so an Intel Mac refuses it with an explanation rather than installing three programs that cannot run.

One recipe for the file layout

make install is now what every Unix package is built from — the .deb, the .rpm and the .pkg all stage through it. New targets: make install-tools, install-doc and install-desktop for the three parts separately, and PREFIX, BINDIR, LIBDIR, DATADIR, MANDIR, DOCDIR and ICONDIR to place them.

Packaging is tested now

A reusable workflow builds the .deb and the .rpm on both architectures on every push. It runs lintian at error and warning level, then installs the .deb for real, runs a program that imports from the standard library from outside the source tree, transpiles and compiles it, checks the manual pages and icons arrived, removes the package and checks nothing was left behind. The macOS job installs the .pkg with installer -pkg and does the same.

Everything the installers draw is generated from the logo in the README by installer/assets/make-assets.py, so the artwork cannot drift.

Also

  • The MIT licence text shipped in every release said AUTHORDRS. Fixed in LICENSE and in the copy the Windows installer shows.
  • sub, subc and subi are clean under AddressSanitizer and UndefinedBehaviorSanitizer across the whole conformance suite and every example.
v1.0.8

The stable release of the v1.0.8 line. Most of the work since the betas is in making one SUB program mean the same thing however you run it.

subc compiles to machine code itself

On x86-64 Linux subc no longer needs a C compiler. It encodes x86-64 instructions, emits its own runtime and writes a static ELF64 executable, in one process — no assembler, no linker, no libc. examples/fibonacci.sb becomes a 3.6 KB static binary instead of a 16 KB dynamically linked one.

Programs using something the machine-code backend does not implement yet (objects, classes, input(), string slicing, try/catch, switch, do/while) still build through the C backend, and subc names the construct that forced the fallback. --native refuses to fall back; --via-c forces the old path.

Arrays work everywhere

Literals, indexing, indexed assignment, len, push/append, pop and for x in a now behave the same in all eleven executed backends. Before this, arrays were broken in every one of them, each differently.

One answer per question

  • Division by zero is a runtime error with exit status 70, for integers and floats alike.
  • Integer division truncates toward zero and float remainder follows fmod, everywhere.
  • Floats print with six significant digits (printf's %g).
  • Array indices count from the end when negative, and going out of range is an error rather than a silent null.

Fixed

  • The interpreter segfaulted on let b = a followed by push(b, x) — two bindings shared one array and both freed it.
  • The Windows build had never worked. <windows.h> declares a TokenType that collides with SUB's.
  • subc refused every absolute path on Windows, because it built a shell command string and rejected the colon in a drive letter. It spawns the compiler directly now, so paths with spaces work too.
  • Java declared SUB's 64-bit integers as int, and for x in <collection> had no case at all — the loop silently ran ten times over nothing.

Older Releases

For releases before v1.0.8, see the GitHub Releases page.