2013-04-05 22:30:12 +02:00
|
|
|
==========
|
|
|
|
Quickstart
|
|
|
|
==========
|
|
|
|
|
2013-04-06 03:50:13 +02:00
|
|
|
HOW TO GET HY REAL FAST:
|
2013-04-05 22:30:12 +02:00
|
|
|
|
2013-04-06 03:22:47 +02:00
|
|
|
1. create a `Python virtual environment
|
|
|
|
<https://pypi.python.org/pypi/virtualenv>`_
|
2013-04-05 22:30:12 +02:00
|
|
|
2. activate your Python virtual environment
|
|
|
|
3. ``pip install hy``
|
|
|
|
4. start a REPL with ``hy``
|
|
|
|
5. type stuff in the REPL::
|
|
|
|
|
|
|
|
=> (print "Hy!")
|
|
|
|
Hy!
|
2013-04-08 23:01:12 +02:00
|
|
|
=> (defn salutationsnm [name] (print (+ "Hy " name "!")))
|
2013-04-05 22:30:12 +02:00
|
|
|
=> (salutationsnm "YourName")
|
|
|
|
Hy YourName!
|
|
|
|
|
|
|
|
etc
|
|
|
|
|
|
|
|
6. hit CTRL-D when you're done
|
|
|
|
|
|
|
|
OMG! That's amazing! I want to write a hy program.
|
|
|
|
|
|
|
|
7. open up an elite programming editor
|
|
|
|
8. type::
|
|
|
|
|
2013-04-08 18:03:42 +02:00
|
|
|
(print "i was going to code in python syntax, but then i got hy")
|
2013-04-05 22:30:12 +02:00
|
|
|
|
|
|
|
9. save as ``test_program_of_awesome.hy``
|
2013-04-06 03:27:30 +02:00
|
|
|
10. run::
|
|
|
|
|
|
|
|
hy test_program_of_awesome.hy
|
2013-04-06 03:38:18 +02:00
|
|
|
|
2013-04-06 03:50:13 +02:00
|
|
|
11. take a deep breath so as to not hyperventilate
|
|
|
|
12. smile villainously and sneak off to your hydeaway and do
|
2013-04-06 03:38:18 +02:00
|
|
|
unspeakable things
|