2024/09/21

Newest at the top

2024-09-21 11:57:09 +0200morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
2024-09-21 11:56:21 +0200nnm(~nnm@79-139-162-83.dynamic.spd-mgts.ru)
2024-09-21 11:52:57 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-09-21 11:52:36 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 11:51:06 +0200morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-09-21 11:45:09 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-09-21 11:44:45 +0200lxsameer(~lxsameer@Serene/lxsameer)
2024-09-21 11:44:19 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-09-21 11:43:27 +0200 <tomsmeding> as does typescript
2024-09-21 11:43:23 +0200 <tomsmeding> python also "has" union types
2024-09-21 11:43:18 +0200 <tomsmeding> the haskell source language has sum types, and no union types; C has union types and no sum types
2024-09-21 11:42:59 +0200 <Inst> ah, and that's why Cmm can't do it, and thus haskell can't
2024-09-21 11:42:40 +0200 <tomsmeding> union types do not have a tag, sum types do
2024-09-21 11:42:34 +0200 <tomsmeding> Inst: do you mean sum types or union types?
2024-09-21 11:42:24 +0200 <Inst> i'd rather have sum types (i.e, C union types) with the newtype transparency
2024-09-21 11:41:38 +0200 <ski> Hugs has restrricted type synonyms (like in the MLs)
2024-09-21 11:41:36 +0200 <Inst> but the two characteristics of newtypes are, no sum types, and only one field allowed
2024-09-21 11:41:30 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2024-09-21 11:40:59 +0200 <Inst> also iirc there's some freaky laziness-related quirkiness there as well, i.e, the constructor doesn't exist and when you evaluate for the constructor you're also evaluating the underlying term, iirc
2024-09-21 11:40:34 +0200 <Inst> i mean that newtype is just transparent, it's effectively a type synonym that's enforced only on the type level
2024-09-21 11:37:21 +0200CiaoSen(~Jura@2a05:5800:22d:f000:ca4b:d6ff:fec1:99da)
2024-09-21 11:36:49 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 11:36:19 +0200random-jellyfish(~developer@user/random-jellyfish) (Quit: Leaving)
2024-09-21 11:30:05 +0200 <tomsmeding> at least it still behaves properly with the rest of the language, contrary to existentials :p
2024-09-21 11:29:43 +0200 <tomsmeding> question is whether that's worth it
2024-09-21 11:29:04 +0200 <tomsmeding> you could make it a GADT and give it a type parameter that is different for each constructor
2024-09-21 11:28:46 +0200 <tomsmeding> have a type that allows just one of the constructors?
2024-09-21 11:28:28 +0200 <tomsmeding> Inst: what do you mean?
2024-09-21 11:28:19 +0200target_i(~target_i@user/target-i/x-6023099)
2024-09-21 11:27:15 +0200 <Inst> i'm more annoyed that you can't newtype constructors for these types of sumtypes
2024-09-21 11:26:03 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2024-09-21 11:21:01 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 11:20:50 +0200morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 255 seconds)
2024-09-21 11:12:03 +0200 <tomsmeding> but if you're in that world, you tend to know it
2024-09-21 11:11:44 +0200 <tomsmeding> mind you, exceptions exist, especially if your types have some GADT-like type parameters and you're doing some computations that cannot (or should not) be fully reflected on the type level
2024-09-21 11:10:34 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2024-09-21 11:10:16 +0200 <tomsmeding> Inst: what ski posted, but also just that they tend to make life more annoying while not actually helping much
2024-09-21 11:09:25 +0200srazkvt(~sarah@user/srazkvt) (Client Quit)
2024-09-21 11:09:00 +0200srazkvt(~sarah@user/srazkvt)
2024-09-21 11:05:15 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 11:03:53 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-09-21 10:59:22 +0200morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net)
2024-09-21 10:56:55 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-09-21 10:56:35 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2024-09-21 10:55:33 +0200__monty__(~toonn@user/toonn)
2024-09-21 10:51:37 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl)
2024-09-21 10:50:31 +0200 <Inst> oh fine, i'll do it the old fashioned way with a sum type :(
2024-09-21 10:45:38 +0200morb(~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds)
2024-09-21 10:42:13 +0200random-jellyfish(~developer@user/random-jellyfish)
2024-09-21 10:40:49 +0200merijn(~merijn@204-220-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)