Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

theratioproject/simple

Repository files navigation

Simple

The Simple programming language

simple is a easy to learn and flexible programming language based on the source code of the Ring programming language ring-lang Compiler & VM by Mahmoud Fayed


Platform / Architecture Build Status
Windows (7, 8, 10, ...) Simple Windows Build
Linux (2.6.18 or later) Simple Linux Build
OSX (10.7 Lion or later) Simple OSX Build
Android (SDK 16 or later) Simple Android Build
Android Termux Simple Android Build
IOS Simple IOS Build

Download simple

Building from source

simple provide self sufficent platform scripts for some of the platform below for building simple successfully with less or no effort at all. The scripts are here. Each script has the following options to customize your build or avoid building a failing section.

[FLAGS] :
        -c --configure  configure your system for simple successful build
        -i --install    install simple on your system
        -b --build-dir  manually enter folder to install simple
        -u --uninstall  uninstall simple from your system
        -d --debug      create a distributable version in ..\..\ source directory
        x86 --32-bit    build 32 bit version of simple
        x64 --64-bit    build 64 bit version of simple
        -t --temp       keep the */dist/ folder(s) in source tree
        -h --help       print this help message
        -min --minify   minify all modules sources (Not Recommended for Debug Purpose)

[STANDALONE BUILD FLAGS]
        -so --simple-only       build only simple.exe, simplew.exe and libsimple.dll
        -do --dep-only          build only the dependencies
        -io --include-only      copy only the simple include files
        -mo --modules-only      copy only the standard modules
        -yo --dymodules-only    build only the dynamic modules
        -eo --environment-only  build only the environment programs

If you just clone this repository you should first configure your system for a successful building by using the -c flag, this process requires internet connection because all dependencies will be downloaded with an execption to Windows which has no particular libraries location.

Download this repository and extract to a working folder or clone this repository into a working folder using git

 $ git clone https://github.com/simple-lang/simple.git

After downloading simple source from either methods listed above, continue with the instruction for your platform below.

Building on Linux

Configure

For the first time using the script configure your building enviroment

 $ cd build
 $ sudo bash ./Linux-Build.sh -c
Installing

Proceed to install simple on your system and start using from any directory. After it complete you can execute sim scripts from any folder

 $ sudo bash ./Linux-Build.sh x64 -i
Debugging

If you wish to debug simple build or try it before installing in your system executable space use the -d flag. Note : this will allow more debugging flag in simple such that you can debug upto the VM Stack level

 $ sudo bash ./Linux-Build.sh x64 -d

After running the command above simple will be installed in the same directory you clone simple source into in the following format s$Version-debug

  • simple
    • build
  • s$Version-debug
    • bin

Building on OSX

Configure

For the first time using the script configure your building enviroment

 $ cd build
 $ sudo bash ./Mac-Build.sh -c
Installing

Proceed to install simple on your system and start using from any directory. After it complete you can execute sim scripts from any folder

 $ sudo bash ./Mac-Build.sh x64 -i
Debugging

If you wish to debug simple build or try it before installing in your system executable space use the -d flag. Note : this will allow more debugging flag in simple such that you can debug upto the VM Stack level

 $ sudo bash ./Mac-Build.sh.sh x64 -d

Building on Windows

It obvious windows does not have a central base for dependencies like the *nix oses, all the dependencies such as curl, openssl, fltk, will have to be manually download and added to a global directory where windows could find them at compile time, this dependencies are only for the dynamic modules and does not affect the main simple executable and shared library also other dynamic modules does not need these dependencies and can be built independently.

Build Toolchain

simple currently uses the MinGW toolchain that can be downloaded here, add the directory where gcc and make is to your environment path.

Installing

Proceed to install simple on your system and start using from any directory. After it complete you can execute sim scripts from any folder

 $ ./Windows-Build.bat x64 -i -so
Debugging

If you wish to debug simple build or try it before installing in your system executable space use the -d flag. Note : this will allow more debugging flag in simple such that you can debug upto the VM Stack level

 $ ./Windows-Build.bat x64 -d -so

After running the command above simple will be installed in the same directory you clone simple source into in the following format s$Version-debug

  • simple
    • build
  • s$Version-debug
    • bin

Building on Android

This require the following dependencies
ANDROID SDK https://developer.android.com/studio/
ANDROID NDK https://developer.android.com/ndk/
FLTK https://www.fltk.org/
Read full instruction on building your first android app with simple-lang here

Building on Android Termux

Termux is a free and open code app that simulates the command shell used in Linux. By doing so, you can introduce all the usual commands and work comfortably from your Android device.

All simple section compiles fine on the termux app and you can test all the source file scripts in the examples folder with exception for the fulltick module with build is still under way.

Configure

For the first time using the script configure your building enviroment

 $ cd build
 $ bash ./Android-Termux-Build.sh -c
Installing

Proceed to install simple on your system and start using from any directory. After it complete you can execute sim scripts from any folder

 $ bash ./Android-Termux-Build.sh x64 -i
Debugging

If you wish to debug simple build or try it before installing in your system executable space use the -d flag. Note : this will allow more debugging flag in simple such that you can debug upto the VM Stack level

 $ sudo bash ./Android-Termux-Build.sh x64 -d

After running the command above simple will be installed in working home directory in termux ~/

 $ cd ~/
 $ cd s$Version-debug/bin/

Note

This project is still so much in it infancy, unexpected failure, seg-faults, errors should be expected therefore it not advisable to build seroius project in it. But if you build something cool with it or a usefull module you can share with the community on Twitter @thesimplelang or write to [email protected]. And also we love issues if it make the project better here.

Contributors

We love contributors. This is an open source project and needs the supports of the community extensively. Check out the contributing guide

License

MIT License Copyright (c) 2018 simple Built with ❤️ in Nigeria