Giter VIP home page Giter VIP logo

nuua's Introduction

Nuua Programming Language

This is the official nuua programming language repository

Nuua is a new high level programming language. It acts as a generic language and it's built using pure C++, no dependencies required. Nuua is dynamic static typed and interpreted language similar to other high level languages like JavaScript or Python.

The syntax is familiar with no strange structures. However, some syntax sugar is added to perform common tasks quicker.

Nuua website

Nuua homepage is https://nuua.io. You may subscribe to recieve further information.

Code examples

  • Calculate the area of a triangle (with some OOP programming).

    class Triangle {
        b: float
        h: float
        fun area(): float -> (self.b * self.h) / 2.0
    }
    
    fun main(argv: [string]) {
        t := Triangle!{b: 10.0, h: 5.0}
        print "The area is: " + t.area() as string
    }
  • Calculate nth Fibonacci number (using recursion).

    fun rec_fib(n: int): int {
        if n < 2 => return n
        return rec_fib(n - 2) + rec_fib(n - 1)
    }
    
    fun main(argv: [string]) {
        print rec_fib(25)
    }
  • High level programming.

    use list_int_map from "list"
    
    class Collection {
        numbers: [int]
        fun map(f: (int -> int)): Collection {
            list_int_map(self.numbers, f)
            return self
        }
    }
    
    fun multiply(n: int): int -> n * 2
    
    fun main(argv: [string]) {
        c := Collection!{numbers: [1, 2, 3, 4, 5]}
        c.map(multiply).map(multiply)
        print c.numbers
    }
    

Nuua Roadmap

  • From dynamic to static
  • Stack machine to Register Machine
  • Re-write the syntax
  • Better error reporting
  • Implement modules (imports)
  • Implement functions
  • Implement classes
  • Implement function overloading 🕐
  • Minimal NUSL (Nuua Standard Library)
  • NUPAC (Nuua Package Manager) 🕐
  • Optimizations ⚠️
  • Initial Release 🚧

How is nuua structured?

Nuua is structured as a layered system. It have diferent tiers (ordered):

  • Application
  • Virtual Machine
  • Compiler (Code Generator)
  • Analyzer (Semantic analyzer)
  • Parser
  • Lexer

Nuua also have independent modules to help with it's development on every layer. In the current state, nuua have the following independent modules:

  • Logger

Layered System

Building Nuua

Currently, nuua is under heavy development meaning it still provides no official release. However, you're free to build the source yourself. The required software is:

  • MinGW + Visual Studio (in windows)
  • A C++ compiler (I use g++: gcc version 8.2.0 (Rev3, Built by MSYS2 project))
  • CMake

To build the language you just need to use Cmake in the root directory. For example, create a directory called my_build in the root directory and then inside of it invoke Cmake cmake ... Then you may build it using the selected target (Makefile, Vistual Studio, etc).

nuua's People

Contributors

consoletvs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nuua's Issues

How to build on Mac?

I'm trying to build this on a Mac. Could you provide instructions for building on a Mac?

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.