Hy
Hy logo - Cuddles the cuttlefish | |
Paradigm | Multi-paradigm: procedural, functional, object-oriented, meta, reflective, generic |
---|---|
Family | Lisp |
Designed by | Paul Tagliamonte |
Developers | Core team |
First appeared | 2013 |
Preview release | |
Scope | lexical, optionally dynamic[citation needed] |
Platform | IA-32, x86-64 |
OS | Cross-platform |
License | MIT-style |
Filename extensions | .hy |
Website | hylang |
Influenced by | |
Kawa, Clojure, Common Lisp |
Hy is a dialect of the Lisp programming language designed to interact with Python by translating s-expressions into Python's abstract syntax tree (AST).[2][3] Hy was introduced at Python Conference (PyCon) 2013 by Paul Tagliamonte.[4] Lisp allows operating on code as data (metaprogramming), thus Hy can be used to write domain-specific languages.[5]
Similar to Kawa's and Clojure's mappings onto the Java virtual machine (JVM),[6][7] Hy is meant to operate as a transparent Lisp front-end for Python.[8] It allows Python libraries, including the standard library, to be imported and accessed alongside Hy code with a compiling[note 1] step where both languages are converted into Python's AST.[note 2][9][10][11]
Example code
From the language documentation:[12]
=> (print "Hy!") Hy! => (defn salutationsnm [name] (print (+ "Hy " name "!"))) => (salutationsnm "YourName") Hy YourName!
See also
Notes
References
- ↑ 1.0 1.1 "Hy 1.0a4". GitHub. https://github.com/hylang/hy/tree/1.0a4.
- ↑ Jaworski, Michał; Ziadé, Tarek (2019). Expert Python programming (Third ed.). Birmingham, U.K.: Packt Publishing. pp. 173. ISBN 978-1-78980-677-9. OCLC 1125343555. https://www.worldcat.org/oclc/1125343555.
- ↑ Danjou, Julien (2018). Serious Python: black-belt advice on deployment, scalability, testing, and more. San Francisco, CA: No Starch Press. pp. 145–149. ISBN 9781593278793. OCLC 1057729260.
- ↑ Tagliamonte, Paul (2 April 2013). PyCon lightning talk (Speech). Python Conference (PyCon). Santa Clara. Retrieved 2 September 2014.
- ↑ Tagliamonte, Paul (11 April 2014). Getting Hy on Python: How to implement a Lisp front-end to Python (Speech). PyCon. Montreal. Retrieved 2 September 2014.
- ↑ Turto, Tuukka (14 February 2014). "Programming Can Be Fun with Hy". Open Source For You. http://www.opensourceforu.com/2014/02/programming-can-fun-hy/.
- ↑ Watson, Mark (2020). A Lisp Programmer Living in Python-Land: The Hy Programming Language. LeanBooks. https://markwatson.com/opencontent/hy-lisp-python.pdf.
- ↑ Edge, Jake (30 April 2014). "Getting Hy on Python". https://lwn.net/Articles/596626/.
- ↑ "Hy Documentation". http://docs.hylang.org/en/stable/tutorial.html#hy-is-a-lisp-flavored-python.
- ↑ Danjou, Julien (26 March 2014). "The AST". The Hacker's Guide to Python. pp. 165–172. https://books.google.com/books?id=B6nhAwAAQBAJ&pg=PT171.
- ↑ Kitchin, John (31 March 2016). "More on Hy and why I think it is a big deal". Carnegie Mellon University. http://kitchingroup.cheme.cmu.edu/blog/2016/03/31/More-on-Hy-and-why-I-think-it-is-a-big-deal/.
- ↑ "Quickstart". 15 May 2018. http://docs.hylang.org/en/stable/quickstart.html.
External links
1955 | 1960 | 1965 | 1970 | 1975 | 1980 | 1985 | 1990 | 1995 | 2000 | 2005 | 2010 | 2015 | 2019 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
LISP 1, 1.5, LISP 2(abandoned) | ||||||||||||||
Maclisp | ||||||||||||||
Interlisp | ||||||||||||||
Lisp Machine Lisp | ||||||||||||||
Scheme | R5RS | R6RS | R7RS small | |||||||||||
NIL | ||||||||||||||
Franz Lisp | ||||||||||||||
Common Lisp | ||||||||||||||
Le Lisp | ||||||||||||||
T | ||||||||||||||
Emacs Lisp | ||||||||||||||
AutoLISP | ||||||||||||||
OpenLisp | ||||||||||||||
PicoLisp | ||||||||||||||
EuLisp | ||||||||||||||
ISLISP | ||||||||||||||
newLISP | ||||||||||||||
Racket | ||||||||||||||
GNU Guile | ||||||||||||||
Visual LISP | ||||||||||||||
Qi, QiII | Shen | |||||||||||||
Clojure | ||||||||||||||
Arc | ||||||||||||||
LFE | ||||||||||||||
Hy |
Original source: https://en.wikipedia.org/wiki/Hy.
Read more |