News for hackers. Stuff that matters.
Re:Usability Improvements in GCC 15 by codeshaunted on Thursday April 10, 2025 @12:05PM (#43645292)
Big fan of all of this except for the emojis in my console
Re:Usability Improvements in GCC 15 by guenthert on Thursday April 10, 2025 @12:26PM (#43645510)
I actually appreciate a #\WARNING_SIGN, but then, why is there no #\STOP_SIGN ?
Re:Usability Improvements in GCC 15 by staplung on Thursday April 10, 2025 @12:40PM (#43645661)
On the one hand I feel like the #WARNING_SIGN is a welcome addition. On the other, I'm sensitive to the idea that it will be totally obnoxious if you need to grep/search for it in whatever tool you're using.

Was a little surprised to learn that the warning sign is generally considered an Emoji; I guess I don't think of it that way. Was even more surprised to learn that there is no great definition for what constitutes an Emoji. The term doesn't seem to have much meaning in Unicode. The warning sign - U+26A0 - goes all the way back to Unicode version 4.0 and is in the BMP, whereas most Emoji are in the SMP.

Re:Usability Improvements in GCC 15 by Someone on Thursday April 10, 2025 @01:51PM (#43646397)
> Was even more surprised to learn that there is no great definition for what constitutes an Emoji. The term doesn't seem to have much meaning in Unicode

The definition is messy, but the list of Unicode emojis is defined. Starting points: https://www.unicode.org/reports/tr51/, https://unicode.org/emoji/charts/full-emoji-list.html

Re:Usability Improvements in GCC 15 by codeshaunted on Thursday April 10, 2025 @01:08PM (#43645985)
How will it output on my VT100 serial terminal? :P

Somewhat related fun fact, anyone can submit an emoji to the Unicode Consortium annually, submissions are actually open right now: https://unicode.org/emoji/proposals.html.

Re:Usability Improvements in GCC 15 by bonzini on Thursday April 10, 2025 @02:15PM (#43646632)
It's only an emoji if followed by the "emoji presentation selector" U+FE0F. Without it, it has no colors (but hackernews doesn't allow including it).
Re:Usability Improvements in GCC 15 by high_na_euv on Thursday April 10, 2025 @01:01PM (#43645904)
Why?
Re:Usability Improvements in GCC 15 by codeshaunted on Thursday April 10, 2025 @01:10PM (#43645993)
Makes me feel like I'm writing JavaScript, if that makes any sense. Also I hate fun.
Re:Usability Improvements in GCC 15 by umanwizard on Thursday April 10, 2025 @01:07PM (#43645974)
Well, other than the fact that it's hard to search for, things should be kept as simple as possible to improve reliability/interoperability. Are you confident that multi-column-wide non-ASCII characters work reliably without causing rendering issues on every possible combination of terminal/shell/OS, including over SSH? I'm certainly not.
Re:Usability Improvements in GCC 15 by aseipp on Thursday April 10, 2025 @03:50PM (#43647447)
They are quite easy to search for actually, because they are sparse and you tend to not get so many spurious results due hitting things that contain your query as a substring. Even then, the glyphs appear inline in the warning message, they are not the anchor, you could still just search for "warning:" like you or your editor have been doing for years. Every operating system comes with an emoji picker, it takes like 2 seconds to use. I'm not sympathetic, tbqh.
Re:Usability Improvements in GCC 15 by gpderetta on Thursday April 10, 2025 @01:17PM (#43646064)
You can already put multi-column-wide non-ASCII characters in your source code, so the horse has left the barn already.
Re:Usability Improvements in GCC 15 by umanwizard on Thursday April 10, 2025 @01:28PM (#43646176)
Of course you can. I'd argue you shouldn't, but that's beside the point. There is clearly a difference between people being able to do something, and the compiler forcing it on them.
Re:Usability Improvements in GCC 15 by IshKebab on Thursday April 10, 2025 @01:52PM (#43646413)
But the compiler isn't forcing it on anyone?
Re:Usability Improvements in GCC 15 by jcelerier on Saturday April 12, 2025 @08:13AM (#43663721)
How isn't it? It's setting it by default which is equivalent to forcing it for the huge majority of users who won't even know that such a thing as a flag to disable these emojis exists
Re:Usability Improvements in GCC 15 by dzaima on Thursday April 10, 2025 @01:31PM (#43646193)
If anything, an emoji is easier to search for, as less things would be using it than a general "warning" (or whatever would make sense, as the emoji'd thing isn't the warning itself). Do have to get a copy from somewhere to search for though. It's also much easier to "visually" search for it.

At least in the blog there are a two spaces after the emoji so it can freely draw past its boundaries rightwards without colliding with anything for a good bit; and nothing to its right is used assuming monospace alignment. So at worst you just get a half-emoji.

Re:Usability Improvements in GCC 15 by javier_e06 on Thursday April 10, 2025 @02:01PM (#43646503)
I started putting emoji's in my bash scripts.

gitk broke! Can't parse emojis

I want emojis in my code. They are a superior form of communication (non-linear)

Re:Usability Improvements in GCC 15 by nomel on Thursday April 10, 2025 @02:34PM (#43646832)
> I want emojis in my code.

Then you will enjoy swift [1]!

[1] Emoji driven development: https://www.swiftbysundell.com/special/emoji-driven-developm...

Re:Usability Improvements in GCC 15 by nomel on Monday April 14, 2025 @09:17PM (#43688066)
(Note, recommendation to use emojis is an April fools joke, but all the listed code compiles. You can use emojis as shown.)
Re:Usability Improvements in GCC 15 by dlachausse on Thursday April 10, 2025 @01:28PM (#43646172)
It should be easy to patch out or possibly add a command line switch to disable it if desired.
Re:Usability Improvements in GCC 15 by cassepipe on Thursday April 10, 2025 @03:38PM (#43647344)
Already exists : -fdiagnostics-text-art-charset=[none|ascii|unicode|emoji]
Re:Usability Improvements in GCC 15 by Karliss on Thursday April 10, 2025 @01:53PM (#43646432)
Few versions ago GCC added `-fdiagnostics-text-art-charset=[none|ascii|unicode|emoji]` so feel free to disable them.

https://godbolt.org/z/bYc7EqYWE

Re:Usability Improvements in GCC 15 by pxc on Thursday April 10, 2025 @02:48PM (#43646956)
If you're using an OS that honors your font choices (i.e., not macOS), you can use a font like Symbola to provide emoji so that they're stylized, monochrome, and vectorized, rather than incongruous color bitmap images. That helps them play nice with terminal colorschemes and things like that.

I'm not aware of any emoji fonts like Symbola which provide a monospace typeface, though. That would be a great option.

Re:Usability Improvements in GCC 15 by lyorig on Saturday April 12, 2025 @06:33AM (#43663162)
By honoring font choices, do you mean the ability to overwrite emojis as well? I’ve never had issues using custom/nerd fonts, but it’s true that the emojis have stayed true to the Apple style so far.
Re:Usability Improvements in GCC 15 by pxc on Saturday April 12, 2025 @05:29PM (#43668089)
Indeed. Emoji are just characters, rendered via some font just like any text character. On non-Apple operating systems, you can select emoji sets via font configuration.

You can do it on macOS as well, but you have to disable SIP and modify/replace the files for the Apple Color Emoji font, because some widely used GUI libs are hardcoded to use it.

Idr the situation on Windows except that emoji glyphs are inherited from your other font choices, if your chosen font includes emoji. But on Linux it's generally easy to configure certain font substitutions only for some groups of characters, like emoji.