Add quickstart and hacking docs
This commit is contained in:
parent
39106c9c62
commit
6fbba17158
11
README.md
11
README.md
@ -7,6 +7,7 @@ Lisp and Python should love each other. Let's make it happen.
|
|||||||
|
|
||||||
[![Build Status](https://travis-ci.org/paultag/hy.png?branch=master)](https://travis-ci.org/paultag/hy)
|
[![Build Status](https://travis-ci.org/paultag/hy.png?branch=master)](https://travis-ci.org/paultag/hy)
|
||||||
|
|
||||||
|
|
||||||
Hylarious Hacks
|
Hylarious Hacks
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
@ -28,3 +29,13 @@ Well, I wrote Hy to help people realize one thing about Python:
|
|||||||
It's really goddamn awesome.
|
It's really goddamn awesome.
|
||||||
|
|
||||||
Oh, and lisps are neat.
|
Oh, and lisps are neat.
|
||||||
|
|
||||||
|
|
||||||
|
Project
|
||||||
|
-------
|
||||||
|
|
||||||
|
* Code: https://github.com/paultag/hy
|
||||||
|
* Docs: http://hy.rtfd.org/
|
||||||
|
* Quickstart: http://hy.rtfd.org/en/latest/quickstart.html
|
||||||
|
* Bug reports: We have no bugs! Your bugs are your own! (https://github.com/paultag/hy/issues)
|
||||||
|
* License: MIT (Expat)
|
||||||
|
67
docs/hacking.rst
Normal file
67
docs/hacking.rst
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
===============
|
||||||
|
Hacking on hy
|
||||||
|
===============
|
||||||
|
|
||||||
|
Join our hyve!
|
||||||
|
==============
|
||||||
|
|
||||||
|
Please come hack on hy!
|
||||||
|
|
||||||
|
Please come hang out with us on ``#hy`` on ``irc.freenode.net``!
|
||||||
|
|
||||||
|
Please talk about it on Twitter with the ``#hy`` hashtag!
|
||||||
|
|
||||||
|
Please blog about it!
|
||||||
|
|
||||||
|
Please spraypaint it on your neighbor's fence!
|
||||||
|
|
||||||
|
|
||||||
|
Hack!
|
||||||
|
=====
|
||||||
|
|
||||||
|
Do this:
|
||||||
|
|
||||||
|
1. create a Python virtual environment
|
||||||
|
2. (optional) go to https://github.com/paultag/hy and fork it
|
||||||
|
3. get the source code::
|
||||||
|
|
||||||
|
$ git clone git@github.com:paultag/hy.git
|
||||||
|
|
||||||
|
(or use your fork)
|
||||||
|
4. install for hacking::
|
||||||
|
|
||||||
|
$ python setup.py develop
|
||||||
|
|
||||||
|
5. install other develop-y requirements::
|
||||||
|
|
||||||
|
$ pip install -r requirements-dev.txt
|
||||||
|
|
||||||
|
6. do awesome things; make someone shriek in delight/disgust at what
|
||||||
|
you have wrought
|
||||||
|
|
||||||
|
|
||||||
|
Test!
|
||||||
|
=====
|
||||||
|
|
||||||
|
Tests are located in ``tests/``. We use `nose
|
||||||
|
<https://nose.readthedocs.org/en/latest/>`_.
|
||||||
|
|
||||||
|
To run the tests::
|
||||||
|
|
||||||
|
$ nosetests
|
||||||
|
|
||||||
|
Write tests---tests are good!
|
||||||
|
|
||||||
|
|
||||||
|
Document!
|
||||||
|
=========
|
||||||
|
|
||||||
|
Documentation is located in ``docs/``. We use `Sphinx
|
||||||
|
<http://sphinx-doc.org/>`_.
|
||||||
|
|
||||||
|
To build the docs in html::
|
||||||
|
|
||||||
|
$ cd docs
|
||||||
|
$ make html
|
||||||
|
|
||||||
|
Write docs---docs are good! Even this doc!
|
@ -36,5 +36,7 @@ Contents:
|
|||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
|
|
||||||
|
quickstart
|
||||||
|
hacking
|
||||||
language/tutorial
|
language/tutorial
|
||||||
.. library/index
|
.. library/index
|
||||||
|
31
docs/quickstart.rst
Normal file
31
docs/quickstart.rst
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
==========
|
||||||
|
Quickstart
|
||||||
|
==========
|
||||||
|
|
||||||
|
I WANT TO BE DOING HY STUFF RIGHT NOW!
|
||||||
|
|
||||||
|
1. create a Python virtual environment
|
||||||
|
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!
|
||||||
|
=> (defn salutationsnm [] (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
|
||||||
|
8. type::
|
||||||
|
|
||||||
|
(print "hy is the BEST!")
|
||||||
|
|
||||||
|
9. save as ``test_program_of_awesome.hy``
|
||||||
|
10. run ``hy test_program_of_awesome.hy``
|
Loading…
x
Reference in New Issue
Block a user