Thun/docs
Simon Forman d050180b88 Some docs that got swept up in the commotion. 2018-06-06 13:08:04 -07:00
..
Advent_of_Code_2017_December_3rd_files Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
jupyter_kernel Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
sphinx_docs Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
0._This_Implementation_of_Joy_in_Python.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
0._This_Implementation_of_Joy_in_Python.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
0._This_Implementation_of_Joy_in_Python.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
0._This_Implementation_of_Joy_in_Python.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
1._Basic_Use_of_Joy_in_a_Notebook.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
1._Basic_Use_of_Joy_in_a_Notebook.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
1._Basic_Use_of_Joy_in_a_Notebook.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
1._Basic_Use_of_Joy_in_a_Notebook.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
2._Library_Examples.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
2._Library_Examples.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
2._Library_Examples.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
2._Library_Examples.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
3._Developing_a_Program.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
3._Developing_a_Program.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
3._Developing_a_Program.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
3._Developing_a_Program.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_1st.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_1st.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_1st.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_1st.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_2nd.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_2nd.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_2nd.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_2nd.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_3rd.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_3rd.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_3rd.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_3rd.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_4th.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_4th.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_4th.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_4th.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_5th.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_5th.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_5th.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_5th.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_6th.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_6th.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_6th.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Advent_of_Code_2017_December_6th.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Document.md Some docs that got swept up in the commotion. 2018-06-06 13:08:04 -07:00
Generator_Programs.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Generator_Programs.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Generator_Programs.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Generator_Programs.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.html Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.ipynb Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.md Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Hylo-,_Ana-,_Cata-,_and_Para-morphisms_-_Recursion_Combinators.rst Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Library_Examples.pdf Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Makefile Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -07:00
Newton-Raphson.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Newton-Raphson.ipynb Working on tree docs. 2018-05-29 11:38:58 -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
Ordered_Binary_Trees.html Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Ordered_Binary_Trees.ipynb Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Ordered_Binary_Trees.md Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Ordered_Binary_Trees.rst Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Quadratic.html Initial move of code from git repo. 2018-04-14 18:13:13 -07:00
Quadratic.ipynb More docs. 2018-06-05 17:39:18 -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 Some docs that got swept up in the commotion. 2018-06-06 13:08:04 -07:00
Replacing.html I want to re-make only edited notebooks. 2018-06-06 12:48:16 -07:00
Replacing.ipynb Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
Replacing.md I want to re-make only edited notebooks. 2018-06-06 12:48:16 -07:00
Replacing.rst I want to re-make only edited notebooks. 2018-06-06 12:48:16 -07:00
Trees.html Regenerated docs. 2018-06-05 17:41:22 -07:00
Trees.ipynb Working on tree docs. 2018-05-29 11:38:58 -07:00
Trees.md Regenerated docs. 2018-06-05 17:41:22 -07:00
Trees.rst Regenerated docs. 2018-06-05 17:41:22 -07:00
Treestep.html Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Treestep.ipynb Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Treestep.md Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Treestep.rst Bumped version to 0.2.0; docs edits. 2018-06-06 08:47:26 -07:00
Zipper.html Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
Zipper.ipynb Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
Zipper.md Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
Zipper.rst Bunch of minor docs edits. 2018-06-06 12:47:11 -07:00
notebook_preamble.py Change project name to Thun. 2018-04-21 21:26:41 -07:00
notebook_preamble.pyc Make cannot deal with spaces in filenames. 2018-06-06 12:57:12 -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.