Created
January 12, 2025 18:25
-
-
Save tfausak/d80ddd18c51d9be857b3c56da0c70fe8 to your computer and use it in GitHub Desktop.
Generates a random seed for Balatro every day.
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
#! /usr/bin/env cabal | |
{- cabal: | |
build-depends: base, random, time | |
-} | |
import qualified Data.Time as Time | |
import qualified System.Random as Random | |
main :: IO () | |
main = | |
putStrLn | |
. fmap (toEnum . (\x -> x + if x < 10 then 48 else 55)) | |
. fst | |
. Random.uniformListR 8 (0, 35) | |
. Random.mkStdGen | |
. fromIntegral | |
. Time.toModifiedJulianDay | |
. Time.utctDay | |
=<< Time.getCurrentTime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment