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.1.tar.gz
(23.4 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.1.tar.gz.
File metadata
- Download URL: po_lang_engine-2.1.1.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fada041cd5285523ac1a9083b19e966b2505d7b27bb5bf3447777f966598661a
|
|
| MD5 |
ba79854e14893fc36aa7a46e80d53a45
|
|
| BLAKE2b-256 |
39e8309ba9cb8ef5f70369b7a3ff71059028cec6060d9612fe4ea376a91e773a
|
File details
Details for the file po_lang_engine-2.1.1-py3-none-any.whl.
File metadata
- Download URL: po_lang_engine-2.1.1-py3-none-any.whl
- Upload date:
- Size: 27.5 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 |
f3459c332f6cc661d4b318fff6edb8b5a127764d1a556902d0a7c9512bb98225
|
|
| MD5 |
438e1c93c5491a86e08428c3b718e48f
|
|
| BLAKE2b-256 |
d5c5bea5cc28ff05a6ab52a836ad5160086bf3933decf58470c0313e547d07ee
|