From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by sourceware.org (Postfix) with ESMTPS id C19FD3858D32 for ; Sat, 1 Apr 2023 17:09:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C19FD3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gwmail.gwu.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gwmail.gwu.edu Received: by mail-vs1-xe34.google.com with SMTP id d2so21827950vso.9 for ; Sat, 01 Apr 2023 10:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gwmail.gwu.edu; s=google; t=1680368971; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=buzHZEZKE3lBL75Pbg7h/te3woH6YRBZgr24Y2z25EM=; b=g0WQe54DzoHizYgcj3FGT8CWEVXTcy3Dfn3VsKSqmqXEziEEO1QesXFzbfiXxf7hB6 n/TncNVxdTy0ewzWcCD90fbyHZ8/+/UB3WOnCjOAI9FWFWFByB8ftnhTiTG8kYzOZnfV KgB8wlAJsHhlP/Fb++JgclSPbuKIxV6PFdIp4NWJ4CWqL7ERy9P0xYvIuMg36GjaYo1y nHeM2odasEqnGasYSm9FgMUw+SE6mutWhzKLT9IMeVQqXheFzheVkVYvE/VxhP9ulDSp yyzgLTa/bxnyf905MvnRdMfU+oZB6jM/tFdDrmwc8uKlIOMdOB0zahRb9zJqhT2eQ12f TgAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680368971; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=buzHZEZKE3lBL75Pbg7h/te3woH6YRBZgr24Y2z25EM=; b=ZePkHj8LpuD47mcnYOthvZoOkmskCRcqaTTPvw8XxKj19vXzWOVXHRw33Pccyx92S4 dCvKM4+uSEIS0wGls+NNnV53/MiCdHIkwKO7+inc7Ie82CmrWVzxKZXSH6SYmhKS+jXS QrTMk4U8nRT8T24DErrxwLZKID+NF+0dYRrnvv7ovifDEpP7lwInTgb5szuMW790thdv 5kgZJ2cV3YfmnTbOjitocKb17J/N7BeB7KSJSkbwcswwCOse4XzlHBK80gNeUL7mKUQR DweJj3SCL5eHieqdm+7kVuyR+fIfObM+u6i3uN8osDq4kRid/FOt0rtrOpGnYwfWk50C ttHg== X-Gm-Message-State: AAQBX9fQGxw41xgfQJikRxtmXC6/C3xMhm592coYx+ZqSazZ/nLdSzyq KLQao27NFJDM4qBfDcJfC3JuGHldfN72s+TjkDwBNXyHbbfuxPLDN5E= X-Google-Smtp-Source: AKy350bUzemw62mGLFd/ot+XGLFzK14Enqnux+VAnkSMl0r5GCCFQJgtxL9vE1nvvZXIfBBwEc/OTCk5sDoE58c7JbM= X-Received: by 2002:a67:d994:0:b0:423:e694:7a7d with SMTP id u20-20020a67d994000000b00423e6947a7dmr17807802vsj.4.1680368970869; Sat, 01 Apr 2023 10:09:30 -0700 (PDT) MIME-Version: 1.0 From: Eric Gallager Date: Sat, 1 Apr 2023 13:09:19 -0400 Message-ID: Subject: Humor in GCC To: GCC Development Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_05,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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