diiq/oyoy
{ "createdAt": "2012-11-25T06:22:52Z", "defaultBranch": "master", "description": "Oyster (a lispish thing) hopefully someday JIT-compiled with pypy", "fullName": "diiq/oyoy", "homepage": "", "language": "Python", "name": "oyoy", "pushedAt": "2015-01-25T23:20:21Z", "stargazersCount": 13, "topics": [], "updatedAt": "2017-01-19T19:49:33Z", "url": "https://github.com/diiq/oyoy"}Oyster is a programming language. It’s heavily lisp-influenced (though it becomes less lisp-like with each iteration).
Oyster
Section titled “Oyster”Oyster is lisp-like; but rather than being built around cons cells, it’s built around arrays and hash tables.
Oyster’s syntax is based on ‘Psychotic Bastard’, designed by @AdamHeck. Much of the development of the PB syntax for lisp is documented in this gist.
Here’s a very simple sample that currently runs:
set my-plus: fn (a b): a + b
my-plus 2 (3 + 5)(It returns 10.)
Oyster is unique largely because of its extensive use of fexprs. This is almost universally considered a bad idea, and made Oyster’s ancestor languages painfully slow. It is my hope that PyPy will be able to host Oyster and use its JIT-generator to win back the speed lost to fexprs.
Fexprs have astonishing expressive power. My goal with Oyster is to demonstrate and explore that power, even if the resulting language proves impractical.
Because I’m just playing around, the best way to learn what I’m doing is to contact me. Twitter (@diiq, and email ([s@diiq.org]!(mailto:s@diiq.org)) both work great.
Installation
Section titled “Installation”To start, you’ll need python and pip installed. Use the package manager of your choice.
-
Install virtualenv and virtualenvwrapper.
pip install virtualenv virtualenvwrapper -
Setup your shell to work with virtualenvwrapper. Here are the full instructions. For reference, here’s roughly what you need in your
.bashrcor.zshrc:export WORKON_HOME=$HOME/.virtualenvssource /usr/local/bin/virtualenvwrapper.sh -
Run
install.shto setup the virtualenv:source scripts/install.sh
Developing
Section titled “Developing”Activate the virtual environment (if you just installed, it’s already active; see [Time Savers] for how to have this happen automatically when you cd into the project directory).
workon oyoyUse fab to do things:
fab test.autofab test.styleYou’re now running a dev setup! Yay!
Time savers
Section titled “Time savers”To automatically activate the virualenv when you cd into the project directory, put https://gist.github.com/clneagu/7990272#file-bashrc-L22 in your .profile, .bashrc or .zshrc.
Contributing
Section titled “Contributing”Style:
Section titled “Style:”Set up your editor to use:
- 4-space tabs.
- No trailing whitespace.
- One trailing newline at the end of the file.
Try to keep lines < 80 characters; DEFINITELY keep lines < 120 characters.
One space should be the largest number of spaces between characters within a single line.
The test suite will check source for any styles contrary to those defined in PEP8 (https://www.python.org/dev/peps/pep-0008).