A Yuri-themed esoteric programming language 🧡
Project description
YuriLang ❤️🧡🤍
YuriLang (Yuri + Language) is an esoteric programming language with Yuri characteristic as functions, operators, syntaxes, etc. Written in Python 🌀
Yuri (/ˈjʊəri/)
- Shiny Certificate :3
- Docs:
Coming Soon...
[!IMPORTANT] 💜 Still in development, new keywords and features will be added one by one, and the language isn't stabilize yet.
Setup
[!NOTE] For Windows, the exe file will be released soon once pyinstaller has done setting up.
Prerequisites:
- Python (3.13)
- NASM (if you're using this language with it's assembly feature)
- wat2wasm (if you're testing it for wasm - experimental)
Simply type this in your terminal:
curl -sSL https://raw.githubusercontent.com/Kazooki123/yurilang/main/install.sh | bash
- 🔗 From Source:
git clone https://github.com/Kazooki123/yurilang
cd yurilang
python install.py # Linux/Mac (may need sudo :/)
python install.py --user # no sudo needed
install.bat # Windows (double click or run as admin)
Syntax
General Rules
- Every statement starts with "@"
- Code executes only inside "@wlw" (entry point) :3
- Strings must be wrapped in quotes ""...""
- Variables are mutable by default, unless awakened.
- You can do comments with
? (your comment) - Logic / Data types exists using
love,ache, anduncertain
🥞 Available Keywords
@wlw — Entry Point
Defines where the program begins.
@wlw:
@confess "Hello, world!"
@bond — Variable Declaration
Creates and assigns a variable.
@bond x = 10
@bond name = "Aki"
@confess — Output
Prints values or text.
@confess "Hello 💖"
@confess "Value is" x
@ship — Functions
Declares a function (also supports parameters :p)
@ship YuuIsGoated:
@confess "Peak!"
@ship bloom_into_you:
@confess "More Peak!"
@promise — Return
Returns a value after exiting
@choose nums with x:
@promise x > 2
@jam — Break/Pass
Used to break out a loop.
@cling 10:
@jealous x == 5:
@jam
@affect — Mapping
Returns the provided typed map unchanged.
@wlw:
@bond feelings = [["distant", "confused", "realizing", "confessing"]]
feelings @> @affect yuu_reacts
@choose - Filter
Extracts an element from a collection (like a list) based on a condition.
@ship is_even x:
@bond rem = @band x 1
@jealous rem == 0:
@promise love
@forgive:
@promise ache
@bond evens = @choose nums is_even
@confess evens
@slice - Slicing
A technique to extract a specific portion or "subset" of data from a sequence.
@bond part = @slice nums 2 5
@confess part
@sappho / @poet — Pattern matching
Used for pattern matching. You can learn what pattern matchings are here.
@sappho x:
@poet 1:
@confess "one"
@poet 2:
@confess "two"
@luna / @bloom - Lambda function
Anonymous functions used for inline.
@wlw:
@bond double = @luna x: x times 2
@confess @double 5
@bond double = @bloom x: x times 2
@dream — Asynchronous (async)
Allows a program to start a (new) task and then move on to another work before that task finishes.
@wlw:
##async
@ship fetch_feeling url:
@dream slept = @sleep 0.5
@wake slept
@promise "feelings arrived from " plus url
@dream result = @fetch_feeling "her heart"
@wake result
@confess result
@wake being await.
@awaken - Immutable
In Yurilang, variables are mutable by default, so to make them permanent or unchangeable, use the @awaken keyword.
@wlw:
@bond x = 10
@awaken x
Trying to modify an already awakened variable throws an Runtime Error:
Error: 'x' has already awakened. It is permanent.
@choose — Filtering
Filters or choose a specific element from a list based on the conditions.
@wlw:
@bond nums = [[1,2,3,4]]
@bond result = @choose nums with x:
@promise x > 2
@confess result
@jealous — Conditional (Basic)
Checks a condition.
@jealous -> if
@forgive -> else
@wlw:
@jealous a > 5:
@confess "Greater than five."
@forgive:
@confess "Five or less."
@cling — Loop (Basic)
Repeats an action a number of times.
@cling "Woosh!" 3
@cling "yay!" 5
@fate — While Loops
Repeats a block of code over and over again as long as a specific condition remains true.
@fate y < 10:
@jealous y == 5:
@jam
@confess y
@rebond y = y plus 1
@yuri — Import
For importing modules.
[!NOTE] Modules in yurilang are still unstable and may break in future updates or changes.
@yuri math
@yuri json
@yuri bloomintoyou
@crush - Types
Declares a type
- strings ->
heart - numbers ->
int(type_name may change later) - float ->
float(type_name may change later) - boolean ->
bloom/uncertain - lists ->
list(type_name may change later)
[!IMPORTANT] Types in this language is never enforced.
@wlw:
@crush name = heart
@crush age = int
@crush score = float
@crush is_inlove = bloom
@crush friends = list
@crush mystery = uncertain
Note: you can use the --crush flag for this feature.
@sempai — Import C functions
Loads and binds a function from a C shared library, callable like any other @ship function.
@sempai libm.so.6 sqrt double
@bond result = @sqrt 144
@confess result
Supported return types: int, double, float, string. If omitted, defaults to int.
@kumitate — Inline Assembly
Allows users to embed low-level assembly language instructions directly within high-level code.
[!WARNING] This feature is very experimental, we'll add a
--experimentflag later on, but this feature hasn't been fully stabilize yet.
@wlw:
? (basic arithmetic in assembly)
@bond x = 5
@bond y = 3
@bond result = 0
@kumitate:
mov rax, {x}
add rax, {y}
mov {result}, rax
@confess result ? (-> 8)
@spectrum — Enums
A data type that lets you define a value as one of several possible variants.
@spectrum Feeling:
confused
curious
nervous
inlove
certain
@persona — Structs
A custom data type that lets you group related data together under one name
@persona Character
name
age
hobby
crush
🍞 Operators
[!WARNING] Some of these operators & special symbols are planned meaning they're not implemented yet
@
>
<
=>
<-
->
()
{}
~
~>
|x|
:
^
#
$
&
!
?
Example Program
@wlw:
@bond x = 10
@bond name = "Aki"
@confess "Hello" name
@confess "Value of x is" x
@jealous x == 10
@cling "yahoo!" 3
Yuri References
Compiler
glc - Girls Love to Compile
A Rust written compiler made for YuriLang, it will be released soon and if it does expect bugs or errors at it's first released.
Note: The compiler is currently implemented in Python.
LLVM
[!WARNING] Some bugs and error may still occur btw
As of v1.3.0, yurilang can transpile to a LLVM IR (Intermediate Representation) file (.ll) with the help of the --llvm flag, while native object files (.o) are done with the --llvm-obj flag.
WASM
You can generate a .wat file in YuriLang with this command:
[!NOTE] 🩵 You would need wat2wasm for this
python main.py yourfile.yuri --wasm
Then convert it to .wasm with wat2wasm:
wat2wasm yourfile.wat -o program.wasm
Amy
A TUI-based editor primarily written in Go.
Named after Amy from I Love Amy, a South Korean yuri manhwa story.
Most contribution is thanks to Angel Miku
Packages / Libraries / Stores
Most modules or libraries of yurilang right now is placed in store/, containing story driven code from Yuri media, but as the language evolves so as its modular system, later on the module system will import modules, libs, and packages whenever it is placed.
Codeberg
[... Coming Soon...]
Issues and Bugs
If you encounter a bug, error, or any issues, please immediately contact me or create a pull request (PR) and explain what's wrong or for making suggestions and feedbacks, Thank you!! 🧡 >.<
Contribution
Everyone is absolutely welcome! If you're interested, you can freely fork the repository and refer to the Contribution guide for contribution information and more 🩷
LICENSE
Under the GNU Public License <3
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yurilang-1.5.0-cp38-abi3-android_34_arm64_v8a.whl.
File metadata
- Download URL: yurilang-1.5.0-cp38-abi3-android_34_arm64_v8a.whl
- Upload date:
- Size: 227.0 kB
- Tags: Android API level 34+ ARM64 v8a, CPython 3.8+
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77557060b30ea427a61dd9d6a64204de4805abb95bce1a59e88dd19a76bc4ef
|
|
| MD5 |
712069385b4a343e88f9dbdc45925cdf
|
|
| BLAKE2b-256 |
4fce0c7af1637d26e0c50a970fa41234f9420e2107776f9c70175651a7c1bc8d
|