Skip to main content

YIPL

YIPL pronounced Yip-el is a turing-complete interpreted language using YAML as it's syntax, made for Hackclub Horizons.

Quick start

  1. In your terminal of choice type pip install yipl
  2. Create a YAML file with your code (example code below)
print:
  - Hello World!
  1. Run yipl <file.yaml>

AI Disclaimer for hackclub

No AI was used :)

Syntax

General rules

Key names

Because of YAML's inherent structure, every key must be unique. YIPL allows any keyword to be appended by text with a leading space. Examples include:

  • print 1:
  • set main variable
  • if a and b are equal

Truthiness

YIPL uses the same truthiness values as Python when using logical operators.

Falsy values: False, None, 0, 0.0, "" (empty string), [] (empty list), {} (empty dict)

Truthy values: Everything else

Function nesting

YIPL allows the nesting of functions to allow for more complex functions than the basic keywords. Some examples include:

Greater than or equal

or:
  - greater:
    - $a
    - $b
  - equality:
    - $a
    - $b

Modulo ($a mod $b)

minus:
  - $a
  - multiply:
    - $b
    - cast:
      - int
      - divide:
        - $a
        - $b

Increment by $b

set:
  - $a
  - plus:
    - $a
    - $b

Keywords

YIPL posesses 17 unique keywords, all listed below.

Comparisons

Equality

a == b

Takes two variables, outputs bool if exactly the same

equality:
  - a
  - b

Greater than

a > b

Takes two int or floats, outputs bool if a is greater than b (not equal to)

greater:
  - a
  - b

Less than

a < b

Takes two int or floats, outputs bool if a is less than b (not equal to)

less:
  - a
  - b

Or

a or b

Takes two bools or comparisons, outputs bool if a or b is True

or:
   - a
   - b

And

a and b

Takes two bools or comparisons, outputs bool if a and b is True

and:
  - a
  - b

Not

not a

Takes one bool or comparisons, outputs the opposite boolean literal

not:
  - a

Conditionals

if a == True:
    print("Yes")
elif a == False:
    print("No")
else:
    print("something else")

If / Goto:

Takes one bool or comparison, jumps to the name of the second entry if true, the third entry if false (think ASM). Every term is required.

Both branching functions require tags to jump to, they will not jump to a function.

if_1:
  - equality:
    - a
    - True
  - print_1
  - if_2
print_1:
  - Yes
goto_1:
  - <code>
if_2:
  - equality:
    - a
    - False
  - print_2
  - print_3
print_2:
  - No
goto_2:
  - <code>
print_3:
  - something else
goto_3:
  - <code>

Arithmetic

All of YIPL's arithmetic only works on two values at a time; a + b + c in one function is not possible in YIPL

a + b

a - b

a * b

a / b

Addition:

Returns the sum of two ints or floats as an int or float

Subtraction:

Returns the difference of two ints or floats as an int or float

Multiplication:

Returns the product of two ints or floats as an int or float

Division:

Returns the Quotient of two ints or floats as an int or float

plus:
  - a
  - b

minus:
  - a
  - b

multiply:
  - a
  - b

divide:
  - a
  - b

Variables

variables are made by prepending a string with $. They do not need to be put in quotes When using set:, the $ is optional

filler_word = "Foobar"
set:
  - $filler word
  - Foobar

I/O

Print:

print(a)

Prints the given data to the terminal

print:
  - a

Set:

input(a)

Returns the typed value as a str. a is the prompt displayed in the terminal/

input:
  - a

Cast:

int(a)
str(b)
float(c)

Returns argument b as the type a

Supported types:

  • int
  • str
  • float
cast:
  - int
  - $a

cast:
  - str
  - $b

cast:
  - float
  - $c

List operations

YIPL posesses multiple operations to be done on a list object. To make a list, use [] like python in the second field of set:

set:
  - $a
  - [a, b, c]

makes a variable $a with the contents [a, b, c]

All operations on lists are done in the list: function, with the first argument being which one to use. Currently implemented functions are:

  • length
  • read
  • delete
  • append
  • replace
list:
  - length
  - $a

Returns the length of the list $a as an int. Equivialent to len(a) in python

list:
  - read
  - $a
  - $b

Returns the item at index $b of list $a. Equivialent to a[b]

list:
  - delete
  - $a
  - $b

Removes the item at index $b of list $a. Equivialent to del a[b]

list:
  - append
  - $a
  - $b

Appends $b to list $a. Equivialent to a.append(b)

list:
  - replace
  - $a
  - $b
  - $c

Replaces the item at index $b of list $a with $c. Equivialent to a[b] = c

Metadata

Release files for yipl 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yipl 1.0.2
File Size Uploaded Provenance Actions
yipl-1.0.2.tar.gz 10.4 kB Without provenance Details for yipl-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for yipl 1.0.2
File Interpreter ABI Platform Actions
yipl-1.0.2-py3-none-any.whl Python 3 none any Details for yipl-1.0.2-py3-none-any.whl

Total release size: 19.1 kB

Release files / yipl-1.0.2.tar.gz

Download URL yipl-1.0.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e2add7b054fb97ff8d0ff22da84688e172b788b14b24f448290c75ba06049b07
BLAKE2b-256 checksum
How to use checksums
20a2d02cd81a201dd49a00563b4b3b44fc48edd6e41fa262fcae1e690ed2d381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / yipl-1.0.2-py3-none-any.whl

Download URL yipl-1.0.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6742a1e83615a44c76565e23b3cfafca66a1b63f82c6b55e6461f90e30979db
BLAKE2b-256 checksum
How to use checksums
3763a32205387a9a587c4aa3d57ff8fdc546cd47de9611b9edf703b108c7dc67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for yipl 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page