Live data from Hacker News

Ask HN: What's the most creative 'useless' program you've ever written?

news.ycombinator.com

341–350 of 422 posts

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#341
I wrote a program to add Roman numerals using Sed. You really just have to use regular expression substitutions to convert it all to unary (e.g. substituting IX -> VIV, IV -> IIII, V -> IIIII in that order), then remove plus and white space, then perform reverse substitutions to “compactify” the result again.

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#342
I once coded a machine that could make photo-books of your neighbour's living rooms.

It was inspired by Ed Ruscha's "34 Parking Lots in Los Angeles" artist booklet from 1967, and the output looked pretty similar, but with photos of domestic interiors instead of parking lots. So far so ordinary, but the difference was that you could tweet any UK postcode at the machine and a couple of minutes later it would spit out a custom-generated, printed-on-demand booklet of living rooms in that neighbourhood.

The way it worked was when it received a postcode, it went to Gumtree (popular UK second hand listings site) and looked for second hand sofas for sale within a radius of 1km. It then scraped the photos, imported them into a document, generated a PDF on the fly and sent it to a laser printer with a built-in binding machine. The results were insanely good. Always hoped I'd get to show it to Ed Ruscha one day.

The project was commissioned by the Victoria and Albert Museum in London, but still kind of pointless from a utilitarian point of view :)

[1] https://gagosianshop.com/products/ed-ruscha-thirtyfour-parki...

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#343
post #123
post #33

Writing programs that play games for me. I enjoy that more than playing the games.

Quite a fun hobby. What game you working on now?

Card game that was revived from Flash to Unity.

https://elementstherevival.com

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#344
Many years ago, I made an emacs script that plays back diffs between files as live edits in the emacs buffer: https://github.com/nma83/diff-actor

My nefarious intent was to make my screen at work look like I am editing code from remote login :). PS: the aciinema link for the demo video is dead right now.

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#345

Earlier quoted context omitted.

Could you use this to build your own “poop detector” where an object is routed around until you confirm with the robot if it’s “safe” to proceed in that area? I love my robot vacuum but I dare never run it when I’m not at home for fear or smearing poop all over my floor on accident. Sadly I didn’t shell out enough money for a bot with superior object detection.

Maybe just stop shitting on the carpet.

Spat my tea out on that comment!

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#346
This wasn't super creative, but way back in time, I was on a local tinymud and a number of us starting writing bot NPCs for it. I built a bartender bot that eventually would remember drinks, tell jokes, and more. One day another bot came into the bar and got into an extended exchange of insults with the bartender bot. We were kind of dumbfounded watching these blocks of switch statements have a very real-looking conversation in front of us.

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#347
post #272

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.…

> 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`?

Exactly the tools that inspired me:

https://github.com/dom111/gut

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#348
I used to write PostScript programs to draw stuff (usually just fractals) on paper.

PostScript is a Forth dialect, so you can do quite a lot with it. If you had a printer that supported PostScript, you could pipe the source code straight to lpt1 (or wherever), and the printer would execute the program directly. It was fun to see what I could get to execute on printer hardware, which was generally fairly limited.

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#349
Made one of those silly Bad Apple [1] renditions using NSSwitches with AppKit [2]. I recorded the video with a buggy version, but was still pretty happy with it! [3]

[1] - https://en.wikipedia.org/wiki/Bad_Apple%21%21

[2] - https://github.com/AndroidKitKat/Bad-AppKit

[3] - https://youtu.be/yJ6YRInG4tI

Re: Ask HN: What's the most creative 'useless' program you've ever written?

#350
Very long ago, I wrote an interpreter in PHP for an arbitrary syntax that was essentially a subset of PHP. It had loops, recursive functions, and performed calculations with BC math (basically using strings for mathematical calculations instead of primitives since it had fewer capacity limits. No practical reason for it though). It taught me a ton about tokenization and how precedence works in an interpreter

I also made a simple mod tracker in JavaScript. It didn't use the audio API. It worked by changing the frequency of header values in WAV files it had embedded within it to play different notes from a sample. Surprisingly it actually changed pitches properly. But the embedded nature made it unfeasible to keep or play more than two samples at a time. It was a good lesson in editing binary, file formats, and browser limitations

Post reply on HN