3 ms·
Just `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 [o
by markjreed 4y ago
Just `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.