Implement the Matrix Digital Rain visual effect from the movie "The Matrix" as described in Wikipedia.

Provided is a reference implementation in Common Lisp to be run in a terminal.




SeedRandom[1234];
ClearAll[ColorFunc]
chars = RandomSample[Flatten[CharacterRange @@@ Partition[Characters["\[CapitalAlpha]\[CapitalPi]ЀѵҊԯ\:03e2\:03efｦﾝⲀ⳩\[ForAll]∗℀℺⨀⫿"], 2]]];
charlen = Length[chars];
fadelength = 6;
ColorFunc[fade_] := ColorFunc[fade] = Blend[{Black, Green}, fade/fadelength]
rows = 30;
cols = 50;
n = 10;
trailpos = {RandomInteger[{1, cols}, n], RandomInteger[{1, rows}, n]} // Transpose;
trailchars = RandomInteger[{1, Length[chars]}, n];
charmap = ConstantArray[".", {rows, cols}];
fade = ConstantArray[5, {rows, cols}];
indices = MapIndexed[#2 &, fade, {2}];
Dynamic[Graphics[{txts}, PlotRange -> {{1, cols}, {1, rows}}, PlotRangePadding -> 1, Background -> Black]]
Do[
 trailpos[[All, 2]] += 1;
 fade = Ramp[fade - 1];
 trailchars = Mod[trailchars + 1, charlen, 1];
 Do[
  If[trailpos[[i, 2]] >= rows,
   trailpos[[i, 2]] = 1;
   trailpos[[i, 1]] = RandomInteger[{1, cols}];
   ];
  charmap[[trailpos[[i, 2]], trailpos[[i, 1]]]] = 
   chars[[trailchars[[i]]]];
  fade[[trailpos[[i, 2]], trailpos[[i, 1]]]] = fadelength
  ,
  {i, n}
  ];
 txts = MapThread[If[#2 > 0, Text[Style[#1, ColorFunc[#2]], {#1, rows - #2 + 1} & @@ Reverse[#3]], {}] &, {charmap, fade, indices}, 2];
 Pause[0.1]
 ,
 {1000}
]