Skip to content

Releases

FerroBASIC 0.1.2 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 21 Nov 22:29
53ffd49

A patch release on the way to M2, classes and events, and the first with prebuilt binaries. Recording run 24 (B4J 10.70, OpenJDK 19, Windows 10) answers the 39 Level 0 probes of #148: Null comparisons that B4J builds now build, a Map changed during For Each raises ConcurrentModificationException, and an undeclared read is reported with B4J's words.

Downloads:

  • Each release now carries ferro for six platforms, with SHA256SUMS listing every archive. Each archive holds only ferro (ferro.exe on Windows), LICENSE and THIRD-PARTY-NOTICES.txt. The archives are attached only after all six platforms pass their workspace and standalone conformance tests with the binary they ship.
    • Linux x64: ferro-0.1.2-linux-x64.tar.gz
    • Linux ARM64: ferro-0.1.2-linux-arm64.tar.gz
    • Windows x64: ferro-0.1.2-windows-x64.zip
    • Windows ARM64: ferro-0.1.2-windows-arm64.zip
    • macOS Apple Silicon: ferro-0.1.2-macos-arm64.tar.gz
    • macOS Intel: ferro-0.1.2-macos-x64.tar.gz
  • macOS binaries are signed ad hoc but not notarized: allow the first launch in System Settings, or run xattr -d com.apple.quarantine ferro. Windows binaries aren't code-signed, so SmartScreen may warn; they link the C runtime statically, so they need no Visual C++ Redistributable. Linux binaries are static (musl) and run on any distribution of their architecture; there is no 32-bit ARM build. Installation and checksum steps are in the README.

Language, as in B4J:

  • Reading a name nothing declares or assigns is reported with B4J's words: "undeclared variable Cuont is used before it was assigned any value". A call to an unknown name keeps "is not declared".
  • Null compared with a Boolean or a Char (b = Null, Null = c), on the left of an Int (Null = n), or with < next to an Int or a String builds, and raises B4J's error when it runs: RuntimeException for b = Null, NullPointerException for the other equalities, NumberFormatException for <. Neighbours no recording shows (<>, >, other number types) are refused as not known yet.
  • In Process_Globals, a read of a name before the untyped For Each that declares it builds, and gives Null. A read of a Type's or a built-in type's name before such a loop is refused until it is recorded.

Runtime, as in B4J:

  • Adding or removing a Map key while a For Each iterates its Keys or Values raises ConcurrentModificationException at the next item, as Java's LinkedHashMap does; replacing a value does not.

Recorded from B4J:

  • Recording run 24 also confirms what FerroBASIC already did: there is no escape for a literal ${ or "$ in a smart string (a \ or $ before ${ is an ordinary character, doubled braces and anything before "$ are refused); reads of undeclared names are refused; ten more keywords (Case, Continue, Else, End, Exit, Next, Private, Public, Return, Select) cannot be local variable names.
  • 358 conformance tests: 339 pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations; 13 probes wait for the next recording run.

Project:

  • The M2 plan and a draft spec of Levels 1 and 2 (modules, classes, events, resumable subs) are in docs/roadmap.md and docs/spec/level1.md.

Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md.

