4 ms·
Oh, man, have I got a treat for you: go checkout hylang.org - Hy is a lisp that (ab)uses the python AST to give you access to the entirety of python, but gives
by vonwoodson 4y ago
Oh, man, have I got a treat for you: go checkout hylang.org -
Hy is a lisp that (ab)uses the python AST to give you access to the entirety of python, but gives you a pretty lisp syntax.
- gleenn 4y agoI've always been super interested in Hy but couldn't ever get it working. Any suggestions for forums or good installation instructions or tutorials? I live Clojure and also have to deal with a lot of Python at work so would be awesome to use lispy syntax to write my Python stuff
- danuker 4y agoDoes this not work? `pip3 install --user hy` as mentioned in the first page of the docs: https://docs.hylang.org/en/stable/ https://docs.hylang.org/en/stable/
- gilch 4y agoHissp might be easier to get started with. It's much less complex as a whole and has pretty thorough introductory docs.
- markjreed 4y agoJust `pip install hy` and then `python -mhy` to run it. Once you see how Python translates into Hy, it's pretty straightforward. (import os) (import [os.path :as op]) (with [f (open (op.join dir_name file_name) "w")] (.write f "...")) Some things you just have to learn, like using `(setv var value)` to do assignment, or the fact that `(for)` is an imperative loop while `(lfor)` is a list comprehension, but a little experimentation goes a long way and the docs are quite good.