Giter VIP home page Giter VIP logo

baugelang's Introduction

Bauge, a 2D esoteric programming language

What is Bauge

Bauge is a terrible idea of a programming language, where programs follow a graphical path, written using box-drawing characters such as , , and so on.

The name Bauge comes from the Bauges mountain range, a very nice place where my parents live in the northern French alps.

I was inspired by the Haskell “Needle” package, which “ASCII-fies” the arrow notation of that language. I wanted to take that concept up a notch, and create a programming language based only on such concepts.

At the time I’m writing this, the idea of the language is still very rough, and I’m still modifying things and changing stuff around a lot. For example, here’s a piece of Bauge code from my ideas file:

┌─ fibonacci: (Int) -> Int ─────────────────────────────────────┐
│                                                               │
│   This function calculates the Fibonacci number for any       │
│   unsigned integer. This implementation uses the recursive    │
│   method without any memoisation; it is done by checking      │
│   the first argument:                                         │
│   - If it's 0 or 1, then we return directly the argument,     │
│   - If not, we calculate recursively the previous two         │
│     Fibonacci numbers, and add them to get the current one.   │
│                                                               │
├───────────────────────────────────────────────────────────────┤
│                                                               │
│                ┌─ 0 ───→                                      │
│                │                                              │
│  ╾──── match ──┼─ 1 ───→                                      │
│                │                                              │
│                └─ _ ────┬─ - _ 1 ─── fibonacci ───┬─ + ───→   │
│                         └─ - _ 2 ─── fibonacci ───┘           │
│                                                               │
└───────────────────────────────────────────────────────────────┘

Planned features for Bauge

  • Interpreted language akin to Python
  • Standard library written using the principle of literate programming
  • Interpreter written in Rust (because that’s the language I’m most familiar with)
  • Easy parallelism using the branching system
  • Functional style of programming, taking full advantage of Iterators and Map/Reduce operations

Roadmap

STARTED Language specification

For the moment, the entirety of the language specification is written in the ideas file. I need to create a comprehensive documentation system.

Interpreter

The only certainty I have is that I’m going to write the interpreter in Rust. It will need to:

  • Parse the code and somehow derive elements from it (paths, boxes, functions, …)
  • Perform lexical analysis, syntax analysis and semantic analysis
  • Find how the interpreter is going to interpret: using a VM, with an intermediate representation seems the most likely.

IDEA Debugger

Having a debugger interface with a step-by-step, path variable visualization, … would be nice.

IDEA Visual editor

This won’t come until much, much later in the development, but having a visual editor would be easier than writing the code by hand (even though I have neat macros for the box drawing characters at the moment)

baugelang's People

Contributors

shadyfennec avatar

Stargazers

astrolemonade avatar Daan Rijks avatar Talon Kettuso avatar  avatar delihiros avatar GAURAV avatar crab avatar Ashish Bailkeri avatar Malik Enes Şafak avatar Mihail Malo avatar Oliver Stahl avatar Jérémie Astor avatar Ben Lovy avatar Kofi Gumbs avatar Attila Bagossy avatar Linus Lee avatar Ell avatar Jesse Li avatar Alexy Torres avatar kiilas avatar Filipe Rodrigues avatar  avatar Guillaume JORANDON avatar

Watchers

 avatar  avatar Milo Fultz avatar  avatar

Forkers

icodein

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.