2025/12/05

Newest at the top

2025-12-05 09:33:26 +0100 <lucabtz> i need a function Grid (a -> b) -> Grid a -> Grid b which is <*>, but this needs to work only if broadcasting is possible (so for some conditions over the grids width and height)
2025-12-05 09:32:19 +0100 <lucabtz> i have a type Grid a which is a grid of data and i want something similar to numpy's broadcasting
2025-12-05 09:30:55 +0100 <lucabtz> dminuoso no both pure and <*>, but <*> will be a partial function
2025-12-05 09:30:11 +0100tromp(~textual@2001:1c00:3487:1b00:4ec:c6c9:2447:6676)
2025-12-05 09:25:12 +0100 <[exa]> "it works"
2025-12-05 09:24:53 +0100 <dminuoso> Of course.
2025-12-05 09:24:43 +0100 <[exa]> dminuoso: well that gives kinda circular definition of approved :D
2025-12-05 09:22:49 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-05 09:22:10 +0100 <[exa]> naturally...
2025-12-05 09:21:57 +0100 <lambdabot> *Exception: arithmetic underflow
2025-12-05 09:21:53 +0100 <ski> > (0 :: Natural) - 1
2025-12-05 09:19:24 +0100 <jackdk> I personally also shy away from using `class Pointed`, for reasons Ed writes about at https://wiki.haskell.org/Why_not_Pointed%3F
2025-12-05 09:18:57 +0100 <dminuoso> Plus, you may later refactor and reuse some other library that imposes a `Applicative` constraint - it may not even be obvious that you're tapping into a bottom. It's a mine waiting to be stepped on.
2025-12-05 09:18:03 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 09:17:54 +0100 <jackdk> lucabtz: I would write code against a different typeclass (class Apply from semigroupoids, for example) or provide a different named function. The benefit of a programming culture where people only write complete and lawful instances, is that anyone writing polymorphic code can expect their code to work for any instance, instead of for "any instance except a growing list of exceptions"
2025-12-05 09:17:44 +0100 <dminuoso> [exa]: Of course "approved" is quite a nebulous term. If "approved" means "perfectly safe", that statement is absolutely correct.
2025-12-05 09:16:54 +0100 <[exa]> lucabtz: probably depends on how much partial
2025-12-05 09:16:08 +0100 <[exa]> ...is that a joke? (can't tell)
2025-12-05 09:16:01 +0100 <[exa]> reading the wiki here https://wiki.haskell.org/index.php?title=Top_level_mutable_state it says "In contrast, other 'approved' uses of unsafePerformIO are perfectly safe."
2025-12-05 09:14:53 +0100 <dminuoso> And in case you just care about pure, https://hackage.haskell.org/package/pointed-5.0.5/docs/Data-Pointed.html#t:Pointed
2025-12-05 09:14:21 +0100 <dminuoso> https://hackage.haskell.org/package/semigroupoids-6.0.1/docs/Data-Functor-Apply.html#t:Apply
2025-12-05 09:13:34 +0100 <dminuoso> lucabtz: Do you just intend to define <*> but not pure?
2025-12-05 09:12:28 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2025-12-05 09:12:13 +0100annamalai(~annamalai@157.32.204.27) annamalai
2025-12-05 09:11:23 +0100divlamir(~divlamir@user/divlamir) (Ping timeout: 265 seconds)
2025-12-05 09:10:37 +0100Googulator(~Googulato@2a01-036d-0106-479c-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Ping timeout: 250 seconds)
2025-12-05 09:10:20 +0100 <lucabtz> is it fine to have an Applicative instance be partial? or it is better i just make separate functions with same signatures as Applicative
2025-12-05 09:10:11 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp)
2025-12-05 09:10:11 +0100chencheng(~chencheng@38.207.158.7) (Ping timeout: 250 seconds)
2025-12-05 09:08:15 +0100xff0x(~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 245 seconds)
2025-12-05 09:06:55 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-05 09:06:20 +0100Googulator27Googulator
2025-12-05 09:02:26 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 08:58:40 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:35d4:1aac:9a2f:cd11) (Ping timeout: 246 seconds)
2025-12-05 08:57:58 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds)
2025-12-05 08:56:10 +0100deptype(~deptype@124.123.133.153)
2025-12-05 08:54:20 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:35d4:1aac:9a2f:cd11)
2025-12-05 08:51:24 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 08:47:53 +0100lucabtz(~lucabtz@user/lucabtz) lucabtz
2025-12-05 08:44:46 +0100deptype(~deptype@2406:b400:3a:9d2f:bea8:630a:dd01:23de) (Ping timeout: 255 seconds)
2025-12-05 08:40:07 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-12-05 08:35:33 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 08:30:37 +0100annamalai(~annamalai@157.32.199.183) (Ping timeout: 264 seconds)
2025-12-05 08:28:53 +0100ft(~ft@p508db844.dip0.t-ipconnect.de) (Quit: leaving)
2025-12-05 08:24:59 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-12-05 08:19:46 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 08:09:01 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-12-05 08:08:04 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:35d4:1aac:9a2f:cd11) (Ping timeout: 265 seconds)
2025-12-05 08:03:58 +0100merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-12-05 08:03:08 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:35d4:1aac:9a2f:cd11)