Skip to content

FerroBASIC 0.1.2 (pre-alpha)

Pre-release
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.