Known limitations:

  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels (M2 onward).
  • The REPL cannot load a file or interrupt a running program without ending it; the language server gives diagnostics only, and there is no editor extension.
  • REPL line editing was tested by hand on macOS and Windows only; automated terminal tests run on Linux only.
  • A NullPointerException has no message, where Java 19 writes one (#146, item 14).

Download a prebuilt binary from the assets below, or build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.1.1 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 16 Nov 13:32
0779a69

A patch release on the way to M2, classes and events. Recording runs 22 and 23 settle how And and Or rank against comparisons and where In and Each can be names. Case handling now follows JDK 19's Unicode 14 data and word boundaries. On macOS, ferro bundle no longer writes binaries that crash at start-up.

Tools:

  • On macOS, ferro bundle no longer writes a binary that crashes at start-up ("illegal hardware instruction") when the ferro executable has little Mach-O header space, as debug builds on macOS 27 do. ferro is linked with spare header space, and ferro bundle reports an error instead of writing such a binary (#131).
  • ferro-recorder records the original toolchain's refusal of a pending probe, and reports it for a decision on whether the probe becomes a negative test.

Runtime:

  • EqualsIgnoreCase, SortCaseInsensitive and SortTypeCaseInsensitive recognize supplementary Unicode case pairs, including Deseret. Case-insensitive comparison and ToUpperCase/ToLowerCase use Unicode 14 case data, as JDK 19 does (#115). The data comes from the Unicode Character Database 14.0.0 under the Unicode License v3 (Unicode-3.0), credited in THIRD-PARTY-NOTICES.txt.
  • ToLowerCase chooses the final sigma ς by JDK 19's word boundaries rather than Unicode's context: "A1Σ" lowercases to a1ς and "A:Σ" to a:σ (#140).

Recorded from B4J:

  • Comparisons bind tighter than And and Or (#127).
  • In and Each can name locals, module variables, parameters, Subs and For Each variables. Each cannot be a counted-loop variable, even when declared first or given a type (#137).
  • 306 conformance tests (B4J 10.70, OpenJDK 19, Windows 10): 300 pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations; none pending.

Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md.

Known limitations:

  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels (M2 onward).
  • The REPL cannot load a file or interrupt a running program without ending it; the language server gives diagnostics only, and there is no editor extension.
  • REPL line editing was tested by hand on macOS and Windows only; automated terminal tests run on Linux only.

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.1.0 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 14 Nov 12:21
6e255b3

FerroBASIC's first minor release: milestones M0 and M1 are complete. Level 0 programs (one module, the language core, List and Map) can be checked, run with the reference interpreter, built into standalone executables, explored in a REPL, and checked live in an editor through the language server. M2, classes and events, is next.

Tools:

  • ferro repl now edits lines and keeps a history on interactive terminals. Up and Down recall whole earlier submissions, multiline Subs and blocks included, to edit them; an edited buffer is checked and run as one submission. History holds up to 100 submissions in memory and is never written to disk. Piped input and terminals without editing support keep the plain reader, with the same output and exit codes as before. The keys for each platform are in docs/spec/cli.md.
  • ferro check names both declarations when a name in Process_Globals is declared by two Consts.

Recorded from B4J:

  • 287 conformance tests (B4J 10.70, OpenJDK 19, Windows 10): 281 pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations; none pending.

Project:

  • A logo, in light and dark versions.
  • Versions now follow the milestones: the release that completes a milestone raises the minor version.

Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md.

Known limitations:

  • Line editing was tested by hand on macOS (Terminal.app) and Windows 10 (Windows Terminal, part of conhost); automated terminal tests run on Linux only. iTerm2 is not tested yet.
  • The REPL cannot load a file or interrupt a running program without ending it; the language server gives diagnostics only, and there is no editor extension.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels.

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.7 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 08 Nov 16:08
b77783c

M1 is complete: FerroBASIC now has an interactive REPL and a language server, and recording run 21 (B4J 10.70, OpenJDK 19, Windows 10) answered the last pending tests.

Tools:

  • ferro repl starts an interactive Level 0 session. It runs statements, prints expressions, and accepts multiline blocks, Subs and Types. Variables and definitions persist between submissions, and :help, :cancel, :reset and :quit are control lines. Piped input works too. Walkthrough in docs/tutorial.md, section 9.
  • ferro lsp is a language server over stdio that publishes ferro check's diagnostics for open buffers, one module at a time. docs/language-server.md shows how to connect VS Code (through a generic LSP client) and Neovim.

Runtime, as in B4J:

  • A value held in an Object converts through its text, as B4J's BA.ObjectTo* helpers do: Null, a List or a Map to a number raise NumberFormatException; "1.5" to Long raises it too; a non-boolean to Boolean raises "Cannot parse"; to Char it takes the first character.

Language, as in B4J:

  • An untyped For Each in Process_Globals over a Type's name declares an Object variable.
  • A For Each over a collection typed Object is a build error.

Recorded from B4J:

  • 287 conformance tests: 281 pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations; none pending.

Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md.

Known limitations:

  • The REPL has no history or line editing; the language server gives diagnostics only, with no completion or hover, and there is no editor extension.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels.

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.6 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 05 Nov 09:20
babb9db

Level 0 is now settled by B4J itself in many more corners: recording runs 14 to 20 (B4J 10.70, OpenJDK 19, Windows 10) answered 131 pending tests, and FerroBASIC follows every answer.

Language, as in B4J:

  • Select Case x is a synonym of Select x, and Each may be a name.
  • An assignment to an undeclared name declares a String; a Sub without As returns a String, so Return <value> builds and its call has a value.
  • Dim o As Object with no value gives a new java.lang.Object (local, module variable, or a Type field after Initialize), compared by identity. Before, it was Null (deviation D8, now gone).
  • A For Each without As declares its variable an Object: over an undeclared name (a module variable in Process_Globals) or over any Object; over a variable of another type, or after an assignment or a read of the name, it is an error.
  • In Process_Globals, the declaration pairs B4J builds (two Dims, a Const and a Dim, two Int Consts) are one variable; a For counter declares an Int in source order; loops over a variable named like a Sub build wherever the variable's rules allow.

Runtime, as in B4J:

  • For evaluates its step, limit and start in B4J's order; Select evaluates every Case value before comparing.
  • < and > compare numbers, parsing a String; a number = Null raises NumberFormatException; a Char compared with a number takes the first character of its text.
  • A List used as a Map key keys by its contents; GetType of a record is <package>.main$_<name>.

Some programs 0.0.5 accepted are now errors, as B4J refuses them (listed in CHANGELOG.md).

Recorded from B4J:

  • 272 conformance tests pass against recordings, in the interpreter and as standalone binaries; 6 are documented deviations, and 2 pending probes wait for the next recording run.

Tools:

  • scripts/check-all.sh runs every check before a push; ferro-compare checks about 94,000 generated programs for what a change to the checker accepts or refuses.

Details in CHANGELOG.md; known differences from B4J (D1, D3–D7) in docs/deviations.md; open questions in docs/open-questions.md.

Known limitations:

  • A For Each over an Object that holds a number stops with an internal error instead of a Java exception, and converting an Object holding a List or Null to a number raises the wrong exception; both are next.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels. The REPL and the Language Server are next (M1).

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.5 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 28 Oct 19:25

Const arrives, and M0 is complete: more of Level 0 is settled against B4J itself (recording runs 12 and 13, B4J 10.70, OpenJDK 19, Windows 10), and FerroBASIC now refuses, with a precise message, any shape B4J has not been recorded on.

Language, as in B4J:

  • Const declarations (#33): every form (Private Const, Public Const, Dim Const, several names, the value before As, lower-case const), of any type, with any value, in Process_Globals or in a Sub. Without As a constant is a String. As in B4J, these are errors: assigning a constant, an item of an array constant or a field of a record constant; a loop over an Int constant; a constant without a value, with bounds or not; a Dim in a Sub with a module constant's name. In Process_Globals, an Int declared by a Const and by a Dim, each with a literal value, builds in either order, each setting its value in turn.
  • A real literal may start with its decimal point (.08), as in a real-world B4J project; it is a Double.

Recorded from B4J:

  • Loops over a variable named like a Sub: FerroBASIC settles exactly the combinations B4J recorded. Some of the other ones were accepted before and are now refused as open until they are recorded (listed in CHANGELOG.md).
  • 142 conformance tests pass against recordings, 6 are documented deviations, and 27 pending probes wait for the next recording run.

Projects:

  • ferro-project reads a whole project (project file, .b4j.meta, local and |relative| modules, any letter case of a module's file name), and writes each file back byte for byte. ferro check, run and bundle still accept only a project with no module (Level 0).

Details in CHANGELOG.md; known differences from B4J (D1–D7) in docs/deviations.md; open questions in docs/open-questions.md.

Known limitations:

  • Const shapes B4J has not been recorded on (for example a Dim with no value after a constant, or assigning a variable declared both ways) are refused until recording run 14.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels. The REPL and the Language Server are next (M1).

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.4 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 27 Oct 08:21

Level 0 checked against B4J itself: every passing conformance test now matches an output recorded from B4J 10.70 (OpenJDK 19, Windows 10), and the compatibility report says how close FerroBASIC is.

Recorded from B4J:

  • The new recorder (tools/recorder) builds and runs each test with B4J and keeps its output. 95 tests pass against recordings, none against hand-derived outputs any more; 6 are documented deviations and 4 wait for the next recording run.

Language, as in B4J:

  • Names follow B4J's rules: a loop variable may have a Sub's name (and every use then calls the Sub), while a Dim or a typed For with a Sub's name is an error; a local Dim with a module variable's name and type is that variable; a parameter cannot hide a module variable.
  • A For with an undeclared counter, and For Each v As T, work in Process_Globals.
  • A comment may follow a line continuation.
  • Arithmetic in an operand of & ("x" & 1 + 2) asks for parentheses; a main module without Sub Process_Globals, or an array of 2 dimensions or more where a List is expected, is an error.
  • Const, x Is T, Wait For and inline Java get one precise error each.

Runtime, as in B4J:

  • Null as a String is the text "null"; records print a line break after every third field.
  • SortType takes the field from the first item; LastException is the innermost cause; changes through a stale SubList view raise UnsupportedOperationException (#21).

Testing and tools:

  • ferro-difftest runs the conformance tests in the interpreter or as standalone binaries and prints the compatibility report, by level and feature.
  • A real-world corpus of six open source B4J console projects, referenced by URL, commit, licence and SHA-256 (never copied) and fetched for its tests: every source round-trips through the lossless syntax tree.

Details in CHANGELOG.md; known differences from B4J (D1–D7) in docs/deviations.md.

Known limitations:

  • Const is not supported yet (#33).
  • Number literals with no leading digit (.08) are a syntax error.
  • Classes, other modules, libraries other than jCore, DateTime, Sleep and Wait For arrive at later levels.

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.3 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 24 Oct 09:27

Projects, licence notices and CI for Level 0 (one code module, the language core, List, Map, StringBuilder and Type records).

Projects:

  • A B4J console project (.b4j), or the folder that holds it, is an input of ferro check, run and bundle. Anything Level 0 cannot run (a UI app, another library, module or file) is an error at its line of the project file, instead of being silently ignored.
  • ferro bundle MyApp writes the program into the project's folder (MyApp/MyApp), wherever it runs from; a single module's program still goes in the current folder.
  • A class module is an error that says so.

Licences:

  • ferro licenses prints FerroBASIC's licence and the notices of the third-party code inside ferro and every bundled program. Include them when you distribute a program: ferro licenses > NOTICES.txt.

Testing and documentation:

  • CI on Linux, Windows, macOS (Apple Silicon and Intel) and a static Linux build; ferro run and ferro bundle are now tested on Windows.
  • New conformance tests for String, StringBuilder, List and Map members, maths, Bit, characters, integers, seeded Rnd and exit codes.
  • docs/language-support.md lists what is supported today and what is not yet.

Details in CHANGELOG.md; known differences from B4J in docs/deviations.md.

Known limitations:

  • Changes through a stale SubList view raise the wrong exception (#21).
  • Const, Is, Wait For and inline Java get a generic syntax error instead of a precise one (#32); Const is not supported yet (#33).

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.2 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 20 Oct 06:21

Hardening and Java exactness for Level 0 (one code module, the language core, List, Map, StringBuilder and Type records).

Command line:

  • ferro build is now ferro bundle (build is reserved for whole projects).
  • ferro version and ferro help show the version and platform.
  • ferro bundle now works on macOS (Apple Silicon, and Intel through Rosetta).
  • ferro never overwrites its input and no longer crashes on invalid bytes, pipes or closed output.

Behaviour:

  • Deep nesting, deep or large data, and running out of memory give clear errors instead of crashes.
  • Numbers print with Java's exact digits, NumberFormat included; ASin, ACos, ATan and ATan2 match Java bit for bit.
  • Multi-dimensional arrays are arrays of rows, as in Java; Select on an Object, GetKeyAt, Bit.ParseInt, IsNumber and AddAll now behave as in B4J.
  • FerroBASIC is now MIT-licensed.

Details in CHANGELOG.md; known differences from B4J in docs/deviations.md.

Known limitations:

  • ferro bundle is untested on Windows.
  • There is no CI yet.
  • Changes through a stale SubList view raise the wrong exception (#21).

Build from source with cargo build --release -p ferro-cli.

FerroBASIC 0.0.1 (pre-alpha)

Pre-release

Choose a tag to compare

@FeliceMente FeliceMente released this 18 Oct 19:40

Level 0 of a B4X-compatible BASIC: one code module, the language core, List, Map, StringBuilder and Type records.
ferro check, ferro run (reference interpreter), and ferro build, which bundles the program with the interpreter into a standalone executable.
Spec, conformance tests and a tutorial: docs/tutorial.md.

Known limitations:

ferro build does not work on macOS yet (the fix is in progress).
Windows is untested.
There is no CI yet.
Build from source with cargo build --release -p ferro-cli.