Language

Ore is designed around the premise that programming languages should be very flexible and easy to understand, just like natural languages. Because of that, Ore offers several different ways to write code: Several aliases for most functions, optional keywords and symbols, Unicode input, very loose-typing, and even multiple paradigms. Emphasis is also placed on portability, readability, deployability, and simplicity. Programming in Ore should be comfortable for developers, offering the freedom to write their code the way that is easiest and most satisfying to them.

Ore is a general-purpose programming language and offers a wide range of capabilities from file manipulation to mathematical computations, with even more features planned for release. Many elements within Ore were inspired from C#, PHP, Python, Basic, Bash, CoffeeScript, C and Haskell. It takes all of the best aspects from those languages and converges them into one, leaving out all of the unnecessary, headache-inducing fluff and the rhetorical lines of code.


Features

Ore is a modern programming language that builds off of the advancements of other programming languages. But... what is a new programming language without new features, right? Well, Ore is jam-packed with them! Many of the bigger features are listed here, but don't worry! There's many more little cool tricks and gems hidden throughout the platform. Whether you're new to programming or you're an experienced professional, there's definitely a lot to appreciate.

Standard Features

Ore has been planned out to offer many new kinds of features that are unique to it, but it still offers standard and traditional programming features that you would expect from any modern language.

Language Neutrality

Flexible syntax and flexible diction were both considered vitally important since Ore's inception. Being able to write the code that you want to write is one of the highest priorities. Aliases are available for most functions and operators, meaning that programming in Ore can be as natural as any other language that you have already become comfortable with. Whether you are coming from Windows, Bash, Python or Basic, you'll find many functions that you've seen before. To see a full list of the commands, functions, and aliases accepted, check out the Reference Table.

Unicode Input

With today's expanding encoding types, international usability can become complex. Because of this, Ore will, by default, be Unicode compliant; This means that you'll have access to thousands of symbols for several languages and special mathematical symbols, which also makes your programs look beautiful. To see a full list of understandable symbols, check out the Reference Table.

Smart Type Casting

Ore is able to discern several different kinds of cool data types and can quickly evaluate the data appropriately. Despite this, you'll be able to easily and explicitly convert data between types. Don't worry, though! In instances of implicit data casting, Ore will scale data types to ensure a natural mode of conversion to the most likely intended data type. You can learn more about Ore's smart type casting in the data type section of the Code page.

Function & Operator Overloading

Function overloading is a popular feature among many developers using languages such as Java or C++ because it offers the ability for functions and commands to take either different types of or different number of arguments. Many built-in commands in Ore accept several different loadouts. Alongside that, many operators can accept different types of operands, too. Even when creating user-defined functions or programs, optional parameters can be defined. To read more about user-defined functions, take a look at the Syntax section of the Code page, under Functions. To read more about entry points for programs and their parameters, check out the syntax section of the Code page, under Entry.

Generic Number Type

The number data type is a number that is written in several different forms including standard representation, positive, negative, decimal and scientific notation. No need to distinguish between float, int, or double- They're all treated the same. In Ore, data types are loose, but their definitions are also broader compared to many other programming languages! You can learn more about Ore's data types in the Data Type section of the Code page.

Functional Assignment

Note that this section is under construction

Code Page: [Functional Assignment] [Anonymous Functions]

Piping & The Magical Then-That Keywords

If you are familiar with Bash, you may be familiar with piping data from a set of commands off to another command, potentially creating a chain of commands. In Ore, piping data is handled somewhat differently. Because commands can take several different arguments, the data's destination needs to be specified. This is accomplished using the that keyword. To combine commands and functions together, you can use the standard then keyword. Alternatively, you can use the |, & or ; symbols. The then keyword has some other uses, but to see examples of then-that piping, head over to the Syntax section of the Code page, under Advanced Syntax.

Inline Loops & Control

