Skip to main content

Toolkit for compiling and executing the Linden Scripting Language as Python

Project description

Lummao

Lummao is a toolkit for compiling and executing the Linden Scripting Language as Python. It aims to ease testing of LSL code by leveraging Python's existing ecosystem for debugging and testing. Think of it as the less opinionated, stupider cousin of LSLForge's unit testing framework.

It could conceivably be used for compile-time evaluation of pure functions with statically known arguments.

The runtime is largely handled by the excellent implementation of LSL's basic operations and library functions from LSL-PyOptimizer.

To see an example input script and its Python output, see the test_resources directory.

Setup

LSL PyOptimizer is not distributed in a form that would allow easily using it as a library, it must be installed separately, with an environment variable pointing to its location so Lummao can find it.

Why

If you've ever written a sufficiently complicated system in LSL, you know how annoying it is to debug your scripts or be sure if they're even correct. Clearly the sanest way to bring sanity to your workflow is to convert your LSL scripts to Python, so you can mock LSL library functions and use Python debuggers, hence the name.

TODO

  • Use LSL-PyOptimizer's lslparse / lsloutput stuff rather than rely on native code for transpilation
    • Just used Tailslide since it was easier for me to get started with it.
  • Symbol shadowing behavior is not correct
  • The behavior of variables whose declarations are jumped over is not correct
  • Provide mock helpers for:
    • inter-script communication
    • HTTP
    • auto-stubs for all functions
    • state-aware event queueing (and state switching, for that matter)

License

GPLv3, additionally including a copyright assignment to Sei Lisa, if desired.

Licensing Clarifications

The output of the compiler necessarily links against the GPL-licensed runtime code from LSL-PyOptimizer for functionality, and LSL-PyOptimizer does not provide a library exception in its license. You should assume that any LSL converted to Python by the compiler and any testcases you write exercising them must also be distributable under the GPL.

In short: If or when you distribute your testcases, you must also allow distribution of their direct dependencies (your LSL scripts) under the terms of the GPL. This does not necessarily change the license of your LSL scripts themselves, or require consumers of your scripts to license their own scripts under the GPL. It is perfectly possible to have an otherwise MIT-licensed or proprietary library with a GPL-licensed test suite. No distribution of testcases == no requirement to distribute under the GPL.

Suggested reading to understand your rights and obligations under the GPL when using a GPL-licensed test suite:

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

lummao-0.0.3.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

lummao-0.0.3-py2.py3-none-any.whl (10.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file lummao-0.0.3.tar.gz.

File metadata

  • Download URL: lummao-0.0.3.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for lummao-0.0.3.tar.gz
Algorithm Hash digest
SHA256 fc384c83293035520fb76eaaf9d961e81a78de90d92d43be3b709a41f04f6650
MD5 0fe9baa3002c69de56e4ea8196b60790
BLAKE2b-256 c24a41039baf6d0e822313e38d859e0e3d442d52163c635009155e39b6bdbc05

See more details on using hashes here.

File details

Details for the file lummao-0.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: lummao-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for lummao-0.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fe8dcab8e83036f1765ced0347272b9accd352dd7c71b04029778c708c4f04a8
MD5 946d0c74915ab9d50d61de14d5dc154c
BLAKE2b-256 8029e829308daf8692b3b9df46c43e9a6c058e65d15c5b64f46b8d3aa8f3d34f

See more details on using hashes here.

Supported by

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