Pixie (programming language)
Paradigm | functional |
---|---|
Designed by | Timothy Baldridge |
First appeared | 2015 |
Stable release | 0.1 / April 2, 2015 |
Platform | Cross-platform |
License | LGPL |
Filename extensions | .pxi |
Website |
github |
Influenced by | |
Clojure, Lisp (programming language) |
Pixie is a lightweight Lisp suitable for both general use as well as shell scripting. The standard library is heavily inspired by Clojure as well as several other functional programming languages. It is written in RPython and relies on PyPy's a GC and tracing JIT.
Pixie was inspired by Clojure but it is not a port, it has significant differences.[1]
Features
- Immutable datastructures
- Protocols first implementation
- Transducers at-the-bottom
- Includes a tracing JIT
- Foreign function interface
Examples
;; This code adds up to 10000 from 0 via calling a function that takes a variable number of arguments.
;; That function then reduces over the argument list to add up all given arguments.
(defn add-fn [& args]
(reduce -add 0 args))
(loop [x 0]
(if (eq x 10000)
x
(recur (add-fn x 1))))
See also
References
External links
- Pixie at Strange Loop 2015
- Embedding Pixie
- Pixie on the Raspberry Pi
- Emacs Pixie-mode
- Hackersome page on Pixie
This article is issued from Wikipedia - version of the Thursday, January 21, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.