2024/07/05

Newest at the top

2024-07-05 22:05:43 +0200 <tomsmeding> iqubic: https://hackage.haskell.org/package/random-1.2.1.2/docs/System-Random.html#v:randomRIO ;)
2024-07-05 22:04:53 +0200lxsameer(~lxsameer@Serene/lxsameer) (Ping timeout: 240 seconds)
2024-07-05 22:00:20 +0200rdcdr(~rdcdr@user/rdcdr)
2024-07-05 21:59:48 +0200rdcdr(~rdcdr@user/rdcdr) (Ping timeout: 260 seconds)
2024-07-05 21:59:28 +0200rdcdr_(~rdcdr@75-172-0-68.tukw.qwest.net) (Client Quit)
2024-07-05 21:58:25 +0200rdcdr_(~rdcdr@75-172-0-68.tukw.qwest.net)
2024-07-05 21:58:20 +0200 <haskellbridge> <iqubic (she/her)> What does randomRIO do?
2024-07-05 21:58:08 +0200 <haskellbridge> <iqubic (she/her)> I think GHCI would have some defaulting stuff.
2024-07-05 21:48:36 +0200rdcdr(~rdcdr@user/rdcdr)
2024-07-05 21:48:22 +0200 <dmj`> iqubic: try it in ghci
2024-07-05 21:42:18 +0200 <haskellbridge> <iqubic (she/her)> I see what you've done there, but you can't show me the results because it's in IO
2024-07-05 21:38:29 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-07-05 21:37:33 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-07-05 21:31:11 +0200euleritian(~euleritia@77.22.252.56)
2024-07-05 21:30:52 +0200euleritian(~euleritia@dynamic-176-002-131-122.176.2.pool.telefonica.de) (Read error: Connection reset by peer)
2024-07-05 21:20:49 +0200 <lambdabot> prevents the constraint ‘(Show (m0 [Integer]))’ from being solved.
2024-07-05 21:20:49 +0200 <lambdabot> • Ambiguous type variable ‘m0’ arising from a use of ‘show_M259786827563...
2024-07-05 21:20:49 +0200 <lambdabot> error:
2024-07-05 21:20:48 +0200 <dmj`> > let deck = [1..52] in do { nums <- replicateM 52 (randomRIO (1,100)); pure $ fmap fst $ sortBy (compare `on` snd) (zip deck nums) }
2024-07-05 21:12:13 +0200target_i(~target_i@user/target-i/x-6023099)
2024-07-05 21:03:28 +0200 <haskellbridge> <iqubic (she/her)> I was thinking of doing something like a Fisher-Yates shuffle, but I'm not sure which of those 4 options I should use.
2024-07-05 21:02:39 +0200 <EvanR> the classic shuffle algorithm requires a source of random dice rolls, which MonadRandom simplifies
2024-07-05 20:53:41 +0200 <haskellbridge> <iqubic (she/her)> "RandomGenM", "StatefulGen", "MonadInterleve", and "MonadRandom" all exist, and I'm not sure what the differences are...
2024-07-05 20:51:30 +0200rdcdr(~rdcdr@user/rdcdr) (Ping timeout: 268 seconds)
2024-07-05 20:50:30 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
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)