Merge branch 'docs-me-now' of git://github.com/willkg/hy
This commit is contained in:
commit
42882a116c
19
LICENSE
Normal file
19
LICENSE
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2012, 2013 Paul Tagliamonte <paultag@debian.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
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)
|
||||
|
||||
|
||||
Hylarious Hacks
|
||||
---------------
|
||||
|
||||
@ -28,3 +29,13 @@ Well, I wrote Hy to help people realize one thing about Python:
|
||||
It's really goddamn awesome.
|
||||
|
||||
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)
|
||||
|
68
docs/hacking.rst
Normal file
68
docs/hacking.rst
Normal file
@ -0,0 +1,68 @@
|
||||
===============
|
||||
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 don't spraypaint it on your neighbor's fence (without asking nicely)!
|
||||
|
||||
|
||||
Hack!
|
||||
=====
|
||||
|
||||
Do this:
|
||||
|
||||
1. create a `Python virtual environment
|
||||
<https://pypi.python.org/pypi/virtualenv>`_
|
||||
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::
|
||||
:maxdepth: 3
|
||||
|
||||
quickstart
|
||||
hacking
|
||||
language/tutorial
|
||||
.. library/index
|
||||
|
@ -1,3 +1,4 @@
|
||||
========
|
||||
Tutorial
|
||||
========
|
||||
|
||||
@ -20,7 +21,7 @@ This is pretty cool because it means Hy is several things:
|
||||
|
||||
|
||||
Basic intro to lisp for pythonistas
|
||||
-----------------------------------
|
||||
===================================
|
||||
|
||||
Okay, maybe you've never used lisp before, but you've used python!
|
||||
|
||||
@ -173,7 +174,7 @@ incredible power (just be careful to not aim them footward)!
|
||||
|
||||
|
||||
Hy is python flavored lisp (or vice versa?)
|
||||
-------------------------------------------
|
||||
===========================================
|
||||
|
||||
Hy converts to python's own abstract syntax tree, so you'll soon start
|
||||
to find that all the familiar power of python is at your fingertips.
|
||||
@ -364,7 +365,7 @@ In hy, you could do these like:
|
||||
|
||||
|
||||
Protips!
|
||||
--------
|
||||
========
|
||||
|
||||
Hy also features something known as the "threading macro", a really neat
|
||||
feature of Clojure's. The "threading macro" (written as "->"), is used
|
||||
@ -404,9 +405,8 @@ Which, of course, expands out to:
|
||||
Much more readable, no! Use the threading macro!
|
||||
|
||||
|
||||
|
||||
TODO
|
||||
----
|
||||
====
|
||||
|
||||
- How do I define classes?
|
||||
- Blow your mind with macros!
|
||||
|
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