2025/12/04

Newest at the top

2025-12-04 15:35:07 +0100fp(~Thunderbi@wireless-86-50-141-176.open.aalto.fi) (Remote host closed the connection)
2025-12-04 15:30:52 +0100wbooze(~wbooze@2001-4dd4-1daa-0-dd66-75b6-3dbd-fc23.ipv6dyn.netcologne.de) Inline
2025-12-04 15:29:49 +0100divlamir_divlamir
2025-12-04 15:29:09 +0100divlamir(~divlamir@user/divlamir) (Ping timeout: 252 seconds)
2025-12-04 15:28:58 +0100divlamir_(~divlamir@user/divlamir) divlamir
2025-12-04 15:27:54 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-04 15:27:41 +0100trickard(~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-04 15:24:56 +0100fp1fp
2025-12-04 15:24:13 +0100wbooze(~wbooze@2001-4dd4-1daa-0-acf3-bea0-8250-a5a2.ipv6dyn.netcologne.de) (Read error: Connection reset by peer)
2025-12-04 15:23:55 +0100xff0x(~xff0x@2405:6580:b080:900:d454:e7ea:27f9:454f) (Ping timeout: 255 seconds)
2025-12-04 15:22:32 +0100fp1(~Thunderbi@wireless-86-50-141-176.open.aalto.fi) fp
2025-12-04 15:22:22 +0100fp(~Thunderbi@wireless-86-50-141-176.open.aalto.fi) (Quit: fp)
2025-12-04 15:15:44 +0100mikess(~sam@user/mikess) mikess
2025-12-04 15:10:04 +0100Digit(~user@user/digit) Digit
2025-12-04 15:08:38 +0100pr1sm(~pr1sm@24.91.163.31) (Remote host closed the connection)
2025-12-04 15:08:29 +0100pr1sm(~pr1sm@24.91.163.31)
2025-12-04 15:06:36 +0100tromp(~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e)
2025-12-04 15:05:40 +0100tromp(~textual@2001:1c00:3487:1b00:a4ed:9e46:fd5d:6b4e) (Quit: My iMac has gone to sleep. ZZZzzz…)
2025-12-04 15:03:15 +0100Ging_(46fea76d80@2001:bc8:1210:2cd8::470)
2025-12-04 15:02:34 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-12-04 14:59:47 +0100Digit(~user@user/digit) (Read error: Connection reset by peer)
2025-12-04 14:51:58 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:313d:1898:c3f8:5287)
2025-12-04 14:50:21 +0100lambda_gibbon(~lambda_gi@2603:7080:ee00:37d8:313d:1898:c3f8:5287) (Ping timeout: 265 seconds)
2025-12-04 14:44:05 +0100 <lucabtz> even though i suppose it could have an use somewhere
2025-12-04 14:43:53 +0100 <lucabtz> no that version isnt what i need
2025-12-04 14:43:04 +0100 <ski> (.. not too sure how useful this version would be for you .. just pondering)
2025-12-04 14:42:27 +0100 <ski> (assuming you use `<' rather than `<=')
2025-12-04 14:42:12 +0100ski. o O ( `(+) :: BoundedNatural m -> BoundedNatural n -> BoundedNatural (m + n)' )
2025-12-04 14:40:41 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
2025-12-04 14:40:30 +0100 <ski> mhm
2025-12-04 14:40:17 +0100 <lucabtz> (:?) :: a -> a -> Maybe a
2025-12-04 14:39:57 +0100 <lucabtz> ski i have a new typeclass PartialAdditive with an operator +?
2025-12-04 14:39:22 +0100 <ski> (oh, and the corresponding operation handling precedences, for `Read', would be `readsPrec', which you'd define in terms of `readParen',`readsPrec',`lex'. for `Show' there's also `showChar')
2025-12-04 14:39:16 +0100fp(~Thunderbi@wireless-86-50-141-176.open.aalto.fi) fp
2025-12-04 14:38:00 +0100fp(~Thunderbi@2001:708:20:1406::1370) (Ping timeout: 252 seconds)
2025-12-04 14:37:17 +0100 <ski> lucabtz : yep, so either you could have `Show' generate a call to `mkBoundedNatural'. or, if you do the pattern synonym, you could have it generate a call to that
2025-12-04 14:37:14 +0100trickard_trickard
2025-12-04 14:35:28 +0100 <ski> how are you detecting over- / under- flow ?
2025-12-04 14:33:41 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au)
2025-12-04 14:33:27 +0100trickard_(~trickard@cpe-85-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-12-04 14:32:50 +0100 <ski> aha
2025-12-04 14:32:12 +0100 <ski> otoh, if you want some custom pretty-printing syntax, i'd suggest not using `Show' (nor `Read') for this, rather defining separate functions (or perhaps using some other type class, possibly one you defined yourself)
2025-12-04 14:31:16 +0100 <lucabtz> *the grid based problems in advent of code
2025-12-04 14:31:01 +0100 <lucabtz> grid). on the other hand i could have a type which does addition in a modular way and get a toroidal grid. i wanted to write the code once to support both options
2025-12-04 14:31:01 +0100 <lucabtz> yeah the whole point for me is having an interface which supports partial addition, in which the sum of two numbers may not be defined. maybe im just overthinking, its for the grid based problems. i want this abstraction because i can change the grid type by changing the coordinate types, if i put bounded integers when asking for neighbours they maybe be 8 or less (because you may exit the
2025-12-04 14:30:46 +0100 <lucabtz> thank you
2025-12-04 14:30:31 +0100 <ski> (i'd possibly still define `Read' to accept both record notation and plain data constructor with components as arguments version, though)
2025-12-04 14:29:25 +0100 <ski> i not too seldom also do (c3) define a data type with record notation for some data constructors, but i don't want `Show' to use the record syntax (because it's verbose, when you're trying to read some larger output), which is what the `deriving' syntax will give you, in this case
2025-12-04 14:27:47 +0100 <ski> also (c2), if you have infix operator declarations for some data constructors, and you want your `Show' to omit unnecessary brackets (when showing in infix form), since iirc GHC for some reason ignores the fixities when `deriving' `Show'
2025-12-04 14:25:37 +0100 <ski> and (c1) you want to use `fromInteger' (or similar hooks into literal syntax for other things, e.g. overloaded string literals), and so you'd probably want `Read' to be able to parse that, and possibly want `Show' to produce it