TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Try Hy

178 pointsby proppyover 11 years ago

24 comments

ninetaxover 11 years ago
It&#x27;s a dialect of LISP that&#x27;s compiled down to Python AST IICR.<p>Here&#x27;s more information: <a href="http://docs.hylang.org/en/latest/tutorial.html" rel="nofollow">http:&#x2F;&#x2F;docs.hylang.org&#x2F;en&#x2F;latest&#x2F;tutorial.html</a>
paultagover 11 years ago
Well done! If anyone wants to learn more:<p><a href="http://hylang.org/" rel="nofollow">http:&#x2F;&#x2F;hylang.org&#x2F;</a><p><a href="http://github.com/hylang" rel="nofollow">http:&#x2F;&#x2F;github.com&#x2F;hylang</a><p><a href="http://www.youtube.com/watch?v=ulekCWvDFVI" rel="nofollow">http:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ulekCWvDFVI</a><p>and a quick 5 minute lightning talk:<p><a href="http://youtu.be/1vui-LupKJI?t=16m13s" rel="nofollow">http:&#x2F;&#x2F;youtu.be&#x2F;1vui-LupKJI?t=16m13s</a><p>(Creator here)<p>Hack on!
评论 #6701421 未加载
agentultraover 11 years ago
I did a little presentation on Hy at Pycon Canada earlier this year [1].<p>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.<p>It&#x27;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.<p>[1] <a href="http://pyvideo.org/video/2328/hy-a-lisp-that-compiles-to-python" rel="nofollow">http:&#x2F;&#x2F;pyvideo.org&#x2F;video&#x2F;2328&#x2F;hy-a-lisp-that-compiles-to-pyt...</a>
mkramlichover 11 years ago
A+ for presentation
评论 #6700304 未加载
anaphorover 11 years ago
So it just desugars into Python? I see there is a section in the documentation for macros, but there&#x27;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).
评论 #6700561 未加载
评论 #6700337 未加载
评论 #6700351 未加载
zaph0dover 11 years ago
Very nice. Surface syntax (and some semantics like interop) seem to be heavily inspired by Clojure :-)
girvoover 11 years ago
Hy is neat. I love Lisps that &quot;compile&quot; or are embedable within host scripting languages.<p>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&#x27;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!<p>[0]: <a href="http://scriptor.github.io/pharen/" rel="nofollow">http:&#x2F;&#x2F;scriptor.github.io&#x2F;pharen&#x2F;</a>
dmoneyover 11 years ago
To quote Dark Helmet, &quot;What the hell am I looking at?&quot;
vezzy-fnordover 11 years ago
Not bad. Could be a very useful tool to teach Python programmers Lisp, although I don&#x27;t think Python benefits much from converting its syntax to sexprs.
评论 #6700365 未加载
nlake44over 11 years ago
Source: <a href="https://github.com/hylang/tryhy" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;hylang&#x2F;tryhy</a>
andrelaszloover 11 years ago
Apparently without TCO :(<p><pre><code> File &quot;&lt;input&gt;&quot;, line 1, in fac File &quot;&lt;input&gt;&quot;, line 1, in fac File &quot;&lt;input&gt;&quot;, line 1, in fac RuntimeError: maximum recursion depth exceeded =&gt;</code></pre>
mattholtomover 11 years ago
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&#x27;ve made to date by a pretty wide margin.
评论 #6700707 未加载
评论 #6700653 未加载
jackhammonsover 11 years ago
Incredible implementation.
评论 #6700259 未加载
评论 #6700303 未加载
petercooperover 11 years ago
What blew my mind is this actually worked on my iPod Touch and brought up the keyboard. Usually &quot;dynamic&quot; JavaScript keyboards or games totally fail on there..
hcarvalhoalvesover 11 years ago
Excellent. I thought what a LISP on top of the Python runtime would be (like Clojure + JVM), didn&#x27;t knew this existed already.
a3_nmover 11 years ago
&quot;(defun f x (x))&quot; gives a Python stack trace.
评论 #6701234 未加载
评论 #6701230 未加载
Sunlisover 11 years ago
Finally my knowledge of Scheme comes in handy!
tallesover 11 years ago
Love at first sight with the presentation
d0mover 11 years ago
I think this is fucking amazing.
basytover 11 years ago
effin&#x27; finally. now to do some serious lisping!
derp_doggover 11 years ago
where&#x27;s cons?
评论 #6701852 未加载
评论 #6700798 未加载
jbejaover 11 years ago
This could be the next big thing.
jbejaover 11 years ago
Is Python really that awesome?
评论 #6702585 未加载
评论 #6700562 未加载
ravestarover 11 years ago
[]+1 = [] 1<p>[]+[] -&gt; error ...
评论 #6700279 未加载