Repository navigation
Releases
FerroBASIC 0.1.2 (pre-alpha)
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
ferrofor six platforms, withSHA256SUMSlisting every archive. Each archive holds onlyferro(ferro.exeon Windows),LICENSEandTHIRD-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
- Linux x64:
- 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
Cuontis used before it was assigned any value". A call to an unknown name keeps "is not declared". Nullcompared 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:RuntimeExceptionforb = Null,NullPointerExceptionfor the other equalities,NumberFormatExceptionfor<. Neighbours no recording shows (<>,>, other number types) are refused as not known yet.- In
Process_Globals, a read of a name before the untypedFor Eachthat declares it builds, and givesNull. A read of aType'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 Eachiterates itsKeysorValuesraisesConcurrentModificationExceptionat the next item, as Java'sLinkedHashMapdoes; 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,SleepandWait Forarrive 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
NullPointerExceptionhas 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)
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 bundleno longer writes a binary that crashes at start-up ("illegal hardware instruction") when theferroexecutable has little Mach-O header space, as debug builds on macOS 27 do.ferrois linked with spare header space, andferro bundlereports an error instead of writing such a binary (#131). ferro-recorderrecords 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,SortCaseInsensitiveandSortTypeCaseInsensitiverecognize supplementary Unicode case pairs, including Deseret. Case-insensitive comparison andToUpperCase/ToLowerCaseuse 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.ToLowerCasechooses the final sigmaςby JDK 19's word boundaries rather than Unicode's context:"A1Σ"lowercases toa1ςand"A:Σ"toa:σ(#140).
Recorded from B4J:
- Comparisons bind tighter than
AndandOr(#127). InandEachcan name locals, module variables, parameters, Subs andFor Eachvariables.Eachcannot 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,SleepandWait Forarrive 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)
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 replnow 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 checknames both declarations when a name inProcess_Globalsis declared by twoConsts.
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,SleepandWait Forarrive at later levels.
Build from source with cargo build --release -p ferro-cli.
FerroBASIC 0.0.7 (pre-alpha)
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 replstarts an interactive Level 0 session. It runs statements, prints expressions, and accepts multiline blocks, Subs andTypes. Variables and definitions persist between submissions, and:help,:cancel,:resetand:quitare control lines. Piped input works too. Walkthrough in docs/tutorial.md, section 9.ferro lspis a language server over stdio that publishesferro 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
Objectconverts through its text, as B4J'sBA.ObjectTo*helpers do:Null, aListor aMapto a number raiseNumberFormatException;"1.5"toLongraises it too; a non-boolean toBooleanraises "Cannot parse"; toCharit takes the first character.
Language, as in B4J:
- An untyped
For EachinProcess_Globalsover aType's name declares anObjectvariable. - A
For Eachover a collection typedObjectis 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,SleepandWait Forarrive at later levels.
Build from source with cargo build --release -p ferro-cli.
FerroBASIC 0.0.6 (pre-alpha)
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 xis a synonym ofSelect x, andEachmay be a name.- An assignment to an undeclared name declares a
String; a Sub withoutAsreturns aString, soReturn <value>builds and its call has a value. Dim o As Objectwith no value gives a newjava.lang.Object(local, module variable, or aTypefield afterInitialize), compared by identity. Before, it wasNull(deviation D8, now gone).- A
For EachwithoutAsdeclares its variable anObject: over an undeclared name (a module variable inProcess_Globals) or over anyObject; 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 (twoDims, aConstand aDim, twoIntConsts) are one variable; aForcounter declares anIntin source order; loops over a variable named like a Sub build wherever the variable's rules allow.
Runtime, as in B4J:
Forevaluates its step, limit and start in B4J's order;Selectevaluates everyCasevalue before comparing.<and>compare numbers, parsing aString; a number= NullraisesNumberFormatException; aCharcompared with a number takes the first character of its text.- A
Listused as aMapkey keys by its contents;GetTypeof 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.shruns every check before a push;ferro-comparechecks 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 Eachover anObjectthat holds a number stops with an internal error instead of a Java exception, and converting anObjectholding aListorNullto a number raises the wrong exception; both are next. - Classes, other modules, libraries other than jCore,
DateTime,SleepandWait Forarrive 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)
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:
Constdeclarations (#33): every form (Private Const,Public Const,Dim Const, several names, the value beforeAs, lower-caseconst), of any type, with any value, inProcess_Globalsor in a Sub. WithoutAsa constant is aString. 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 anIntconstant; a constant without a value, with bounds or not; aDimin a Sub with a module constant's name. InProcess_Globals, anIntdeclared by aConstand by aDim, 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 aDouble.
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-projectreads 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,runandbundlestill 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:
Constshapes B4J has not been recorded on (for example aDimwith 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,SleepandWait Forarrive 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)
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
Dimor a typedForwith a Sub's name is an error; a localDimwith a module variable's name and type is that variable; a parameter cannot hide a module variable. - A
Forwith an undeclared counter, andFor Each v As T, work inProcess_Globals. - A comment may follow a line continuation.
- Arithmetic in an operand of
&("x" & 1 + 2) asks for parentheses; a main module withoutSub Process_Globals, or an array of 2 dimensions or more where aListis expected, is an error. Const,x Is T,Wait Forand inline Java get one precise error each.
Runtime, as in B4J:
Nullas aStringis the text "null"; records print a line break after every third field.SortTypetakes the field from the first item;LastExceptionis the innermost cause; changes through a staleSubListview raiseUnsupportedOperationException(#21).
Testing and tools:
ferro-difftestruns 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:
Constis not supported yet (#33).- Number literals with no leading digit (
.08) are a syntax error. - Classes, other modules, libraries other than jCore,
DateTime,SleepandWait Forarrive at later levels.
Build from source with cargo build --release -p ferro-cli.
FerroBASIC 0.0.3 (pre-alpha)
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 offerro check,runandbundle. 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 MyAppwrites 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 licensesprints FerroBASIC's licence and the notices of the third-party code insideferroand 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 runandferro bundleare 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 Forand inline Java get a generic syntax error instead of a precise one (#32);Constis not supported yet (#33).
Build from source with cargo build --release -p ferro-cli.
FerroBASIC 0.0.2 (pre-alpha)
Hardening and Java exactness for Level 0 (one code module, the language core, List, Map, StringBuilder and Type records).
Command line:
ferro buildis nowferro bundle(buildis reserved for whole projects).ferro versionandferro helpshow the version and platform.ferro bundlenow works on macOS (Apple Silicon, and Intel through Rosetta).ferronever 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,
NumberFormatincluded;ASin,ACos,ATanandATan2match Java bit for bit. - Multi-dimensional arrays are arrays of rows, as in Java;
Selecton anObject,GetKeyAt,Bit.ParseInt,IsNumberandAddAllnow behave as in B4J. - FerroBASIC is now MIT-licensed.
Details in CHANGELOG.md; known differences from B4J in docs/deviations.md.
Known limitations:
ferro bundleis 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)
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.