hy/docs/quickstart.rst
Kevin Yap 8c0ac0862f Adhere to CPython's documentation guidelines
- Inline code is written using ``double backticks``
- Italicized text uses *asterisks* rather than `single backticks`
- Function parameters are italicized rather than written as inline code
2014-12-07 02:09:43 -08: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.