Live data from Hacker News

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

news.ycombinator.com

321–330 of 422 posts

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

#321

A Ai bot that lives on a phone number. You can call the number to talk to it and ask it questions, however all of it's answers are sandwich related and it attempts to solve any problem presented using sandwiches.

github?

I have not yet done this. None of the code is complicated, however the setup is a bit (needs an asterisk server, a trunk with a voip provider, an openai account, a text to voice service).

The actual code is quite simple. It's all just glue on the above.

I'll start a repo for the script and some instruction, though.

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

#322

A Ai bot that lives on a phone number. You can call the number to talk to it and ask it questions, however all of it's answers are sandwich related and it attempts to solve any problem presented using sandwiches.

github?

https://github.com/JonD-libera/sandwichbot

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

#323
I'm a lover of esoteric languages, and Piet[1] captured my imagination more than any other. So, I wrote a compiler[2] for the language, eventually writing a backend that re-targets Piet itself.

And since I love code golf, I wrote most of the compiler in the extremely tortured form that only fellow golfers can love. But I balanced the golf with extensive comments, as a bit of an experiment on the varied advice that we programmers receive about comments. Do they help? Can I keep them current as the code beneath them changes? (Jury's still out on both, but I find the juxtaposition aesthetically amusing).

Just recently, I made a friend! And by "friend" I mean that another human has written another Piet compiler[3] and it's a beautiful project and we were delighted to discuss our tortuous projects that we wrote for pure fun! So I've gotta plug his compiler too -- it's written in safe Rust! Too cool!

[1] https://www.dangermouse.net/esoteric/piet.html

[2] https://github.com/boothby/repiet

[3] https://github.com/pwang00/pietcc/

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

#324

Earlier quoted context omitted.

This is very similar to when I used OpenCV to read the angle of a cardboard knob I pinned on the wall in my office to change the volume on Spotify!

That is a super cool idea! Kinda sad that it doesn’t make much sense outside of a very particular use case scenario. Much more practical to mount a potentiometer to the wall for any sort of fixed installation. It might be cool adapt for a mobile office setup where you’re only present in one location for a few days but still want some automated creature comforts.

Cf. https://dynamicland.org/

> Dynamicland is a nonprofit research lab creating a humane dynamic medium.

> What that means is a way for real people in the real world to explore ideas together, not just with words and pictures, but with computation.

They're doing stuff like that.

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

#325
When I was in university, with a friend we wrote stack++, which was using stacks to do everything. Stack strings, stack numbers, stack operators, etc. We only give you two stacks per type. You would define your program using long string that would stack all of your stuff into stacks, then it starts unstacking the operators-1 stack, and you're on your own.

It was of course completely pointless, but to this day I regularly go back my stack of old hard drives and cd backups to see if I can find back the source code.

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

#327
I spent months trying to improve the visual fidelity of Microsoft Flight Simulator X terrain for my home town. I downloaded US geological survey heightmaps for terrain and openstreetmap vector data for all roads and building dimensions. I built custom tooling to export only the road vectors I cared about using a 2D image mask (I was also using some of the same data and tooling to attempt to build an Assetto Corsa map of my home town to drive around in in VR). I cribbed an API implementation for Google's satellite tile server from someone's code. I borrowed google maps tiles for ground textures. I learned how GIS works, played around with GDAL, played around with QGIS, wrote code to convert heightmaps into 3D models (absolutely terribly, I'm pretty sure blender includes a tool to do it ten times better) which were too big, so I wrote a tool to be able to take the same image mask from the road vectors and use it to configure a lower level of detail of the terrain away from the roads. I manually drew outlines for thousands and thousands of buildings and homes so FSX would autogenerate buildings on the terrain to match the scenery, which was mediocre because FSX only autogenerated buildings that look like old germany. I used the building footprint vector data to attempt to generate 3D models but didn't finish. I had about 100 40k X 40k pixel images of ground terrain, and it looked nice in game, but only in spring time and summer time since that's what google takes images of. So I found a 512x512 "snow" texture and wrote a python program to "resample" that texture into any green area in the ground textures and despite all my assumptions that this would be hilariously ugly, it worked extremely well. It took like 15 minutes per image though because PIL is the slowest library ever written, so I built a java program to do the actual image resampling and orchestrated it in my "pipeline" python script. I didn't want to actually have to write these massive images to disk in between steps so I found an old and unloved AMD utility to create 4gb ramdisks on Windows to use as a tempdir. I was at the point where I was manually tracing out tree polygons for the autogen scenery system and manually rebuilding the local airport from the ground up when I finally ran out of steam. I looked and found a utility that does most of the autogen scenery work for you but I never finished reading the manual. I just burnt out.

A year later or so Microsoft announced MSFS2020 and I was never happier to dump $200 on a problem. It still nags in the back of my head. It's one of the biggest projects I've ever worked on and I made so much progress.

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

#328
Once I wrote a Wordpress image downloader that would recursively go through a wordpress blog and download all the images. Only issue was that I had a bug that made it keep redownloading all images over and over again which made the bill for data go through the roof.

Ended up scrapping the project and didn't pay the bill. Luckily it was hosted on a platform that just complained on me for going over it instead of requiring me to pay.

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

#329

In college, I had an internship at JPL writing software to help collate, transform, and combine pictures of Jupiter, for use with NASA’s JUNO mission. My coworker and I created a GUI application in IDL (similar to FORTRAN), that would allow the user to open up several images of various wavelengths and combine them into a cylindrical map of the planet, showing its entire surface at a given point in time. After working…

> In college, I had an internship at JPL writing software to help collate, transform, and combine pictures of Jupiter, for use with NASA’s JUNO mission.

This already sounds incredibly cool. I wish I had had an opportunity like this sometime. Sadly, nothing.

> The disappointment in his eyes when he saw that dumb, useless, cat button was priceless.

Some people tend to have no humour. I think it's hilarious.

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

#330

In college, I had an internship at JPL writing software to help collate, transform, and combine pictures of Jupiter, for use with NASA’s JUNO mission. My coworker and I created a GUI application in IDL (similar to FORTRAN), that would allow the user to open up several images of various wavelengths and combine them into a cylindrical map of the planet, showing its entire surface at a given point in time. After working…

>The disappointment in his eyes when he saw that dumb, useless, cat button was priceless.

I once wrote a p2p filesharing app in college for a networking class, and I had put an easter egg in there where if you requested a certain file (lenin.jpg?) it displayed ascii art of a communism meme and started playing a midi of the soviet national anthem.

My little old networking prof sets down to test my program, and of course, that's the file she requested. She slowly turns to me, looks me in the eye and says 'be honest, you spent more time on that than the actual assignment didn't you?' ...'yes'. She shakes her head and mutters 'nerds!' under her breath, lmao

Post reply on HN