←back to thread

296 points reverseCh | 1 comments | | HN request time: 0s | source

I recently came across the concept of "useless" programs - pieces of code that serve no practical purpose but are fun, creative, or challenging to write. These could be anything from elaborate ASCII art generators to programs that solve imaginary problems. I'm curious to hear about the most interesting or creative "useless" programs the HN community has written. What was your motivation? What unexpected challenges did you face? Did you learn anything valuable from the experience? Some examples to get the ball rolling: 1. A program that prints the lyrics of "99 Bottles of Beer" in binary. A text-based game where you play as a semicolon trying to find its way to the end of a line of code. A script that translates English text into Shakespearean insults. Share your creations, no matter how quirky or impractical. Let's celebrate the joy of coding for coding's sake!
Show context
dom111 ◴[] No.41923875[source]
I think most of the stuff I make falls into this category...

My favourites are probably these two:

- a tool I made called gif-to-ansi (https://dom111.github.io/gif-to-ansi/) which converts an animated GIF to a stream of ANSI escapes in a shell script. I made this because I wanted to loop a GIF image in terminal when I mistyped a command to train me to do better typing.

- a 26 "language" polyglot (https://codegolf.stackexchange.com/q/209669/9365) where each starts with a different letter of the alphabet and prints out the alphabet less it's starting char (e.g. Bash prints out ACDEF...). This was just a puzzle that nerd sniped me, I really enjoyed it though and even got to learn a little APL for it, as well as brush up on shells. I highly recommend using sites like this if you want to explore a languages depths, I used it to learn Perl for a previous job and still play around in Perl today!

replies(1): >>41924007 #
dotancohen ◴[] No.41924007[source]

  > I made this because I wanted to loop a GIF image in terminal when I mistyped a command to train me to do better typing.
Have you seen `sl` and `gti`?
replies(1): >>41926179 #
1. dom111 ◴[] No.41926179[source]
Exactly the tools that inspired me:

https://github.com/dom111/gut