Skip to content

Eitantan/IridiumLang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

For Contributers: IMPORTANT

There will be no code for the language in the master branch. This is because there are 2 branches for the code. RS-Build (Rust), and JS-Build (Javascript). The master branch will be for the website.

Iridium Programming Language

Iridium is a Object-Oriented Programming Language Designed to be Simple and Powerful.

Whats special about Iridium?

  • It's fast.
  • It's powerful
  • It's free
  • It's perfect for beginners and pros alike!
  • It's open-source under the MIT License
  • Its written in Rust (there's also a NodeJS version, which has more syntax at the moment, due to early development)
  • Syntax for getting internal

Installation

To install the rust build, there will be a Rust release. For contributing to the project, there is a RS-Build branch.

Syntax (unfinished)

Startup

Make sure you have Iridium installed or NodeJS, and then, when it prompts you to do a command: >>> Type in:

>>> iri -c path/to/file.iri

You can use literally any extension, but .iri is usually used as not to interrupt the compilers/interpreters of other languages.

Enviroment Variables

advanced-mode = true. //sets advanced syntax to true. Includes Linux command support and C-Like syntax graphics-mode = true. //sets the graphics_EngineOn internal variable to true web_mode = true. // make a web with Iridium shell = true. // sets a shell loop after every program runs.

Output:

Console.out('Hello").
// Can use any combination of quotes. :D

Declaring Variables

var sample = "Strings are the first data types supported.".
var boolean_supported = true.
var this_is_true = ButBooleanAreSupportedToo.
var age = 13.4. // and numbers!

Printing Variables

print = $sample

Classes And Objects

class hello{
  // Stuff
}

hello = new hello.

class hello:hewwo{
//Class inheritance
}

Methods

static method_name(arg1,arg2){
	// DO cool stuff
}

Decisions & Accepting user input

Console.In().

Math

a = 2 + 2.
math.sqrt(5).

a = pow(4(3)).

a = avrg({dataset}).

a = factorial(5).

a = sin(5).

a = log(5, base=2.71828182845905).

a = MAD({dataset}{dataset}).

a = percent(5.1).

a = Decimal(5).


Data Structures

// array 
array = new array[](
array[0] = "hi".
).
example = array[1].

//dictionary

hey = new Dictionary([5])(
add[0] "hey".
).
example = hey[1]

//list 
list = new list(
add to list "wut".
).
example = list[1]

//dataset WARNING: ONLY USE FOR NUMBERS
average = new dataset[](
add 5 to average.
).
example = average[1].