Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,802,691 events total
2025-11-11 10:28:49 Jackneill joins (~Jackneill@188-143-82-32.pool.digikabel.hu)
2025-11-11 10:32:10 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 10:33:48 × jreicher quits (~user@user/jreicher) (Quit: In transit)
2025-11-11 10:34:00 merijn joins (~merijn@77.242.116.146)
2025-11-11 10:46:44 <kuribas> Haskell typelevel is this weird combination of untyped prolog, intricacies of type classes, and ad hoc extensions (generics, TH).
2025-11-11 10:47:14 <merijn> kuribas: I don't think TH really counts as type level?
2025-11-11 10:48:27 <kuribas> merijn: generating types, freemonads, lenses.
2025-11-11 10:49:00 <kuribas> Not necessarily type level, but usually there to avoid the boilerplate that comes with haskell type level stuff.
2025-11-11 10:49:23 <kuribas> I usually go with generics, but they have a big compile time cost.
2025-11-11 10:49:32 <kuribas> And possibly runtime as well.
2025-11-11 10:51:43 <kuribas> Then again, type level programming in other languages is strictly worse.
2025-11-11 10:51:44 deptype_ joins (~deptype@2406:b400:3a:73c2:96bb:43ff:fecb:477b)
2025-11-11 10:51:50 <kuribas> Python, Typescript.
2025-11-11 10:52:31 Nachtgespenst joins (~user@user/siracusa)
2025-11-11 10:53:25 × deptype quits (~deptype@2406:b400:3a:73c2:20ec:9ba6:a31e:71d2) (Ping timeout: 240 seconds)
2025-11-11 10:53:39 <kuribas> I just feel dependent types are the logical conclusion of any advanced type system.
2025-11-11 11:00:37 jreicher joins (~user@user/jreicher)
2025-11-11 11:03:17 <merijn> Those bring a lot of disadvantages too
2025-11-11 11:03:25 <merijn> So I'm not yet convinced that's what I want
2025-11-11 11:03:34 <merijn> You know what I do want?
2025-11-11 11:03:52 <merijn> I want my damn rowtype polymorhpism in a production language! >.<
2025-11-11 11:04:04 <merijn> Ideally one not as niche and obscure as Ur/Web
2025-11-11 11:04:35 × trickard_ quits (~trickard@cpe-62-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-11 11:04:49 trickard_ joins (~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-11 11:05:42 <kuribas> merijn: typescript?
2025-11-11 11:06:34 <merijn> typescript doesn't have row type polymorphism
2025-11-11 11:06:56 <merijn> typescript just does structural subtyping
2025-11-11 11:07:03 <merijn> Which is, like, the opposite of what I want
2025-11-11 11:07:20 <merijn> The entire point of rowtype polymorphism is to have structural subtyping that doesn't suck
2025-11-11 11:07:40 <merijn> So I don't have to think about covariance/contravariance
2025-11-11 11:08:37 <kuribas> purescript then?
2025-11-11 11:08:37 <merijn> Especially since subtyping ruins all good things
2025-11-11 11:09:02 <arahael> I'd just be happy having sum types.
2025-11-11 11:09:19 × poscat quits (~poscat@user/poscat) (Remote host closed the connection)
2025-11-11 11:09:20 <arahael> Still annoyed I can't tell C# that the enums I have should only be defined for the values they're specified for.
2025-11-11 11:09:34 <merijn> Purescript does have rowtype polymorphism, but compiling to JS means I can't practically use it
2025-11-11 11:10:51 <jreicher> kuribas: I don't think there's any "logical conclusion" to a type system. A type system is whatever assertions you want the compiler to check for you, in which case you need to be able to express the assertions, and you need the system to be able to check them.
2025-11-11 11:11:14 <jreicher> I think that will always be a moving target.
2025-11-11 11:11:39 <kuribas> jreicher: yes, but they always explode in complexity.
2025-11-11 11:11:49 <kuribas> Lookup at python types. And you don't even have hkts.
2025-11-11 11:12:11 <kuribas> Which is somewhat mitigated with subtypes.
2025-11-11 11:12:16 poscat joins (~poscat@user/poscat)
2025-11-11 11:12:47 <mreh> Do associated types in a Constraint also imply their typeclass? I guess they would have to.
2025-11-11 11:13:43 <mreh> e.g. `Enum (AssociatedType t) => ...`
2025-11-11 11:14:04 <kuribas> mreh: yes
2025-11-11 11:14:30 <kuribas> mreh: constraints, are only checked after resolving the instances.
2025-11-11 11:15:15 <kuribas> in a class or instance definition I mean.
2025-11-11 11:16:29 <kuribas> mreh: so "class Eq a => Ord a", means everytime you use "Ord a", it implies "Eq a".
2025-11-11 11:16:55 × Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 240 seconds)
2025-11-11 11:17:36 <kuribas> mreh: "Eq a" isn't even checked when resolving the instance, if it resolves to "Ord a", then "Eq a" must be met, or it is a type error.
2025-11-11 11:21:33 <mreh> I think you misunderstand.
2025-11-11 11:22:19 × Googulator33 quits (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu) (Quit: Client closed)
2025-11-11 11:22:20 <kuribas> What do you mean then?
2025-11-11 11:22:29 <mreh> I haven't told GHC to look for the typeclass that AssociatedType is from.
2025-11-11 11:22:35 xff0x joins (~xff0x@2405:6580:b080:900:e7c9:4386:1015:3b04)
2025-11-11 11:22:36 Googulator33 joins (~Googulato@2a01-036d-0106-0180-8127-ba79-55a7-6f29.pool6.digikabel.hu)
2025-11-11 11:22:40 <mreh> But I guess it works it out.
2025-11-11 11:22:53 <kuribas> mreh: You mean it's a type family inside a typeclass?
2025-11-11 11:22:53 <mreh> Is that what you thought I meant?
2025-11-11 11:23:06 <mreh> kuribas: yeah, isn't that called an "associated type"?
2025-11-11 11:23:43 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 11:24:01 <kuribas> idk
2025-11-11 11:24:31 <mreh> it was just a little unexpected,
2025-11-11 11:24:36 <mreh> to see GHC do that
2025-11-11 11:25:08 <kuribas> Well, if the type family is inside the class definition, the GHC will know it must be an instance.
2025-11-11 11:25:53 <mreh> yup
2025-11-11 11:26:20 <kuribas> Why would that be surprising?
2025-11-11 11:26:33 Square3 joins (~Square@user/square)
2025-11-11 11:26:37 <kuribas> Everything inside the class definition implies the class constraints.
2025-11-11 11:26:46 × xff0x quits (~xff0x@2405:6580:b080:900:e7c9:4386:1015:3b04) (Client Quit)
2025-11-11 11:27:07 <mreh> I guess because I'm used to supplying contraints when using type class methods
2025-11-11 11:27:15 <mreh> but that's only when you have an exmplicit type signature
2025-11-11 11:28:11 <mreh> the associated type is in the type signature already
2025-11-11 11:28:25 <haskellbridge> <loonycyborg> Row polymorphism sounds like really unsafe idea. Because you can't be really sure that doing something on a subset of rows of ANY record just because they have particular types will do anything useful.
2025-11-11 11:29:27 Ranhir joins (~Ranhir@157.97.53.139)
2025-11-11 11:31:40 × Square3 quits (~Square@user/square) (Ping timeout: 256 seconds)
2025-11-11 11:33:03 qqe joins (~qqq@185.54.21.203)
2025-11-11 11:36:35 merijn joins (~merijn@77.242.116.146)
2025-11-11 11:41:17 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 11:42:15 dlock23 joins (~dlock@user/dlock23)
2025-11-11 11:43:50 <kuribas> loonycyborg: It's the same with putting type classes on every possible type.
2025-11-11 11:44:06 <kuribas> It's easy to get wrong behaviour, since it picks the wrong instance.
2025-11-11 11:44:14 <kuribas> For example Monad and Applicative on (->)
2025-11-11 11:44:47 <kuribas> It should not exist, because the few times you need it, you can just wrap ReaderT, and it will be also easier to understand the code.
2025-11-11 11:45:37 merijn joins (~merijn@77.242.116.146)
2025-11-11 11:47:28 × kuribas quits (~user@2a02-1810-2825-6000-c59e-d8f1-aea0-564e.ip6.access.telenet.be) (Remote host closed the connection)
2025-11-11 11:48:14 × trickard_ quits (~trickard@cpe-62-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-11-11 11:48:28 trickard_ joins (~trickard@cpe-62-98-47-163.wireline.com.au)
2025-11-11 11:49:55 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 240 seconds)
2025-11-11 11:50:32 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
2025-11-11 11:51:07 chiselfuse joins (~chiselfus@user/chiselfuse)
2025-11-11 11:52:25 __monty__ joins (~toonn@user/toonn)
2025-11-11 11:58:40 × artix_live_1 quits (~loouom@109.166.130.42) (Remote host closed the connection)
2025-11-11 12:00:01 merijn joins (~merijn@77.242.116.146)
2025-11-11 12:01:33 fp joins (~Thunderbi@2001:708:20:1406::10c5)
2025-11-11 12:10:29 xff0x joins (~xff0x@2405:6580:b080:900:d7c7:2664:9910:68b4)
2025-11-11 12:11:49 wootehfoot joins (~wootehfoo@user/wootehfoot)
2025-11-11 12:12:43 comerijn joins (~merijn@77.242.116.146)
2025-11-11 12:15:18 × merijn quits (~merijn@77.242.116.146) (Ping timeout: 256 seconds)
2025-11-11 12:15:55 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 240 seconds)

All times are in UTC.