All nice!
No one run the obfuscation version with gfortran unless you are curious whether you will get a bus error or fill /var/crash first. Does not seem right to give or receive a bug report this time of year, so some other time β but a real doozie.
Assuming your terminal emulator handles ANSI in-line control sequences, this one should be safe to run with gfortran
!write(*,'(*(a,/),a,/)')([(repeat(' ',i-k)//repeat('*',2*k-1),k=1,i),repeat(' ',i-1)//'*'],i=3,9)
!write(*,'(*(i0,/),i0/)')([(i-k,2*k-1,k=1,i),i-1],i=3,9)
implicit none
integer, allocatable :: seed(:)
integer,parameter :: first=1,last=8
integer :: i,k,n,r
real :: rand_val
call random_seed(size = n)
allocate(seed(n))
call random_seed(get=seed)
write(*,'(a,a,*(a,/),a,/)')char(27)//'[H'//char(27)//'[J'
do
call random_number(rand_val)
r=first+floor((last+1-first)*rand_val)
write(*,'(a,*(a,/),a,/)')char(27)//'[H',([&
&( repeat(' ',min(8,max(0,i-k)))//repeat(char(33+r+k),min(17,max(0,2*k-1))) ,k=1,i),&
&repeat(' ',min(max(0,i-1),9) )//'*'],i=8,9)
enddo
end
Merry Christmas!