I did a little presentation on Hy at Pycon Canada earlier this year [1].
Hy has come a ways since then even. Shortly after that talk we added succinct syntax aliases for QUOTE and QUASIQUOTE. And we added a nice clojure-inspired core library.
It's a cool little language. Fun to hack on. You could learn a few things if you do. And I do hope that we can start help creating documentation for the Python AST module via this project.
So it just desugars into Python? I see there is a section in the documentation for macros, but there's nothing there. Does it support AST macros right now? I thought of doing something similar to this except doing some kind of static or gradual typing (that would be a larger project though).
Original author of hylang here - because lisp is homoiconic, you have real macros, not AST macros; although the distinction isn't exactly clear, it's nice to have them as first-class members of the language, and allow them to avoid caring about stmt vs expr internally.
I've had similar ideas. I really like the batteries that are included with python but I would like to be able to add type annotations that are enforced to my code base for type safety.
I also really like the idea of being able to extend the language with macros. Hy certainly seems like a good start towards a language like this.
Hy is neat. I love Lisps that "compile" or are embedable within host scripting languages.
My favourite one to hack on (owing to my PHP ability) is Pharen[0]. Very neat little Lisp that compiles down to PHP, which is very fun to play with. I highly suggest giving Hy a go if you're a Pythonista, as you can learn a lot about programming in general by seeing how these sorts of languages map to the host. Very fun to hack on, too!
Not bad. Could be a very useful tool to teach Python programmers Lisp, although I don't think Python benefits much from converting its syntax to sexprs.
If this thing supports macros (and it seems to, see the pipe example in the tutorial), it may be more powerful than Python — as you'd expect from a Lisp.
Heh, recognized reverse polish notation right away. One of the companies I interviewed at last year had me program an RPN calculator fed by CSV spreadsheets. Weirdest thing I've made to date by a pretty wide margin.
"+ 41 1" more closely resembeles straight-up non-reverse Polish notation. Its cool property is that it has unambiguous grouping without parentheses.
Reverse Polish notation's even cooler property is that, in addition to the unambiguity, it can easily be evaluated from left to right with a stack: If you see a operand, push it onto the stack. If you see an operator, pop two operands off the stack, compute, and push the result onto the stack. By the end you'll have a one-element stack with your result.
Really what we're seeing here, though, is a language without infix operators: all functions are of the form "<name> <operand1> <operand2>…", but grouping still works as expected.
What blew my mind is this actually worked on my iPod Touch and brought up the keyboard. Usually "dynamic" JavaScript keyboards or games totally fail on there..
[+] [-] ninetax|12 years ago|reply
Here's more information: http://docs.hylang.org/en/latest/tutorial.html
[+] [-] paultag|12 years ago|reply
http://hylang.org/
http://github.com/hylang
http://www.youtube.com/watch?v=ulekCWvDFVI
and a quick 5 minute lightning talk:
http://youtu.be/1vui-LupKJI?t=16m13s
(Creator here)
Hack on!
[+] [-] kro0ub|12 years ago|reply
[+] [-] agentultra|12 years ago|reply
Hy has come a ways since then even. Shortly after that talk we added succinct syntax aliases for QUOTE and QUASIQUOTE. And we added a nice clojure-inspired core library.
It's a cool little language. Fun to hack on. You could learn a few things if you do. And I do hope that we can start help creating documentation for the Python AST module via this project.
[1] http://pyvideo.org/video/2328/hy-a-lisp-that-compiles-to-pyt...
[+] [-] mkramlich|12 years ago|reply
[+] [-] ceautery|12 years ago|reply
[+] [-] anaphor|12 years ago|reply
[+] [-] paultag|12 years ago|reply
Happy to answer questions.
[+] [-] Foxboron|12 years ago|reply
[+] [-] haney|12 years ago|reply
I also really like the idea of being able to extend the language with macros. Hy certainly seems like a good start towards a language like this.
[+] [-] zaph0d|12 years ago|reply
[+] [-] girvo|12 years ago|reply
My favourite one to hack on (owing to my PHP ability) is Pharen[0]. Very neat little Lisp that compiles down to PHP, which is very fun to play with. I highly suggest giving Hy a go if you're a Pythonista, as you can learn a lot about programming in general by seeing how these sorts of languages map to the host. Very fun to hack on, too!
[0]: http://scriptor.github.io/pharen/
[+] [-] dmoney|12 years ago|reply
[+] [-] vezzy-fnord|12 years ago|reply
[+] [-] nine_k|12 years ago|reply
[+] [-] nlake44|12 years ago|reply
[+] [-] andrelaszlo|12 years ago|reply
[+] [-] mattholtom|12 years ago|reply
[+] [-] matchu|12 years ago|reply
Reverse Polish notation's even cooler property is that, in addition to the unambiguity, it can easily be evaluated from left to right with a stack: If you see a operand, push it onto the stack. If you see an operator, pop two operands off the stack, compute, and push the result onto the stack. By the end you'll have a one-element stack with your result.
Really what we're seeing here, though, is a language without infix operators: all functions are of the form "<name> <operand1> <operand2>…", but grouping still works as expected.
http://en.wikipedia.org/wiki/Polish_notation
http://en.wikipedia.org/wiki/Reverse_Polish_notation
[+] [-] sockgrant|12 years ago|reply
[+] [-] jackhammons|12 years ago|reply
[+] [-] anaphor|12 years ago|reply
[+] [-] rhizome31|12 years ago|reply
[+] [-] petercooper|12 years ago|reply
[+] [-] hcarvalhoalves|12 years ago|reply
[+] [-] a3_nm|12 years ago|reply
[+] [-] dagurp|12 years ago|reply
[+] [-] chrismonsanto|12 years ago|reply
[+] [-] Sunlis|12 years ago|reply
[+] [-] talles|12 years ago|reply
[+] [-] d0m|12 years ago|reply
[+] [-] unknown|12 years ago|reply
[deleted]