Skip to content

Releases: daniero/braingasm

The $ prefix

10 Jun 16:14
Compare
Choose a tag to compare

New features

  • Added the $ prefix which returns the value of the current cell
  • The r (random) prefix now takes up to two optional prefixes:
    • Without prefixes it returns a random number between 0 (inclusive) and 256 (exclusive)
    • With one integer prefix n it returns a random number between 0 (inclusive) and n (exclusive)
    • WIth two integers n and m it returns a random number between n (inclusive) and m (inclusive)

Minor fixes

  • The p (parity) and o (oddity) prefixes now work with two integer prefixes also when the last one is not an integer literal: 3#p will return 1 or 0 depending on whether 3 is divisible by the current tape position

New behaviour of prefixes s, p and o

27 May 15:29
Compare
Choose a tag to compare

Breaking changes

  • Prefix s now by default evaluates the current cell, not the last change of a cell:
    s: will print 1 of the current cell value is negative (signed), 0 otherwise

  • Given an integer literal, prefixes p and o will return the parity or oddity with the given integer as base:
    3p: will print 1 if the current cell value is divisble by 3.
    #5o: will print 1 if the current position on the tape is not divisible by 5.

New features

  • Prefix s now itself takes an optional integer prefix:
    #s: will print 1 if the datapointer has moved to the left of the original start position (i.e, the position on the tape is negative)

A bunch of new features

26 May 16:55
Compare
Choose a tag to compare

Breaking changes

  • Registers z and p now by default evaluates the current cell, instead of the last updated cell.
  • The p prefix now returns 1 if the value is even, and 0 if it's odd, instead of the opposite.
  • The cells on the tape are no longer limited to 8 bits by default; They can contain arbitrarily large values, and the values may be negative

New features

  • The o prefix which returns 1 if the given value is odd, or 0 otherwise
  • The s prefix, which returns 1 if the given value is negative (signed).
  • The * instruction which doubles the value of the current cell, or multiplies it with the given amount, if any
  • The / instruction which halves the value of the current cell, or divides it by the given amount, if any
  • the Q instruction which quits the program if the given parameter is non-zero
  • String literals! Works with instructions such as and .
  • The L instruction which limits the tape length and makes the datapointer wrap around to the other end
  • Minor tweaks and techical improvements

First braingasm features

24 Sep 14:42
Compare
Choose a tag to compare

This relase contains some of the first non-brainfuck features of the
braingasm language:

  • The ; instruction, which reads an integer from the input
  • The : instruction, which prints the current cell as an integer
  • Instruction prefixes, which changes the number of times an instruction
    is performed, or alters its behaviour. Prefixes added:
    • Numbers
    • #, the current cell number
    • r, a random number
  • Registers, which are updated whenever a cell is updated and can be
    used as prefixes:
    • z returns 1 or 0 depending on whether the new value of the cell is
      zero or not
    • p returns the least significant bit of the new value

Fixed runtime dependencies

29 Aug 20:33
Compare
Choose a tag to compare

The runtime dependencies were goofed up. This fix makes sure everything is installed when doing gem install braingasm

Improved brainfuck features

21 Aug 20:16
Compare
Choose a tag to compare

This version of Braingasm does not come with any new language features over
standard brainfuck, but the implementation has a few changes and improvements:

  • The tape length is unbound in both directions
  • The values of the cells stay within the range 0 - 255 by default
  • Command line options have been added for
    • setting other cell sizes than the default
    • turning off cell wrapping, allowing arbitrarily large cell values
    • selecting input behaviour when reaching EOF.

All in all this should be quite a sturdy brainfuck implementation (but not
necesarrily a blazingly fast one)

A working brainfuck interpreter

21 Aug 20:49
Compare
Choose a tag to compare

This first version of Braingasm is a fully working brainfuck interpreter, with exactly zero
other features.