Giter Club home page Giter Club logo

nougaro's Introduction

Nougaro

Français

Nougaro. A programming Language.

This is Nougaro version 1.1.0.

Nougaro is a programming language interpreted in Python.

It is a multi-paradigm programming language that supports imperative, functional and object-oriented programming.

Nougaro is weakly typed. Its syntax is inspired from Python and Basic.

Example

def fizzbuzz(n)
    for i = 0 to n then
        if i%15 == 0 then print("FizzBuzz") \
        elif i%3 == 0 then print("Fizz") \
        elif i%5 == 0 then print("Buzz") \
        else print(i)
    end
end

Run

Execute the shell with python3 shell.py. Open files with python3 shell.py filename.extension. Generally, we use .noug as extension for Nougaro files.

The code is compiled for Windows and GNU/Linux. Check it out in the releases tab!

Supports Python 3.11 and 3.12.

Third-party modules (optional)

Python builtins that are not always builtin:

  • colorama (pip install colorama)

Under GNU/Linux, to allow browsing command history with the arrow keys:

  • readline (pip install readline)

Documentation

The documentation is available here.

About syntax highlighting

The notepad++ file was no longer updated, so I deleted it from the repo. Here is its last version.

I’m planning to create a VSCode extension – if you know something about that, contact me!

How it works?

Everything is explained here :)

Language goals

The main goal of this language is, for me, to learn how interpreted languages work. It is not intended to be blazing fast, memory safe and bleeding edge, but to be easily understandable.

Important

I do not recommend to use Nougaro in real projects.

Acknowledgements

Thanks to Mistera who episodically contributes.

Thanks to 3fxcf9 for the repository banner.

nougaro's People

Contributors

jd-develop avatar mistera91 avatar 3fxcf9 avatar

Stargazers

Andrew Johnson avatar  avatar  avatar ItsQuadrus avatar  avatar Lucas avatar Pavel Karateev avatar

Watchers

 avatar

Forkers

3fxcf9

nougaro's Issues

[BUG] in builtin functions, SymbolTable.get() tries to get symbol in parent if it doesn't exist

Evertyhing in title

To Reproduce
Steps to reproduce the behavior:

  1. Launch shell
  2. Execute test to demonstrate everything works fine
  3. Execute the calculator
  4. Do a calculation (the bug doesn't occur if you just exit without using the calculator)
  5. Exit the calculator then execute test again
  6. AssertionError

Expected behavior
It should not crash

Screenshots
screenshot

Your setup (please complete the following information):

  • OS: Android (termux)
  • Nougaro version: beta 0.13.1

[BUG] Tabs make `string_with_arrows` do weird stuff

Describe the bug
When you put a tab in incorrect code, the wrong positions are arrowed in error messages.

To Reproduce
Steps to reproduce the behavior:

  1. Type '(tab)foo'
  2. The arrows are not shown
  3. Type '(tab)foobar'
  4. The arrows are only under the 3 first characters

Expected behavior
The arrows should be under the whole text causing error

Screenshots
image

Your setup (please complete the following information):

  • OS: Ubuntu
  • OS version: 23.10 (Linux 6.5.0-21-generic)
  • Nougaro version: 0.17.0-beta (dev branch of 0.18.0-beta, commit 5312b29).

Code analysis
Line 51:53, file strings_with_arrows.py :

        # Append to result
        result += line + '\n'
        result += ' ' * col_start + '^' * (col_end - col_start)

Instead of spaces, a mix of tab and spaces depending on what’s on the line should be happened. But this could cause errors: just replacing the tabs by 4 spaces in the line could solve the problem.

Milestone: 0.18.0-beta

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.