←back to thread

296 points reverseCh | 2 comments | | HN request time: 0.415s | 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
adityaathalye ◴[] No.41896671[source]
"The Matrix" raining characters, but really bad, and in Bash (:

https://www.evalapply.org/posts/bad-matrix/

replies(1): >>41921501 #
1. somat ◴[] No.41921501[source]
Oh man that brought back a memory.

I once had a job operating an ibm mainframe. it was the night shift of a low tier job mainly feeding tapes to the machine. I would spend the downtime reading the documentation for what was for me a foreign system. The mainframe.

This system was set up as vse(a batch processing operating system) over z/os, however the operators would login to cms(a more interactive operating system) on 3270 terminals.

If unfamiliar with 3270 terminals they are very different than the VT style terminals we tend to use. the main difference is VT terminals are in a sort of immediate mode(they print to the screen and read from the keyboard asynchronously) 3270 terminals are more like a html form, you fill out the form and send the whole thing to OS.

My great useless task was to build a matrix rain screensaver on the 3270, This is not trivial, the 3270 does not want to do this, I had to figure out how to spoof an immediate mode, I got it half working, I could print to the screen async like but I could never figure out how to read from the keyboard without blocking.

Once I had my async tty library, my next great useless task was to make an analog clock screen saver. This was it's own pile of worms as rexx(the cms scripting language) had no trig functions. I was smuggling in printouts from the nist library of functions on how to calculate sin, tan, pow... etc... and ended up writing some of the worlds slowest trig and exponential libs.

I think the nist library was this https://dlmf.nist.gov/ I have a great, perhaps unwarranted respect for nist to this day for providing this amazing resource.

Unfortunately I was not able to save any of my code from that job, I would love to look at it again.

replies(1): >>41921905 #
2. adityaathalye ◴[] No.41921905[source]
Wow that's a great story; thanks for sharing! If you have a blog, please copy-pasta this there. It needs to live!

This made me chuckle... it is how all great hacks begin.

> "This is not trivial, the 3270 does not want to do this"