Skip to content

Releases: skx/gobasic

release-1.4

09 Nov 05:34
@skx skx
Compare
Choose a tag to compare

This release makes some minor improvements to the handling of FOR-NEXT loops:

  • The increment of a loop can now be fractional as per #63:
    • FOR I=1 TO 2 STEP 0.1
  • The termination condition uses a little rounding to mask float-based drifting.

As a result of fuzz-testing we've also improved the parsing of FN, NEXT, and STEP tokens (#65, #66, #67).

Finally the PRINT statement will accept ; as being synonymous with ,, which eases porting programs written for BBC BASIC.

release-1.3

03 Nov 09:33
@skx skx
Compare
Choose a tag to compare

This release makes minor tweaks to remove/fix warnings produced by golint, go vet & etc.

Nothing significant was changed, internally or externally, although a couple of our examples were given minor fixes and we've added a new graphics example (drawing a random number of randomly coloured lines.)

release-1.2

01 Nov 05:13
@skx skx
Compare
Choose a tag to compare

New Features

  • We now support DATA + READ.
    • See examples/35-read-data.bas for a simple example, and the HTTP-server example for more complete version which draws an image of a skull and bones!
  • ^ can now be used to raise integers to an arbitrary power. (e.g. "2 ^ 3 => 8".)
  • We support the XOR binary & logical operator.
  • We implemented support for the definition of user-defined functions DEF FN, and calling them via FN.
  • 100% test coverage of our builtin functions!

BugFixes

  • SQR now errors, as it should, when given a negative number.
  • Our string-primitives now support UTF8 input correctly
    • LEFT$, RIGHT$, MID$, TL, and LEN.

Breaking changes:

  • The API for embedding builtins changed, again, sorry. The first argument is now an interface{}, rather than instance of the Interpreter.
    • See embed/main.go or goserver/main.go for updated usage.

release-1.1

28 Oct 02:52
@skx skx
Compare
Choose a tag to compare

New Features

The IF statement has been updated as a result of #42 to allow testing for non-zero, and non-empty strings. For example:

10 LET a = 3
20 IF a THEN PRINT "OK - a is not zero, or not an empty string"

BugFixes

  • As a result of fuzz-testing several potential crashing-bugs have been prevented.
  • The PRINT statement has been moved from the core of the interpreter loop to builtins.go.
    • This improves the argument parsing such that 10 PRINT 3 + 4 * 5 works as expected.
    • This was as a result of #41

Breaking changes:

  • None

release-1.0

27 Oct 09:33
@skx skx
Compare
Choose a tag to compare

New Features

  • Error messages will (largely) show the appropriate line-number at which they were encountered.

BugFixes

  • Builtins are correctly handled when too few arguments are present.
  • Builtins now receive the result of evaluating expressions, rather than being forced to do the work themselves.
  • If a FOR loop is not terminated at exit-time that will be reported.
  • The RND builtin will abort cleanly if given a number less than one.

Breaking changes:

  • Due to the way arguments are evaluated it might be that some programs need to be updated.

For example this statement has been updated to add ( + ) around a$:

10 LET l = LEN(a$) - 1

release-0.9

26 Oct 02:49
@skx skx
Compare
Choose a tag to compare

New Features

  • The new builtin VAL is available
  • The gobasic intepreter now has a -trace=[true|false] command-line option.

Breaking changes:

  • Our internal API has been updated to change the signature of the builtin-function.
  • The example programs which embed the interpreter have updated to match (embed/main.go + goserver/main.go).

BugFixes

  • The STR$ function has been updated to require only a single argument, previous two were required in error.
  • The handling of changed builtins is now significantly improved. For example see the chained calls here.

release-0.8

23 Oct 17:02
@skx skx
cedca9c
Compare
Choose a tag to compare

This release was all about error-detection:

  • Now the interpreter will output error-messages in more places than in the past.
  • Errors will be caught gracefully, and they will be returned to the caller.
  • The gobasic-server benefits from this especially
    • As it can now show errors, in addition to any output image you've created.

Otherwise the only real new feature was the update of the gobasic server to be standalone, and have a bunch of built-in samples. It also gained the ability to draw lines, via LINE.

NOTE: release-0.7 was made in error - I forgot to git pull before I ran git tag.. - so I've removed it.

release-0.6

22 Oct 17:02
@skx skx
Compare
Choose a tag to compare

This release updates the bundled goserver command to be fully standalone, and relocatable, because the file that it servers is now embedded inside the binary via implant.

In addition to being relocatable the goserver now also includes some simple example-scripts which make it easier to see how you might use it.

The core basic-interpreter gained the ability to use AND and OR inside conditional-tests, and also the ability to use AND, BIN and OR as operators themselves. These are demonstrated in the examples:

There were some minor bugfixes made, for example in the case of a FOR loop where the starting index and terminating index are identical only one iteration will be made, rather than an infinite number. Handling GOSUB inside an IF statement also works correctly now.

release-0.5

21 Oct 11:51
@skx skx
Compare
Choose a tag to compare

New Features

  • We've now implemented string support
  • String-specific functions are now present, and documented:
    • CHR$
    • CODE
    • LEFT$
    • LEN
    • MID$
    • RIGHT$
    • TL$
  • INPUT now allows reading either a string or an integer.

Breaking changes:

  • Our internal API has changed, since we support more than just integers.
  • RND now requires an argument.

release-0.4

20 Oct 17:11
@skx skx
Compare
Choose a tag to compare

100% consistency in how custom-functions are handled vs. variables.

New release, even with just a single change, because the signature of the builtin-function has changed. Best get the pain over with before we're popular!