Sometimes loops are written out to be large and complex, but it's understood if a user would like a smaller, simpler alternative. Ore offers a way for users to loop a single line of code (or combined lines) with an inline loop. Unlike other languages, the inline loop is added at the end of the code instead of surrounding the code. Simply add the loop or control keywords, such as while, if or for, at the end of a line, followed by their condition to implement this. It's very simple, but to see examples and to read more about this feature, visit the Syntax section of the Code page, under Control.

Compound Loops & Control

Inline and inverse loops and control keywords help expand and ensure ease of use. They also open up the ability to compound these keywords in a unique way to Ore... There are millions of possibilities that can result from this single feature, but the basic idea is that control and loop keywords can be added on to lines of code at will, even at the end of lines of code that already have these added on. Essentially, long lines of code can be written with several loops or conditional statements to save space and to make code easier to read. This feature is best illustrated with examples, so please check out the Syntax section of the Code page, under Conditional or Loops.

Inverse Loops & Control

All flow control keywords have inverse equivalents in Ore. Inverse keywords are the opposite of their normal counterparts, where they are true where their counterparts would be false and vice versa. A few examples include the unless and until keywords, which are the inverses of if and while. To read more about this feature and to see the rest of the inverse control keywords, visit the Syntax section of the Code page, under Control.

Loop Loops

Ore implements a more generic loop keyword called loop, which has various uses. It is a quick and generic keyword that kinda merges while, for, and foreach keywords from other programming languages, while having the additional feature of simply looping a block of code until it is broken out of. Read more about this unique type of loop in the Syntax section of the Code page, under Control.

Special Else Keyword

In most programming languages, the else keyword is exclusive to the if statement. However, Ore extends its use to while loops. Whenever the while condition returns false, the else section will be executed, essentially creating two separate loops that can be switched between as the condition changes. Additionally, the else keyword can be used on the inverse of these keywords, which are unless and until. To read more about this feature, visit the Syntax section of the Code page, under Control.

Special After Keyword

Another unique feature in Ore is the cool after keyword that can be connected to loops. This denotes a section of code that is executed only after the loop is successfully concluded or broken out of. This offers developers several new ways to conclude processes and to wrap up any code within that loop. To see an example or read more about this keyword, go to the Syntax section of the Code page, under Control.

Compound Comparisons

Comparisons in Ore can be compounded to create longer conditional statements. This feature allows developers to create comparisons such as 0 < x < 100, which would essentially be the same as (0 < x) and (x < 100). More comparisons can be compounded and extended past that, so for more examples, take a look at the Syntax section on the Code page, under Basic Syntax.

Implication, XAND, XNAND, Etc.

Logical comparisons in programming are import, so when Ore was being developed, a wide range boolean algebraic expressions were considered. Using Ore, you can use several standard comparisons, but you can also use rarely-seen comparisons such as imp, xand and xnand. Read more about logical comparisons within Ore in the Syntax section of the Code page, under Control.

Yada-Yada Operator

In Ore, you can use the a special keyword called the yada-yada operator in order to signify a section of code is yet to be implemented. To do this, simply use the ... keyword on a line by itself. Whenever Ore reads this, the line is skipped and not executed. Note that if this is is used inside of an inline loop or condition, the loop or condition will still be executed. That's because the yada-yada operator is run like a command that simply returns null. To see an example of how this is useful, head over to the Syntax section of the Code page, under Comments.

Additionally, the yada-yada operator can be used to specify a subset of an array by specifying a range of indexes. To read more about this use of the yada-yada operator, refer to the Variable & Constants section on the Code page.

Flow & Stack Control

Many high-level programming languages end up opting out to grant developers the ability of advanced control over the flow of their programs. Ore gives those abilities back and actually expands upon them. Ore allows goto and gosub along with the use of labels, but it uniquely allows developers to control and even clear their return stacks using the rs and crs commands. To read more about this feature, visit the Syntax section of the Code page, under Labels & Redirects and under Functions.

String Pool Control

