r/tinycode • • May 05 '24

Matrix Digital Rain & Implementation In Under 20 LOC in pure Bash

Post image
20 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/wick3dr0se May 05 '24

Thank you! Great questions

(:;:) is a pure Bash microsleep and it's to ensure LINES/COLUMNS is set immediately

These are both just run forever loops. I just prefer the second way of writing it really. I like the braces over the do; done

while true; do
done

for((;;)) {
}

2

u/[deleted] May 06 '24

Nice, it does make for compact (tiny, hah!) code. Thanks for the explanation, it was just a bit puzzling for someone who knows bash but not very versed in it like me.

2

u/wick3dr0se May 06 '24

Thank you! You should see my TUI type test on GitHub. That thing was a pain in the ass to figure out lol