GithubHelp home page GithubHelp logo

elipie / night Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexapostolu/night

0.0 0.0 0.0 779 KB

An interpreted programming language

Home Page: https://night-website.dynamicsquid.repl.co/

License: Apache License 2.0

C++ 99.79% Makefile 0.21%

night's Introduction

Night

An interpreted programming language that focuses on simplicity and useability. The main goal of Night is to design an intuitive and easy to learn language.

It's still in early development, and there's a lot to get done.


Source Build

Currently, only a Windows and a Linux source build are supported.

Windows system requirements:

  • GCC and a working console

Linux system requirements:

  • build-essential / base-devel

You'll need to install the GNU Compiler Collection (GCC) to get access to the g++ compiler, and once you have that, clone this repo, create a new file called *.night where you'll write your code, and you're ready to go! Just pass in the *.night file as a command line argument when you run the code.

Windows

g++ -o <exe file> <path to night.cpp file>
<exe file> *.night

for example:

g++ -o night src/night.cpp
night source.night

Linux

You can follow the steps above, or if you have GNU Make, you can simply use that and it'll create a night executable.

make
./night source.night

If there's an error with the source build, or you're having trouble, feel free to leave an issue!


Timeline

As of right now, version 3 of Night has been released, and that version is actually the first non-beta release of Night. The future releases will further improve the language through various useful features such as array parameters, and better error messages, eventually working towards a standard library.

  • v1-beta the first version of Night! (the code is so bad plz don't look at it)
    • v1.0-beta the base release
  • v2-beta a testing release, many new features were tested and implemented in here
    • v2.0-beta the base release
    • v2.1-beta added more support for expressions
    • v2.2-beta added a simple loop
    • v2.3-beta added arrays
    • v2.4-beta added user input
  • v3 the first non-beta version of Night!
    • v3.0 the base release
      • v3.0.1 bug fix for source builds
    • v3.1 functions will be able to return arrays, and accept array parameters
    • v3.2 sqdlib, the standard library for Night; also included is the dusk package manager!
  • v4 a complete rewrite of Night, focusing on additional stability
    • v4.0 the base release
    • v4.1 classes, but only with variables and methods

About Night

Night is strong statically typed language that mirrors the C family in many ways. As of right now, it just supports basic functionality. It has five types, booleans, characters, integers, floats, and strings. Arrays and functions are also supported. Functions can also be one of the five types, as well as a null type. Loops are also included, with a simple for and while loop.

Here is a little sample of my language:

// classic fibonacci sequence using recursion
int fib(int num)
{
    if (num <= 1)
    {
        return num;
    }

    return fib(num - 1) + fib(num - 2);
}

// array of 3 values, 2 of which have been initialized
int[3] fib_nums = [ fib(5), fib(6) ];
fib_nums[2] = fib(7);

// printing out the values of the array
int a = 0;
loop for (3)
{
    print(fib_nums[a] + " ");
    a += 1;
}

More information regarding the syntax can be found on the website.


Other

Here's a couple other projects related to Night, all under development and will be integrated into or used with Night sometime in the future. Definitely worth checking these out!

sqdlib

sqdlib (squid library) is the standard library for Night. It's coming shortly after v3.1 and will feature some handy functions. More information about that can be found on the repo.

dusk

dusk is the package manager for Night. It's primarily for sqdlib, but user built libraries could also be added later. Huge thanks to @firefish111 for making it!

night shade

night shade is a neat little compiler for Night. Made by @AntimatterReactor, it compiles Night down to C++ rather well, however it's not fully implemented yet.

If you have an interesting idea for Night, or would like to contribute to one of these projects, don't hesitate to leave a pull request!

night's People

Contributors

alexapostolu avatar codelongandprosper90 avatar

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.