diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 1809a1f..24bca21 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -31,13 +31,18 @@ Quickstart 7. Open up an elite programming editor and type:: + #! /usr/bin/env hy (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:: +9. Make it executable:: - hy awesome.hy + chmod +x awesome.hy -10. Take a deep breath so as to not hyperventilate. -11. Smile villainously and sneak off to your hydeaway and do +10. And run your first Hy program:: + + ./awesome.hy + +11. Take a deep breath so as to not hyperventilate. +12. Smile villainously and sneak off to your hydeaway and do unspeakable things. diff --git a/docs/tutorial.rst b/docs/tutorial.rst index cf76538..91b4062 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -306,6 +306,13 @@ Comments start with semicolons: ; (print "but this will not") (+ 1 2 3) ; we'll execute the addition, but not this comment! +Hashbang (``#!``) syntax is supported: + +.. code-block:: clj + + #! /usr/bin/env hy + (print "Make me executable, and run me!") + Looping is not hard but has a kind of special structure. In Python, we might do::