Po-Lang: A robust, multi-purpose scripting language engine with compiler, VM, and standard library
Project description
Po-Lang Engine v2.0
A robust, multi-purpose scripting language with a bytecode compiler and stack-based VM.
Features
- Conditionals:
if / else if / else - Loops:
loop/for/whilewithbreak/continue - Functions:
fn/defwith closures and recursion - Classes:
classwith inheritance - Error Handling:
try / catch / finally+throw - Modules:
json,math,net,io,sys,os,time,random,ffi
Install
pip install po-lang-engine
Quick Start
# hello.po
fn greet(name) {
return "Hello, " + name + "!"
}
show greet("World")
# try-catch
try {
keep x = 1 / 0
} catch(err) {
show "Caught: " + err
}
# math module
use math
show math.random(1, 100)
show math.sqrt(144)
# json module
use json
keep data = json.parse("{\"key\": \"value\"}")
show data["key"]
Standard Library
| Module | Key Functions |
|---|---|
math |
sqrt, pow, random(min,max), abs, ceil, floor, clamp |
json |
parse, stringify, load, dump, valid |
net |
get, post, request(url,method,data), listen(port) |
io |
File read/write operations |
sys |
System info and args |
os |
File system operations |
time |
now, sleep, format |
random |
int, float, choice, shuffle |
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
po_lang_engine-2.1.0.tar.gz
(23.3 kB
view details)
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 po_lang_engine-2.1.0.tar.gz.
File metadata
- Download URL: po_lang_engine-2.1.0.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8186e9ae1df8ea0c8373da09b29ad17294d3c51ae56f46ff12a121c08439026d
|
|
| MD5 |
98b757aafc98015c76d87fd4130ff9ae
|
|
| BLAKE2b-256 |
572afc1a02acb0643657359f9bfa625cf32e69ba52fb689b8e5125e12eb5bae1
|
File details
Details for the file po_lang_engine-2.1.0-py3-none-any.whl.
File metadata
- Download URL: po_lang_engine-2.1.0-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfcb486839fb131ea274872c87cf47b9488e6035415516d61ccc6d25ea6297bf
|
|
| MD5 |
b37e63eda8993c5a7833f67afdaa2071
|
|
| BLAKE2b-256 |
80335a11a3863818987078cf186ec83a08edc82d33969fa0264bc3e14fb9b93b
|