NaNoGenMo / 2021

National Novel Generation Month, 2021 edition.
44 stars 8 forks source link

The Shortest NaNoGenMo Entry You'll Probably See #69

Open lyxal opened 2 years ago

lyxal commented 2 years ago

Wow, look at everyone else writing generating programs that span multiple lines. Sure, they have fancy "markov chain" or "special filter" rules that make the generated novel make more sense and make the program longer, but as a green cucumber once said, "in the future, humour will be randomly generated". Therefore, I present to you a program that will randomly generate 50000 word novels using only 41 40 bytes.

k⟇kP⊍‛\t⊍\‛⊍f:Ẋ(n∑qĖ:L4≥[⅛|_])k3½(¾℅⇩₴ð₴

Try it Online! (it'll probably timeout, but that's fine).

lyxal commented 2 years ago

Now you're probably wondering "how is that 40 bytes? The utf-8 byte counter I use says it's 72 bytes. And what on earth is up with all those garbage characters?"

lyxal commented 2 years ago

Well for a start, this novel generating program is written using an esoteric programming language (esolang) called Vyxal (disclaimer: I made the language lol). It is designed to perform well in code golf competitions on the Code Golf StackExchange site - as such, it's known as what's called a "golfing language". There are various other golfing languages such as Golfscript, 05AB1E, Jelly and Husk.

In languages such as these, each command (built-in) is a single character/byte.

lyxal commented 2 years ago

(Note that the writeup for this is still WIP/as a draft - I'll be adding more soon. I just wanted to make sure I got #69 because it's a funny number)

lyxal commented 2 years ago

(Also, if I've submitted this wrong, let me know the best way to actually submit it)

hugovk commented 2 years ago

This is the right way to submit, it would be good to post a static 50k+ output somewhere when you're ready.

There's a name for these microprograms: Nano-NaNoGenMo!

Because of this, I have recently announced Nano-NaNoGenMo. On Mastodon and Twitter (using #NNNGM) I have declared that November will also be the month in which people write computer programs that are at most 256 characters, and which generate 50,000 word or more novels. These can use Project Gutenberg files, as they are named on that site, as input. Or, they can run without using any input.

https://nickm.com/post/2019/11/nano-nanogenmo-or-nnngm/