GithubHelp home page GithubHelp logo

davidskrundz / b Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 471 KB

🅱️ is a low level language

License: GNU Lesser General Public License v3.0

Makefile 1.51% Limbo 98.10% Brainfuck 0.39%
b-lang b language programming-language

b's Introduction

🅱️

It's like C, but 🅱️etter™️. (Actually worse in every way)

Requirements

macOS
  • Install command line developer tools (Xcode)
  • Install brew
  • brew cask install mactex
Ubuntu
  • sudo apt-get install texlive-full
Windows
  • No idea™️

Building

(Optional) Documentation:

cd docs
make

Bootstrap the compiler (bin/bc):

git checkout bootstrap
./bootstrap.sh [--update] [--keep-old]

While developing:

make clean    # Remove build/
make          # Build stage1, stage2, and the new bc
make test     # Run the new bc against the test cases
make install  # Copy build/bc to bin/bc (if the tests pass)

Things to do

  • Add associated functions to enums (similar to values, looked up with symbols)
  • Rewrite resolveExpressionDot to handle Enum.Case, Struct.Field, and struct.field
  • resolveExpressionArrow should dereference the value then call resolveExpressionArrow

Things to do (eventually)

  • Rvalue/Lvalue (warn about write-only variables)
  • Overload functions (with swift labels?)
  • Unions + nested struct/union
  • Allow . to get a struct field (currently only -> on a pointer works)
  • Allow Struct.Field to resolve the symbol of that field for use in sizeof and offsetof
  • Custom operators implemented as functions
  • Allow keywords to be used as second-level identifiers (enum cases, struct fields, ...)
  • Static arrays (lookup tables)
  • Integer conversion for literals
  • Convert the C codegen into a module to allow multiple targets
  • Escape characters for string and character literals
  • Automatic conversion to and from Void*, Void**, etc.
  • Ensure all paths in a function returns
  • Add @noreturn attribute
  • Unused declaration detection
  • Add let keyword to prevent mutation
  • for loops
  • Fix C codegen to allow having structs in struct (only pointer work now)
  • Floating point number support
  • Support inlined functions
  • Represent the Int family as structs that wrap hidden primitives (eg. __builtin_int)
  • Line comments
  • Block comments (with nesting)
  • Improve VSCode plugin with compile/debug/autocompletion features
  • When make test fails to compile running it again gives a different, irrelevant error
  • [advanced] Remove all keywords and define generic concepts such as conditional and loop, and implement some way to define keywords at compile-time where custom code can be run to interact with the ast during parsing and resolving

b's People

Contributors

davidskrundz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

b's Issues

Github support

Currently .b files are processed as Limbo code by github. This needs to change 😡

To get github to recognize it as a language we need over 100 repositories using 🅱️

🙏

Rename to 🅱️

The repository and the compiler executable should both be named 🅱️. Its not an ASCII character so support is lacking. The following must be addressed:

  • Terminals display it as 2 characters wide, but they do not add a space after it, nor backspace properly
  • Github replaces 🅱️ with - in the repo name

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.