This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loop :: Show a => Int -> a -> String; | |
loop 0 x = show x; | |
loop n x = loop (n-1) [x]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
patrik@ariakenom ~/h/cabal> nix-shell -p zlib pkgconfig --run "cabal v1-build" | |
Resolving dependencies... | |
Warning: solver failed to find a solution: | |
Could not resolve dependencies: | |
[__0] trying: hello-0.1.0.0 (user goal) | |
[__1] unknown package: lens (dependency of hello) | |
[__1] fail (backjumping, conflict set: hello, lens) | |
After searching the rest of the dependency tree exhaustively, these were the | |
goals I've had most trouble fulfilling: hello, lens | |
Trying configure anyway. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _queue_get(q, timeout): | |
""" | |
The timeout of Queue.get has a precision of ~16ms on Windows. | |
In order to get more precision we poll the last few ms. | |
""" | |
t0 = time.perf_counter() | |
SLEEP_PRECISION = time.get_clock_info('monotonic').resolution | |
try: | |
return q.get(timeout=timeout-SLEEP_PRECISION) | |
except queue.Empty: |