Thun/docs
Simon Forman 2887132aeb Editing Sphinx docs.
A lot more still to do but it's coming along.
2018-04-25 13:35:03 -07:00
..
Advent of Code 2017 December 3rd_files Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
jupyter_kernel Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
sphinx_docs Editing Sphinx docs. 2018-04-25 13:35:03 -07:00
0. This Implementation of Joy in Python.html Working on the Sphinx docs. 2018-04-24 21:01:16 -07:00
0. This Implementation of Joy in Python.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
0. This Implementation of Joy in Python.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
0. This Implementation of Joy in Python.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
1. Basic Use of Joy in a Notebook.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
1. Basic Use of Joy in a Notebook.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
1. Basic Use of Joy in a Notebook.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
1. Basic Use of Joy in a Notebook.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
2. Library Examples.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
2. Library Examples.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
2. Library Examples.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
2. Library Examples.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
3. Developing a Program.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
3. Developing a Program.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
3. Developing a Program.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
3. Developing a Program.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
4. Replacing Functions in the Dictionary.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
4. Replacing Functions in the Dictionary.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
4. Replacing Functions in the Dictionary.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
4. Replacing Functions in the Dictionary.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 1st.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 1st.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 1st.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 1st.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 2nd.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 2nd.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 2nd.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 2nd.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 3rd.html Working on the Sphinx docs. 2018-04-24 21:01:16 -07:00
Advent of Code 2017 December 3rd.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 3rd.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 3rd.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 4th.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 4th.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 4th.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 4th.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 5th.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 5th.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 5th.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 5th.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Advent of Code 2017 December 6th.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 6th.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 6th.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Advent of Code 2017 December 6th.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Document.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Generator Programs.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Generator Programs.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Generator Programs.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Generator Programs.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Hylo-, Ana-, Cata-, and Para-morphisms - Recursion Combinators.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Library Examples.pdf Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Newton-Raphson.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Newton-Raphson.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Newton-Raphson.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Newton-Raphson.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Quadratic.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Quadratic.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Quadratic.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Quadratic.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
README.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Trees.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Trees.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Trees.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Trees.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
Zipper.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Zipper.ipynb Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Zipper.md Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Zipper.rst ReST docs & library edits for Sphinx 2018-04-24 22:07:21 -07:00
notebook_preamble.py Change project name to Thun. 2018-04-21 21:26:41 -07:00
pe1.py Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
pe1.txt Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
repl.py Change project name to Thun. 2018-04-21 21:26:41 -07:00

README.md

Some Jupyter Notebooks and other material.

All of the notebooks are also available as HTML and Markdown files (generated using nbconvert) so you can view them without running Jupyter.

In order to run the Jupyter Notebooks you need Jupyter (obviously) and you should install Joypy. Here's an example using virtualenv from the joypy/ directory:

virtualenv --system-site-packages <DIRNAME>
. ./<DIRNAME>/bin/activate
python ./setup.py install

Once that's done you should be able to start Jupyter Notebook server with, e.g.:

python -n notebook

This starts it using the virtualenv version of Python so joy will be available. Navigate to the joypy/docs directory and the notebooks should be able to import the notebook_preamble.py file.

Table of Contents

    1. Basic Use of Joy in a Notebook
    1. Library Examples - Short examples of each word in the dictionary. Various formats.
    1. Developing a Program - Working with the first problem from Project Euler, "Find the sum of all the multiples of 3 or 5 below 1000", several forms of the program are derived.
    1. Replacing Functions in the Dictionary - Shows the basics of defining new "primitive" functions in Python or as definitions and adding them to the dictionary.
  • Factorial Function and Paramorphisms - A basic pattern of recursive control-flow.
  • Generator Programs - Using the x combinator to make generator programs which can be used to create unbounded streams of values.
  • Hylo-, Ana-, Cata-morphisms - Some basic patterns of recursive control-flow structures.
  • Quadratic - Not-so-annoying Quadratic Formula.
  • Trees - Ordered Binary Trees in Joy and more recursion.
  • Zipper - A preliminary examination of the idea of data-structure "zippers" for traversing datastructures.
  • notebook_preamble.py - Imported into notebooks to simplify the preamble code.
  • pe1.py pe1.txt - Set up and execute a Joy program for the first problem from Project Euler. The pe1.txt file is the trace. It's 2.8M uncompressed. Compressed with gzip it becomes just 0.12M.
  • repl.py - Run this script to start a REPL. Useful for e.g. running Joy code in a debugger.

Notes

One of the things that interests me about Joy is how programming becomes less about writing code and more about sound reasoning about simple (almost geometric) programs. Many of the notebooks in this collection consist of several pages of discussion to arrive at a few lines of Joy definitions. I think this is a good thing. This is "literate programming". The "programs" resemble mathematical proofs. You aren't implementing so much as deriving. The structure of Joy seems to force you to think clearly about the task in a way that is reliable but extremely flexible. It feels like a puzzle game, and the puzzles are often simple, and the solutions build on each other.