All Projects → quack → Quack

quack / Quack

Licence: gpl-3.0
🐤 A multi-paradigm programming language with gradual and duck typing that targets PHP and JS

Programming Languages

language
365 projects

Projects that are alternatives of or similar to Quack

Ramtuary
Ramda + Ramda Fantasy + Sanctuary REPL 🌿
Stars: ✭ 72 (-76.7%)
Mutual labels:  functional-programming, repl
Mappy
A functional programming language. Like LISP but focused around maps rather than lists.
Stars: ✭ 10 (-96.76%)
Mutual labels:  functional-programming, repl
Carp
Carp is a programming language designed to work well for interactive and performance sensitive use cases like games, sound synthesis and visualizations.
Stars: ✭ 4,389 (+1320.39%)
Mutual labels:  functional-programming, repl
Omnia
Stars: ✭ 81 (-73.79%)
Mutual labels:  functional-programming, repl
Aecor
Pure functional event sourcing runtime
Stars: ✭ 299 (-3.24%)
Mutual labels:  functional-programming
Javascript For Everyone
A step by step guide to learn JavaScript and programming
Stars: ✭ 285 (-7.77%)
Mutual labels:  functional-programming
Croissant
🥐 A Lua REPL and debugger
Stars: ✭ 285 (-7.77%)
Mutual labels:  repl
Tofu
Functional programming toolbox
Stars: ✭ 281 (-9.06%)
Mutual labels:  functional-programming
Coconut
Simple, elegant, Pythonic functional programming.
Stars: ✭ 3,422 (+1007.44%)
Mutual labels:  functional-programming
Byebug
Debugging in Ruby 2
Stars: ✭ 3,202 (+936.25%)
Mutual labels:  repl
Funcshell
Improve your shell by making it functional through Haskell! (An update to Awkward)
Stars: ✭ 297 (-3.88%)
Mutual labels:  functional-programming
Mobile App
See your city's air pollution measured in daily cigarettes. iOS/Android.
Stars: ✭ 291 (-5.83%)
Mutual labels:  functional-programming
Virtual Audio Graph
🎶 Library for declaratively manipulating the Web Audio API
Stars: ✭ 299 (-3.24%)
Mutual labels:  functional-programming
Eslint Plugin Functional
ESLint rules to disable mutation and promote fp in JavaScript and TypeScript.
Stars: ✭ 282 (-8.74%)
Mutual labels:  functional-programming
Functionkit
A framework for functional types and operations designed to fit naturally into Swift.
Stars: ✭ 302 (-2.27%)
Mutual labels:  functional-programming
Elmboy
A Nintendo™ Game Boy™ Emulator written in Elm.
Stars: ✭ 285 (-7.77%)
Mutual labels:  functional-programming
Lambda
🔮 Estudos obscuros de programação funcional
Stars: ✭ 297 (-3.88%)
Mutual labels:  functional-programming
Awesome Idris
𝛌 Awesome Idris resources
Stars: ✭ 299 (-3.24%)
Mutual labels:  functional-programming
Lev
The complete REPL & CLI for managing LevelDB instances.
Stars: ✭ 295 (-4.53%)
Mutual labels:  repl
Hareactive
Purely functional reactive programming library
Stars: ✭ 293 (-5.18%)
Mutual labels:  functional-programming

Logo

Sponsor

Slack Build Status Code Climate Test Coverage Issue Count Issue Count

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.

Quack is:

Type safe

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.

Multi-paradigm

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.

Basic examples

Hello World

fn main()
  do print("Hello World!")
end

Factorial

[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?

First of all, Quack compiler is, currently, entirely written in PHP, by hand. I'm doing this because I want to easily make it self-hosted and write the compiler in itself later. The front-end of the compiler is easy to extend and you can provide multiple back-ends for it. I'm writing standard libraries in the language for itself to allow interpreting it and running the compiler on desktop, on browser and interpreting it using the evaluator of any target language. Basically, when integrating Quack with your main programming language, you need to provide a set of type annotations for your libraries and for the language core. For JavaScript, I'm writing a tool that is able to convert TypeScript type definitions .d.ts for Quack type definitons .qkt, making the life easier. The initial support will be provided for PHP, Python and JavaScript. Please note that Quack is in its early stage, and in constant development. Quack also provides a REPL that you can try online here, currently generating the AST of the source.

Get Quack

REPL

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!

Run tests

Assert that everything is OK. There is a small set of tests that may be run.

make test module=module_name

Modules

lexer parser

Syntax Support

Vim

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 protected] and I'll be happy to answer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].