Skip to main content

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 / while with break / continue
  • Functions: fn / def with closures and recursion
  • Classes: class with 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

po_lang_engine-2.1.0-py3-none-any.whl (27.3 kB view details)

Uploaded Python 3

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

Hashes for po_lang_engine-2.1.0.tar.gz
Algorithm Hash digest
SHA256 8186e9ae1df8ea0c8373da09b29ad17294d3c51ae56f46ff12a121c08439026d
MD5 98b757aafc98015c76d87fd4130ff9ae
BLAKE2b-256 572afc1a02acb0643657359f9bfa625cf32e69ba52fb689b8e5125e12eb5bae1

See more details on using hashes here.

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

Hashes for po_lang_engine-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dfcb486839fb131ea274872c87cf47b9488e6035415516d61ccc6d25ea6297bf
MD5 b37e63eda8993c5a7833f67afdaa2071
BLAKE2b-256 80335a11a3863818987078cf186ec83a08edc82d33969fa0264bc3e14fb9b93b

See more details on using hashes here.

Supported by

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