Skip to content

0.2.0

Compare
Choose a tag to compare
@giann giann released this 26 Jul 22:13
· 309 commits to main since this release

A lot of work went into implementing the JIT compiler: first with LLVM then with MIR which was way faster at compiling. There's also a lot of new features, fixes and changes. See below.

Added

  • buzz has a homepage: https://buzz-lang.dev, a Discord and an actual VS Code extension
  • JIT compiler powered by MIR
  • mimalloc as the main allocator
  • Inline if
  • Ranges
  • any type
  • as? operator to safely cast something
  • http standard lib (with an HTTP client)
  • crypto standard lib (in progress)
  • list.pop, list.insert, list.forEach, list.reduce, list.filter, list.map, list.reduce, list.sort
  • pattern.replace, pattern.replaceAll
  • std.random
  • bz_call allows a native function to call a buzz function
  • --ast will dump a script AST in JSON
  • --check will check that a script compiles whitout running it
  • Shebang comment is allowed (#!/usr/bin/env buzz) at the start of a script

Changed

  • Main function signature must either be fun main([str] args) > void or fun main([str] args) > int, plus any required errors
  • Numbers are splitted in two types: int (32 bits integers) and float (64 bits floating points)
  • Some performance related changes
    • VM uses tail calls to dispatch opcode instead of a big switch
    • More specialized opcodes to avoid checking types at runtime
    • Some minor things...
  • Key can be omitted in foreach statements
  • buzz wil now search a library in a list of common directories
  • export can prefix declarations

Fixed

Too many to count...