Earlier quoted context omitted.
Have you got a write-up or GitHub for your camera? I'd kinda like to do the same, and wouldn't mind a starting point.
I can't without doxxing myself sadly. I really should make a public HN account
Ask HN: What's the most creative 'useless' program you've ever written?
401–410 of 422 posts
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#402Earlier quoted context omitted.
> a Space Invaders game > a minimal roguelike in Forth > 3-D rotating objects in ASCII art in 20 lines of Python > an RPN calculator with forward-mode automatic differentiation Those all sound pretty cool. Are those in the link you provided? I'd be interested in seeing how you did the 3-D rotations in only 20 lines, or what a minimal roguelike in Forth would look like.
Thanks! Two of them are there! Or, sort of, three of them. The Space Invaders game is http://canonical.org/~kragen/sw/dev3/qvaders.html , built on the game engine in http://canonical.org/~kragen/sw/dev3/qj2d.js . An earlier version without the engine, the explosions, or the Xbox support is at http://canonical.org/~kragen/sw/dev3/invaders.html . The minimal roguelike is http://canonical.org/~kragen/sw/dev3/wmaze.fs .…
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#403Earlier quoted context omitted.
Thanks! Two of them are there! Or, sort of, three of them. The Space Invaders game is http://canonical.org/~kragen/sw/dev3/qvaders.html , built on the game engine in http://canonical.org/~kragen/sw/dev3/qj2d.js . An earlier version without the engine, the explosions, or the Xbox support is at http://canonical.org/~kragen/sw/dev3/invaders.html . The minimal roguelike is http://canonical.org/~kragen/sw/dev3/wmaze.fs .…
Thanks! I upvoted you but forgot to reply. Those are as interesting as I thought they'd be.
I probably should have said in my original comment that the 3-D rotation itself was only 3 of the 15 lines:
s = 0.1 # sine
c = (1 - s**2)**0.5 # cosine
...
cube = [(c*x + s*z, y, -s*x + c*z) for x, y, z in cube] # Rotate by theta.
The rest was ASCII art, animation, perspective projection, and geometry generation.Re: Ask HN: What's the most creative 'useless' program you've ever written?
#404Someone made an ASCII art bonsai generator in bash, so I ported it to a few lines of JS. Then I made it animate the growth :) http://web.archive.org/web/20200512153032id_/https://andai.t... There's no "restart" button, but each refresh produces a unique tree.
Just a caution for future clickers: This caused my mobile browser to spawn a bunch of print windows and was pretty annoying to exit.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#405Earlier quoted context omitted.
What anagrams does it produce for "Jeremy Irons"?
You can download the binary and run it in a DOS emulator to find out! Or compile from the source linked to on the page.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#406I didn't expect it to be that useless. I like to experiment with home automation things, and recently I added a feature to my system where I could push notifications with images to my phone (pretty much everything I do is entirely self-hosted btw). Then a Valetudo update came out - Valetudo is a FOSS replacement for the cloud services usually required for supported robot vacuums. You root your robot, block it from ph…
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.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#407A 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.
I love this idea. It makes me think of an alternative universe where urls and websites were never invented, and everyone has to interact via a dumb phones with a phone number and txt messages (maybe WAP exists...maybe). I might try taking this further :-)
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#408Re: Ask HN: What's the most creative 'useless' program you've ever written?
#409But I learn a lot from it, and it indirectly feeds into my day job.
Re: Ask HN: What's the most creative 'useless' program you've ever written?
#410 #!/usr/bin/env