Code Monkey home page Code Monkey logo

simple's Introduction

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

simple's People

Contributors

appcypher avatar bahat159 avatar ebiboy2 avatar iamcoderisk avatar mykeels avatar sdmg15 avatar thecarisma avatar youngestdev 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  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  avatar  avatar  avatar  avatar  avatar  avatar

simple's Issues

Copyright (You are using the Ring programming language source code and removed the original author name!)

Hello

The source code of this language (https://github.com/theratioproject/simple/tree/master/simple/sources) and (https://github.com/theratioproject/simple/tree/master/simple/include) is based on the source code of the (Ring programming language)

URL: https://www.codeproject.com/Articles/1089887/The-Ring-Programming-Language
URL: http://ring-lang.net
URL: https://github.com/ring-lang/ring
URL: https://www.apress.com/gp/book/9781484258323

It's not right to remove the original author name and claim that this is your source code!

To fix this mistake

(1) Add the original author name to each source code file
(2) Write in the documentation that this language is based on the Ring programming language

We are contacting you first (before contacting github) to avoid reporting the project (And removing it from GitHub)

Greetings,
Mahmoud

Improving Simplepad desktop app.

Simplepad is a GUI desktop enviroment built with simple. It is a text editor which might eventually become SIMPLE's code editor. It currently has dummy menu's which will be worked upon and the improvements will be documented in this issue.

Preview of Simplepad.

screenshot at 2018-06-30 15-07-36

Features..

It currently houses a lot of functionalities which are yet to be functioning. It has normal file operations like:

  • File
    • Open
    • Save
    • Save As
    • Close
    • Exit.
  • Edit
    • Undo
    • Copy
    • Edit
  • Search
    • Search
    • Replace.
  • Program
    • Run i.e, to run the file: this is a feature that'll give live preview of what we're building.
    • Debug
    • Build executable.
  • About - I recently added the about menu.

What's failing ?

Menu options do not work except for About.

Todo

Fix all issues listed above and make it function well.

Support for var and strict.

From the ROADMAP, I saw this :

add and use the keyword var to allow variable declaration

What's this all about ? .
Do you mean to declare variables in simple-lang after this is accomplished, it'll be:

var name = "simple-lang"

instead of the current version of variable declaration ?

name = "simple-lang"

Also,

The support for strict is really nice but what are the plans for this ? Are we moving to a strictly typed syntax following the introduction of #38 ? . What improvements will the strictness bring especially to error handling ?

Unable to link globally on linux

Hi, I'm unable to add simple as a compiler to the global set. I mean to make it accessible in all corners. Any help ? I'm a Linux user...

In npm, we have something like...

npm link

Issue installing and running Simple on Ubuntu

Have issue installing and running Simple on my Ubuntu machine after downloading linx version form sourceforge.io, I try follow the command on the README but no says no file. So I try cloning and follow the README instruction, everything seems to work but if I type simple in the terminal it says command not found. Pls need help on proper installation. Thanks

IRC or Gitter Channel for SimpleLang

I think it will be great if a gitter channel or IRC is created for SimpleLang to help in facilitating communication.

I would really love to contribute, but I'm not fully updated on the roadmap of simple.

Unable to load shared library in Linux.

I've fixed the issues with calling modules and I'll write a new documentation soon but .dll files cannot be run in Linux. How do we solve those issues as dynamic modules depend on those files ?

Fulltick issue

Description - A brief one.

Error fromfulltick dynamic module during build

Here's a snapshot of the error.

screenshot from 2018-10-31 16-13-33

Expected behavior and actual behavior.

Smooth installation but instead there's an error from the png_write function and/or stream.

Steps to reproduce the problem.

Perhaps adding a ld flag or installing additional libary

Specifications - version of the project, operating system, or hardware.

  • Version - 0.3.36
  • OS- Fedora 28

PR Supporting Fix

None yet.

Attach the PR link if any.

FullTick module ( GUI ) for Linux OS.

The fulltick dynamic module for simple-lang is a port of the fltk C++ gui library. To build the dynmic module it has to be compiled against the simple.so and the fltk shared library

Linux Build needs console-colors

Description - A brief one.

Linux Build fails due to the absence of console-color.

Expected behavior and actual behavior.

Build is supposed to go smoothly instead it went bad.

Steps to reproduce the problem.

Fix the Makefile to build without the console-color or add the console-color file back else wait for #29

Specifications - version of the project, operating system, or hardware.

s0.3.36, Debian Linux 32-bit.

PR Supporting Fix

Attach the PR link if any.
This PR - #29 fixes it I think.

Build fails on ubuntu

Description - A brief one.

While trying to build on Ubuntu it fails due to double slash added to directories path

simple-lang:install-configure: building simple-lang s0.3.36 build...
rm -rf /usr//bin/simple
rm -f /usr//lib/simple.so
rm -f /usr//lib/x86_64-linux-gnu/libsimple.so
rm -f /usr//lib/x86_64-linux-gnu/libsimple.0.3.36.so
rm -R -f /usr//include/simple/
unlink /usr//lib/libsimple.so 
unlink: cannot unlink '/usr//lib/libsimple.so': No such file or directory
Makefile-Linux.mk:193: recipe for target 'uninstall' failed
make: *** [uninstall] Error 1

Expected behavior and actual behavior.

Building without errors

Steps to reproduce the problem.

Specifications - version of the project, operating system, or hardware.

Simple-lang version: latest
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

PR Supporting Fix

None yet

Attach the PR link if any.

The Need for Simple Presence on RosettaCode

RosettaCode is a repository where codes implementing tasks in different languages are stored. Simple has no presence there yet. So I think we should fix that.

I already created a SimpleLang category since Simple isn't available as category. Nothing is there yet.
Anyone can signup to the site and contribute to it.

An example of a tool that uses codes on rosetta is http://rosetta.alhur.es/. It allows you to compare codes in different languages. An example of this is http://rosetta.alhur.es/compare/python/java

This will allow programmers from other languages get a feel of what idiomatic Simple code looks like compared to a language they are used to.


More information on how to add a language to RosettaCode http://www.rosettacode.org/wiki/Rosetta_Code:Add_a_Language

Support for Web

For the past months, the contributors here have only worked on simple to be a repl language and to be able to work on basic modules like the File system, interact with the OS and GUI but the big thing is amiss.

Support for WEB

Ideally, we should have this implemented already into simple, we basically have a simple module which depends on other existing technology ( CGI ). Perhaps it's high time we implement the web server modules into simple so we can have frameworks, routers etc

Also, it'd be nice if we r pay more attention to the web server ish*. We've paid too much attention to the consoler already - simple-lang wasn't built for the console I bet, let's work this out and start building web apps with simple-lang .

'null' is an empty string, make a true pointer with address 000000x0

null in simple is currently an empty string '' which can be confusing when comparing with an actual empty string . e.g

variable = null

is same as

variable = ""

This appear to be very bad as some implementation requires to differentiate between null and and empty string such as the Console module.
Also null variable should have a string value of (null) for output readability

Modular - Simple module update and downloader.

Well, we want to build simple as a very intelligent and smart programming language so we have to include a lot of environmental functions etc. Judging by the last issues, you can see we're working hard.

So what's modular ?

Modular is a command line simple app that updates simple itself and it modules, it will also be used to get new modules or fetch upgrades from the repos. Just like we have apt-get in Linux, npm update etc. That sounds cool ? Yeah

ToDo

  1. Upgrade simple version without having to download from website. ( Currently under test ).
  2. Grab modules from the repository
  3. Update modules.
  4. Install new environment / desktop apps and update them.
  5. Publish your module into the repo.
    That sounds cool. On this issues, you're welcomed as a contributor. This is currently handled by @Thecarisma and I.

Updates will be published in this issue

Issues with running on Mac

Description

I successfully built simple for Mac, but it's refusing to compile the example *.sim code.

Expected behavior

I expect that simple ../examples/algorithms/degreeToRadian.sim would actually run the degreeToRadian.sim file.

Actual behavior

It does not

image

Variable declaration garbage collected and destroyed after loop in recursive function call

Description

After the implementation of variable declaration using the var keyword, calling a function recursively destroy the variables used within a loop. All referenced global variables in the loop is garbage collected and all local variables are destroyed too after the function has complete execution.

Expected behavior and actual behavior.

Function call should be successful when called recursively within it body and only temporary variable should be destroyed. Even when variables are destroyed it should recreate on another call

Steps to reproduce the problem.

Onene()

block Onene()
	var Onet = [1,2,3,4]
	var on
	for on in Onet
		display "Done with : " + on + nl
		
	end
	Onene()

Building a better debugging module.

Well, if you've been following this repo, you'll find out we've been improving SIMPLE day by day.

In this project, we'll build/improve the existing debugging module because the current code displays the given code and doesn't debug in anyways.

Current code:

module simple.debugging
 
block throw(value)
	display value 
	__exit__

The future module will focus on tracking bugs in large scale apps without having to hard-find them.

Data Types Modules.

Author : @Youngestdev

I'll be working on building data type modules such as List.sim and Number.sim.

Reason.

Modules will enable us carry out basic operations in data type.

Example

A list will be able to add, delete, reverse once the module is built.

list = ["a", "b", test] 

display list +crlf
// Displays *a, b and test*
list.push("a")
// Undefined

Result from this ?

Well, we'll have methods that arrays ( as in JavaScript ) or Lists ( as in Python ).

example :

.push()
.pop()
.reverse()
And so many more.

Display should print trailing newline or new print function be created

Currently the display magic function doesn't print a newline after its arguments, which leads to the need to sprinkle crlf variable about in the code. As a result, the following code prints shows its results as Hello worldHello simple.

display "Hello world"
display "Hello simple"

Alsocrlf, which I believe signifies carriage return + linefeed, is platform-specific.

It would be nicer if display adds a newline to the end its arguments automatically. And if one wants a display function without newline, a new function, say print or echo can be used.

But given that there are a lot of codes with display already, an alternative solution would be to create a new function that adds newline.

Writing a vscode extension for simple.

Could someone help write a Visual Studio code extension for simple code linting and completion here ?. Writing SIMPLE in vscode looks like writing plain text. Someone could volunteer ๐ŸŽ‰ .

Single Command Installer

This is a rustup-like or choosenim-like installation process where the user doesn't need to have simple already installed on their system. Just a single command that does all the installation and/or update automatically.

The user just types a command into the terminal and simple gets installed or updated automatically. A seamless nice user experience.

The command is usually in this format.

curl https://sh.some-domain.com/install -sSf | sh

This means the shell script that gets run will be hosted on that site and the script will be responsible for downloading and installing simple on the user's system.

The first step here is to host an installer script online.

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.