2025/11/25

Newest at the top

2025-11-25 17:34:51 +0100euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2025-11-25 17:33:43 +0100Googulator55Googulator
2025-11-25 17:33:03 +0100lucabtz(~lucabtz@user/lucabtz) (Remote host closed the connection)
2025-11-25 17:21:41 +0100Leary(~Leary@user/Leary/x-0910699) Leary
2025-11-25 17:21:01 +0100Leary(~Leary@user/Leary/x-0910699) (Ping timeout: 264 seconds)
2025-11-25 17:17:35 +0100tt123160(~tt1231@2603:6010:8700:4a81:a4f6:acff:fe95:3803) tt1231
2025-11-25 17:17:25 +0100tt12316(~tt1231@2603:6010:8700:4a81:a4f6:acff:fe95:3803) (Read error: Connection reset by peer)
2025-11-25 17:16:15 +0100alex`(~user@251.red-83-33-249.dynamicip.rima-tde.net) (Ping timeout: 240 seconds)
2025-11-25 17:15:48 +0100Googulator55(~Googulato@2a01-036d-0106-4ad8-11e2-562e-881b-eb37.pool6.digikabel.hu)
2025-11-25 17:15:43 +0100Googulator(~Googulato@2a01-036d-0106-4ad8-11e2-562e-881b-eb37.pool6.digikabel.hu) (Quit: Client closed)
2025-11-25 17:02:07 +0100fp(~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 264 seconds)
2025-11-25 16:54:56 +0100euphores(~SASL_euph@user/euphores) euphores
2025-11-25 16:47:52 +0100typedfern__(~Typedfern@15.red-83-37-26.dynamicip.rima-tde.net) typedfern
2025-11-25 16:46:32 +0100typedfern__(~Typedfern@15.red-83-37-26.dynamicip.rima-tde.net) (Ping timeout: 240 seconds)
2025-11-25 16:40:26 +0100 <merijn> Leary: Sure, but a required should've been that the mapping is dense and boundscheck should've made more sense
2025-11-25 16:39:38 +0100 <Leary> merijn: `(to|from)Enum` are easier to get right than the tricky details of the other methods, and should only be used to write them by proxy. You can argue that they shouldn't be part of the class (e.g. they could be written as local helpers on a per-instance basis and mapped over the methods of `Enum Int`), but then you lose the convenience of method defaults.
2025-11-25 16:34:57 +0100 <haskellbridge> <Morj> Otherwise I just write monomorphic functions for my own type that I need to convert to-from Int
2025-11-25 16:33:14 +0100 <haskellbridge> <Morj> The good thing about Enum is that fromEnum @Char is exported in prelude, and ord isn't
2025-11-25 16:31:15 +0100sindu(~sindu@2.148.32.207.tmi.telenormobil.no)
2025-11-25 16:31:15 +0100weary-traveler(~user@user/user363627) (Ping timeout: 240 seconds)
2025-11-25 16:30:50 +0100 <merijn> I dunno what happened in my brain there, glitching two conversations together xD
2025-11-25 16:30:38 +0100 <merijn> -AI+class
2025-11-25 16:29:54 +0100 <merijn> Leary: The AI going through Int but not ensuring that's safe is definitely bad
2025-11-25 16:28:45 +0100 <dutchie> if i was going to refactor I think it'd make sense to have my bounds in a Reader somewhere
2025-11-25 16:27:51 +0100 <dutchie> yeah it's almost certainly overkill to have it that generic
2025-11-25 16:27:28 +0100Fischmiep(~Fischmiep@user/Fischmiep) Fischmiep
2025-11-25 16:27:25 +0100 <Leary> dutchie: Rather than trying to be generic in `Enum`, perhaps just use `Int` with explicit bounds? That can always be generalised to `Enum a` if you really need it to.
2025-11-25 16:26:55 +0100Googulator(~Googulato@2a01-036d-0106-4ad8-11e2-562e-881b-eb37.pool6.digikabel.hu)
2025-11-25 16:26:36 +0100 <Leary> `class Enum` is an implementation detail of `[a(, b) .. (c)]` notation, and `(to|from)Enum` of the necessary `enumFrom*` methods. What's bad is that these details aren't hidden, inviting abuse. `succ`/`pred`, which are thrown in on principle, are perhaps the only truly user-facing part of the class.
2025-11-25 16:25:52 +0100Fischmiep(~Fischmiep@user/Fischmiep) (Quit: ZNC - https://znc.in)
2025-11-25 16:24:56 +0100Square3(~Square@user/square) Square
2025-11-25 16:23:36 +0100srazkvt(~sarah@user/srazkvt) (Quit: Konversation terminated!)
2025-11-25 16:19:49 +0100 <dutchie> nudge a square on a grid, so Maybe Neighbour
2025-11-25 16:19:02 +0100trickard_trickard
2025-11-25 16:18:51 +0100 <merijn> dutchie: What are you using maybeToEnum for?
2025-11-25 16:18:25 +0100 <dutchie> at least these are my own Enum instances (faking a bounded Int class) and so I know they are dense
2025-11-25 16:17:52 +0100 <lambdabot> concatMap (\ a -> case a of { Just x -> [x]; _ -> []}) xs
2025-11-25 16:17:52 +0100 <alex`> @undo [x | Just x <- xs]
2025-11-25 16:17:39 +0100alex`(~user@251.red-83-33-249.dynamicip.rima-tde.net)
2025-11-25 16:15:04 +0100 <merijn> Enum is an awful, awful class and it should feel bad
2025-11-25 16:14:56 +0100 <merijn> Like I said
2025-11-25 16:14:41 +0100 <dutchie> ah true, even worse
2025-11-25 16:14:15 +0100 <merijn> dutchie: Incidentally, that may *still* fail, if the enum instance isn't dense
2025-11-25 16:13:28 +0100 <haskellbridge> <Zemyla> In addition to the standard parens function, there should be a parens', which is guaranteed to parse all parentheses.
2025-11-25 16:13:23 +0100 <merijn> Enum is an awful awful class and it should feel bad >.>
2025-11-25 16:12:51 +0100 <dutchie> https://paste.tomsmeding.com/MLNFAoXl this feels dumb
2025-11-25 16:05:51 +0100td_(~td@i5387092E.versanet.de)
2025-11-25 16:05:14 +0100potatoespotatoes(~quassel@user/potatoespotatoes) potatoespotatoes
2025-11-25 16:04:52 +0100potatoespotatoes(~quassel@user/potatoespotatoes) (Client Quit)
2025-11-25 16:01:34 +0100merijn(~merijn@77.242.116.146) merijn