-
Notifications
You must be signed in to change notification settings - Fork 24
Prepare veralang distribution for PyPI publication #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Vera | ||
|
|
||
| Vera is a programming language designed for large language models to write. It | ||
| has mandatory contracts, algebraic effects, typed slot references instead of | ||
| variable names, and a compiler that emits WebAssembly. | ||
|
|
||
| Full documentation, examples, and the language specification are available at | ||
| [veralang.dev](https://veralang.dev) and in the | ||
| [GitHub repository](https://github.com/aallan/vera). | ||
|
|
||
| ## Install a released version | ||
|
|
||
| Vera requires Python 3.11 or later. Create a virtual environment and install | ||
| the `veralang` distribution: | ||
|
|
||
| ```bash | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| python -m pip install veralang | ||
| ``` | ||
|
|
||
| On Windows, activate the environment with `.venv\Scripts\activate` instead. | ||
| For editor and agent integration through the language server, install the LSP | ||
| extra: | ||
|
|
||
| ```bash | ||
| python -m pip install "veralang[lsp]" | ||
| ``` | ||
|
|
||
| The distribution is named `veralang`, but the installed command remains | ||
| `vera`, and Python code still imports it as `import vera`. **Do not run `pip install vera`**: that name belongs to an unrelated | ||
| ERAV citizen-science project on PyPI. | ||
|
|
||
| ## Install from GitHub source | ||
|
|
||
| The source route remains supported for compiler development, unreleased | ||
| changes, and testing the current `main` branch: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/aallan/vera.git | ||
| cd vera | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| python -m pip install -e . | ||
| ``` | ||
|
|
||
| Use `python -m pip install -e ".[lsp]"` for the language server or | ||
| `python -m pip install -e ".[dev]"` when working on the compiler. | ||
|
|
||
| ## Try it | ||
|
|
||
| ```vera | ||
| public fn safe_divide(@Int, @Int -> @Int) | ||
| requires(@Int.1 != 0) | ||
| ensures(@Int.result == @Int.0 / @Int.1) | ||
| effects(pure) | ||
| { | ||
| @Int.0 / @Int.1 | ||
| } | ||
| ``` | ||
|
|
||
| ```bash | ||
| vera check program.vera | ||
| vera verify program.vera | ||
| vera run program.vera | ||
| ``` | ||
|
|
||
| See the [CLI cookbook](https://github.com/aallan/vera/blob/main/TOOLCHAIN.md), | ||
| [language reference](https://veralang.dev/SKILL.md), | ||
| [supported-platform policy](https://github.com/aallan/vera#supported-platforms), | ||
| and [issue tracker](https://github.com/aallan/vera/issues) for more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.