A golfing language that has aspects of traditional programming languages.
Project description
Vyxal
Vyxal is a golfing language that takes the idea that conciseness comes at the cost of practicality and throws it out the window. That's right - where other golflangs throw you into the deep-end of keyboard mashing, Vyxal eases you into the concept of elegantly crafting built-ins into a functioning program.
And yes, this design goal really does warrant adding another golfing language into the already densely populated mix of golflangs. If you go and take a look at the current state of the art of golfing languages, you'll find that 99% of languages are either a) powerful and concise, but not easy to pick up or b) easy to learn, but not that useful for anything non-trivial (I say this as someone who's made and contributed to both kinds of languages). Vyxal aims to bridge the gap between simplicity and "golfability".
Fun Vyxal Features
- Comments!
1 1+ # This is a comment
# This is a comment too, but it's longer
# Btw the expression evaluates to 2
- Variables!
`Joe` →first_name # The variable "first_name" now has the value "Joe"
69 →age # The variable "age" now has the value 69 (nice)
←first_name ` is ` ←age ` years old` +++ # "Joe is 69 years old"
- Named Functions!
@fibonacii:N| # def fibonacii(N):
←N 0 = [ 0 | # if N == 0: return 0
←N 1 = [ 1 | # elif N == 1: return 1
←N 2 - @fibonacii; # else: return fibonacii(N - 2) + fibonacii(N - 1)
←N 1 - @fibonacii; +
]
]
;
6 @fibonacii;
- And Nice Syntax Choices!
In conclusion, if you're coming from a traditional programming language, Vyxal is the right golfing language for you - you'll appreciate the familiar control structures! If you're coming from another golfing language, Vyxal is also the right golfing language for you - you'll be able to jump right into complex problem solving!
(Btw we also have cookies - the tasty kind, not the track your info kind)
Installation
You can also use the online interpreter with no need to install!
If you only want to run Vyxal, all you need to run is this:
pip install vyxal
If you are working on Vyxal, install Poetry, and then you can clone this repo and run:
poetry install
Usage
To run using the script:
vyxal <file> <flags (single string of flags)> <input(s)>
If you're using Poetry:
poetry run vyxal <file> <flags (single string of flags)> <input(s)>
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vyxal-2.10.1.tar.gz
.
File metadata
- Download URL: vyxal-2.10.1.tar.gz
- Upload date:
- Size: 137.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6967348fe014195f2ce6185ea799e10f2571a4a5ddd702d21b9badab8ed0c233 |
|
MD5 | 2302377b266f3dbe2c28a740b6f63407 |
|
BLAKE2b-256 | 9c2a352f251de0460eea3c9af8baa77e1b5d0aac36becb9c82c961c6110e9ea4 |
File details
Details for the file vyxal-2.10.1-py3-none-any.whl
.
File metadata
- Download URL: vyxal-2.10.1-py3-none-any.whl
- Upload date:
- Size: 138.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 651c5d292356fd7f829db2a7123781f74747c35ac087ff191564d14899b93fda |
|
MD5 | a2e65c3a1909f65fee0d96df4ffd89cf |
|
BLAKE2b-256 | 389652cc5d4285ae199bcb7787965515c881211b434f6f5747e163fafa775ac9 |