Nyah
Nyah is a programming language designed to allow code to be written that performs as well as or better than traditional systems languages like C and C++. Equally as important as performance is the expressiveness of the language which should allow features to be expressed as concisely as in modern scripting languages such as
Ruby
or modern virtual machine languages such as
Nemerle
and
Scala.
Nyah is typed, but uses type inference so types can usually be omitted. Nyah has strong meta-programming capabilities. It uses the
LLVM
compiler infrastructure to generate object code. The grammar of nyah can be modified at compile time to allow diverging opinions to be expressed within the same language and to provide DSL building capabilities far superior to current languages.
Goals
-
Improve the meta-programming capabilities of C++0x/D/Nemerle whilst simplifying the syntax.
-
Better type inference than Scala/D.
-
Provide a fast and free MIT licensed compiler implementation.
-
Provide a powerful and intelligent compiler which will infer information to save developers from repetitive typing when safe to do so.
-
Optional garbage collection. Nyah should target both the JVM (and/or the CLR) and the LLVM to allow it to be used both with and without a garbage collector. Currently only an LLVM implementation is being worked on.
-
Support object orientated (including multiple inheritance), meta, functional and declarative programming styles.
Syntax can be extended/modified at compile time.
New features can be added to the language and the compiler from within nyah code itself. This not only allows many powerful features to be expressed neatly in the language, but makes nyah an ideal "compiler toolkit". It is conceivable to import the syntax of a pre-existing language into nyah, for example, the nyah grammar module allows PEG based parsers to be expressed directly in a PEG based notation within the language. This variant of PEGs allows AST building capabilities to be expressed with the parsing grammar. This allows powerful modifications and extensions to be expressed in a concise way. The nyah parser itself is implemented with this module which allows extensions and modifications to the core language to be made with reasonable ease and flexibility.
Please read the
introduction.
Status
Parser generator
-
completed
Research new notation to extend PEG to include “AST-building” parsers. Read paper
TBPEGs
-
completed
chilon::parser, a C++0x implementation of TBPEGs, to be used in the bootstrap compiler. Project website
chilon::parser
-
completed
nyu parser generator
which implements the nyah grammar syntax and will be used to boostrap nyah. Note that the nyu language is a subset of the nyah language, and is already capable of bootstrapping itself.
First compiler (written in D) to be used for bootstrapping
-
in progress
mousedeer: full nyah language parser using parser generator.
-
yet to start
Code generator using LLVM.
Nyah standard library
-
in progress
std.variant and std.tuple.
-
in progress
containers: vector, vector_hash_map, hash_map, hash_set, set, map.
-
in progress
nyah meta-programming library.
-
yet to start
argument parser.
Second compiler (written in nyah)
-
yet to start
nyah.parser based on chilon::parser.
-
yet to start
TBPEG nyah syntax which will internally be based on nyah.parser.
-
yet to start
Use nyah syntax from bootstrap compiler to produce full parser.
-
yet to start
LLVM library for nyah based on LLVM C bindings.
-
yet to start
Code generator using llvm library.
-
yet to start
Java bytecode output library for nyah.
-
yet to start
Code generator for garbage collected nyah using java bytecode library.
Help wanted
Help is appreciated from anyone with research, implementation or art. Criticisms and suggestions for how to improve or modify the language will be welcomed.
Here are some ideas for things to contribute:
-
Coroutines
-
Internationalisation
-
Optimised hashed standard containers
-
Red-black tree maps
-
Multi-index container library
-
Asynchronous IO library
E-mail: nyahsuper face@chilon.net.
next