2025/11/21

Newest at the top

2025-11-21 16:30:04 +0100 <haskellbridge> <loonycyborg> And if it's "(Hashable t, Typeable t)" you can both use Hashable instance and reflect its exact type.
2025-11-21 16:27:12 +0100 <haskellbridge> <loonycyborg> But obviously it can get less maintainable because compiler won't warn you if you change types in the origin but forget to update uses of Typeable.
2025-11-21 16:26:16 +0100 <haskellbridge> <loonycyborg> And if it's "(Hashable t, Dynamic t)" you can both use Hashable instance and reflect its exact type.
2025-11-21 16:26:09 +0100sam113101(~sam@modemcable200.189-202-24.mc.videotron.ca) (Read error: Connection reset by peer)
2025-11-21 16:26:04 +0100srazkvt(~sarah@user/srazkvt) (Quit: Konversation terminated!)
2025-11-21 16:23:21 +0100sam113101(~sam@modemcable200.189-202-24.mc.videotron.ca) sam113101
2025-11-21 16:22:37 +0100FragByte(~christian@user/fragbyte) FragByte
2025-11-21 16:22:27 +0100 <kuribas> It restrict t to a hashable, but it's also a guarantee that the type is hashable.
2025-11-21 16:22:13 +0100 <kuribas> Like "Hashable t => t ** t"
2025-11-21 16:21:42 +0100 <kuribas> __monty__: the existential can carry more information and guarantees. Restrict is a funny word for "guarantee".
2025-11-21 16:21:29 +0100 <haskellbridge> <loonycyborg> but with Typeable/Dynamic they're equivalent
2025-11-21 16:21:25 +0100 <__monty__> But kuribas' comment of "dynamic types are existentials, but not all existentials are dynamic types" is the other way around, no?
2025-11-21 16:20:38 +0100FragByte(~christian@user/fragbyte) (Quit: Quit)
2025-11-21 16:20:34 +0100 <__monty__> That's what I assumed.
2025-11-21 16:20:29 +0100 <haskellbridge> <loonycyborg> existentials can restric more than dynamic types
2025-11-21 16:20:16 +0100 <haskellbridge> <loonycyborg> It's the other way around
2025-11-21 16:19:33 +0100 <__monty__> What can existentials express that dynamic types restrict?
2025-11-21 16:19:08 +0100 <kuribas> merijn: but you hide the tag, and make primitive functions partial.
2025-11-21 16:18:45 +0100machinedgod(~machinedg@d75-159-126-101.abhsia.telus.net) machinedgod
2025-11-21 16:18:35 +0100sam113101(~sam@modemcable200.189-202-24.mc.videotron.ca) (Read error: Connection reset by peer)
2025-11-21 16:18:28 +0100 <haskellbridge> <Zemyla> newtype FreeMonoid a = FreeMonoid { runFreeMonoid :: forall r. Monoid r => (a -> r) -> r }
2025-11-21 16:18:24 +0100 <kuribas> merijn: A dynamic language just means every value is (Tag t ** t), Where Tag :: Type -> Type
2025-11-21 16:18:19 +0100 <haskellbridge> <loonycyborg> that way they're not dynamic types but more like C++ virtual functions and abstract classes
2025-11-21 16:17:55 +0100 <haskellbridge> <loonycyborg> If you don't use type.reflection then typeclass entirely determines what can you do with existential
2025-11-21 16:17:41 +0100 <haskellbridge> <Zemyla> Thinking about the free monoid now.
2025-11-21 16:17:35 +0100yin(~zero@user/zero) zero
2025-11-21 16:17:13 +0100yin(~zero@user/zero) (Ping timeout: 246 seconds)
2025-11-21 16:17:11 +0100 <merijn> loonycyborg: You don't have to do that yourself, Dynamic exists already :)
2025-11-21 16:16:52 +0100 <kuribas> merijn: dynamic types are existentials, but not all existentials are like dynamic types.
2025-11-21 16:16:32 +0100 <kuribas> merijn: yeah, it's the other way.
2025-11-21 16:16:20 +0100 <haskellbridge> <loonycyborg> you can do things like with C++ rtti then
2025-11-21 16:16:02 +0100 <haskellbridge> <loonycyborg> https://hackage.haskell.org/package/base-4.21.0.0/docs/Type-Reflection.html
2025-11-21 16:15:53 +0100 <merijn> You can kinda fake dynamic types with existentials, but they are far more principled
2025-11-21 16:15:39 +0100 <haskellbridge> <loonycyborg> If you add Typeable constraint to your existentials you can query exact type at runtime too.
2025-11-21 16:15:33 +0100 <merijn> how are existentials like dynamic types?
2025-11-21 16:10:35 +0100 <kuribas> existentials are like dynamic types, but with dependent types I can compute on the unknown type part, without breaking static garantees, and without the need for a second language for type computations.
2025-11-21 16:08:43 +0100Lycurgus(~juan@user/Lycurgus) Lycurgus
2025-11-21 16:04:03 +0100Googulator83(~Googulato@team.broadbit.hu) (Ping timeout: 250 seconds)
2025-11-21 16:01:02 +0100Googulator5(~Googulato@team.broadbit.hu)
2025-11-21 15:58:50 +0100jmcantrell(~weechat@user/jmcantrell) jmcantrell
2025-11-21 15:56:44 +0100ljdarj(~Thunderbi@user/ljdarj) ljdarj
2025-11-21 15:54:22 +0100ljdarj(~Thunderbi@user/ljdarj) (Quit: ljdarj)
2025-11-21 15:49:34 +0100YoungFrog(~youngfrog@39.129-180-91.adsl-dyn.isp.belgacom.be) youngfrog
2025-11-21 15:49:14 +0100YoungFrog(~youngfrog@2a02:a03f:ca07:f900:5e58:dbf4:c0b:fbb3) (Quit: ZNC 1.7.x-git-3-96481995 - https://znc.in)
2025-11-21 15:48:33 +0100Inline(~inlinE@2001-4dd7-ae97-0-4674-ae6d-2607-c022.ipv6dyn.netcologne.de) Inline
2025-11-21 15:41:11 +0100 <kuribas> yes
2025-11-21 15:34:09 +0100Googulator7(~Googulato@81.183.235.203) (Ping timeout: 250 seconds)
2025-11-21 15:32:01 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) (Ping timeout: 255 seconds)
2025-11-21 15:30:45 +0100Googulator83(~Googulato@team.broadbit.hu)
2025-11-21 15:27:48 +0100humasect(~humasect@dyn-192-249-132-90.nexicom.net) humasect