2025/09/28

Newest at the top

2025-09-28 21:27:04 +0200ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2025-09-28 21:25:38 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 272 seconds)
2025-09-28 21:22:31 +0200 <tomsmeding> right
2025-09-28 21:21:19 +0200vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-09-28 21:21:16 +0200 <dcpagan> I was planning on constraining the type family with the constraint.
2025-09-28 21:20:56 +0200Googulator64(~Googulato@2a01-036d-0106-03fa-f110-0864-c42c-107f.pool6.digikabel.hu)
2025-09-28 21:20:45 +0200Googulator64(~Googulato@2a01-036d-0106-03fa-f110-0864-c42c-107f.pool6.digikabel.hu) (Quit: Client closed)
2025-09-28 21:19:05 +0200 <tomsmeding> there are very specific reasons why you may need such a thing sometimes (in particular if it appears in a QuantifiedConstraint elsewhere), but none of those apply here
2025-09-28 21:18:37 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-09-28 21:18:24 +0200 <tomsmeding> a class with a single, blanket instance (like you have here with VerseIndex) is very rarely useful
2025-09-28 21:18:07 +0200vanishingideal(~vanishing@user/vanishingideal) (Remote host closed the connection)
2025-09-28 21:17:40 +0200 <tomsmeding> dcpagan: why is the instance still there? Why are Verses/Stanza/Song not just top-level type families at this point?
2025-09-28 21:17:16 +0200 <tomsmeding> dcpagan: use ShowType? https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-TypeError.html#t:ErrorMessage
2025-09-28 21:13:43 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-09-28 21:12:53 +0200vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-09-28 21:12:36 +0200tromp(~textual@2001:1c00:3487:1b00:259a:5516:59ca:4e5)
2025-09-28 21:12:19 +0200trickard_(~trickard@cpe-50-98-47-163.wireline.com.au)
2025-09-28 21:10:13 +0200trickard_(~trickard@cpe-50-98-47-163.wireline.com.au) (Ping timeout: 264 seconds)
2025-09-28 21:08:33 +0200humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect
2025-09-28 21:08:17 +0200 <dcpagan> Like a type-promoted show?
2025-09-28 21:08:01 +0200 <dcpagan> How do I convert a Natural to a Symbol for displaying in a custom type error message?
2025-09-28 21:07:30 +0200 <dcpagan> The only thing I'm missing is specifying the input index in the custom type error message.
2025-09-28 21:02:31 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2025-09-28 21:02:19 +0200 <dcpagan> Would this render redundant the constraint (n <= SongLength)?
2025-09-28 21:01:43 +0200 <dcpagan> https://github.com/DCPagan/Exercism-Haskell/blob/73c27000e602ea2fe1718f552b717ae62a490257/house/sr…
2025-09-28 21:01:40 +0200 <dcpagan> I used Data.Type.Bool.If, and there were no reduction stack overflows.
2025-09-28 21:00:47 +0200caconym74787(~caconym@user/caconym) caconym
2025-09-28 21:00:12 +0200 <[exa]> EvanR: no one used cut yet! backtrack!
2025-09-28 21:00:03 +0200caconym74787(~caconym@user/caconym) (Quit: bye)
2025-09-28 20:57:57 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-09-28 20:52:26 +0200 <EvanR> it's too late
2025-09-28 20:52:19 +0200 <EvanR> warning warning prolog detected. Abort
2025-09-28 20:49:33 +0200 <tomsmeding> and retain sane compile times
2025-09-28 20:49:12 +0200 <tomsmeding> why exactly this choice for greediness was made I don't know; perhaps to not accidentally build a prolog
2025-09-28 20:47:56 +0200 <tomsmeding> this means that the result of the greedy algorithm is always compatible with what a full backtracking algorithm would have produced
2025-09-28 20:47:38 +0200 <tomsmeding> the algorithm does, however, guard against ambiguity: an instance is chosen only if it can be determined, without looking at the constraints, that it's the only one that matches
2025-09-28 20:47:12 +0200 <tomsmeding> instance selection is "greedy" in haskell, no backtracking is performed
2025-09-28 20:46:49 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds)
2025-09-28 20:46:04 +0200 <tomsmeding> but I expect the If to work
2025-09-28 20:46:02 +0200 <dcpagan> I want to guard against naturals beyond a certain value.
2025-09-28 20:45:53 +0200 <tomsmeding> sure, you can do that here too
2025-09-28 20:45:42 +0200 <dcpagan> It's why I refactored to recursion with Maybe Natural.
2025-09-28 20:45:24 +0200 <dcpagan> Last time I tried Data.Type.Bool.If, I got reduction stack overflows.
2025-09-28 20:45:15 +0200 <tomsmeding> but in this case, you don't want to pattern-match, you want to have a conditional on <=
2025-09-28 20:45:03 +0200 <tomsmeding> dcpagan: what is `Song' Nothing = "" ; Song' (Just n) = ...` doing if not pattern matching?
2025-09-28 20:44:41 +0200 <tomsmeding> use https://hackage.haskell.org/package/base-4.19.0.0/docs/GHC-TypeLits.html#t:-60--61--63- and https://hackage.haskell.org/package/base-4.19.0.0/docs/Data-Type-Bool.html#t:If
2025-09-28 20:44:28 +0200bgg(~bgg@2a01:e0a:819:1510:ce70:2793:3b21:6fbd) (Remote host closed the connection)
2025-09-28 20:44:25 +0200 <dcpagan> Can I pattern match with type families?
2025-09-28 20:43:43 +0200 <tomsmeding> I don't see why you cannot just compute these things with type families
2025-09-28 20:43:33 +0200 <tomsmeding> you can use type families though :)