Skip to main content

Lua programming language written in Python

Project description

mehtap

Lua 5.4 programming language implementation in Pure Python

Latest version on PyPI Supported Python versions

Codacy Grade Badge Codacy Coverage Badge checks/master docs

Status

mehtap is in an early alpha stage. Since there is active development, API changes may happen without any special notice. Please pin your dependencies using a specific commit hash.

What does mehtap have?

  • Everything in the Lua 5.4 grammar is supported.

  • There are utility functions to convert values from Python to Lua and from Lua to Python.

  • Most of the standard library is supported. (100% support is planned.)

    Basic Functions (22/25)
    • assert()
    • collectgarbage() — Does nothing.
    • dofile()
    • error()
    • _G
    • getmetatable()
    • ipairs()
    • load()
    • loadfile()
    • next()
    • pairs()
    • pcall()
    • print()
    • rawequal()
    • rawget()
    • rawlen()
    • rawset()
    • select()
    • setmetatable()
    • tonumber()
    • tostring()
    • type()
    • _VERSION
    • warn()
    • xpcall()
    Input and Output Facilities (17/18)
    • io.close()
    • io.flush()
    • io.input()
    • io.lines()
    • io.open()
    • io.output()
    • io.popen()
    • io.read()
    • io.tmpfile()
    • io.type()
    • io.write()
    • file:close()
    • file:flush()
    • file:lines()
    • file:read()
    • file:seek()
    • file:setvbuf() — Does nothing.
    • file:write()
    Operating System Facilities (8/11)
    • os.clock()
    • os.date()
    • os.difftime()
    • os.execute()
    • os.exit()
    • os.getenv()
    • os.remove()
    • os.rename()
    • os.setlocale()
    • os.time()
    • os.tmpname()

What's the catch?

There are some differences with the specification of the reference manual. They are:

  • garbage collection,
  • frame scope.

For the most part, behaviour differences with the reference implementation are only allowed if the reference manual does not specify the behaviour. For example, the exact formatting of error messages is not specified in the reference manual, so it is allowed to be different.

There are some things that are not implemented yet. They are, only listing language features, excluding the standard library:

  • Taking metavalues and metamethods into consideration when doing operations.

Also, since this is a Python implementation, it is SLOW.


Copyright (c) 2024 Emre Özcan

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

mehtap-0.0.2.tar.gz (44.6 kB view details)

Uploaded Source

Built Distribution

mehtap-0.0.2-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

Details for the file mehtap-0.0.2.tar.gz.

File metadata

  • Download URL: mehtap-0.0.2.tar.gz
  • Upload date:
  • Size: 44.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mehtap-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b4e7245fb271a37988c54c10f597918ced80f4a3214103a74418790ffdcd6003
MD5 6961de0b157f24ef17fede8b11c013b6
BLAKE2b-256 6dadf9c8cbeb5e76942eea8a1cfce5ce418b47c56a9195dbeeb1fb78582c726c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mehtap-0.0.2.tar.gz:

Publisher: publish.yml on emreozcan/mehtap

Attestations:

File details

Details for the file mehtap-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: mehtap-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 50.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for mehtap-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c5a423a93621e0eb423a3fb9456da38691d2c0bfa93b3bdf4c720634aa9d48d1
MD5 368aee340dc0bd73a0f4903234b13263
BLAKE2b-256 4e95619ba930c26ecb6234eeedfac08c4b3667d766e3fdd3327e995b1a20ae1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mehtap-0.0.2-py3-none-any.whl:

Publisher: publish.yml on emreozcan/mehtap

Attestations:

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