Like several other languages, Ore uses a string pool in order to optimize string operations and use through interning. Since Ore gives you complete flow control, it only makes sense to give pool control as well. To reference a string by its address, use the : symbol as a prefix, followed by its address. This could be used in place of any string literal when coding or passing commands through the command line for value access or even re-assignment.

In order to see the entirety of the current string pool, the strs command can be used. Another command, idof, can be used to determine if a passed string value is already contained in the string pool, and its given address if it is.

To read more about about strings as literals and referencing them by address, read the Variables & Constants section of the Code page under Literal.

Interned Functions & Function Pool Access

Ore is very unique in its ability to merge two paradigms together the way that it does. Not only can Ore intern string literals to speed up a lot of processes, but it can also do something very similar with functions and heaps of code. This makes functional assignment possible within Ore. Like the string pool, the ability to access the function pool is extended to the user, which enables functional programming capabilities.

To access an interned function along with any parameters, use the @ prefix, followed by the address. Again, recalling the function or reassignment can be used similar to the way relative string pool addresses can be. Furthermore, idof can also accept functions/parameters and return the address of them if they exist in the function pool. To view the entire contents of the function pool along with the corresponding function pool addresses, use the funs command.

There's a lot more to read about functions that can be found in the Syntax section of the Code page, under Function.

Freezing Variables

There are no constants in Ore, but you can freeze variables in order to prevent assigning or overwriting the data. This essentially converts the variable into a constant, which can also be reversed. This can be accomplished using the frz and unfrz commands. It can be very useful when debugging new code or when using libraries to ensure that your data is protected from anything changing it. To learn more about freezing variables, check out the Variables & Constants section of the Code page.


Structure

Ore programs can come in two different file formats and can be written in various styles. Because Ore is designed to be expandable, it can additionally be deployed in 3 different configurations: Ore script files, Ore programs, or Ore libraries.

Ore Scripts

Ore scripts are files that are usually very short snippets of code that are in uncompiled .ore format. They contain very simple procedures to be loaded by another Ore program or run from the command line. Saving code in this format saves time when that code is expected to be used again in the future. It's easy to edit and does not require any special formatting.

Ore Program

Ore programs are self-contained pieces of code that are usually much larger than scripts that can contain a main loop or entrance/intent. These files are either uncompiled (.ore) or compiled (.core) format. The programs can be loaded by command line or run from other parts of Ore Os, or even loaded by other code.

Ore Libraries

Ore libraries are usually designed to contain pre-defined functions and/or variables to extend capabilities of several other programs. Libraries are either uncompiled (.ore) or compiled (.core) format. Libraries are usually not loaded by the user in the command line, but instead are loaded by other programs.


Execution

Ore Os and the Ore Runtime Environment allow several options for code execution. Files that can be interpreted are either in both uncompiled (.ore) and compiled (.core) format. These files can be run using the run command, open command or by simply typing in the filename. Parameters may also be included in this fashion. Ore libraries can also be run using that same method, but in order to load them as actual libarires within a program, the use, import, or include commands should be used. Loading a libary in this manner allows access to functions and other sections of code without interupting any current computations.

As stated, Ore programs can be executed with different parameters. They can also be executed with different entry points. To learn more about both parameters and entry points, refer to the syntax section of the Code page, under Entry.

Additionally, command aliases can be assigned in the alias file, which could be used to execute files as a shortcut from anywhere in the system. Lastly, the association file can be updated with a given program's file location in order to associate a specific filetype to be opened with that program as its default viewer.

To read more about the .ore file format, read the file formats section of the reference page.


Compilation

Ore allows users to compile .ore files into compacted bytecode with the .core extension. Compilation of .ore files is handled in either Ore Os or the Ore Runtime Environment using the core or compile command. Once a file is compiled, it is converted into the compiled Ore format. Just like running .ore files, Ore will output errors if the file is unable to compile.

To read more about the .core file format, read the file formats page.