An experimental concatenative Python-based programming language.
Examples are in the examples directory. To see the (out of date and incomplete) spec, go to http://jmanuel1.github.io/concat-spec/.
Python 3.12 required.
Python code is formatted using Ruff through a
pre-commit Git hook. To set this up
in your clone of the repository, install the dev
dependencies of the project
(by running pip install -e .[dev]
, for example), and then run:
pre-commit install
Now Ruff and pre-commit should be working! Whenever you commit a Python file, Ruff will be ran on that file. If Ruff makes formatting changes, you might need to try restaging and recommiting.
If you run the tests on Windows, you might need a
Rust installation for one of the tests. (The tests
depend on pywinpty
to use Windows
pseudoterminals.)
If your Python is 32-bit, you may get Rust compile errors that make it look like
the standard library is missing (in particular, E0463: rustc --explain E0463
).
As suggested by rustc
, you can try adding the right standard library with
rustup target add <target>
. I used the target i686-pc-windows-msvc
even
though pywinpty
claims to require x86_64-pc-windows-msvc
to build from
source. Then set the environment variable CARGO_BUILD_TARGET
to
i686-pc-windows-msvc
and try to install pywinpty
again.
Run the tests and get coverage info using coverage run -m nose2 --pretty-assert concat.tests
. (Make sure you've installed the development dependencies first.)
Nota Bene: If you have concat
installed globally, make sure to create and
enter a virtualenv
before testing, so you don't end up running the installed
version.
Change the version number in setup.py
. Upload will fail if you try to push
an existing version.
Delete the dist
directory, if it exists.
rmdir dist /S
Build source and pure Python-3 distributions.
py -3 setup.py sdist
py -3 setup.py bdist_wheel
Upload.
twine upload dist/* [-r pypitest]
For a similar idea that is more mature, check out Nustack.