public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Humor in GCC
@ 2023-04-01 17:09 Eric Gallager
  0 siblings, 0 replies; only message in thread
From: Eric Gallager @ 2023-04-01 17:09 UTC (permalink / raw)
  To: GCC Development

Happy April Fools' Day! In the spirit of the day, I've done a brief
survey of humor in other FOSS projects, and how they could be used as
inspiration for fun features in GCC.

* Emacs: The etc/ folder in the emacs sources has plenty of humorous
material in it, most obviously, etc/JOKES (although, some of the jokes
there can be kind of cringe). Emacs also has games included in it,
such as Tetris:
https://www.masteringemacs.org/article/fun-games-in-emacs
If emacs can have games in it, why can't GCC bring back its "play
nethack on undefined behavior" option?
* glibc: glibc has some joke functions in it, such as strfry:
https://sourceware.org/bugzilla/show_bug.cgi?id=4403
...or memfrob: https://www.gnu.org/software/libc/manual/html_node/Obfuscating-Data.html#Obfuscating-Data
Perhaps GCC could offer builtins for these functions? i.e.,
__builtin_strfry() and __builtin_memfrob()
* clang: clang has a flag called -fheinous-gnu-extensions:
https://stackoverflow.com/questions/19367572/what-does-fheinous-gnu-extensions-option-do
It allows for compiling code such as this:
https://opensource.apple.com/source/clang/clang-318.0.45/src/tools/clang/test/Sema/heinous-extensions-on.c.auto.html
In GCC, such a flag is unnecessary, as such casts in inline assembly
are already allowed. Thus, attempting to use the flag with actual GCC
results in the following error message:
gcc: error: unrecognized command-line option
'-fheinous-gnu-extensions'; did you mean '-fno-ms-extensions'?
However, I've thought it might be fun to special-case the error
message for this specific flag: maybe GCC could have a unique message
such as "gcc: error: GNU extensions are never heinous!" just as an
easter egg for this flag?
* sudo: sudo is notable for having configure options that will cause
it to insult you when you mistype your password:
https://askubuntu.com/questions/837558/where-are-sudos-insults-stored
Imagine if GCC had similar functionality where it would insult you
when providing compile warnings and/or errors? What might it say?
* gdb: gdb has a song: https://www.gnu.org/music/gdb-song.en.html
Perhaps GCC could have a song as well?

Anyways, just some fun food for thought on this day of foolishness;
please don't take these suggestions too seriously (unless you want
to).

Happy hacking!
Eric Gallager

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-01 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-01 17:09 Humor in GCC Eric Gallager

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).