1. 22
  1. 9

    I love this stuff. I hadn’t heard of HQ9+ before; that’s great.

    If a swear ever fails, the function is deleted from the source code. This guarantees that only functionally correct remains in the codebase.

    I wonder if this was inspired by the famous GHC bug which deleted your source code when a type check failed: https://gitlab.haskell.org/ghc/ghc/-/issues/163

    1. 3

      Just remembered one of my favorite humor languages: Swearjure


      It’s a subset of Clojure where you’re not allowed to use alphanumeric characters. Here’s factorial in Swearjure:

      (#((:! %) % (`[~@%&] (+)))
       {:! #((% ({(+) :+} (`[~@%&] (+)) :-))
             % (`[~@%&] (+)))
        :+ #({} %& (*))
        :- #(* (`[~@%&] (+)) 
               ((% :!) %  (- (`[~@%&] (+)) (*))))}
      1. 2

        My toolchain for Cammy, another esoteric language somewhat like Vigil, has a similar feature: code can be proposed at the REPL, but ill-formed or ill-typed terms are rejected and not added to the code database. Strangely, I completely forgot about Vigil until reading this article!

      2. 4

        When I was a kid, I was obsessed with esolangs. The best one I made was O, which is stack based and heavily inspired by GolfScript. The original joke was every program had to end with o for you to output the final items on the stack (this requirement was later dropped because this, of course, did not do well in code golf). Another language, this time in 2D, had mirrors and portals to bounce execution around. If it weren’t for these funny programming languages, I probably wouldn’t be as interested in languages as I am today. I definitely recommend creating whatever goofy ideas you can think of - and try them out on the codegolf stackechange!

        1. 1

          There’s also some cases where the joke is an entire programming language. Not many, since making a PL is hard, but a few!

          There’s actually quite a few joke languages out there. https://esolangs.org/wiki/Category:Joke_languages

          1. 4

            Yes but something like 90% of them are just reskins of Brainfuck, GolfScript, Befunge, or another well-known esolang.

          2. 1

            Footnote 1 references ngate, which is sadly defunct (and mostly existed to poke fun at Hackernews culture, not languages per se).

            1. 1

              What about lolcode, the lolcats language where variable declarations start with I CAN HAS? I think someone actually implemented it.

              1. 4

                aren’t they covered in the first paragraph?

                a joke syntactic skin over another language. These can be funny but they’re not very interesting.