;;
;;
;; Newlisp clocking
;;
;; linux version or dos-box with ansi support.
;; enjoy...norman.
;;
(set 'digits '(
("#####" " # " "#####" "#####" "# #" "#####" "# " "#####" "#####" "#####" " ")
("# #" " # " " #" " #" "# #" "# " "# " " #" "# #" "# #" " # ")
("# #" " # " "#####" "#####" "#####" "#####" "#####" " #" "#####" "#####" " ")
("# #" " # " "# " " #" " #" " #" "# #" " #" "# #" " #" " # ")
("#####" " # " "#####" "#####" " #" "#####" "#####" " #" "#####" " #" " ")))
(while true
;; clear screen ANSI way
(println "\027[H\027[2J")
;; define time without ":" get from apply date
(set 'ticks (replace ":" (slice (date (apply date-value (now))) 11 8) ""))
;; write 5 rows of 6 digits and 2 seperators
(dotimes (x 5)
(dotimes (y 6)
(print " " (nth (integer (nth 0 (nth y ticks))) (nth x digits)))
(if (or (= y 1) (= y 3)) (print (nth 10 (nth x digits)))))
(println))
(sleep 1)
)
5 Cent tip for today [ clock ticks ]
5 Cent tip for today [ clock ticks ]
-- (define? (Cornflakes))