Logs: liberachat/#haskell
| 2025-10-14 08:21:32 | → | adig joins (~adi@86.123.72.40) |
| 2025-10-14 08:21:38 | → | comerijn joins (~merijn@77.242.116.146) |
| 2025-10-14 08:21:42 | ← | adig parts (~adi@86.123.72.40) () |
| 2025-10-14 08:22:40 | → | fp joins (~Thunderbi@2001:708:20:1406::10c5) |
| 2025-10-14 08:24:38 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 256 seconds) |
| 2025-10-14 08:27:51 | → | gustrb joins (~gustrb@191.243.134.87) |
| 2025-10-14 08:33:01 | × | gustrb quits (~gustrb@191.243.134.87) (Ping timeout: 264 seconds) |
| 2025-10-14 08:33:49 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 2025-10-14 08:35:38 | × | Googulator quits (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-10-14 08:35:42 | → | Googulator66 joins (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) |
| 2025-10-14 08:37:47 | → | gustrb joins (~gustrb@191.243.134.87) |
| 2025-10-14 08:39:01 | × | comerijn quits (~merijn@77.242.116.146) (Ping timeout: 264 seconds) |
| 2025-10-14 08:40:42 | → | chele joins (~chele@user/chele) |
| 2025-10-14 08:42:52 | Googulator66 | is now known as Googulator |
| 2025-10-14 08:44:30 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-14 08:44:37 | → | acidjnk joins (~acidjnk@p200300d6e71719931c47ad226c4c8e20.dip0.t-ipconnect.de) |
| 2025-10-14 08:45:01 | × | gustrb quits (~gustrb@191.243.134.87) (Ping timeout: 256 seconds) |
| 2025-10-14 08:48:32 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 2025-10-14 08:49:22 | → | gustrb joins (~gustrb@191.243.134.87) |
| 2025-10-14 08:50:45 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 245 seconds) |
| 2025-10-14 08:57:14 | → | adig joins (~adi@86.123.72.40) |
| 2025-10-14 08:57:22 | ← | adig parts (~adi@86.123.72.40) () |
| 2025-10-14 09:02:51 | → | kuribas joins (~user@2a02-1810-2825-6000-b5ac-98ee-b19a-ab1f.ip6.access.telenet.be) |
| 2025-10-14 09:04:18 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-14 09:05:43 | × | Googulator quits (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-10-14 09:05:47 | → | Googulator56 joins (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) |
| 2025-10-14 09:05:55 | Googulator56 | is now known as Googulator |
| 2025-10-14 09:07:58 | × | bgamari quits (~bgamari@64.223.225.237) (Ping timeout: 256 seconds) |
| 2025-10-14 09:11:25 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 264 seconds) |
| 2025-10-14 09:18:39 | → | OWS joins (~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) |
| 2025-10-14 09:19:51 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-14 09:20:25 | → | bgamari joins (~bgamari@64.223.200.137) |
| 2025-10-14 09:21:51 | × | Dhark8 quits (~Shark8@c-174-56-102-109.hsd1.nm.comcast.net) (Ping timeout: 256 seconds) |
| 2025-10-14 09:24:58 | → | mreh joins (~matthew@host86-146-25-125.range86-146.btcentralplus.com) |
| 2025-10-14 09:27:14 | <mreh> | Is there a Semigroup instance for Map that is based on `unionWith (<>)` before I implement my own? I can't find one already. |
| 2025-10-14 09:28:05 | × | bgamari quits (~bgamari@64.223.200.137) (Ping timeout: 256 seconds) |
| 2025-10-14 09:28:20 | <mreh> | instance (Semigroup a, Ord k) => Semigroup (MergeMap k a) where MergeMap m <> MergeMap n = MergeMap $ unionWith (<>) m n |
| 2025-10-14 09:28:29 | <mreh> | seems to fit the bill for what I'm doing |
| 2025-10-14 09:28:43 | <merijn> | mreh: There is one, but it's inconvenient to use |
| 2025-10-14 09:28:56 | <mreh> | merijn: oh? |
| 2025-10-14 09:29:19 | <merijn> | I once tried to start a crusade to get the (imo more sensible) monoidal Map in containers, but no success |
| 2025-10-14 09:30:01 | <mreh> | merijn: intuitively, it feels like the right default |
| 2025-10-14 09:30:05 | <merijn> | mreh: There's like 3 or 4 libraries on Hackage that have monoidal map |
| 2025-10-14 09:30:08 | <tomsmeding> | there are various packages on hackage that implement a monoidal map |
| 2025-10-14 09:30:10 | <tomsmeding> | ^ |
| 2025-10-14 09:30:22 | <merijn> | In practice I tend to just do `unionWith (<>)` since it's more convenient |
| 2025-10-14 09:30:51 | <merijn> | But every single time I want to `foldMap` a `Map` I am once again confronted with the default monoid of Map being shite >.< |
| 2025-10-14 09:33:20 | × | Googulator quits (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-10-14 09:34:11 | → | Googulator joins (~Googulato@2a01-036d-0106-03fa-dc7a-fb6e-71bb-aaf0.pool6.digikabel.hu) |
| 2025-10-14 09:35:02 | → | bgamari joins (~bgamari@64.223.200.74) |
| 2025-10-14 09:37:40 | <mreh> | oh yeah, it's too early, my eyes glazed over when reading Data.MonoidMap |
| 2025-10-14 09:38:12 | <mreh> | v interesting how get is total when a is a Moniod |
| 2025-10-14 09:46:48 | × | califax quits (~califax@user/califx) (Ping timeout: 272 seconds) |
| 2025-10-14 09:51:00 | × | notzmv quits (~umar@user/notzmv) (Read error: Connection reset by peer) |
| 2025-10-14 09:52:53 | <dminuoso> | merijn: Honestly I think much of Haskell typeclasses would be far more usable if we had an ergonomic way of just picking/swapping out instances other than newtype wrappers. |
| 2025-10-14 09:53:24 | <dminuoso> | And yes, we'd give up guarantees on coherence that apply to some very obscure usecases... |
| 2025-10-14 09:54:15 | → | mochie joins (~mochie@user/mochie) |
| 2025-10-14 09:54:20 | <merijn> | dminuoso: Hard disagree |
| 2025-10-14 09:54:44 | <merijn> | I've been doing Scala for the past 2 years and the fact that implicit's let you do that is a giant nightmare |
| 2025-10-14 09:56:00 | <dminuoso> | Having all these newtypes with clear bias about what the author thought should be "the authoritative behavior for typeclass XYZ" is just annoying. |
| 2025-10-14 09:56:09 | → | dhil joins (~dhil@5.151.29.137) |
| 2025-10-14 09:56:26 | <dminuoso> | Some libraries are more honest like `time` where you just dont get Eq on some newtypes because there's two equally good possibilities. |
| 2025-10-14 09:58:06 | → | califax joins (~califax@user/califx) |
| 2025-10-14 09:58:24 | <dminuoso> | merijn: I think it may be a tooling problem in scala if its unclear what implicit is in scope right now. |
| 2025-10-14 10:00:29 | <merijn> | My main tooling problem is sbt. I'd kill for cabal's speed xD |
| 2025-10-14 10:06:04 | <haskellbridge> | <Morj> At least with newtypes unlike in rust you don't have problems that "fn(&MyType) -> &MyNewtype" is impossible to write |
| 2025-10-14 10:06:57 | ← | mochie parts (~mochie@user/mochie) () |
| 2025-10-14 10:08:27 | <haskellbridge> | <Morj> I find that where I use newtypes for their instances, it's usually not a bad ergonomic to write. Like "getProduct . foldMap Product" |
| 2025-10-14 10:09:16 | <haskellbridge> | <Morj> Would be cool if there was a combinator like "foldMap coerce" so that I only had to write the newtype name once |
| 2025-10-14 10:09:18 | <mreh> | shouldn't you use coerce and type applications in that case? |
| 2025-10-14 10:09:18 | → | __monty__ joins (~toonn@user/toonn) |
| 2025-10-14 10:09:50 | <haskellbridge> | <Morj> I like being explicit |
| 2025-10-14 10:09:55 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 245 seconds) |
| 2025-10-14 10:09:58 | <haskellbridge> | <Morj> Also is coerce in microhs? ;-) |
| 2025-10-14 10:10:26 | <mreh> | ¯\_(ツ)_/¯ |
| 2025-10-14 10:10:52 | <mreh> | are type applications? |
| 2025-10-14 10:11:01 | <haskellbridge> | <Morj> They at least are there |
| 2025-10-14 10:12:21 | × | divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer) |
| 2025-10-14 10:12:45 | → | divlamir joins (~divlamir@user/divlamir) |
| 2025-10-14 10:14:34 | × | Adeon quits (sid418992@id-418992.lymington.irccloud.com) (Server closed connection) |
| 2025-10-14 10:14:46 | → | Adeon joins (sid418992@id-418992.lymington.irccloud.com) |
| 2025-10-14 10:15:07 | × | xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 256 seconds) |
| 2025-10-14 10:15:34 | <merijn> | coerce is good, but type applications is bad imo |
| 2025-10-14 10:16:02 | <merijn> | Ugly syntax and (worse) far too brittle in my opinion |
| 2025-10-14 10:20:08 | <merijn> | You're relying on the order of type variables as part of the public interface of a library (which basically no library author considers for PVP decisions) and unless the library author explicitly `forall`'s the type variables on every function that's dependent on the whims of GHC |
| 2025-10-14 10:20:20 | <tomsmeding> | type applications would be more robust if they're allowed only on functions with an explicit type variable ordering |
| 2025-10-14 10:20:29 | <tomsmeding> | but then nobody would have used it because of the chicken-egg problem |
| 2025-10-14 10:20:44 | <merijn> | Which is far from hypothetical, since we've already had at least one GHC release where a type system rejiggle changed the order of inferred variables, leading to breakage |
| 2025-10-14 10:25:52 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 260 seconds) |
| 2025-10-14 10:33:31 | → | halloy7365 joins (~halloy736@2404:4400:5446:4e00:c9d:2341:235f:e891) |
| 2025-10-14 10:38:24 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-14 10:44:10 | × | merijn quits (~merijn@77.242.116.146) (Ping timeout: 246 seconds) |
| 2025-10-14 10:47:44 | × | yegor quits (~yegor@user/yegor) (Quit: ZNC 1.8.2+deb3.1+deb12u1 - https://znc.in) |
| 2025-10-14 10:48:01 | → | yegor joins (yegor@user/yegor) |
| 2025-10-14 10:50:11 | → | merijn joins (~merijn@77.242.116.146) |
| 2025-10-14 10:52:48 | × | halloy7365 quits (~halloy736@2404:4400:5446:4e00:c9d:2341:235f:e891) (Quit: halloy7365) |
| 2025-10-14 10:53:13 | → | CiaoSen joins (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) |
| 2025-10-14 10:54:55 | × | chele quits (~chele@user/chele) (Ping timeout: 245 seconds) |
| 2025-10-14 11:00:05 | × | caconym7478798 quits (~caconym@user/caconym) (Quit: bye) |
| 2025-10-14 11:01:29 | → | caconym7478798 joins (~caconym@user/caconym) |
All times are in UTC.