Jump to content

Hy (programming language)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Protonk (talk | contribs) at 17:17, 3 September 2014 (Protonk moved page User:Protonk/Hy to Hy: moving to articlespace over capitalization redirect). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Hy
Cuddles the cuttlefish
ParadigmMulti-paradigm: procedural, functional, object-oriented, meta, reflective, generic
FamilyLisp
Designed byPaul Tagliamonte
First appeared2013
Preview release
0.10.0
Scopelexical, optionally dynamic
OSCross-platform
LicenseFree Software
Filename extensions.hy
Websitehylang.org
Influenced by
Lisp, Clojure, Python

Hy (alternately, Hylang) is a dialect of the Lisp programming language designed to interoperate with Python by translating expressions into Python's abstract syntax tree (AST). Similar to Clojure's mapping of s-expressions onto the JVM[1], Hy is meant to operate as a transparent Lisp front end to Python's abstract syntax.[2] Hy also allows for Python libraries (including the standard libraries) to be imported and accessed alongside Hy code with a compilation[note 1] step converting the data structure of both into Python's AST.[3][4]

Because Lisp allows for programming on the language, Hy can be used to write domain-specific languages.[5]

Hy is compatible with Python 2.6 to 3.4 and multiple Python interpreters (e.g. PyPy).[4] Hy was introduced at PyCon 2013 by Paul Tagliamonte. [6]

See also

Notes

  1. ^ "Compiled" is a term which may apply to expressing Hy code in Pythons AST or converting that AST into bytecode.

References

  1. ^ Turto, Tuukka (14 February 2014). "Programming Can Be Fun with Hy". Open Source For You. Retrieved 2 September 2014.
  2. ^ Edge, Jake (30 April 2014). "Getting Hy on Python". LWN.net. Retrieved 2 September 2014.
  3. ^ "Hy Documentation". hylang.org. Retrieved 3 September 2014.
  4. ^ a b Danjou, Julien (26 March 2014). "The AST". The Hacker's Guide to Python. pp. 165–172.
  5. ^ Paul Tagliamonte (11 April 2014). Getting Hy on Python: How to implement a Lisp front-end to Python (Speech). PyCon. Montreal. Retrieved 2 September 2014.
  6. ^ Paul Tagliamonte (2 April 2013). PyCon lightning talk (Speech). PyCon. Santa Clara. Retrieved 2 September 2014.

External links