Skip to content

travisdoor/bl

Repository files navigation

About

Windows Linux macOS

Twitter URL

The Biscuit Language (BL) is a simple imperative programming language using LLVM backend and compiler implemented in C. Language syntax and all its features are still in development. Biscuit is designed to be simple, fast, and explicit.

Language design and some core principles are based on the hard work of Jonathan Blow, who, over the past few years, has been working on the JAI programming language. You can watch his streams on Twitch. I liked the idea of C++ replacement a lot from the beginning, and since Blow's project is not publicly available, I've started implementing my own language from scratch.

Features

  • Strongly typed.
  • Embedded rich runtime type information.
  • Polymorphic functions and structures (generics).
  • Simple structure inheritance.
  • Compile-time execution (experimental).
  • Compile-time function arguments; allow passing types as values (experimental).
  • C ABI compatible (C library functions can be directly called).
  • Runtime debugging is possible in Visual Studio/gdb/lldb.
  • Explicit function overloading.
  • Integrated build system.
  • Module management.
  • Unit testing system.
  • Automatic documentation generation.
  • Defer statement.
  • Multiple return values.
  • Custom memory allocators.
  • Basic support for game development via extra packages.
  • Supports Windows, Linux and macOS.
  • Nested functions.
  • And more...

Installation

See the installation guide here.

Example

HelloWorld :: struct {
    hello: s32;
    world: s32;
};

main :: fn () s32 {
    info :: cast(*TypeInfoStruct) typeinfo(HelloWorld);

    loop i := 0; i < info.members.len; i += 1 {
        print("% ", info.members[i].name);
    }
    print("!!!\n");

    return 0;
}

See more examples here.

Authors

  • Martin Dorazil (travis)
  • Gmos

Discord Server

https://discord.gg/DDTCcYzb9h

Projects Using BL

Tine Text Editor

Text editor I use.

Vulkan Renderer & The Game

Screenshot of an unnamed 3D experimental game created using BL.

Video

Space Shooter

Contribution

Please follow the instructions on wiki.

Links