diff --git a/MANIFEST b/MANIFEST index 6114b72..290e8fb 100644 --- a/MANIFEST +++ b/MANIFEST @@ -10,5 +10,6 @@ joy/joy.py joy/library.py joy/parser.py joy/utils/__init__.py +joy/utils/brutal_hackery.py joy/utils/pretty_print.py joy/utils/stack.py diff --git a/Makefile b/Makefile index dea37d2..a606fa6 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # My make-fu style is old and tired. I just want to have a few helper commands. TESTDIR = ./test00 +VERSION = 0.1.0 .PHONY: clean sdist test docs @@ -12,11 +13,13 @@ clean: sdist: python ./setup.py sdist +# In order to support testing the code as installed +# create a virtualenv and install the source dist zip there. test: sdist $(RM) -r $(TESTDIR) virtualenv --system-site-packages --never-download $(TESTDIR) . $(TESTDIR)/bin/activate && \ - pip install --no-cache-dir --no-index ./dist/Joypy-0.1.tar.gz + pip install --no-cache-dir --no-index ./dist/Joypy-$(VERSION).tar.gz echo "Type: source $(TESTDIR)/bin/activate" diff --git a/README b/README index 13ee8d6..0e96ed1 100644 --- a/README +++ b/README @@ -1,10 +1,4 @@ - ____ ____ _ _____ _____ - | _ \| _ \ / \ | ___|_ _| - | | | | |_) | / A \ | |_ | | - | |_| | _ < / ___ \| _| | | - |____/|_| \_\_/ \_\_| |_| - --------------------------------------------------- +-------------------------------------------------- Joypy @@ -15,7 +9,7 @@ -------------------------------------------------- -Copyright © 2014, 2015, 2017 Simon Forman +Copyright © 2014, 2015, 2017, 2018 Simon Forman This file is part of Joypy @@ -41,18 +35,9 @@ Joy is a programming language created by Manfred von Thun that is easy to use and understand and has many other nice properties. This Python package implements an interpreter for a dialect of Joy that attempts to stay very close to the spirit of Joy but does not precisely match the -behaviour of the original version(s) written in C. - -The main difference between Joypy and the originals, other than being -written in Python, is that it works by the "Continuation-Passing Style". -In Joy, control-flow is done by combinators that expect quoted programs -on the stack and execute them in various ways. In Joypy they work by -changing the pending expression that the interpreter is about to execute. -In concrete terms, the combinators could work by making recursive calls -to the interpreter and all intermediate state would be held in the call -stack of the implementation language, in this Joypy implementation they -work instead by changing the pending expression and intermediate state -is put there. +behaviour of the original version(s) written in C. The main difference +between Joypy and the originals, other than being written in Python, is +that it works by the "Continuation-Passing Style". As I study Joy I find that it is very aptly named. It is clear, concise, and ameniable to advanced techniques for constructing bug-free software. @@ -125,9 +110,15 @@ are called "combinators", which accept quoted programs on the stack and run them in various ways. These combinators factor specific patterns that provide the effect of control-flow in other languages (such as ifte which is like if..then..else..) Combinators receive the current -expession in addition to the stack and return the next expression. As -mentioned above, the combinators in Joypy work by changing the pending -expression before returning it. +expession in addition to the stack and return the next expression. +In Joy control-flow is done by combinators that expect quoted programs +on the stack and execute them in various ways. In Joypy they work by +changing the pending expression that the interpreter is about to execute. +In concrete terms, the combinators could work by making recursive calls +to the interpreter and all intermediate state would be held in the call +stack of the implementation language, in this Joypy implementation they +work instead by changing the pending expression and intermediate state +is put there. In general, where otherwise unspecified, the semantics of Joypy are that of the underlying Python. That means, for example, that integers are diff --git a/setup.py b/setup.py index 05f5c29..d337734 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ from textwrap import dedent setup( name='Joypy', - version='0.1', + version='0.1.0', description='Python Implementation of Joy', long_description=dedent('''\ Joy is a programming language created by Manfred von Thun that is easy to @@ -37,7 +37,7 @@ setup( url='https://osdn.net/projects/joypy', packages=['joy', 'joy.utils'], classifiers=[ - 'Development Status :: 3 - Alpha', + 'Development Status :: 4 - Beta', 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', 'Programming Language :: Python :: 2.7', ],