News for hackers. Stuff that matters.
Re:How to make your C codebase Rusty: rewriting keyboard fir... by outworlder on Thursday November 21, 2019 @05:21PM (#21600368)
> And emojiis in code, really?

What is the problem? As most code nowadays is UTF, why do you care?

Re:How to make your C codebase Rusty: rewriting keyboard fir... by clktmr on Thursday November 21, 2019 @06:09PM (#21600772)
Are you coding on your phone? Emojiis are not on my keyboard. Maybe not even in my font.
Re:How to make your C codebase Rusty: rewriting keyboard fir... by steveklabnik on Thursday November 21, 2019 @06:21PM (#21600848)
I'm on Windows, emoji are a "windows + ;" away. On a Mac they're "command + control + space". Not sure about Linux.
Re:How to make your C codebase Rusty: rewriting keyboard fir... by umanwizard on Friday November 22, 2019 @12:48AM (#21603102)
I have no idea how to type emojis on Linux (with a barebones tiling WM), the OS I use almost exclusively for work, although I’m willing to believe there’s probably a way. But I would still immediately reject a code review inserting emojis into our codebase — why force every single person who modifies the code to figure out how to type them in their setup, use a particular font, etc. I’d also reject a code review naming things in Chinese or French, for similar reasons, unless I worked in a country that uses one of those languages.

Furthermore, Windows, Mac, and Linux are not the only operating systems, nor even the only ones Rust supports. Good luck figuring out how to type emojis on Solaris or the GUI-less FreeBSD base system.

Re:How to make your C codebase Rusty: rewriting keyboard fir... by tom_mellior on Friday November 22, 2019 @07:09AM (#21604840)
> I have no idea how to type emojis on Linux (with a barebones tiling WM)

You can copy and paste. In the context of this project, the small, fixed set of symbols (not emojis, but whatever) makes a lot of sense, and the code comes with an example that you can copy from. I would guess that this works even on Solaris or in a decent editor on GUI-less FreeBSD.

As for using, I don't know, "thumbs up" and "thumbs down" symbols in place of "true" or "false", sure, that would be excessive.

Re:How to make your C codebase Rusty: rewriting keyboard fir... by umanwizard on Saturday November 23, 2019 @12:02AM (#21612574)
The FreeBSD base system ships with two editors (IIRC): ed and nvi. Ed doesn’t let you copy and paste at all, except whole lines. I don’t know for sure, but I’d guess that nvi does work properly with Unicode. But can the base system’s font render it properly? I don’t know.

Anyway, that’s beside the point. It’s an unnecessary piece of additional complexity for, as far as I can tell, no real benefit over escape sequences.

Re:How to make your C codebase Rusty: rewriting keyboard fir... by Thiez on Saturday November 23, 2019 @09:43AM (#21614325)
Those seem more like arguments against FreeBSD than an argument against using those special symbols.
Re:How to make your C codebase Rusty: rewriting keyboard fir... by smabie on Thursday November 21, 2019 @06:01PM (#21600704)
I mean, I guess? But I’m guessing way over 99% of lines of code is ASCII. Of course then it’s also UTF-8, but it’s still a little disingenuous to say that “most” code is Unicode.