Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,790,768 events total
2026-03-09 14:27:48 arandombit joins (~arandombi@2a02:2455:8656:7100:2149:c35e:cd23:4e9a)
2026-03-09 14:27:48 × arandombit quits (~arandombi@2a02:2455:8656:7100:2149:c35e:cd23:4e9a) (Changing host)
2026-03-09 14:27:48 arandombit joins (~arandombi@user/arandombit)
2026-03-09 14:48:30 × Digit quits (~user@user/digit) (Ping timeout: 245 seconds)
2026-03-09 14:48:53 Digitteknohippie joins (~user@user/digit)
2026-03-09 14:57:44 × danza quits (~danza@user/danza) (Remote host closed the connection)
2026-03-09 15:02:12 machinedgod joins (~machinedg@d172-219-48-230.abhsia.telus.net)
2026-03-09 15:10:24 × arandombit quits (~arandombi@user/arandombit) (Ping timeout: 244 seconds)
2026-03-09 15:18:22 × loonycyborg quits (~loonycybo@wesnoth/developer/loonycyborg) (Quit: ZNC - http://znc.sourceforge.net)
2026-03-09 15:22:13 systemhalted joins (~systemhal@108.147.100.161)
2026-03-09 15:22:54 peterbecich joins (~Thunderbi@71.84.33.135)
2026-03-09 15:23:35 × systemhalted quits (~systemhal@108.147.100.161) (Remote host closed the connection)
2026-03-09 15:24:20 × Digitteknohippie quits (~user@user/digit) (Ping timeout: 268 seconds)
2026-03-09 15:27:35 tremon joins (~tremon@83.80.159.219)
2026-03-09 15:37:00 Fischmiep joins (~Fischmiep@user/Fischmiep)
2026-03-09 15:40:18 × pabs3 quits (~pabs3@user/pabs3) (Ping timeout: 246 seconds)
2026-03-09 15:48:14 × CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 245 seconds)
2026-03-09 15:52:12 × j1n37 quits (~j1n37@user/j1n37) (Ping timeout: 255 seconds)
2026-03-09 15:53:51 pabs3 joins (~pabs3@user/pabs3)
2026-03-09 15:58:32 jmcantrell_ joins (~weechat@user/jmcantrell)
2026-03-09 16:03:04 × fp quits (~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 276 seconds)
2026-03-09 16:08:04 <[exa]> is there any reason why `toList` could not serve as a sufficient minimal definition of Foldable?
2026-03-09 16:09:37 <[exa]> (somewhat stupidly I assumeth and debuggeth)
2026-03-09 16:10:02 <mesaoptimizer> :t toList
2026-03-09 16:10:03 <lambdabot> Foldable t => t a -> [a]
2026-03-09 16:11:35 ezzieyguywuf parts (~Unknown@user/ezzieyguywuf) ()
2026-03-09 16:14:12 × prdak quits (~Thunderbi@user/prdak) (Ping timeout: 264 seconds)
2026-03-09 16:14:52 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
2026-03-09 16:15:44 Digit joins (~user@user/digit)
2026-03-09 16:16:00 × vgtw quits (~vgtw@user/vgtw) (Ping timeout: 246 seconds)
2026-03-09 16:16:30 <dolio> [exa]: I think the obstacle is how default definitions work. You can only give one default definition for each method, and those determine the minimal definitions.
2026-03-09 16:16:31 <[exa]> (oh ok I guess because the defaults would be a mess)
2026-03-09 16:16:54 <[exa]> yeah I assume that if we could default from 3 different ones, the 2 would need to pick which one to default from
2026-03-09 16:16:59 <[exa]> or make a 3-cycle of them all
2026-03-09 16:17:01 <[exa]> wild
2026-03-09 16:18:07 <dolio> You could make a cycle betwee foldMap, foldr and toList. But that might make some choices of minimal implementation kind of bad.
2026-03-09 16:18:58 <[exa]> yeah I myself already have 2 different correct opinions on which direction of the cycle is more correct... imagine giving it to more people :)
2026-03-09 16:22:59 Digit is now known as Digitteknohippie
2026-03-09 16:23:26 vgtw joins (~vgtw@user/vgtw)
2026-03-09 16:23:46 Digitteknohippie is now known as Digit
2026-03-09 16:29:48 × peterbecich quits (~Thunderbi@71.84.33.135) (Ping timeout: 264 seconds)
2026-03-09 16:34:49 × kuribas quits (~user@2a02-1810-2825-6000-46e-614f-97bf-a1c6.ip6.access.telenet.be) (Ping timeout: 248 seconds)
2026-03-09 16:36:24 × bggd_ quits (~bgg@2a01:e0a:fd5:f510:d84e:bd19:3fca:eb64) (Remote host closed the connection)
2026-03-09 16:37:00 × vgtw quits (~vgtw@user/vgtw) (Ping timeout: 246 seconds)
2026-03-09 16:37:26 vgtw joins (~vgtw@user/vgtw)
2026-03-09 16:40:49 × oats quits (~oats@user/oats) (Read error: Connection reset by peer)
2026-03-09 16:41:04 oats joins (~oats@user/oats)
2026-03-09 16:43:55 × infinity0 quits (~infinity0@pwned.gg) (Ping timeout: 245 seconds)
2026-03-09 16:53:34 kuribas joins (~user@2a02-1810-2825-6000-414c-630a-ac36-9026.ip6.access.telenet.be)
2026-03-09 16:58:56 × kimiamania4 quits (~b4b260c9@user/kimiamania) (Quit: PegeLinux)
2026-03-09 17:00:03 kimiamania4 joins (~b4b260c9@user/kimiamania)
2026-03-09 17:04:22 infinity0 joins (~infinity0@pwned.gg)
2026-03-09 17:06:24 AlexNoo joins (~AlexNoo@178.34.160.184)
2026-03-09 17:07:09 AlexNoo_ joins (~AlexNoo@178.34.160.184)
2026-03-09 17:07:52 AlexNoo__ joins (~AlexNoo@178.34.160.184)
2026-03-09 17:10:00 × comerijn quits (~merijn@77.242.116.146) (Ping timeout: 265 seconds)
2026-03-09 17:10:36 × AlexNoo quits (~AlexNoo@178.34.160.184) (Ping timeout: 246 seconds)
2026-03-09 17:10:58 AlexNoo joins (~AlexNoo@178.34.160.184)
2026-03-09 17:11:18 × AlexNoo_ quits (~AlexNoo@178.34.160.184) (Ping timeout: 246 seconds)
2026-03-09 17:12:00 × AlexNoo__ quits (~AlexNoo@178.34.160.184) (Ping timeout: 246 seconds)
2026-03-09 17:24:01 <tccq> what is the correct state variable s to use for STArray? I want to have some monadic stuff over a large array of ints and a record of some other info (to make a stack machine)
2026-03-09 17:24:18 <tccq> not sure I understand how STArray and regular ST fit together
2026-03-09 17:25:24 <mauke> s
2026-03-09 17:25:49 <mauke> for ST to work, you have to leave s generic
2026-03-09 17:26:23 <mauke> well, and it has to match all the other 's's of the ST context and all the variables used in that context
2026-03-09 17:27:01 <[exa]> tccq: `s` is voidy like RealWorld but without RealWorld
2026-03-09 17:27:36 × raincomplex quits (~rain@user/raincomplex) (Read error: Connection reset by peer)
2026-03-09 17:28:02 <[exa]> tccq: as a minor annoyance, if you want to type stuff correctly you might need higher-rank types with a (forall s. ...) somewhere
2026-03-09 17:29:14 raincomplex joins (~rain@pool-173-54-183-192.nwrknj.fios.verizon.net)
2026-03-09 17:29:14 × raincomplex quits (~rain@pool-173-54-183-192.nwrknj.fios.verizon.net) (Changing host)
2026-03-09 17:29:14 raincomplex joins (~rain@user/raincomplex)
2026-03-09 17:31:49 <tccq> hmm ok
2026-03-09 17:32:22 <tccq> if I want my mutable array and a regular state var should I have two nested ST's then? One generic s for the array and one with my Info struct?
2026-03-09 17:32:36 <mauke> no, you can use the same s for both
2026-03-09 17:33:53 <tccq> something like `type MemM a = (STArray RegInfo) Int Slot (ST RegInfo) a`?
2026-03-09 17:34:09 <tccq> use get/put for RegInfo and read/writeArray for the array?
2026-03-09 17:34:16 <[exa]> tccq: the "state" there is more of a token that doesn't really carry anything
2026-03-09 17:34:51 <mauke> that doesn't look like s
2026-03-09 17:35:39 <mauke> you don't get to choose an s
2026-03-09 17:35:41 <mauke> :t runST
2026-03-09 17:35:42 <lambdabot> (forall s. ST s a) -> a
2026-03-09 17:35:42 <[exa]> tccq: more like `type MemM s a = STArray s Int Slot`
2026-03-09 17:35:46 <mauke> ^ this fella does
2026-03-09 17:36:09 <mauke> :t runSTArray
2026-03-09 17:36:09 <[exa]> tccq: (not sure what RegInfo is)
2026-03-09 17:36:10 <lambdabot> error: [GHC-88464]
2026-03-09 17:36:10 <lambdabot> Variable not in scope: runSTArray
2026-03-09 17:36:33 <tccq> RegInfo is just a big record if ints and stuff
2026-03-09 17:36:41 <tccq> like I said I'm trying to make a little stack machine
2026-03-09 17:37:29 <tccq> I understand s is scoped so that the state can't escape, but I want to use it at some specific type right?
2026-03-09 17:37:35 <mauke> no
2026-03-09 17:37:38 <mauke> never
2026-03-09 17:37:50 <mauke> the "state" is not your data
2026-03-09 17:38:05 <[exa]> tccq: ahh so reginfo is the actual state that you want to hold, together with the array
2026-03-09 17:38:09 <tccq> eys
2026-03-09 17:38:38 <tccq> I could write all of this by passing an array and this record to every function
2026-03-09 17:38:39 <[exa]> tccq: in short, you don't need to carry these in the type -- you make arrays like you would with mutable vectors in IO. These are "carried through" but only implicitly.
2026-03-09 17:38:53 <tccq> but I don't want to do that and hint to the compiler that there is only ever one array
2026-03-09 17:39:15 <mauke> that sounds more like State, not ST
2026-03-09 17:39:27 <[exa]> yes, State or Reader (ok for mutables) over the ST

All times are in UTC.