freenode/#sbcl - IRC Chatlog
Search
15:27:02
stassats
and i have no idea why type-difference is so complicated while simply doing (type-intersection x (type-negation y)) is enough
15:41:52
stassats
i don't often use octets-to-string, but i mistype char-code/code-char all the time
15:45:23
stassats
i'd use something like (sleep most-positive-fixnum) or (sb-thread:join-thread some-thread)
15:53:20
flip214
I mostly settle for (loop (sleep 3600)), this way an strace shows that this sleep is intentional and not an integer-became-negative bug
15:55:55
stassats
(sb-kernel:%vector-raw-bits (coerce "notabug" 'simple-base-string) 0) => 29120988003463022
18:43:47
Xof
ballpark (Fermi estimation, if you will) power use of this VM can't be more than 50W. Waking from sleep for, say, 20000 cycles per second is 0.001% of 2GHz. So power usage of (sleep 1) vs (sleep most-positive-fixnum) is approximately 0.5mW
18:45:00
Xof
I dread to think how much more energy has been spent sending this conversation around the world and storing it for posterity than the energy cost of (loop (sleep 1))
18:45:31
Xof
I wonder how long it will take to offset the energy cost of me typing `most-positive-fixnum'
18:46:34
Xof
my fingers move, say, 1cm per character, exerting 1N of force, so work done is 0.01J for 20 characters = 0.2J
18:47:13
Xof
so my server has to run for 400 seconds for the power saving of (sleep most-positive-fixnum) to outweigh the cost of typing most-positive-fixnum
19:12:01
stassats
Xof: that's why you should've just pasted (sleep most-positive-fixnum) instead of arguing
19:12:53
stassats
what if your VM becomes the most popular VM ever, one billion users, imagine the power savings
19:15:00
stassats
and when calculating energy expenditure, don't forget to account for the truck bringing food to the grocery store, so that you can spend all these joules while typing