(boing!) Cnoocy Mosque O'Witz (
cnoocy
) wrote
2003
-
11
-
24
04:48 pm
Current Mood:
amused
Current Music:
"Automatic Rainy Day" by the Go-Go's
Entry tags:
math
New cnoocy toy
from a Unix prompt:
date +%s | factor
what this does:
gives you the prime factorization of the current Unix timestamp.
I think I need to build this as a desktop clock.
Threaded
|
Flat
no subject
rikchik.livejournal.com
2003-11-24 08:04 pm (UTC)
(
link
)
factor doesn't seem to be in my path on my iMac, but it works on the linux box I ssh to. I had no idea prime numbers were so common, I thought they thinned out after a while.
quick clock version
cnoocy
2003-11-25 08:54 am (UTC)
(
link
)
$ while true; do date +%s | factor; perl -e 'select (undef, undef, undef, 0.5)'; done | uniq
probably would be better if I just stayed in perl. But this works.
2 comments
Post a new comment
Threaded
|
Flat
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
quick clock version
probably would be better if I just stayed in perl. But this works.