What is Quack?
Quack is a type-safe, multi-paradigm programming language. Quack enables you to write consistent and legible code, and run it on different platforms.
You can optionally provide type annotations for your values, although it isn't really necessary because we rely on duck and gradual typing. The Quack compiler is being built to be decidable by propagation and with a strong type inference.
Quack supports many programming paradigms, especially functional and imperative programming. Quack also supports tacit programming, immutability and determinism when possible.
Metaprogrammable and extensible
The language is metaprogrammable and very extensible. You can easily build extensions for the language and provide them as libraries with annotations. You can create operators at compile time, override current operators, match operations by type, implement inline optimizations via the own compiler and easily build DSLs over it.
fn main() do print("Hello World!") end
[imperative] fn fact(n) let fact :- 1 for i from 1 to n do fact :- fact * i ^ fact end [tail_call_recursion] fn fact(n) :- n = 0 then 1 else n * fact(n - 1)
How does it work?
.d.ts for Quack type definitons
To get and try Quack, the steps are simple. Clone this repository and install the
src folder under
/quack/quack. I promise I'll provide a better way to do it later. After,
cd /quack/quack/src/repl and
php QuackRepl.php --ast (you can also try with
--python, but it is unstable at the moment). You will be sent to the REPL. Currently, the REPL is only compatible with POSIX systems. I'll implement support for Windows later, I promise too!
Assert that everything is OK. There is a small set of tests that may be run.
make test module=module_name
Quack syntax support to Vim's built-in editor quack/editor/vim/quack.vim
Contribute to Quack!
Yay! Your contribution to the Quack language core is very important! There is a lot of work to be done, and you can find it in this repository's issues! Look for the
accepting-pull-requests label! Newcomers to the open-source contribution process are very welcome! Please, read the
CONTRIBUTING file in this repository as well!
There are many ways to help! You can fix typos, improve code quality, suggest changes, suggest language features, be engaged on the language discussion, standardize the code, doc-comment the methods, write and run tests... The work is just starting out!
We also need to implement support of Quack for the different text editors. If you want to implement for some, contact me and I'll write the syntactic specification and the semantic of the blocks for you!
Questions or concerns? Contact me at email@example.com and I'll be happy to answer.