- Bad Matrix (tput blocks to the terminal): https://www.evalapply.org/posts/bad-matrix/
- Animating Text Art in Javascript (print text into fixed grid, flipbook-style): https://www.evalapply.org/posts/animate-text-art-javascript/...
- oxo (format and print tic-tac-toe board to terminal, so I can regex-match for win/loss/draw results): https://github.com/adityaathalye/oxo/blob/7681e75edaeec5aa1f...
But, I mean, that Bad Apple takes the cake!
(edit: add missing link)
Brb forking and integrating ascii-text third party ads
https://somethingnerdy.com/downloads/
Here it is running from my Everdrive.
https://inversethought.com/jordi/video/badapple.mp4
Yes, with full audio. It's about one gigabyte of data. On a system where the typical game size is no more than a couple hundred kilobytes, and your CPU only has three 8-bit registers for you to do any calculation with.
I wonder if it's using the background tile map for this instead of sprites, though that's also an impressive amount of graphics bandwidth.
> with full audio playback rate (44.2kHz)
The audio being so clear is also impressive, is that something that the card extends? IIRC the PCM channel on the NES isn't anywhere near that bitrate, and is also 8-bit sample size.
So by burning a lot of CPU cycles, you can keep up a perfectly good sample rate using the latter method.
They also made an accompanying breakdown video. https://www.youtube.com/watch?v=Wa0u1CjGtEQ
:%norm @q
back when I was vim golfing the normal solution was to make the macro recursive. So you'd record your macro, and you'd end it with '+@q' (move to next line and run the macro again). Then you run the macro once and it runs over every line.
This ends up being really efficient in terms of keystrokes but in practice I think it's hard to think about and not very ergonomic, so I don't end up using it much. But it's a fun trick for golfing.
One thing to keep in mind is that ":%norm" will place the cursor at the start of each line, before any indentation, whereas the trick of ending the macro with "+" will place the cursor at the start of each line after the indentation. But this can be worked around with ":%norm ^@q", using ^ to skip indentation before running macro q on each line.
"qp
Edit it, and put it back into the register with "qdd
:g//norm @q
Here, g// repeats the most recent search, and norm @q runs the q macro on each matched line. This is not quite the same as starting the macro with a search, since the cursor is at the start of the line and not at the start of the match, but it's often good enough.You can also restrict it to just the matches inside a range of lines: First select the lines in visual mode, then type :g//norm @q, which will cause Vim to insert a range before g, as in: :'<,'>g//norm @q, which means "between line '< and '>, find lines containing a match of the most recent search, and run @q on each such line".
https://us.govee.com/products/govee-curtain-lights
and my understanding is that you can upload an animated GIF to it... I just added making a "bad apple" GIF for it to my Kanban board though I don't know how much memory the device has and how well I can get it to work.
(Sometimes that part where Remmy Scarlet spreads her wings still makes chills go down my spine)
https://bsky.app/profile/up-8.bsky.social/post/3lbqfh7pesc2x
and the spreads I make are like
https://bsky.app/profile/up-8.bsky.social/post/3latxcwmkpk2w
I have a list of 20 that I need to fill out a little (somehow I missed Koakuma) and then I have to have my image sorter find a good set of images that fit together stylistically. (A friend of mine was talking about how RA's in dorms would make picture sets for all the rooms, seemed to me Touhou would be the ultimate basis for this)
Big shout out to https://ezgif.com/ !
Also, I really like how footnotes are implemented in this blog. I guess I'm gonna steal it.
Anyway steal away!!
I wouldn't be surprised if your problem turns out to be much easier to solve optimally.
However, that's of course just an academic tangent - the theoretical results don't necessarily imply that one problem is easier than the other when you're just getting something to work for an afternoon project.
but agree that it can be really hard to take a step back and realize that you can employ it instead of writing something "perfect"
There are some really interesting ones, like running Doom on a pregnancy test.
It's drawing in Vim, but not pattern matching.
Like jchw said, this was a single-day project (although I did the writeup for it the next day).
I went from 0-prototype in one sitting; I think that was around four or five hours of work? Then I went home, had dinner, and spent maybe three hours optimizing and cleaning it up.
edit: I should say, i have done a lot of dumb things like this and I'm pretty sure it would have been at least a week of work for me 2 years ago. "making the computer do dumb stuff" is a skill like any other!
> I didn’t have the time to find a good general-purpose algorithm: I was working on this the night before weekly presentations at the Recurse Center and I wanted to present it the next day!
...
> I built this in a single day
No estimate of hours, though.
There is nothing even remotely close to sexual or NSFW in it.