NoSyn is a statically typed general purpose programming language designed on a principles of minimalism and extensibility.
Like many contemporary languages, NoSyn allows the user to overload operators using a basic function syntax:
Nothing infix_:=_(Int a*, Int b) {
assignValue(a, b);
}
Unlike other languages however. There are almost no operators defined by default within the language compiler allowing for great flexibility in the workings and syntax of the language based on the source code itself.
NoSyn seeks to reduce the compiler to its most basic form without compromising on capability or readbility of language source code. The syntax of the language gas been reduced to the absolute minimum in order to allow the language user to create their own syntax in whatever way they would like using the operator overloading features. NoSyn provides a simple process to define operators to do whatever you want with compile time checks to ensure validity.
Function Inference is the key to producing compile time checks on user defined operators in NoSyn’s function inference algorithm. Unlike functions in most other languages. The return value of a function in NoSyn is dependent on the context in which it is being used. This allows overloaded operators to work differently in different parts of the source code making it east to create syntactic changed to the language without changing the lexer of parser of the compiler, while maintaining compile time checks on operator validity. A detailed description on how the Function Inference algorithm works can be found here
- The NoSyn compiler is written in Haskell and requires the Haskell build tool, Stack. Please find instructions on how to install Stack here.
There are currently no binary installers for any systems so nsc must be built from source by cloning this repo.
Once stack has been installed run the install_nsc.linux.sh
script from the main directory.
This will build the project and create an executable at /usr/bin/nsc
.
Once stack has been installed run the install_nsc.mac.sh
script from the main directory.
This will build the project and create an executable at /usr/local/bin/nsc
.
Once stack has been installed simply run the install_nsc_windows.bat
script from the main directory using the Command Prompt.
This will build the project and create an executable at C:\Users\<user>\AppData\Roaming\local\bin\nsc.exe
It is recommended that you install the NoSyn Build Tool, nsp. The NoSyn compiler’s dependency system is designed to be used with this build tool (nsc will need to be installed first).