Skip to main content

Nythop is an esolang that takes Python and gives it a good shake, letting you write code in reverse for a coding experience like no other!

Project description

Nyhtop: The Python Replacement You Never Knew You Didn’t Need

PyPI - Version PyPI - Python Version License: GPL v3 GitHub Actions Workflow Status Codecov CodeFactor Grade


Nyhtop is here to revolutionize your coding experience by turning Python on its head – literally. Forget the simplicity and readability of Python; Nyhtop takes that elegance and adds an exciting twist: every line is written backwards! With Nyhtop, code clarity reaches a whole new level (of confusion), promising an impressively awkward and cryptic experience that will have you wondering how you ever tolerated straightforward syntax.

Nyhtop enthusiasts argue that it’s not just Python – it’s Python improved. Indentation wars? Resolved. All your indentation happens at the end of the line, so tabs vs. spaces is no longer a battle you can even see. And comments? They’re read from right to left, so cryptic notes and backward logic are just part of the Nythopic experience.

If you’re tired of the predictability and accessibility of Python, Nyhtop promises to shake things up by keeping things just familiar enough to fool you into thinking you know what’s happening. But in practice? It’s perfectly unreadable – just as any good esolang should be.

Ready to leave Python behind? Let’s dive in!


Table of Contents

Installation

Nyhtop is available on PyPI, so you can install it in seconds if you’re ready to turn Python upside-down. Just run:

pip install nythop

And that’s it! You’re now equipped to enjoy the Nythop experience.

Coding

Nyhtop is, at its core, just Python – but backwards. Every line is simply a reversed version of Python syntax, which means if you’re already familiar with Python, you’re halfway there (or perhaps halfway confused). Any valid Python code can be adapted to Nyhtop by flipping each line from right to left. For example:

print("Hello, World!")
)"!dlroW ,olleH"(tnirp

That’s it. No new keywords, no unfamiliar constructs – just reversed lines of Python code. Of course, this makes even the simplest tasks look cryptic, but it’s still technically Python. Indentation (the invisible kind) happens at the end of each line, so the usual debate over tabs vs. spaces doesn’t apply here.

Check out some of the possible for loop versions:

# Using the character ␠ to visualize whitespaces
:)01(egnar ni i rof
)"}20:i{ retI"f(tnirp␠␠␠␠

# You can move things around within the line, just don't mess with the invisible indentation at the end.
                                :)01(egnar ni i rof
)"}20:i{ retI"f(tnirp␠␠␠␠

# Maybe you're feeling adventurous and want to make it feel right.
      :)01(egnar ni i rof
)"}20:i{ retI"f(tnirp␠␠␠␠

Once you get used to this “improvement,” you’ll find Nyhtop code offers the same functionality as Python but with the added benefit of looking impressively perplexing.

Running

Running Nyhtop from a File

Given the example file hello_world.yp:

)"!dlroW ,olleH"(tnirp

Run it with:

nyhtop hello_world.yp

Running Nyhtop with a Command

Alternatively, you can run Nyhtop code directly from the command line with the -c option:

nythop -c ')"!dlroW ,olleH"(tnirp'

Interactive REPL

To explore Nyhtop’s logic on the fly, you can start an interactive REPL session by simply running:

nyhtop

The REPL will wait for your input in a prompt format. Type )(tixe when you’re ready to escape.

License

nythop is distributed under the terms of the GPL-3.0-or-later license.

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

nythop-0.1.0.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

nythop-0.1.0-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file nythop-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for nythop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5333b08955b9e278a8cc09f93109ce78e2ce8ca28059231d61a27c939dc5f06
MD5 857989e8e7ce4ba245f60869bd90fefa
BLAKE2b-256 9391eb687437dd517867705baf88ea2a8deeb3a73d5ffc2219d68b75f0afbf69

See more details on using hashes here.

Provenance

The following attestation bundles were made for nythop-0.1.0.tar.gz:

Publisher: publish.yml on luxedo/nythop

Attestations:

File details

Details for the file nythop-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for nythop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2c69ce5f334e9d2930a13cf508561a41612b2d76d889c084db0a2d951d2534c
MD5 7a23e23380ce8025f0037e7dc6aa649e
BLAKE2b-256 11c200c07cf059cfddebc691168493e17067dd8d4195035be61d573128654b67

See more details on using hashes here.

Provenance

The following attestation bundles were made for nythop-0.1.0-py3-none-any.whl:

Publisher: publish.yml on luxedo/nythop

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