Hacker News new | ask | show | jobs
by im3w1l 3960 days ago
Haha, what a coincidence. Just the other day we discussed string special cases[0][1], to which I contributed ansi escapes. Unicode "fonts" 𝓵𝓲𝓴𝓮 𝖙𝖍𝖎𝖘 seem to work in commit messages as well.

I think this is quite harmful, especially the character movement ansi escapes could be used for nefarious purposes.

[0] https://news.ycombinator.com/item?id=10035008

[1] https://github.com/minimaxir/big-list-of-naughty-strings/blo...

3 comments

I wrote a little thing that helps you make your commits 𝔢𝔵𝔱𝔯𝔞 𝔞𝔴𝔢𝔰𝔬𝔪𝔢: http://antglove.com/erger/
I recently had to write some code[0] that handles strings of UTF-8 with ANSI color escapes sprinkled throughout.

A fun exercise is to write a function that overwrites string A with string B, starting at index N. It's hard enough with unicode, but ANSI escapes make it more fun.

[0]: https://github.com/tillberg/ansi-log (Go logging library with support for ANSI colors and interleaving multiple writers)

I think this is quite harmful, especially the character movement ansi escapes could be used for nefarious purposes.

Like what?

- Push malicious commit

- Rewrite the commit hash in git log with character movement

Actually I don't know if it's a practical attack in any way, could cause some confusion.

If you can commit, why not just enter something like "Small fix in formatting" instead of drawing of LOT of attention to malicious comit?
Hiding changes on previous lines.
Annoying your coworkers, for one
Just yesterday I ran across this example: "(っ˘▽˘)っ :cloud: ⊂(◕。◕⊂)" in the Parse SDK repo, which I found especially distracting, and in general, kind of turned me off from the project (even though I know Parse is awesome). I agree that UTF and special-chars should be permissable; I don't agree that if they don't actually communicate something, they should be used anyway. Maybe this cute 'moticon trend is trendy, but for my buck$, I'd rather things just be kept simple. My eyeballs see (っ˘▽˘)っ :cloud: ⊂(◕。◕⊂) as line-noise, mostly, and make me wonder if there are other such typo's to be found in the attached code-base.
>Just yesterday I ran across this example: "(っ˘▽˘)っ :cloud: ⊂(◕。◕⊂)" in the Parse SDK repo, which I found especially distracting, and in general, kind of turned me off from the project (even though I know Parse is awesome).

This reasoning turns me off from types who have it.

It's not like they use emoticons everywhere -- and if having one is the big distraction one can complaint about, then their repo is in excellent shape.

Some Unicode characters can also move the cursor in strange ways. I think most of them only work in GUI programs, though. (See the list of bad strings above)
I personally just find the committer to be immature, nothing else.
Immature to one is playful to another. :-)

It's all going to depend on the team; it would be a mistake to conflate seriousness with competence.

I personally see it as a filter to exclude those who find things too seriously.
We are all gonna die anyway. The mature commiters too, including everybody they love.

And all of their "serious" work will amount to absolutely nothing in just 100 years (that's it if they're lucky: for most their work wont matter at all in 10 or 20 years, their companies shuw down, or bought and dismantled, their startup dreams shattered etc.).

(A lot of them will even regret working so hard and giving importance to the BS they gave importance to after they retire).

Just to put some mature perspective on being playful.