Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards text? #2

Open
refi64 opened this issue Jun 21, 2015 · 5 comments
Open

Backwards text? #2

refi64 opened this issue Jun 21, 2015 · 5 comments

Comments

@refi64
Copy link

refi64 commented Jun 21, 2015

First thing: this is AWESOME!

Now, as this is targeted towards terminal destruction, I was wondering about the chance of adding something involving Unicode RTL. Something like:

  • Whenever the user types a letter, the cursor will move to the left so that the input comes out backwards. Jitter already kind of does this.
  • Everything printed to the terminal will be backwards. This is the cool part.

Thoughts?

@dellis23
Copy link
Owner

Sorry for the late response. For some reason github doesn't email when a new issue is added.

This is an interesting idea! I'll have to play around with it and see what it looks like. Or feel free to submit a PR and I'll check it out :-)

@dellis23
Copy link
Owner

Hmm, printing that character actually just outright crashes my terminal in python (iTerm2 on OSX). Can you try this in a python shell and tell me what happens for you?

print u'\202e' + 'Testing'

@refi64
Copy link
Author

refi64 commented Jun 26, 2015

So:

  • Is that supposed to be u\u202e?
  • I can't test it right now on a real terminal, as I'm on a phone, but:
    • PyPy.js's web REPL freezes for a second and throws a UnicodeEncodeError.
    • Ideone gives the same result.
    • repl.it works.

It seems to depend on whether the output console supports Unicode in general. I love Python, but this Unicode mess sucks... :O

Also: only that line of text is reversed. The following line returns to normal.

@dellis23
Copy link
Owner

Interesting -- the version you posted does seem to work on the online repl:

print(u'\u202e' + "This is a test")
‮This is a test

But still crashes my terminal. It looks like it even works in the github comments though. If I try to type after the invisible character there everything comes in reversed. I really like this idea; I just don't want it to crash peoples' terminals.

@refi64
Copy link
Author

refi64 commented Jun 26, 2015

@dellis23 In Bash, that seems to do nothing. :(

Maybe there can be a workaround. I'll look into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants