Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
11
Task/Draw-a-clock/Raku/draw-a-clock-2.raku
Normal file
11
Task/Draw-a-clock/Raku/draw-a-clock-2.raku
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
constant @t = < ⡎⢉⢵ ⠀⢺⠀ ⠊⠉⡱ ⠊⣉⡱ ⢀⠔⡇ ⣏⣉⡉ ⣎⣉⡁ ⠊⢉⠝ ⢎⣉⡱ ⡎⠉⢱ ⠀⠶⠀>;
|
||||
constant @b = < ⢗⣁⡸ ⢀⣸⣀ ⣔⣉⣀ ⢄⣀⡸ ⠉⠉⡏ ⢄⣀⡸ ⢇⣀⡸ ⢰⠁⠀ ⢇⣀⡸ ⢈⣉⡹ ⠀⠶⠀>;
|
||||
|
||||
signal(SIGINT).tap: { print "\e[?25h\n"; exit }
|
||||
print "\e7\e[?25l"; # saves cursor position, make it invisible
|
||||
loop {
|
||||
my @x = DateTime.now.Str.substr(11,8).ords X- ord('0');
|
||||
put ~.[@x] for @t, @b;
|
||||
sleep 1;
|
||||
print "\e8"; # restores cursor position
|
||||
}
|
||||
10
Task/Draw-a-clock/Raku/draw-a-clock-3.raku
Normal file
10
Task/Draw-a-clock/Raku/draw-a-clock-3.raku
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
print "\e7";
|
||||
loop {
|
||||
my $time = DateTime.now;
|
||||
put '#' x $_ ~ '.' x (24 - $_) given $time.hour.round;
|
||||
put '#' x $_ ~ '.' x (60 - $_) given $time.minute.round;
|
||||
put '#' x $_ ~ '.' x (60 - $_) given $time.second.round;
|
||||
sleep 1;
|
||||
print "\e8";
|
||||
}
|
||||
END put "\n";
|
||||
Loading…
Add table
Add a link
Reference in a new issue