2025/05/10

2025-05-10 00:01:26 +0200shr\ke(~shrike@user/paxhumana) paxhumana
2025-05-10 00:01:26 +0200shr\ke(~shrike@user/paxhumana) (Changing host)
2025-05-10 00:01:26 +0200shr\ke(~shrike@user/shrke:31298) shr\ke
2025-05-10 00:03:14 +0200Guest48(~Guest48@104.156.111.174)
2025-05-10 00:17:25 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds)
2025-05-10 00:26:36 +0200 <EvanR> :t mzero
2025-05-10 00:26:36 +0200 <lambdabot> MonadPlus m => m a
2025-05-10 00:26:40 +0200euleritian(~euleritia@dynamic-176-000-193-082.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2025-05-10 00:26:40 +0200 <EvanR> :t fail
2025-05-10 00:26:41 +0200 <lambdabot> MonadFail m => String -> m a
2025-05-10 00:26:58 +0200euleritian(~euleritia@77.23.248.100)
2025-05-10 00:27:00 +0200 <EvanR> too bad good nails are taken
2025-05-10 00:27:02 +0200 <EvanR> names
2025-05-10 00:27:36 +0200eron(~eron@179.118.250.144) (Quit: Client closed)
2025-05-10 00:28:33 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 00:29:54 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2025-05-10 00:30:00 +0200 <monochrom> Consider "flouder". >:)
2025-05-10 00:30:44 +0200 <monochrom> err, flounder!
2025-05-10 00:31:06 +0200monochrom's spelling skill flounders.
2025-05-10 00:31:59 +0200simplystuart(~simplystu@c-75-75-152-164.hsd1.pa.comcast.net) (Remote host closed the connection)
2025-05-10 00:32:13 +0200 <monochrom> I learned that word very recently from the Curry language.
2025-05-10 00:32:22 +0200simplystuart(~simplystu@c-75-75-152-164.hsd1.pa.comcast.net)
2025-05-10 00:33:03 +0200 <EvanR> flounder, sebastian, scuttle, flotsam, jetsam
2025-05-10 00:35:38 +0200manwithluck(~manwithlu@2a09:bac1:5b80:20::49:f6) (Remote host closed the connection)
2025-05-10 00:36:03 +0200manwithluck(~manwithlu@2a09:bac1:5b80:20::49:f6) manwithluck
2025-05-10 00:38:35 +0200poscat0x04(~poscat@user/poscat) (Ping timeout: 265 seconds)
2025-05-10 00:39:05 +0200JuanDaugherty(~juan@user/JuanDaugherty) JuanDaugherty
2025-05-10 00:41:21 +0200poscat(~poscat@user/poscat) poscat
2025-05-10 00:41:45 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 244 seconds)
2025-05-10 00:42:08 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) Lord_of_Life
2025-05-10 00:52:12 +0200 <zfnmxt> I want to write the function "toFunc :: [Either () ()] -> Func a b" where "toFunc (Left () : rest) = Fst "Seq" toFunc rest" and the analogue for "Right ()". My "Func" datatype is something like "data Func a b where Fst :: Func (a, b) a; Snd :: Func (a, b) b; Id Func a a". Obviously this doesn't type, but I'm a bit stuck on what the right approach is for the issue. Instead of "[Either () ()]" I think I could have a type-level "path" and then use TH to...
2025-05-10 00:52:18 +0200 <zfnmxt> ... generate all the different versions of "toFunc" I might need, but I was hoping there's a better/more elegant way.
2025-05-10 00:53:06 +0200 <zfnmxt> Err, forgot the constructor "Seq :: Func a b -> Func b c -> Func a c".
2025-05-10 00:55:20 +0200Frostillicus(~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
2025-05-10 00:56:59 +0200 <EvanR> in toFunc :: [Either () ()] -> Func a b where do you think it's going to get an a or a b from
2025-05-10 00:59:12 +0200 <geekosaur> also I note that `Either () ()` is a funny-looking `Bool`
2025-05-10 01:00:02 +0200 <zfnmxt> I know that's the issue. And you can connect a b to the input "path" using a Path data type along with DataKinds, but then I can no longer have lists of heterogeneous paths, which I also need.
2025-05-10 01:00:20 +0200 <zfnmxt> I used "Either () ()" because "[Left (), Right (), Left(), ...]" etc looks more like a path. :)
2025-05-10 01:04:35 +0200 <EvanR> needs more GADT
2025-05-10 01:05:06 +0200 <EvanR> the path itself can contain the right types
2025-05-10 01:05:52 +0200 <zfnmxt> I tried that too! I.e., I did something like "data Path a b where PEnd :: Path a a; PLeft :: Path a b -> Path (a, c) b; ...".
2025-05-10 01:06:29 +0200 <zfnmxt> And that works for "toFunc", but it breaks my "can no longer have lists of heterogeneous paths" requirement. I.e., I also need something like "[Path a b]" where "a" and "b" vary in the list.
2025-05-10 01:07:13 +0200 <EvanR> the Path needs more types
2025-05-10 01:07:16 +0200 <geekosaur> you can't have that anyway unless you use an HList
2025-05-10 01:07:17 +0200 <EvanR> like a whole list
2025-05-10 01:08:01 +0200 <zfnmxt> Yeah, but every HList is type-leve distinct distinct from every other HList with differently typed elements at each position, right? I.e., aren't HLists just isomorphic to tuples?
2025-05-10 01:08:22 +0200 <EvanR> no, no
2025-05-10 01:08:39 +0200 <EvanR> two hlists with matching type lists are compatible
2025-05-10 01:08:41 +0200 <zfnmxt> This issue is coming up because I'm essentially matching variables in a llittle DSL to arbitrary projection functions. So I have a mapping from variables to paths. So I need to be able to have that mapping AND also convert the paths into the functions, as above.
2025-05-10 01:08:49 +0200ZLima12(~zlima12@user/meow/ZLima12) (Remote host closed the connection)
2025-05-10 01:09:10 +0200 <zfnmxt> Yeah, matching type lists. But the hlists ["foo", 5] and [1, "blah"] are typewise distinct, right?
2025-05-10 01:09:15 +0200 <EvanR> nested tuples would work if you try really hard but it's better to write your own or use HList
2025-05-10 01:09:34 +0200 <EvanR> yes those are differently typed
2025-05-10 01:09:58 +0200ZLima12(~zlima12@user/meow/ZLima12) ZLima12
2025-05-10 01:10:17 +0200 <EvanR> which is good
2025-05-10 01:10:24 +0200 <EvanR> a bogus path would not be accepted
2025-05-10 01:10:39 +0200Frostillicus(~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net)
2025-05-10 01:10:44 +0200 <zfnmxt> I'm going to have some translation monad with an variable environment like "Reader [(Var, Path a b)]". So I need one type that goes in there, for arbitrary paths.
2025-05-10 01:11:08 +0200 <zfnmxt> (i.e, "Path a b" definitely doesn't work)
2025-05-10 01:11:15 +0200 <EvanR> what do the a and b even mean there
2025-05-10 01:11:40 +0200 <zfnmxt> Yeah, nothing. I know it doesn't make sense when I write it like that, just trying to communicate the issue.
2025-05-10 01:12:21 +0200 <EvanR> if you want a "collection" of arbitrary paths, it's possible to encapsulated it with operations that work on any path, then hide the type list variable somehow
2025-05-10 01:12:22 +0200 <zfnmxt> I need an environment of arbitrary paths and from those arbitrary paths I must be able to recover arbitrary compositions of projections.
2025-05-10 01:12:38 +0200 <zfnmxt> Like some existential type thing?
2025-05-10 01:12:49 +0200 <zfnmxt> But I also have to actually recover the type in the end =/
2025-05-10 01:13:06 +0200 <EvanR> to have a collection do anything you need a uniform interface that works for any path
2025-05-10 01:13:15 +0200 <EvanR> in which case no you don't
2025-05-10 01:13:22 +0200 <EvanR> you just recover whatever the of all this is, in the end
2025-05-10 01:13:26 +0200 <EvanR> whatever point is
2025-05-10 01:13:54 +0200 <EvanR> types don't exist at runtime anyway
2025-05-10 01:13:54 +0200 <zfnmxt> The point is to parse into my little "Func a b" DSL. And "Func a b" is parameterized by the inputs and outputs.
2025-05-10 01:14:18 +0200 <EvanR> so that's what a and b are
2025-05-10 01:15:07 +0200 <EvanR> if the output is Func a b, then you don't need to know all the intermediate types in the end
2025-05-10 01:16:12 +0200 <zfnmxt> But there's no way to determine "a" and "b" without those intermediate types, as far as I can tell.
2025-05-10 01:16:41 +0200 <EvanR> note that existential is (maybe not a great) one way to get this "uniform interface among the various elements of a collection" to work, but there are other ways, like type classes is another, but the point is they're all trying to do some uniform thing on a bunch of things that support that interface
2025-05-10 01:16:49 +0200 <EvanR> oh
2025-05-10 01:16:54 +0200 <EvanR> a and b are unknown?
2025-05-10 01:17:06 +0200 <zfnmxt> a and b are determined by the projection mapping, in this case.
2025-05-10 01:17:46 +0200 <EvanR> in snd :: (a,b) -> b, they're known
2025-05-10 01:17:54 +0200 <EvanR> or chosen by you
2025-05-10 01:17:58 +0200Guest48(~Guest48@104.156.111.174) (Quit: Client closed)
2025-05-10 01:18:27 +0200 <EvanR> if you're parsing a program, I can see how the type of the program may not be known
2025-05-10 01:18:39 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
2025-05-10 01:18:40 +0200 <zfnmxt> Here's an example. Env = [("x", [Left (), Right (), Left ()])]. Now you want to convert the program "Var "x"" into a "Func a b". So you look up ""x"" in the env, and get its path, which corresponds to the "Func" program "Fst "Seq"Snd"Seq" Fst :: Func ((a,(b, c)), d) b".
2025-05-10 01:19:15 +0200 <zfnmxt> So the path completely determines the type of "Func".
2025-05-10 01:19:16 +0200 <EvanR> an environment with a bunch of typed things is a classic GADT exercise
2025-05-10 01:19:33 +0200 <EvanR> which doesn't involve a tree
2025-05-10 01:20:10 +0200 <EvanR> you can do it usually with a straight list
2025-05-10 01:20:24 +0200 <zfnmxt> I don't see what the environment should look like, though, because every variable can have a different path---how can I have a mapping of elements of different types?
2025-05-10 01:21:09 +0200 <zfnmxt> Either you make them all typewise identical, in which case you throw away the required information to convert the path to a "Func". Or you make them typewise different, in which case you can convert to a "Func" but now you can't place them all in the same mapping.
2025-05-10 01:21:10 +0200vanishingideal(~vanishing@user/vanishingideal) vanishingideal
2025-05-10 01:21:17 +0200 <zfnmxt> Do you see the issue?
2025-05-10 01:21:47 +0200 <EvanR> no because I keep thinking of context (or environment) as a mapping of names to types (or values)
2025-05-10 01:21:49 +0200 <EvanR> not paths
2025-05-10 01:22:07 +0200 <EvanR> which doesn't have to be a tree
2025-05-10 01:22:45 +0200 <EvanR> each time something is added to the context it just gets prepended
2025-05-10 01:22:51 +0200 <zfnmxt> What type would such a mapping have?
2025-05-10 01:22:53 +0200jespada_(~jespada@r167-61-136-127.dialup.adsl.anteldata.net.uy) (Quit: My Mac has gone to sleep. ZZZzzz…)
2025-05-10 01:23:20 +0200machinedgod(~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 260 seconds)
2025-05-10 01:24:10 +0200 <EvanR> a GADT parameterized by a type level list of the types in each component 2 of each pair
2025-05-10 01:24:22 +0200 <EvanR> component 1 being the name
2025-05-10 01:24:37 +0200 <EvanR> or if the names at type level, type level list of type level tuples
2025-05-10 01:24:46 +0200 <EvanR> something like that!
2025-05-10 01:25:27 +0200 <zfnmxt> Something like "data MapElem String (ts :: TypeList) where ...."?
2025-05-10 01:26:08 +0200 <EvanR> no
2025-05-10 01:28:47 +0200 <EvanR> try this narrative... defining Ctx _, well figure out the _ later. Nil is a Ctx [], the empty context. Also, if c is a Ctx ts and name is a string which goes to type t, then Cons name c is a Ctx (t:ts)
2025-05-10 01:29:16 +0200 <EvanR> that's a context but doesn't have the names at type level, and _ is (type level) list of types
2025-05-10 01:30:06 +0200todi(~todi@p57803331.dip0.t-ipconnect.de) todi
2025-05-10 01:32:05 +0200 <EvanR> Cons "z" (Cons "y" (Cons "x" Nil)) would be a Ctx [Char, Int, Bool] for example
2025-05-10 01:32:43 +0200 <zfnmxt> Just have to wrestle my head around it for a sec.
2025-05-10 01:33:50 +0200acidjnk_new(~acidjnk@p200300d6e71c4f03cc4d8db2fb428aa9.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2025-05-10 01:34:03 +0200 <EvanR> for whatever reason you might need the include the names in the list, paired with the type, which then you might be able to use a tuple, or because you're going to do type class shenanigans for computation, define a pair-like type for that
2025-05-10 01:37:09 +0200sprotte24(~sprotte24@p200300d16f4c5600f9fedd9f4ccf13a5.dip0.t-ipconnect.de) (Quit: Leaving)
2025-05-10 01:42:52 +0200nitrix(~nitrix@user/meow/nitrix) (Ping timeout: 265 seconds)
2025-05-10 01:46:33 +0200 <zfnmxt> EvanR: So this, basically: https://gist.github.com/zfnmxt/fc11f78c64651d1ab19a41f3d5a9f2a8
2025-05-10 01:47:01 +0200ttybitnik(~ttybitnik@user/wolper) (Quit: Fading out...)
2025-05-10 01:47:45 +0200 <zfnmxt> And then my monad will just be a "Reader Ctx" and hopefully everything should work out 🙃
2025-05-10 01:49:19 +0200 <EvanR> that looks cromulent
2025-05-10 01:49:50 +0200 <zfnmxt> Okay, I think I get the approach now. Thanks so much for your help!
2025-05-10 01:50:02 +0200 <EvanR> for your next exercise define a thing which says ("x", t) is an element of some ctx ts
2025-05-10 01:50:07 +0200 <EvanR> that works
2025-05-10 01:50:16 +0200 <zfnmxt> Okdoke.
2025-05-10 01:50:18 +0200 <EvanR> lol
2025-05-10 01:50:41 +0200 <EvanR> (not to mention the computation which decides if this is true or not)
2025-05-10 01:51:07 +0200 <zfnmxt> As an aside, are there any good papers to read on typelits/proxy/etc?
2025-05-10 01:51:27 +0200 <zfnmxt> (Specifically in regards to Haskell, not dependent typing in general.)
2025-05-10 01:51:48 +0200 <EvanR> probably oleg's website
2025-05-10 01:52:06 +0200 <zfnmxt> https://okmij.org/ftp/ this?
2025-05-10 01:52:40 +0200 <EvanR> yeah
2025-05-10 01:59:49 +0200 <zfnmxt> Alright, implemented "ctxElem :: String -> Ctx ts -> Bool". I guess a "find" will have to be a type family if I want the actual type, right?
2025-05-10 02:05:22 +0200vanishingideal(~vanishing@user/vanishingideal) (Ping timeout: 276 seconds)
2025-05-10 02:06:23 +0200 <EvanR> or a type class
2025-05-10 02:07:24 +0200 <EvanR> or yet another GADT to express the element of relation
2025-05-10 02:08:11 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) peterbecich
2025-05-10 02:09:45 +0200 <zfnmxt> Right right. okay, will do. Thanks again!
2025-05-10 02:18:57 +0200ljdarj(~Thunderbi@user/ljdarj) (Ping timeout: 248 seconds)
2025-05-10 02:19:27 +0200nitrix(~nitrix@user/meow/nitrix) nitrix
2025-05-10 02:24:05 +0200tremon(~tremon@83.80.159.219) (Quit: getting boxed in)
2025-05-10 02:24:59 +0200euleritian(~euleritia@77.23.248.100) (Ping timeout: 260 seconds)
2025-05-10 02:25:50 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de)
2025-05-10 02:28:49 +0200sajenim(~sajenim@user/sajenim) sajenim
2025-05-10 02:38:44 +0200Frostillicus(~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
2025-05-10 02:39:49 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2025-05-10 02:40:44 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
2025-05-10 02:50:51 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 02:53:53 +0200jmcantrell(~weechat@user/jmcantrell) jmcantrell
2025-05-10 02:56:04 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2025-05-10 03:06:37 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 03:08:20 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2025-05-10 03:08:33 +0200Frostillicus(~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net)
2025-05-10 03:09:03 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de)
2025-05-10 03:10:59 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2025-05-10 03:11:12 +0200euleritian(~euleritia@dynamic-176-000-193-082.176.0.pool.telefonica.de)
2025-05-10 03:11:33 +0200euleritian(~euleritia@dynamic-176-000-193-082.176.0.pool.telefonica.de) (Read error: Connection reset by peer)
2025-05-10 03:11:45 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-05-10 03:11:49 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de)
2025-05-10 03:15:39 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2025-05-10 03:16:02 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de)
2025-05-10 03:22:24 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 03:26:39 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2025-05-10 03:27:01 +0200euleritian(~euleritia@ip4d17f864.dynamic.kabel-deutschland.de)
2025-05-10 03:34:59 +0200peterbecich(~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2025-05-10 03:39:28 +0200beka_(~beka@2600:382:7f22:d94d:377b:c2ed:ee02:e087)
2025-05-10 03:42:18 +0200beka(~beka@2607:f598:bd4a:330:66d1:97e6:9764:f51f) (Ping timeout: 276 seconds)
2025-05-10 03:53:31 +0200j1n37-(~j1n37@user/j1n37) j1n37
2025-05-10 03:54:51 +0200j1n37(~j1n37@user/j1n37) (Ping timeout: 272 seconds)
2025-05-10 03:54:52 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2025-05-10 03:56:17 +0200img(~img@user/img) img
2025-05-10 04:02:46 +0200harveypwca(~harveypwc@2601:246:d080:f6e0:27d6:8cc7:eca9:c46c) HarveyPwca
2025-05-10 04:09:52 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2025-05-10 04:11:17 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2025-05-10 04:13:44 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) bitdex
2025-05-10 04:20:33 +0200td_(~td@i53870906.versanet.de) (Ping timeout: 248 seconds)
2025-05-10 04:21:59 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2025-05-10 04:22:18 +0200td_(~td@i53870903.versanet.de) td_
2025-05-10 04:22:28 +0200ChaiTRex(~ChaiTRex@user/chaitrex) ChaiTRex
2025-05-10 04:26:25 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 276 seconds)
2025-05-10 04:38:12 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 04:43:16 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds)
2025-05-10 04:46:37 +0200ft(~ft@p4fc2a6e6.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2025-05-10 04:47:23 +0200sabathan2(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr) (Read error: Connection reset by peer)
2025-05-10 04:48:36 +0200ft(~ft@p3e9bc106.dip0.t-ipconnect.de) ft
2025-05-10 04:51:43 +0200sabathan2(~sabathan@amarseille-159-1-12-107.w86-203.abo.wanadoo.fr)
2025-05-10 04:54:31 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) merijn
2025-05-10 04:54:34 +0200Frostillicus(~Frostilli@pool-71-174-119-56.bstnma.fios.verizon.net) (Ping timeout: 245 seconds)
2025-05-10 05:09:07 +0200nitrix(~nitrix@user/meow/nitrix) (Read error: Connection reset by peer)
2025-05-10 05:48:43 +0200xff0x(~xff0x@2405:6580:b080:900:6a78:8b93:a1e2:8e69) (Ping timeout: 252 seconds)
2025-05-10 06:01:21 +0200merijn(~merijn@host-vr.cgnat-g.v4.dfn.nl) (Ping timeout: 248 seconds)
2025-05-10 06:06:30 +0200nitrix(~nitrix@user/meow/nitrix) nitrix