2024/07/05

Newest at the top

2024-07-05 20:49:16 +0200 <haskellbridge> <iqubic (she/her)> MonadRandom seems like half a dozen different but related things.
2024-07-05 20:48:31 +0200 <Leary> Or MonadRandom.
2024-07-05 20:48:05 +0200 <lambdabot> https://hackage.haskell.org/package/random
2024-07-05 20:48:05 +0200 <geekosaur> @hackage random
2024-07-05 20:47:53 +0200 <haskellbridge> <iqubic (she/her)> What is "random"?
2024-07-05 20:47:22 +0200 <geekosaur> `random` is probably good enough for your use case
2024-07-05 20:46:37 +0200 <haskellbridge> <iqubic (she/her)> hc: I'm writing a program to simulate playing card games, and I want a way shuffle a "deck of cards" (it's just a list/vector of cards)
2024-07-05 20:45:12 +0200 <darkling> iqubic: 7 is a good number. Use that.
2024-07-05 20:44:54 +0200 <dmj`> ¯\_(ツ)_/¯
2024-07-05 20:42:55 +0200 <jle`> dmj`: omg this whole time
2024-07-05 20:41:05 +0200 <hc> Depends on what you want to use them for
2024-07-05 20:39:25 +0200euleritian(~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de)
2024-07-05 20:39:11 +0200 <haskellbridge> <iqubic (she/her)> What should I use for random numbers?
2024-07-05 20:39:09 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds)
2024-07-05 20:38:14 +0200 <geekosaur> yes
2024-07-05 20:37:36 +0200 <dmj`> if its a function I think it needs parens $(myTH a b), o/w it can just be $myTH
2024-07-05 20:37:02 +0200 <geekosaur> jle`, that's always ttbomk been permitted
2024-07-05 20:32:22 +0200rdcdr(~rdcdr@user/rdcdr)
2024-07-05 20:27:14 +0200 <jle`> hi! i have been floating in and out for the past few months heh
2024-07-05 20:26:37 +0200 <haskellbridge> <iqubic (she/her)> Jle`: You're back!!!
2024-07-05 20:26:00 +0200 <jle`> was there a recent ghc version where $$(myTH) can now be written as $$myTH ? or was it always permitted and i just didn't know
2024-07-05 20:21:46 +0200Lord_of_Life_Lord_of_Life
2024-07-05 20:21:09 +0200noumenon(~noumenon@2a01:799:cd8:e700:aa7e:eaff:fede:ff94)
2024-07-05 20:19:10 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2024-07-05 20:18:49 +0200Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2024-07-05 20:17:52 +0200 <haskellbridge> <iqubic (she/her)> Overloaded strings are pretty OP.
2024-07-05 20:17:19 +0200 <probie> Inst: "foo :: Text" is the same as if you'd written "(fromString "foo") :: Text", however that doesn't actually mean there will be a `String` in the compiled code. GHC normally does a very good job optimising it all away and just leaving you with the `Text` value you'd expect
2024-07-05 20:16:04 +0200 <haskellbridge> <iqubic (she/her)> What do people recommend for generating random values? I know that some of this stuff will have to be in IO, but I think most of the functions can be pure by doing something like "generator -> (Int, generator)"
2024-07-05 20:15:17 +0200fun-safe-math(~fun-safe-@24.21.106.247)
2024-07-05 20:15:07 +0200soverysour(~soverysou@user/soverysour) (Ping timeout: 268 seconds)
2024-07-05 20:13:00 +0200rdcdr(~rdcdr@user/rdcdr) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
2024-07-05 20:02:22 +0200 <geekosaur> much as it does for numeric literals (fromInteger/fromRational)
2024-07-05 20:02:01 +0200 <geekosaur> it compiles them to fromString/fromList called on a normal string/list
2024-07-05 20:00:36 +0200nurupo(~nurupo.ga@user/nurupo)
2024-07-05 20:00:17 +0200nurupo(~nurupo.ga@user/nurupo) (Quit: nurupo.ga)
2024-07-05 19:57:40 +0200 <Inst> just curious, when you have isString or isList typeclasses, are these hardcoded literals or, when GHC gets to the literals, it generates a String or List and does the conversion as needed?
2024-07-05 19:57:10 +0200Inst(~Inst@user/Inst)
2024-07-05 19:52:31 +0200danse-nr3(~danse-nr3@151.47.148.201) (Quit: Leaving)
2024-07-05 19:47:53 +0200rdcdr(~rdcdr@user/rdcdr)
2024-07-05 19:41:31 +0200codaraxis__(~codaraxis@user/codaraxis) (Ping timeout: 268 seconds)
2024-07-05 19:37:29 +0200codaraxis___(~codaraxis@user/codaraxis)
2024-07-05 19:35:59 +0200madhavanmiui(~madhavanm@2409:40f4:304d:5ad7:8000::) (Client Quit)
2024-07-05 19:35:18 +0200madhavanmiui(~madhavanm@2409:40f4:304d:5ad7:8000::)
2024-07-05 19:32:33 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-07-05 19:20:14 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-07-05 19:12:29 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2024-07-05 19:06:33 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-05 18:55:44 +0200misterfish(~misterfis@84.53.85.146)
2024-07-05 18:53:47 +0200destituion(~destituio@2a02:2121:6bc:1a95:cb10:e092:4032:88f5)
2024-07-05 18:51:16 +0200sord937(~sord937@gateway/tor-sasl/sord937) (Quit: sord937)