▲ 85 ▼ Unicode tricks in pull requests: Do review tools warn us? (semanticdiff.com) submitted 2 years ago by DarkPlayer@lemmy.world to c/programming@programming.dev 18 comments fedilink hide all child comments
[–] monk@lemmy.unboiled.info 44 points 2 years ago (3 children) Homoglyphs? Invisible text? Bidirectional text? Just highlight every line that goes beyond ASCII with yellow warning colors and require to vet it. Maybe make localization data an exception. permalink fedilink source hideshow 6 child comments replies: [–] cbarrick@lemmy.world 12 points 2 years ago (3 children) This doesn't work for code bases written in non-English languages. Especially east asian languages. Any line containing an identifier that is also a word would be highlighted. More and more programming languages are supporting unicode identifiers for this use case. permalink fedilink source parent hideshow 6 child comments replies: [–] mrkite@programming.dev 11 points 2 years ago (2 children) So it won't work for 0.0001% of all github projects. permalink fedilink source parent hideshow 4 child comments replies: [–] sndrtj@feddit.nl 6 points 2 years ago I'd suggest to have the occasional look at the "most popular repos" ranking. It's about 50% Chinese. Super-interesting sometimes as it shows completely different tech trends. permalink fedilink source parent [–] cbarrick@lemmy.world 1 point 2 years ago I know right. It's wild that an American company primarily doing business in the West would have a bias towards English. permalink fedilink source parent [–] monk@lemmy.unboiled.info 6 points 2 years ago Yeah, just don't. Allowing to code in anything other than English is a disservice, plain and simple. Inb4, I'm not being US-centric, Latin ain't even my native alphabet. permalink fedilink source parent [+] MonkderZweite@feddit.ch 1 point 2 years ago [deleted] permalink fedilink source parent [–] actual_patience@programming.dev 6 points 2 years ago (2 children) Very simple solution actually. Here I was thinking we'd need AI to solve it. permalink fedilink source parent hideshow 4 child comments replies: [–] DudeDudenson@lemmings.world 16 points 2 years ago People would call that solution AI these days. If it has at least one if statement then they call it AI permalink fedilink source parent [–] slacktoid@lemmy.ml 3 points 2 years ago We say we have AI to get VC funding permalink fedilink source parent [–] arthur@lemmy.zip 1 point 2 years ago (1 child) Or the non-ascii character itself. permalink fedilink source parent hideshow 2 child comments replies: [–] monk@lemmy.unboiled.info 3 points 2 years ago (1 child) Doesn't work if it's invisible. permalink fedilink source parent hideshow 2 child comments replies: [–] xilophor@programming.dev 1 point 2 years ago what about a box around it? permalink fedilink source parent
[–] cbarrick@lemmy.world 12 points 2 years ago (3 children) This doesn't work for code bases written in non-English languages. Especially east asian languages. Any line containing an identifier that is also a word would be highlighted. More and more programming languages are supporting unicode identifiers for this use case. permalink fedilink source parent hideshow 6 child comments replies: [–] mrkite@programming.dev 11 points 2 years ago (2 children) So it won't work for 0.0001% of all github projects. permalink fedilink source parent hideshow 4 child comments replies: [–] sndrtj@feddit.nl 6 points 2 years ago I'd suggest to have the occasional look at the "most popular repos" ranking. It's about 50% Chinese. Super-interesting sometimes as it shows completely different tech trends. permalink fedilink source parent [–] cbarrick@lemmy.world 1 point 2 years ago I know right. It's wild that an American company primarily doing business in the West would have a bias towards English. permalink fedilink source parent [–] monk@lemmy.unboiled.info 6 points 2 years ago Yeah, just don't. Allowing to code in anything other than English is a disservice, plain and simple. Inb4, I'm not being US-centric, Latin ain't even my native alphabet. permalink fedilink source parent [+] MonkderZweite@feddit.ch 1 point 2 years ago [deleted] permalink fedilink source parent
[–] mrkite@programming.dev 11 points 2 years ago (2 children) So it won't work for 0.0001% of all github projects. permalink fedilink source parent hideshow 4 child comments replies: [–] sndrtj@feddit.nl 6 points 2 years ago I'd suggest to have the occasional look at the "most popular repos" ranking. It's about 50% Chinese. Super-interesting sometimes as it shows completely different tech trends. permalink fedilink source parent [–] cbarrick@lemmy.world 1 point 2 years ago I know right. It's wild that an American company primarily doing business in the West would have a bias towards English. permalink fedilink source parent
[–] sndrtj@feddit.nl 6 points 2 years ago I'd suggest to have the occasional look at the "most popular repos" ranking. It's about 50% Chinese. Super-interesting sometimes as it shows completely different tech trends. permalink fedilink source parent
[–] cbarrick@lemmy.world 1 point 2 years ago I know right. It's wild that an American company primarily doing business in the West would have a bias towards English. permalink fedilink source parent
[–] monk@lemmy.unboiled.info 6 points 2 years ago Yeah, just don't. Allowing to code in anything other than English is a disservice, plain and simple. Inb4, I'm not being US-centric, Latin ain't even my native alphabet. permalink fedilink source parent
[–] actual_patience@programming.dev 6 points 2 years ago (2 children) Very simple solution actually. Here I was thinking we'd need AI to solve it. permalink fedilink source parent hideshow 4 child comments replies: [–] DudeDudenson@lemmings.world 16 points 2 years ago People would call that solution AI these days. If it has at least one if statement then they call it AI permalink fedilink source parent [–] slacktoid@lemmy.ml 3 points 2 years ago We say we have AI to get VC funding permalink fedilink source parent
[–] DudeDudenson@lemmings.world 16 points 2 years ago People would call that solution AI these days. If it has at least one if statement then they call it AI permalink fedilink source parent
[–] slacktoid@lemmy.ml 3 points 2 years ago We say we have AI to get VC funding permalink fedilink source parent
[–] arthur@lemmy.zip 1 point 2 years ago (1 child) Or the non-ascii character itself. permalink fedilink source parent hideshow 2 child comments replies: [–] monk@lemmy.unboiled.info 3 points 2 years ago (1 child) Doesn't work if it's invisible. permalink fedilink source parent hideshow 2 child comments replies: [–] xilophor@programming.dev 1 point 2 years ago what about a box around it? permalink fedilink source parent
[–] monk@lemmy.unboiled.info 3 points 2 years ago (1 child) Doesn't work if it's invisible. permalink fedilink source parent hideshow 2 child comments replies: [–] xilophor@programming.dev 1 point 2 years ago what about a box around it? permalink fedilink source parent
[–] xilophor@programming.dev 1 point 2 years ago what about a box around it? permalink fedilink source parent