Great work! This is one of the best rain implementations I've seen.
A while back I implemented[0] a (pretty basic) Matrix rain in JavaScript that will pull your latest public GitHub contributions and use that for the rain text. Demo here[1]. And of course my useless Game of Life icons, golicaons[2] (demo [3]).
Back in the 80s when most people were using DOS text screens, we would sometime play a joke on a friend/coworker. We would get on their computer and run a small terminate-and-stay-resident (background process) program called rain.com. It would sit in the background while they ran their word processor or spreadsheet. After some time, it would cause one character to “fall” down the screen. They would see it happen and not know what was going on. Then it would make another charter fall. By then, the person would usually call out to someone else to come and look at this weird thing. But then the program would up the rate and start dropping multiple charters. It kept increasing the rate and eventually all of the characters on their screen had rained down and were in a pile on the bottom of the screen. At that point, we would press some key combination and their original screen would appear. That is usually when we would let them in on the joke and reboot their machine to remove the TSR Rain.
It's a Matrix emulator inspired by cmatrix. It doesnt have as many features as this posts one (e.g. just 2 colors for the kanas), but was a fun exercise to learn Go.
Pull requests welcome :)
You made it further than I did. The majority of machines out there today probably do not support the required -std=c++17. I know none of my OS installs (and their compilers) do.
GCC 7.4.0 sadly misses certain C++ features (filesystems) and does not correctly support others (template argument deduction). I'm waiting for 20.04 to hopefully bump GCC to something newer…
This is fantastic. What arguments should I pass ./cxxmatrix to get the mandelbrot set or game of life?
Can't seem to get it to work / couldn't figure it out from the repo.
Thank you for your comment. I'm not sure for your specific case, but generally the performance largely depends on the terminal emulators in my experience. For example, xterm and Windows ConPTY are super slow which are sometimes 100 times slower than the fastest terminals. urxvt (rxvt-unicode), alacritty, terminology are usually fast. xfce4-terminal, qterminal, mintty are acceptable. VTE based terminals (GNOME terminal, lxterminal, etc.), termit, etc. are slow in my environments.
Actually one of the reason why I wrote this program is to test the terminal performances. When I'm searching the benchmark data of Alacritty, I found this issue https://github.com/alacritty/alacritty/issues/289#issue-2001... where the existing Matrix rain program "cmatrix" is mentioned. I tried "cmatrix" in my terminal (I'm using a terminal which I wrote from scratch for myself) and found that the Matrix rain of "cmatrix" is cheaper than I expected. That is the reason why I wrote "cxxmatrix", a version with additional optical effects written in C++.
The default WSL terminal is slow. I always install an X server. VcXsrv works great, with good Windows clipboard support. Then you can use urxvt or some other Linux terminal that's faster.
I use VcXsrv in the multiwindow mode where it uses the Windows 10 window manager for each X app, instead of being fullscreen. Is that also slow on a 4k screen?
A while back I implemented[0] a (pretty basic) Matrix rain in JavaScript that will pull your latest public GitHub contributions and use that for the rain text. Demo here[1]. And of course my useless Game of Life icons, golicaons[2] (demo [3]).
[0]: https://github.com/anderspitman/redpill
[1]: https://anderspitman.net/apps/redpill/
[2]: https://github.com/anderspitman/golicons
[3]: https://anderspitman.net/apps/golicons/