Skip to main content

A golfing language that has aspects of traditional programming languages.

Project description

Vyxal

Vyxal Logo

Language grade: Python Test status

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

Try it Online!

  • 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"

Try it Online!

  • 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;

Try it Online!

  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vyxal-2.10.1.tar.gz (137.1 kB view hashes)

Uploaded Source

Built Distribution

vyxal-2.10.1-py3-none-any.whl (138.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page