bhuthesh / gherkin

a functional programming language and interpreter written in GNU Bash 4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gherkin

gherkin logo

gherkin is a functional programming language and interpreter written in GNU Bash 4 designed for extreme portability across *nix platforms. For rationale, see Why gherkin?

gherkin is a dialect of Lisp, and like other Lisps such as Clojure and [Scheme](http://en.wikipedia.org/wiki/Scheme_(programming_language) it features homoiconicity, first-class functions, and primitive functions for operating on a variety of data types such as strings, integers, symbols, and lists. As a citizen of *nix and the shell environment, it also provides *nix and shell interoperation facilities.

gherkin is currently alpha status, but our hope is to continue feature development until gherkin can be used in place of Bash for general purpose *nix scripting. If you're curious about our progress toward our first release, see our milestones.

Try gherkin

gherkin requires GNU Bash version 4 or higher. If you're on Linux, this is probably already your shell. If you're on a Mac, we recommend you install a recent version of Bash with Homebrew.

REPL

Start a Read-Evaluate-Print-Loop (REPL) and evaluate a simple expression:

./gherkin
> (+ 1 2)
3

You may exit the REPL with Ctrl-D.

Running a script

Run fib.gk to find the 60th Fibonacci number:

./gherkin -l fib.gk

Start a REPL and try a core library function:

./gherkin
> (load-file "core")
nil
> (map inc '(1 2 3))
(2 3 4)

You may also load the core library and start a REPL with ./gherkin -l core.gk -r.

Learning more & getting involved

gherkin is brand new, under active development, and not yet formally released. As such, its usage is error-prone and its documentation spotty. If you'd like to help us improve gherkin, its documentation, or have any questions, please join us:

Related tools

Thanks

About

a functional programming language and interpreter written in GNU Bash 4

License:BSD 3-Clause "New" or "Revised" License