Skip to content

Instantly share code, notes, and snippets.

@tfausak
Created January 12, 2025 18:25
Show Gist options
  • Save tfausak/d80ddd18c51d9be857b3c56da0c70fe8 to your computer and use it in GitHub Desktop.
Save tfausak/d80ddd18c51d9be857b3c56da0c70fe8 to your computer and use it in GitHub Desktop.
Generates a random seed for Balatro every day.
#! /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