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

Unicodable should print all characters if there are not many #104

Closed
AlexDaniel opened this issue Feb 27, 2017 · 1 comment
Closed

Unicodable should print all characters if there are not many #104

AlexDaniel opened this issue Feb 27, 2017 · 1 comment
Labels
testneeded Issue is generally resolved but tests were not written yet unicodable Issues related to Unicodable bot

Comments

@AlexDaniel
Copy link
Member

<elaADnlxie> unicodable6: black heart
<unicodable6> elaADnlxie, U+2665 BLACK HEART SUIT [So] (♥)
<unicodable6> elaADnlxie, U+2764 HEAVY BLACK HEART [So] (❤)
<unicodable6> elaADnlxie, 4 characters in total: https://gist.github.com/07d2781ea3895f86e8bab28d89cebbde

Currently, 3 is a limit, so that's why it uploads the result. But still, just print the characters in the message? Like this:

unicodable6> elaADnlxie, 4 characters in total (♥❤❥🖤): https://gist.github.com/07d2781ea3895f86e8bab28d89cebbde

@AlexDaniel AlexDaniel added the unicodable Issues related to Unicodable bot label Feb 27, 2017
@AlexDaniel AlexDaniel added the good first issue Low-hanging fruit (relatively easy issue, good for drive-by contributions) label May 20, 2017
AlexDaniel added a commit that referenced this issue Jul 22, 2017
Unicodable will now print all characters in its last message (only if
it makes sense to do so).

Resolves issue #104.

Note that with these changes it may call get-description method more
than once for some characters (up to two extra calls in total!), but
this really does not matter. What matters, however, is that now it
will respond faster if it goes beyond $LIMIT (because it does not have
to process characters early).

It turns out that checking if it is safe to print all characters is
difficult, but not too much. If it round trips nicely (e.g. no
normalization taking effect), and if GCB property tells us there are
no weirdos, then it is probably safe to concat the whole thing and
print it. Hopefully parens around it won't affect anything.
@AlexDaniel
Copy link
Member Author

Works now:

<AlexDaniel> unicodable6: black heart
<unicodable> AlexDaniel, U+2665 BLACK HEART SUIT [So] (♥)
<unicodable> AlexDaniel, U+2764 HEAVY BLACK HEART [So] (❤)
<unicodable> AlexDaniel, 4 characters in total (♥❤❥🖤): https://gist.github.com/e5a74a15856fd905c3687b389384b459

<AlexDaniel> unicodable6: math symbol
<unicodable> AlexDaniel, U+1D6B9 MATHEMATICAL BOLD CAPITAL THETA SYMBOL [Lu] (𝚹)
<unicodable> AlexDaniel, U+1D6DC MATHEMATICAL BOLD EPSILON SYMBOL [Ll] (𝛜)
<unicodable> AlexDaniel, 35 characters in total (𝚹𝛜𝛝𝛞𝛟𝛠𝛡𝛳𝜖𝜗𝜘𝜙𝜚𝜛𝜭𝝐𝝑𝝒𝝓𝝔𝝕𝝧𝞊𝞋𝞌𝞍𝞎𝞏𝞡𝟄𝟅𝟆𝟇𝟈𝟉): https://gist.github.com/ab75a3f592736b822d0d89ff15c163e6

There is one test, but I think we need more (especially those that make sure that stuff is not printed).

@AlexDaniel AlexDaniel added testneeded Issue is generally resolved but tests were not written yet and removed good first issue Low-hanging fruit (relatively easy issue, good for drive-by contributions) labels Jul 22, 2017
JJ pushed a commit to JJ/whateverable that referenced this issue Jun 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testneeded Issue is generally resolved but tests were not written yet unicodable Issues related to Unicodable bot
Projects
None yet
Development

No branches or pull requests

1 participant