Merge pull request #1551 from waigx/docs/quickstart

Add `hy --spy` in quickstart
This commit is contained in:
Ryan Gonzalez 2018-03-26 21:41:06 -05:00 committed by GitHub
commit 308196d5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,23 +26,29 @@ Quickstart
etc etc
6. Hit CTRL-D when you're done. 6. Hit CTRL-D when you're done.
7. If you're familiar with Python, try ``hy --spy`` to check what happens inside::
=> (+ "Hyllo " "World" "!")
'Hyllo ' + 'World' + '!'
'Hyllo World!'
*OMG! That's amazing! I want to write a Hy program.* *OMG! That's amazing! I want to write a Hy program.*
7. Open up an elite programming editor and type:: 8. Open up an elite programming editor and type::
#! /usr/bin/env hy #! /usr/bin/env hy
(print "I was going to code in Python syntax, but then I got Hy.") (print "I was going to code in Python syntax, but then I got Hy.")
8. Save as ``awesome.hy``. 9. Save as ``awesome.hy``.
9. Make it executable:: 10. Make it executable::
chmod +x awesome.hy chmod +x awesome.hy
10. And run your first Hy program:: 11. And run your first Hy program::
./awesome.hy ./awesome.hy
11. Take a deep breath so as to not hyperventilate. 12. Take a deep breath so as to not hyperventilate.
12. Smile villainously and sneak off to your hydeaway and do 13. Smile villainously and sneak off to your hydeaway and do
unspeakable things. unspeakable things.