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.1.tar.gz (23.4 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.1-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

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

Hashes for po_lang_engine-2.1.1.tar.gz
Algorithm Hash digest
SHA256 fada041cd5285523ac1a9083b19e966b2505d7b27bb5bf3447777f966598661a
MD5 ba79854e14893fc36aa7a46e80d53a45
BLAKE2b-256 39e8309ba9cb8ef5f70369b7a3ff71059028cec6060d9612fe4ea376a91e773a

See more details on using hashes here.

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

Hashes for po_lang_engine-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3459c332f6cc661d4b318fff6edb8b5a127764d1a556902d0a7c9512bb98225
MD5 438e1c93c5491a86e08428c3b718e48f
BLAKE2b-256 d5c5bea5cc28ff05a6ab52a836ad5160086bf3933decf58470c0313e547d07ee

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