hy/docs/quickstart.rst
2014-01-17 04:02:33 +02:00

44 lines
1.0 KiB
ReStructuredText

==========
Quickstart
==========
.. image:: _static/cuddles-transparent-small.png
:alt: Karen Rustard's Cuddles
(Thanks to Karen Rustad for Cuddles!)
**HOW TO GET HY REAL FAST**:
1. Create a `Virtual Python Environment
<https://pypi.python.org/pypi/virtualenv>`_
2. Activate your Virtual Python Environment
3. Install `hy from PyPI <https://pypi.python.org/pypi/hy>`_ with ``pip install hy``
4. Start a REPL with ``hy``
5. Type stuff in the REPL::
=> (print "Hy!")
Hy!
=> (defn salutationsnm [name] (print (+ "Hy " name "!")))
=> (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 and type::
(print "I was going to code in python syntax, but then I got hy.")
8. Save as ``awesome.hy``
9. And run your first Hy program::
hy awesome.hy
10. Take a deep breath so as to not hyperventilate
11. Smile villainously and sneak off to your hydeaway and do
unspeakable things