2024/04/06

2024-04-06 00:00:04 +0200 <sm> alright, I can't and shouldn't stop you, but let's not keep saying there's a "war"
2024-04-06 00:00:26 +0200 <sclv> they ended because everyone agreed to be normal about things
2024-04-06 00:01:38 +0200 <Inst> i mean that re cabal-stack, i learned haskell with cabal partisans and really ignored stack most of the time
2024-04-06 00:02:04 +0200 <geekosaur> it's around 50-50
2024-04-06 00:02:09 +0200 <geekosaur> and really not worth arguing about
2024-04-06 00:03:14 +0200 <Inst> i'm not going to argue about it, but fragmented build system / tooling is and was a mess, even though it was sort of a cabal victory, you also have the folks who moved off to nix
2024-04-06 00:03:49 +0200 <sm> victory is a matter of opinion. I'd say evolution is ongoing.
2024-04-06 00:03:53 +0200 <shapr> nix uses cabal to build
2024-04-06 00:04:03 +0200 <shapr> but stackage snapshots for library versions
2024-04-06 00:04:14 +0200 <Inst> just incredible fragmentation in the ecosystem, sometimes more trouble than it's worth
2024-04-06 00:04:25 +0200 <yushyin> as long as projects have a cabal file in the repo and reasonable version bounds, I personally don't care what build tool is used
2024-04-06 00:04:57 +0200 <shapr> inst: is there something specific you'd want improved?
2024-04-06 00:05:33 +0200 <Inst> the one thing I'd love, tbh, would be a network package in base
2024-04-06 00:05:35 +0200 <shapr> my fun thing is using GHC runtime coverage to improve property based tests
2024-04-06 00:05:44 +0200 <EvanR> Inst, you're so controversial
2024-04-06 00:05:44 +0200 <shapr> Inst: propose it? push it?
2024-04-06 00:05:50 +0200 <shapr> build a posse? :-D
2024-04-06 00:05:59 +0200 <EvanR> I'm calling the ny post on you
2024-04-06 00:06:01 +0200 <int-e> depend on `network`?
2024-04-06 00:06:19 +0200 <int-e> all of these are largely non-issues painted in the most negative light possible
2024-04-06 00:06:45 +0200 <int-e> to what end I do not know
2024-04-06 00:06:52 +0200 <shapr> I wish CloudHaskell had let me do Erlang things, but I never had the motivation to go fix it myself
2024-04-06 00:08:04 +0200 <EvanR> fear uncertainty and doubt in haskell, furthering the interests of agents of chaos
2024-04-06 00:08:26 +0200 <Rembane> shapr: The whole concept was really cool though!
2024-04-06 00:08:41 +0200vhsconnect(~vhs@81-233-2-46-no600.tbcn.telia.com) (Quit: Leaving)
2024-04-06 00:08:53 +0200 <sm> as a programmer, I object to having to learn and manage two separate "import systems" - one getting the right packages in scope, two getting the right modules in scope.
2024-04-06 00:08:54 +0200 <shapr> yeah CloudHaskell was really cool. I especially liked the part about shipping types across the wire for use on the other end
2024-04-06 00:09:29 +0200 <Rembane> shapr: That's the catch, right?
2024-04-06 00:09:54 +0200 <shapr> it's certainly required
2024-04-06 00:11:06 +0200 <Inst> because, end of the day, which one am i supposed to use? there's like 20 different network packages just for downloading a file, and more than 3 in stackage
2024-04-06 00:12:03 +0200 <shapr> I do wish we had library curation, some sort of recommended set
2024-04-06 00:12:29 +0200 <shapr> for example, I never got fgl to work, but algebraic graphs was easy for me, so that would be my recommendation
2024-04-06 00:12:46 +0200 <shapr> Actually, I'd want curation with usage examples
2024-04-06 00:12:48 +0200 <sm> s/two import systems/*three* import systems - the right compiler, the right packages, the right modules/
2024-04-06 00:12:56 +0200 <Inst> iirc gabriella gonzalez had her site on github for that
2024-04-06 00:13:16 +0200 <shapr> yeah, that's true. I'm using nix to run our tests with several different versions of GHC (credit to exarkun for writing that, thanks! )
2024-04-06 00:13:54 +0200 <shapr> Which gabriella site?
2024-04-06 00:14:56 +0200 <shapr> I recently found out about juhp's hkgr from reading https://github.com/tonyday567/checklist
2024-04-06 00:15:03 +0200 <Inst> this was good... 2 years ago
2024-04-06 00:15:04 +0200 <Inst> https://github.com/Gabriella439/post-rfc/blob/main/sotu.md
2024-04-06 00:16:12 +0200 <shapr> Oh yeah, that is a good resource
2024-04-06 00:18:51 +0200 <Inst> the issue i bring up with networking, though, is, if i simply want to get a file from the interwebs, there's like 20 different libraries for it, all with different interfaces, build on different models, and i don't know wwhich ones are performant, and which ones are not
2024-04-06 00:19:13 +0200 <sm> which are the 3 in stackage ?
2024-04-06 00:19:39 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2024-04-06 00:20:01 +0200 <yushyin> you can ask here for recommendations, i guess
2024-04-06 00:20:02 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-04-06 00:20:45 +0200 <Inst> i mean i have my own choice, it's probably suboptimal, but it's irritating
2024-04-06 00:20:58 +0200 <sm> stackage LTS that is at least a first layer of curation. I see http-conduit, http-download, ... ?
2024-04-06 00:21:43 +0200 <sm> I bet there's more than 3 in there actually
2024-04-06 00:22:59 +0200 <Inst> https://hackage.haskell.org/package/HTTP | https://hackage.haskell.org/package/http2 | https://hackage.haskell.org/package/http-client-tls | https://hackage.haskell.org/package/http-conduit | https://www.stackage.org/haddock/lts-22.15/http-download-0.2.1.0/Network-HTTP-Download.html | https://www.stackage.org/haddock/lts-22.15/http-io-streams-0.1.7.0/Network-Http-Client.html
2024-04-06 00:23:02 +0200 <Inst> not going to keep going
2024-04-06 00:24:32 +0200 <sm> Yes, a curation task as always. http-conduit was considered a safe bet for a while, handling tls etc.
2024-04-06 00:24:48 +0200 <Inst> yeah, i went there
2024-04-06 00:25:07 +0200 <sm> now we have 4+ streaming libs which probably all do it
2024-04-06 00:25:07 +0200 <Inst> it also doesn't look that well for hackage, i.e, there's 3-4k packages being maintained
2024-04-06 00:25:27 +0200 <sm> Hackage is the everything repo, like github
2024-04-06 00:25:35 +0200 <Inst> a huge number of them are clones of each other with variations that do some basic capability
2024-04-06 00:25:49 +0200 <shapr> that's why I want a reviews+examples site
2024-04-06 00:26:52 +0200 <Inst> hmmm
2024-04-06 00:26:54 +0200 <Inst> k
2024-04-06 00:26:58 +0200 <sm> let's add comments to flora
2024-04-06 00:27:29 +0200 <shapr> I like that idea, but we gotta ask Hecate
2024-04-06 00:27:36 +0200 <sm> bah why
2024-04-06 00:27:54 +0200 <shapr> I mean, we could just put up a PR
2024-04-06 00:27:56 +0200 <sm> just quietly quietly add them
2024-04-06 00:27:58 +0200 <shapr> haha
2024-04-06 00:28:01 +0200 <shapr> I like it!
2024-04-06 00:28:10 +0200 <Inst> also that'd have the problem that people would get upset at negative reviews
2024-04-06 00:28:23 +0200shaprshrugs
2024-04-06 00:28:27 +0200 <Hecate> shapr: oi
2024-04-06 00:28:32 +0200 <Hecate> sm: oi oi oi
2024-04-06 00:28:33 +0200 <sm> and spam. But, it's needed
2024-04-06 00:28:36 +0200 <shapr> if the negative review says "this doesn't work, here's some code to show you what I mean"
2024-04-06 00:28:39 +0200 <shapr> then I'm okay with that
2024-04-06 00:28:40 +0200 <sm> every app store does it
2024-04-06 00:28:45 +0200 <shapr> salut Hecate, ca va?
2024-04-06 00:29:15 +0200 <Hecate> God kväll
2024-04-06 00:29:25 +0200 <shapr> Inst: I agree, I often don't know which library to use when I'm doing something unfamiliar
2024-04-06 00:29:28 +0200 <Hecate> shapr: ça va pas trop mal, merci. Et toi ?
2024-04-06 00:29:40 +0200 <shapr> Hecate: jättebra ;-)
2024-04-06 00:29:44 +0200 <shapr> pas mal!
2024-04-06 00:29:52 +0200 <Inst> btw who is handling hackage?
2024-04-06 00:30:01 +0200 <shapr> I got to speak my pitiful high school French to the dentist assistant yesterday, that was fun
2024-04-06 00:30:10 +0200 <Inst> it has a bias for libraries that start with numbers
2024-04-06 00:30:15 +0200 <Inst> i'm glad no one has tried to game the system yet
2024-04-06 00:30:20 +0200 <shapr> there have been some games
2024-04-06 00:30:25 +0200 <shapr> name squatting and the like
2024-04-06 00:30:34 +0200 <shapr> the gamers got a talking to
2024-04-06 00:30:46 +0200 <Inst> https://hackage.haskell.org/packages/browse
2024-04-06 00:30:49 +0200 <shapr> Inst: you could be one of those who handles hackage!
2024-04-06 00:30:50 +0200 <Hecate> shapr: in MA? damn, interesting
2024-04-06 00:31:04 +0200 <shapr> Hecate: lots of imports / expats in the Boston area
2024-04-06 00:31:10 +0200 <Hecate> shapr: haha, I see
2024-04-06 00:31:20 +0200 <shapr> Sometimes I get to hear languages I don't recognize! That makes me very happy.
2024-04-06 00:31:30 +0200 <Inst> i'd love to, but would need to "get gud", as the kids say
2024-04-06 00:31:46 +0200 <Inst> i hate haddock btw and wish i were competent enough to rework it
2024-04-06 00:31:48 +0200 <shapr> nah, it's just boring work
2024-04-06 00:32:02 +0200 <sm> Inst, you can help Hecate do that
2024-04-06 00:32:07 +0200 <shapr> being a hackage admin is just detail stuff
2024-04-06 00:32:17 +0200 <Inst> uhhh
2024-04-06 00:32:36 +0200 <Inst> bleh, i should get my github working again
2024-04-06 00:32:49 +0200 <Inst> hackage currently defaults to alphabetical order on browse
2024-04-06 00:32:50 +0200 <shapr> You have good ideas, just gotta pick one and push it
2024-04-06 00:33:11 +0200 <Inst> comparable package repos default to sorting on latest upload
2024-04-06 00:33:21 +0200 <Inst> thank you for the encouragement
2024-04-06 00:33:59 +0200 <shapr> Inst: write a blog post about the one that interests you most?
2024-04-06 00:34:10 +0200 <shapr> I got a PR into cabal not too long ago (with exarkun )
2024-04-06 00:34:17 +0200 <shapr> I bet you can get a PR into hackage for default sorting?
2024-04-06 00:34:37 +0200 <Inst> will write a note to self
2024-04-06 00:35:07 +0200hiredman(~hiredman@frontier1.downey.family)
2024-04-06 00:35:32 +0200 <Inst> that's just a really minor quality of life issue
2024-04-06 00:36:23 +0200 <shapr> you can fix it!
2024-04-06 00:37:56 +0200 <sm> I will upvote that PR
2024-04-06 00:38:55 +0200 <Inst> https://github.com/haskell/hackage-server
2024-04-06 00:39:13 +0200 <sm> in the larger scheme of things, there's a choice of do you want to invest time in hackage or flora
2024-04-06 00:39:37 +0200 <sm> and/or what is a good future path for these
2024-04-06 00:41:13 +0200 <shapr> flora is REALLY AWESOME
2024-04-06 00:41:43 +0200sudden(~cat@user/sudden) (Ping timeout: 260 seconds)
2024-04-06 00:42:29 +0200 <Inst> whoa, this hand-crafted?
2024-04-06 00:42:31 +0200 <Inst> https://github.com/haskell/hackage-server/blob/master/hackage-server.cabal
2024-04-06 00:42:36 +0200 <Inst> this is hand-crafted?
2024-04-06 00:44:07 +0200 <sm> Hecate I wouldn't mind seeing the modules by default on a package page, as on Hackage. I guess that would require a big haddock integration project.
2024-04-06 00:44:59 +0200 <shapr> argh, why does haskell-mode in emacs want me to use haskell-mode-jump-to-def-or-tag when I want to use lsp-find-definition ?!
2024-04-06 00:45:26 +0200 <shapr> I thought I had a haskell-mode-hook that fixed this *frustration*
2024-04-06 00:45:43 +0200amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com) (Read error: Connection reset by peer)
2024-04-06 00:46:05 +0200amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com)
2024-04-06 00:46:30 +0200 <Inst> oh, looks like happstack
2024-04-06 00:46:39 +0200shaprhas PTSD flashbacks
2024-04-06 00:46:45 +0200 <shapr> stop saying that name!
2024-04-06 00:50:26 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2024-04-06 00:54:27 +0200sudden(~cat@user/sudden)
2024-04-06 00:55:39 +0200yin(~yin@user/zero)
2024-04-06 00:56:03 +0200mei(~mei@user/mei) (Remote host closed the connection)
2024-04-06 00:58:28 +0200mei(~mei@user/mei)
2024-04-06 01:00:12 +0200acidjnk_new(~acidjnk@p200300d6e714dc123800cc33cf682def.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2024-04-06 01:01:14 +0200yin(~yin@user/zero) (Read error: Connection reset by peer)
2024-04-06 01:06:55 +0200igemnace(~ian@user/igemnace)
2024-04-06 01:07:17 +0200raym(~ray@user/raym) (Ping timeout: 252 seconds)
2024-04-06 01:08:49 +0200shapr(~user@c-24-218-186-89.hsd1.ma.comcast.net) (Quit: rebooting emacs)
2024-04-06 01:12:40 +0200dbaoty(~dbaoty@tptn-04-0838.dsl.iowatelecom.net)
2024-04-06 01:15:10 +0200raym(~ray@user/raym)
2024-04-06 01:20:47 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 256 seconds)
2024-04-06 01:30:50 +0200igemnace(~ian@user/igemnace) (Quit: WeeChat 4.2.1)
2024-04-06 01:31:14 +0200poxel(~lennart@user/poxel) (Quit: WeeChat 4.2.1)
2024-04-06 01:31:28 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
2024-04-06 01:34:04 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-06 01:39:03 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 268 seconds)
2024-04-06 01:39:51 +0200 <Inst> shapr, sm, regarding flora
2024-04-06 01:40:03 +0200 <Inst> github has a policy against viral code, right?
2024-04-06 01:40:59 +0200 <Inst> they don't enforce it
2024-04-06 01:54:19 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2024-04-06 01:57:17 +0200euleritian(~euleritia@dynamic-176-006-182-016.176.6.pool.telefonica.de) (Ping timeout: 240 seconds)
2024-04-06 01:59:45 +0200 <Inst> ugh, this really sucks
2024-04-06 02:00:00 +0200 <Inst> it'd be really cool to have haddock be able to automatically generate examples of code, but guess what?
2024-04-06 02:00:14 +0200 <Inst> massive security hole :(
2024-04-06 02:08:33 +0200Inst(~Inst@120.244.192.170) (Changing host)
2024-04-06 02:08:33 +0200Inst(~Inst@user/Inst)
2024-04-06 02:13:14 +0200ephemient(uid407513@id-407513.lymington.irccloud.com) (Changing host)
2024-04-06 02:13:14 +0200ephemient(uid407513@user/ephemient)
2024-04-06 02:16:56 +0200dbaoty(~dbaoty@tptn-04-0838.dsl.iowatelecom.net) (Quit: Leaving.)
2024-04-06 02:29:46 +0200oo_miguel(~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Quit: oo_miguel)
2024-04-06 02:30:37 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
2024-04-06 02:34:23 +0200fbytez_(~uid@user/fbytez) (Quit: byte byte)
2024-04-06 02:34:50 +0200fbytez(~uid@user/fbytez)
2024-04-06 02:37:09 +0200sroso(~sroso@user/SrOso)
2024-04-06 02:38:51 +0200polyphem(~rod@p200300ef271ab1008634ba5d8231450c.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2024-04-06 02:39:08 +0200rosco(~rosco@i222-150-140-233.s41.a013.ap.plala.or.jp)
2024-04-06 02:40:44 +0200polyphem(~rod@p200300ef273784005840865d4515fb32.dip0.t-ipconnect.de)
2024-04-06 02:41:05 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2024-04-06 02:44:05 +0200L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 252 seconds)
2024-04-06 02:45:39 +0200ftweedal(~ftweedal@211.30.152.176) (Ping timeout: 268 seconds)
2024-04-06 02:57:15 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 03:00:53 +0200Guest54(~Guest54@p10645008-ipngn27601marunouchi.tokyo.ocn.ne.jp)
2024-04-06 03:01:05 +0200Guest54(~Guest54@p10645008-ipngn27601marunouchi.tokyo.ocn.ne.jp) (Client Quit)
2024-04-06 03:04:07 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2024-04-06 03:10:38 +0200sadie_(~sadie@c-76-155-235-153.hsd1.co.comcast.net) (Remote host closed the connection)
2024-04-06 03:17:34 +0200migas97(~migas@static.140.65.63.178.clients.your-server.de) (Quit: The Lounge - https://thelounge.github.io)
2024-04-06 03:20:58 +0200ftweedal(~ftweedal@211.30.152.176) (Ping timeout: 264 seconds)
2024-04-06 03:22:30 +0200rosco(~rosco@i222-150-140-233.s41.a013.ap.plala.or.jp) (Quit: Lost terminal)
2024-04-06 03:26:26 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
2024-04-06 03:28:03 +0200dbaoty(~dbaoty@tptn-04-0838.dsl.iowatelecom.net)
2024-04-06 03:33:17 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 240 seconds)
2024-04-06 03:33:36 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-06 03:35:42 +0200JSharp(sid4580@id-4580.lymington.irccloud.com) (Changing host)
2024-04-06 03:35:42 +0200JSharp(sid4580@user/JSharp)
2024-04-06 03:39:53 +0200gabiruh(~gabiruh@vps19177.publiccloud.com.br) (Quit: ZNC 1.7.5 - https://znc.in)
2024-04-06 03:57:48 +0200otto_s(~user@p5de2f5c3.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2024-04-06 03:58:50 +0200dbaoty(~dbaoty@tptn-04-0838.dsl.iowatelecom.net) (Quit: Leaving.)
2024-04-06 03:59:26 +0200otto_s(~user@p4ff27a75.dip0.t-ipconnect.de)
2024-04-06 04:03:17 +0200gabiruh(~gabiruh@191.252.222.55)
2024-04-06 04:11:29 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-04-06 04:17:22 +0200dsmith(~dsmith@024-029-202-168.inf.spectrum.com) (Changing host)
2024-04-06 04:17:22 +0200dsmith(~dsmith@user/dsmith)
2024-04-06 04:22:28 +0200gaff(~gaff@49.207.205.255)
2024-04-06 04:23:40 +0200 <gaff> I have this type defined: `newtype Logger a b = Logger { execLogger :: (b, [a]) } `. Is it possible to create Alternative and MonadPlus instances for this type?
2024-04-06 04:25:05 +0200 <gaff> Sorry, it should be `newtype Logger a b = Logger ( execLogger :: (b, [a]) )`.
2024-04-06 04:27:22 +0200 <geekosaur> that's just a simplified Writer, isn't it? should allow Applicative, Alternative, Monad, and MonadPlus
2024-04-06 04:29:30 +0200 <c_wraith> What kind of MonadPlus instance does that give you? what's mempty?
2024-04-06 04:29:48 +0200 <c_wraith> err, mzero
2024-04-06 04:30:02 +0200 <geekosaur> mm, right, need some Monoid constraints
2024-04-06 04:30:21 +0200 <c_wraith> I don't think that's enough. you also need a b value
2024-04-06 04:32:53 +0200 <c_wraith> you're only getting one of those with a bottom. And I suppose a bottom satisfies the contract, such as it is...
2024-04-06 04:32:59 +0200 <c_wraith> But it's not a useful instance
2024-04-06 04:35:01 +0200 <c_wraith> Alternative actually has stricter laws, saying the instance should be a monoid. that implies "everything is a bottom" isn't good enough.
2024-04-06 04:36:15 +0200 <EvanR> is everything is a bottom not a monoid instance
2024-04-06 04:39:05 +0200 <c_wraith> not unless it's an empty data type
2024-04-06 04:39:18 +0200 <c_wraith> otherwise the identity laws fail
2024-04-06 04:42:05 +0200 <EvanR> bottom * bottom = bottom
2024-04-06 04:42:18 +0200 <c_wraith> but that's only the test if the data type is empty
2024-04-06 04:42:24 +0200 <EvanR> oh, yeah, then not everything is bottom
2024-04-06 04:47:27 +0200 <gaff> c_wraith: I don't think there is a way to define mzero for this MonadPlus instance.
2024-04-06 04:47:45 +0200 <gaff> how would you define it? beats me.
2024-04-06 04:47:53 +0200 <c_wraith> gaff: I don't see a useful way.
2024-04-06 04:48:47 +0200 <gaff> You coudl do this, but that would be largely futile: `mzero = Logger (undefined, [])`
2024-04-06 04:49:14 +0200 <c_wraith> and it wouldn't be law-abiding on the Alternative side, as I was talking about above.
2024-04-06 04:50:00 +0200 <c_wraith> Alternative tells us it's creating a monoid. That implementation can't obey the monoid requirement that it be an identity
2024-04-06 04:52:34 +0200 <gaff> c_wraith: you could easily define a Monoid instance for this type and have `instance Monoid b => Monoid (Logger a b) where mempty = Logger (mempty, []) ...` and in the MonadPlus instance have mzero = mempty, but that doesn't compile either.
2024-04-06 04:53:27 +0200 <c_wraith> You can't do that, because Alternative and MonadPlus apply to the higher-kinded type
2024-04-06 04:53:42 +0200 <c_wraith> That is, they apply to `Logger a'
2024-04-06 04:53:49 +0200 <c_wraith> There's nowhere in that to add a constraint to `b`
2024-04-06 04:53:56 +0200 <geekosaur> oh, that was the part I was missing
2024-04-06 04:54:04 +0200 <gaff> c_wraith: I see. thank you.
2024-04-06 04:55:00 +0200 <gaff> c_wraith: so in general, as this type here shows, it ain't possible to define MonadPlus and Alternative instances for all types?
2024-04-06 04:55:14 +0200 <c_wraith> it absolutely is not, even if they have the right kind :)
2024-04-06 04:56:01 +0200 <gaff> c_wraith: I see. Unfortunately, this aspect is not mentioned in any of the MoandPlus and Alternative discussions I have read so far.
2024-04-06 04:56:13 +0200 <EvanR> the monoidness kind of implies that
2024-04-06 04:56:26 +0200 <EvanR> since there are laws there
2024-04-06 04:56:37 +0200 <c_wraith> It's kind of implicit in the fact that classes usually come with laws the implementations must obey
2024-04-06 04:57:00 +0200 <c_wraith> That wouldn't be much of a limitation if there was always an implementation that obeys the laws
2024-04-06 04:57:05 +0200td_(~td@i53870915.versanet.de) (Ping timeout: 272 seconds)
2024-04-06 04:57:45 +0200 <gaff> c_wraith: I see. So in this case MonadPlus and Alternative, those laws would tell us what can be made instances of these classes? Intuitively, what would they be?
2024-04-06 04:58:18 +0200 <EvanR> this is all feeding into haskell's reputation for bondage and discipline. I can't write whatever the hell I want in an instance?
2024-04-06 04:58:29 +0200td_(~td@i53870929.versanet.de)
2024-04-06 04:59:10 +0200 <c_wraith> MonadPlus historically hasn't had the greatest story with being consistent there. But Alternative specifically says that it describes a monoid. Then it sort of leaves it up to you to know what that means.
2024-04-06 04:59:49 +0200 <c_wraith> I think you're expected to have run into these things in other classes first :)
2024-04-06 05:00:51 +0200 <gaff> c_wraith: In this case of Logger type, even the operation (<|>) doesn't make any sense. I mean intuitively what in the world would that be, you know?
2024-04-06 05:01:27 +0200 <c_wraith> gaff: In the specific case of Logger... yeah. What *does* that mean?
2024-04-06 05:01:46 +0200 <c_wraith> FWIW, that's why laws are often in terms of the interactions between multiple operations
2024-04-06 05:02:22 +0200 <gaff> c_wraith: it doesn't mean anything sensible unless you can cook up something on your own, which would invariably make no sense.
2024-04-06 05:03:38 +0200 <c_wraith> I think this is also an area why Haskell's type system is doing a lot of underrated work. It's rejecting a lot of "just make it work" implementations before anyone else has to run into them.
2024-04-06 05:03:49 +0200 <c_wraith> an area *where*
2024-04-06 05:03:57 +0200 <gaff> yes
2024-04-06 05:06:24 +0200 <gaff> c_wraith: you mentioned earlier that Alternative says it describes a monoid. The Alternative class definition starts off this way: `class Applicative f => Alternative f where ... ` I didn't see any mention of Monoid anywhere. Are you implying that the Monoid stuff is implicit in the Alternative laws?
2024-04-06 05:07:01 +0200 <c_wraith> Oh, I'm looking at the docs: https://hackage.haskell.org/package/base-4.19.1.0/docs/GHC-Base.html#t:Alternative "A monoid on applicative functors."
2024-04-06 05:08:23 +0200 <gaff> c_wraith: Ah, I see that now. Thank you!
2024-04-06 05:09:14 +0200 <gaff> You could easily define Alternative for Either I think.
2024-04-06 05:10:47 +0200 <c_wraith> It still gives you trouble with what to do with `Right 5' <|> `Right 7`.
2024-04-06 05:11:07 +0200 <c_wraith> There *are* things you can do, but none of them are obviously right
2024-04-06 05:11:15 +0200 <EvanR> > Right 5 <|> Right 7
2024-04-06 05:11:17 +0200 <lambdabot> error:
2024-04-06 05:11:17 +0200 <lambdabot> • Ambiguous type variable ‘a0’ arising from a use of ‘show_M458786900715...
2024-04-06 05:11:17 +0200 <lambdabot> prevents the constraint ‘(Show a0)’ from being solved.
2024-04-06 05:11:30 +0200 <EvanR> cmon
2024-04-06 05:11:33 +0200 <c_wraith> You can use a First or a Last style implementation
2024-04-06 05:11:52 +0200 <c_wraith> Both are valid, but neither one is more obviously correct than the other
2024-04-06 05:12:24 +0200 <gaff> c_wraith: I see. Well, in case of Maybe, you do have Just 5 <|> Just 10 = Just 5 I think (not sure).
2024-04-06 05:12:41 +0200 <c_wraith> Looks like Either does have a First-like instance
2024-04-06 05:12:48 +0200 <c_wraith> So I'm sure Maybe does too
2024-04-06 05:13:56 +0200 <gaff> c_wraith: Maybe is listed as having an instance of Alternative, but I don't see Either listed there.
2024-04-06 05:14:09 +0200 <c_wraith> > Right 5 <|> Right 7 :: Either String Int
2024-04-06 05:14:10 +0200 <lambdabot> Right 5
2024-04-06 05:14:17 +0200 <c_wraith> Well, *something* defined one! :)
2024-04-06 05:14:30 +0200 <gaff> c_wraith: :)
2024-04-06 05:15:47 +0200 <gaff> it isnt there in ghc 8.10.4
2024-04-06 05:15:54 +0200 <c_wraith> Huh. Yeah, that's not in an obvious place. Not sure where lambdabot's getting it
2024-04-06 05:16:42 +0200 <c_wraith> this is the downside to lambdabot having a lot of libraries imported by default
2024-04-06 05:17:56 +0200 <gaff> c_wraith: One of the ideas people talk about in favour of using Alternative or MonadPlus is that it makes the code more general and not specific to a monad. But they don't mention that you can't define instances for these for all monads!
2024-04-06 05:20:17 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 252 seconds)
2024-04-06 05:23:22 +0200 <EvanR> great episode in the story of not using stuff just because it's there
2024-04-06 05:23:38 +0200 <EvanR> at least wait until there's a good reason
2024-04-06 05:23:43 +0200 <c_wraith> In fact, you'll find APIs tend to move away from that sort of thing.
2024-04-06 05:24:31 +0200 <c_wraith> If you look at Data.Map.lookup in containers 0.1.0.0... man, that was silly. Even when Monad contained fail. Containers stopped working that was long before fail was moved out of the class.
2024-04-06 05:24:31 +0200aforemny_(~aforemny@2001:9e8:6ccc:cd00:83d5:fd83:d24c:2c05)
2024-04-06 05:24:38 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 260 seconds)
2024-04-06 05:24:56 +0200 <c_wraith> stopped working that *way* long before..
2024-04-06 05:25:55 +0200aforemny(~aforemny@i59F516F4.versanet.de) (Ping timeout: 260 seconds)
2024-04-06 05:26:05 +0200 <gaff> EvanR: yeah, wait until there is a good reason. Quite often, there isn't any.
2024-04-06 05:28:08 +0200 <c_wraith> A lot of the time, polymorphism doesn't add anything. I'm a big fan of concrete types when there is only one correct way they can work.
2024-04-06 05:28:55 +0200 <gaff> EvanR: what you have stated is a tried and tested piece of wisdom, but very often people, including myself, tend to forget it and overdo things.
2024-04-06 05:29:15 +0200 <c_wraith> On the other hand, I'm a big fan of polymorphism when it lets the caller have more power or the implementation be simpler.
2024-04-06 05:29:47 +0200 <c_wraith> But if the polymorphism works out to something like "this is just an obscure way of writing Either", who is it helping?
2024-04-06 05:32:22 +0200 <gaff> c_wraith: one idea behind polymorphism is that it removes code duplication. But you have to first see that such a duplication is indeed a reality. Very often, people tend to jump right into polymorphism before seeing such duplication.
2024-04-06 06:01:49 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 06:01:56 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-04-06 06:27:32 +0200ec_(~ec@gateway/tor-sasl/ec)
2024-04-06 06:35:22 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net) (Ping timeout: 264 seconds)
2024-04-06 06:37:10 +0200ddellacosta(~ddellacos@ool-44c73d29.dyn.optonline.net)
2024-04-06 06:40:16 +0200gaff(~gaff@49.207.205.255)
2024-04-06 06:54:33 +0200gaff(~gaff@49.207.205.255) (Ping timeout: 256 seconds)
2024-04-06 06:55:00 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-04-06 07:01:38 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:14:09 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:14:27 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:14:56 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:15:13 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:15:44 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:16:19 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:16:48 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:17:06 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:17:36 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:17:54 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:18:23 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:18:41 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:19:11 +0200gaff(~gaff@49.207.205.255) (Remote host closed the connection)
2024-04-06 07:19:47 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:24:09 +0200gaff(~gaff@49.207.205.255) (Ping timeout: 256 seconds)
2024-04-06 07:44:16 +0200notzmv(~daniel@user/notzmv) (Ping timeout: 260 seconds)
2024-04-06 07:54:23 +0200gaff(~gaff@49.207.205.255)
2024-04-06 07:58:09 +0200jle`(~jle`@2603-8001-3b02-84d4-fb26-0043-58fe-e57b.res6.spectrum.com) (Quit: WeeChat 4.2.1)
2024-04-06 07:58:41 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 252 seconds)
2024-04-06 07:59:04 +0200Square2(~Square@user/square)
2024-04-06 08:00:39 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2024-04-06 08:03:49 +0200gaff(~gaff@49.207.205.255) (Ping timeout: 256 seconds)
2024-04-06 08:09:03 +0200cawfee(~root@2406:3003:2077:1c50::babe)
2024-04-06 08:20:38 +0200causal(~eric@50.35.88.207)
2024-04-06 08:21:40 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 08:22:31 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 256 seconds)
2024-04-06 08:24:01 +0200sadie_(~sadie@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-06 08:25:26 +0200philopsos(~caecilius@user/philopsos) (Ping timeout: 268 seconds)
2024-04-06 08:26:04 +0200qqq(~qqq@92.43.167.61)
2024-04-06 08:31:21 +0200gmg(~user@user/gehmehgeh)
2024-04-06 08:32:31 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2024-04-06 08:33:57 +0200gmg(~user@user/gehmehgeh)
2024-04-06 08:35:51 +0200gaff(~gaff@49.207.205.255)
2024-04-06 08:41:05 +0200ubert(~Thunderbi@p200300ecdf39578eeee93514f98d266d.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2024-04-06 08:41:13 +0200ubert1(~Thunderbi@p200300ecdf395731c4a2a707ba473843.dip0.t-ipconnect.de)
2024-04-06 08:42:31 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 08:43:26 +0200euleritian(~euleritia@dynamic-176-006-191-173.176.6.pool.telefonica.de)
2024-04-06 08:43:30 +0200ubert1ubert
2024-04-06 08:46:24 +0200gaff(~gaff@49.207.205.255) (Ping timeout: 268 seconds)
2024-04-06 08:54:33 +0200caconym(~caconym@user/caconym)
2024-04-06 08:54:42 +0200gaff(~gaff@49.207.205.255)
2024-04-06 08:55:34 +0200ec_(~ec@gateway/tor-sasl/ec) (Ping timeout: 260 seconds)
2024-04-06 08:59:20 +0200phma(~phma@host-67-44-208-145.hnremote.net) (Read error: Connection reset by peer)
2024-04-06 09:00:31 +0200phma(phma@2001:5b0:211c:1c38:cf4e:d6e:98f0:9ef7)
2024-04-06 09:08:13 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 09:15:19 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 09:16:06 +0200califax(~califax@user/califx) (Ping timeout: 260 seconds)
2024-04-06 09:18:28 +0200ftweedal(~ftweedal@211.30.152.176) (Ping timeout: 268 seconds)
2024-04-06 09:19:54 +0200sefidel(~sefidel@user/sefidel) (Remote host closed the connection)
2024-04-06 09:20:45 +0200sefidel(~sefidel@user/sefidel)
2024-04-06 09:24:55 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 09:28:07 +0200califax(~califax@user/califx)
2024-04-06 09:29:38 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 09:36:54 +0200acidjnk_new(~acidjnk@p200300d6e714dc22c1009207f5f0377f.dip0.t-ipconnect.de)
2024-04-06 09:42:08 +0200yeitrafferin(~user@2a04:4540:7217:ac00:2df5:a77c:945d:95ef)
2024-04-06 09:55:15 +0200gaff(~gaff@49.207.205.255) ()
2024-04-06 09:55:35 +0200notzmv(~daniel@user/notzmv)
2024-04-06 09:57:25 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-04-06 09:58:13 +0200jle`(~jle`@2603-8001-3b02-84d4-fc90-a9ba-a756-93bd.res6.spectrum.com)
2024-04-06 10:02:57 +0200bionade24(~quassel@2a03:4000:33:45b::1)
2024-04-06 10:03:50 +0200econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2024-04-06 10:09:26 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-06 10:09:52 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-06 10:11:45 +0200TMA(tma@twin.jikos.cz) (Ping timeout: 256 seconds)
2024-04-06 10:16:54 +0200Unhammer(~Unhammer@user/unhammer)
2024-04-06 10:19:22 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2024-04-06 10:20:28 +0200 <Unhammer> anyone know if there's a simple trick to get ghci to show Text stuff with unicode characters like ö instead of \246?
2024-04-06 10:21:02 +0200 <Unhammer> like if my SongClassifier.hs has metal = "döh" :: Text
2024-04-06 10:21:12 +0200 <Unhammer> λ> metal
2024-04-06 10:21:14 +0200 <Unhammer> "d\246h"
2024-04-06 10:22:42 +0200 <mauke> T.putStrLn metal
2024-04-06 10:23:23 +0200 <Unhammer> heh well yeah
2024-04-06 10:23:37 +0200 <Unhammer> but it's often inside deeper structures
2024-04-06 10:24:32 +0200 <mauke> https://hackage.haskell.org/package/unicode-show-0.1.1.1/docs/Text-Show-Unicode.html
2024-04-06 10:24:58 +0200 <Unhammer> oh nice!
2024-04-06 10:35:58 +0200 <tomsmeding> Unhammer: be aware that unicode-show is a bit of a hack; if replaces anyhing that looks like a (printable) character escape in the Show output with the original unicode character
2024-04-06 10:36:11 +0200 <tomsmeding> regardless of whether it was in a string or not, originally
2024-04-06 10:36:16 +0200 <Unhammer> :O
2024-04-06 10:36:19 +0200 <Unhammer> ok
2024-04-06 10:36:22 +0200 <tomsmeding> may be suitable for debugging, though :)
2024-04-06 10:36:39 +0200 <tomsmeding> (Show output is generally only suitable for debugging anyway)
2024-04-06 10:40:13 +0200 <Unhammer> yeah, but nice to know about the limitations still
2024-04-06 10:48:58 +0200sawilagar(~sawilagar@user/sawilagar)
2024-04-06 10:51:11 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-04-06 10:53:15 +0200ftweedal(~ftweedal@211.30.152.176) (Ping timeout: 255 seconds)
2024-04-06 10:54:55 +0200Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-04-06 10:55:05 +0200tzh(~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz)
2024-04-06 10:57:45 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-06 11:20:45 +0200anon1123anon8697
2024-04-06 11:25:12 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 11:26:49 +0200tomsmeding(~tomsmedin@2a01:4f8:c0c:5e5e::2) (Quit: ZNC 1.9.0 - https://znc.in)
2024-04-06 11:27:09 +0200gabiruh(~gabiruh@191.252.222.55) (Quit: ZNC 1.7.5 - https://znc.in)
2024-04-06 11:27:11 +0200tomsmeding(~tomsmedin@2a01:4f8:c0c:5e5e::2)
2024-04-06 11:27:47 +0200tomsmeding(~tomsmedin@2a01:4f8:c0c:5e5e::2) (Remote host closed the connection)
2024-04-06 11:28:14 +0200tomsmeding(~tomsmedin@static.21.109.88.23.clients.your-server.de)
2024-04-06 11:29:51 +0200ircbrowse_tom(~ircbrowse@2a01:4f8:1c1c:9319::1) (ZNC 1.8.2+deb2build5 - https://znc.in)
2024-04-06 11:30:08 +0200ircbrowse_tom(~ircbrowse@2a01:4f8:1c1c:9319::1)
2024-04-06 11:30:16 +0200Server+Cnt
2024-04-06 11:30:24 +0200Server+Cnt
2024-04-06 11:37:50 +0200hovsater(sid499516@id-499516.lymington.irccloud.com) (Changing host)
2024-04-06 11:37:50 +0200hovsater(sid499516@user/kevinsjoberg)
2024-04-06 11:41:37 +0200gabiruh(~gabiruh@vps19177.publiccloud.com.br)
2024-04-06 11:44:42 +0200dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 256 seconds)
2024-04-06 11:49:58 +0200hovsater(sid499516@user/kevinsjoberg) (Changing host)
2024-04-06 11:49:58 +0200hovsater(sid499516@user/hovsater)
2024-04-06 11:53:13 +0200hovsater(sid499516@user/hovsater) (Quit: Updating details, brb)
2024-04-06 11:53:26 +0200hovsater(sid499516@user/hovsater)
2024-04-06 11:55:43 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2024-04-06 11:56:33 +0200hovsater(sid499516@user/hovsater) (Client Quit)
2024-04-06 11:56:46 +0200hovsater(sid499516@user/hovsater)
2024-04-06 11:59:20 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
2024-04-06 12:09:49 +0200iphy(sid67735@id-67735.lymington.irccloud.com) (Changing host)
2024-04-06 12:09:49 +0200iphy(sid67735@user/iphy)
2024-04-06 12:12:33 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2024-04-06 12:14:19 +0200TMA(tma@twin.jikos.cz)
2024-04-06 12:26:51 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2024-04-06 12:26:51 +0200vnogueira(~vnogueira@user/vnogueira) (Remote host closed the connection)
2024-04-06 12:26:51 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Read error: Connection reset by peer)
2024-04-06 12:26:51 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-06 12:26:52 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2024-04-06 12:27:12 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2024-04-06 12:27:14 +0200vnogueira(~vnogueira@user/vnogueira)
2024-04-06 12:27:25 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-06 12:27:45 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2024-04-06 12:28:00 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-04-06 12:29:20 +0200waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-04-06 12:33:09 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds)
2024-04-06 12:33:10 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-06 12:33:10 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2024-04-06 12:33:41 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-06 12:34:02 +0200Nixkernal(~Nixkernal@240.17.194.178.dynamic.wline.res.cust.swisscom.ch)
2024-04-06 12:34:08 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-04-06 12:34:11 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2024-04-06 12:36:08 +0200emmanuelux(~emmanuelu@user/emmanuelux) (Read error: Connection reset by peer)
2024-04-06 12:36:56 +0200emmanuelux(~emmanuelu@user/emmanuelux)
2024-04-06 12:53:56 +0200random-jellyfish(~developer@2a02:2f04:11e:c600:7d1b:5f1a:4e91:ac)
2024-04-06 12:53:56 +0200random-jellyfish(~developer@2a02:2f04:11e:c600:7d1b:5f1a:4e91:ac) (Changing host)
2024-04-06 12:53:56 +0200random-jellyfish(~developer@user/random-jellyfish)
2024-04-06 13:00:57 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-06 13:01:20 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-06 13:03:01 +0200random-jellyfish(~developer@user/random-jellyfish) (Ping timeout: 256 seconds)
2024-04-06 13:05:43 +0200polyphem(~rod@p200300ef273784005840865d4515fb32.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2024-04-06 13:22:57 +0200euleritian(~euleritia@dynamic-176-006-191-173.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-04-06 13:23:20 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-06 13:23:40 +0200biberu(~biberu@user/biberu) (Quit: ZNC - https://znc.in)
2024-04-06 13:24:02 +0200biberu(~biberu@user/biberu)
2024-04-06 13:27:27 +0200ftweedal(~ftweedal@211.30.152.176) (Read error: Connection reset by peer)
2024-04-06 13:31:47 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2024-04-06 13:32:44 +0200sadie_(~sadie@c-76-155-235-153.hsd1.co.comcast.net) (Remote host closed the connection)
2024-04-06 13:41:28 +0200gehmehgeh(~user@user/gehmehgeh)
2024-04-06 13:41:38 +0200gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-04-06 13:51:42 +0200sroso(~sroso@user/SrOso) (Quit: Leaving :))
2024-04-06 14:16:21 +0200todi(~todi@p57803331.dip0.t-ipconnect.de) (Remote host closed the connection)
2024-04-06 14:18:48 +0200todi(~todi@p57803331.dip0.t-ipconnect.de)
2024-04-06 14:23:44 +0200Nixkernal(~Nixkernal@240.17.194.178.dynamic.wline.res.cust.swisscom.ch) (Ping timeout: 260 seconds)
2024-04-06 14:28:55 +0200Nixkernal(~Nixkernal@240.17.194.178.dynamic.wline.res.cust.swisscom.ch)
2024-04-06 14:37:18 +0200harveypwca(~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
2024-04-06 14:39:09 +0200acidjnk_new(~acidjnk@p200300d6e714dc22c1009207f5f0377f.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2024-04-06 15:01:41 +0200kupi(uid212005@id-212005.hampstead.irccloud.com)
2024-04-06 15:10:17 +0200causal(~eric@50.35.88.207) (Quit: WeeChat 4.1.1)
2024-04-06 15:10:34 +0200nilradical(~nilradica@202.115.218.139.sta.wbroadband.net.au)
2024-04-06 15:10:34 +0200nilradical(~nilradica@202.115.218.139.sta.wbroadband.net.au) (Changing host)
2024-04-06 15:10:34 +0200nilradical(~nilradica@user/naso)
2024-04-06 15:14:27 +0200random-jellyfish(~developer@user/random-jellyfish)
2024-04-06 15:18:39 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-06 15:20:40 +0200qqq(~qqq@92.43.167.61) (Remote host closed the connection)
2024-04-06 15:27:44 +0200califax(~califax@user/califx) (Remote host closed the connection)
2024-04-06 15:28:31 +0200stiell_(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2024-04-06 15:28:59 +0200stiell_(~stiell@gateway/tor-sasl/stiell)
2024-04-06 15:29:01 +0200califax(~califax@user/califx)
2024-04-06 15:32:21 +0200califax(~califax@user/califx) (Remote host closed the connection)
2024-04-06 15:32:26 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
2024-04-06 15:32:43 +0200califax(~califax@user/califx)
2024-04-06 15:33:30 +0200euleritian(~euleritia@dynamic-176-006-191-173.176.6.pool.telefonica.de)
2024-04-06 15:34:47 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-04-06 15:40:16 +0200enyc(~enyc@user/enyc) (Ping timeout: 260 seconds)
2024-04-06 15:46:12 +0200mei(~mei@user/mei) (Remote host closed the connection)
2024-04-06 15:47:54 +0200todi(~todi@p57803331.dip0.t-ipconnect.de) (Quit: ZNC - https://znc.in)
2024-04-06 15:48:38 +0200mei(~mei@user/mei)
2024-04-06 15:50:56 +0200target_i(~target_i@user/target-i/x-6023099)
2024-04-06 15:54:41 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-04-06 15:57:50 +0200Inst_(~Inst@user/Inst)
2024-04-06 16:00:35 +0200Inst(~Inst@user/Inst) (Ping timeout: 264 seconds)
2024-04-06 16:00:49 +0200euleritian(~euleritia@dynamic-176-006-191-173.176.6.pool.telefonica.de) (Ping timeout: 272 seconds)
2024-04-06 16:01:48 +0200euleritian(~euleritia@dynamic-176-006-196-063.176.6.pool.telefonica.de)
2024-04-06 16:11:55 +0200nilradical(~nilradica@user/naso) (Remote host closed the connection)
2024-04-06 16:20:59 +0200retset(~retset@mobile-access-2e8440-111.dhcp.inet.fi)
2024-04-06 16:23:27 +0200Square2(~Square@user/square) (Ping timeout: 260 seconds)
2024-04-06 16:35:16 +0200retset(~retset@mobile-access-2e8440-111.dhcp.inet.fi) ()
2024-04-06 16:37:34 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-04-06 16:37:40 +0200ec_(~ec@gateway/tor-sasl/ec)
2024-04-06 16:39:11 +0200harveypwca(~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Quit: Leaving)
2024-04-06 16:49:26 +0200random-jellyfish(~developer@user/random-jellyfish) (Ping timeout: 252 seconds)
2024-04-06 16:49:51 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-06 16:51:23 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-04-06 17:00:43 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2024-04-06 17:05:04 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2024-04-06 17:12:57 +0200zetef(~quassel@5.2.182.99)
2024-04-06 17:19:06 +0200acidjnk_new(~acidjnk@p200300d6e714dc22c1009207f5f0377f.dip0.t-ipconnect.de)
2024-04-06 17:21:25 +0200kupi(uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2024-04-06 17:32:10 +0200n8n(~n8n@user/n8n)
2024-04-06 17:40:26 +0200tzh(~tzh@c-73-164-206-160.hsd1.or.comcast.net)
2024-04-06 17:48:03 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2024-04-06 17:49:03 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2024-04-06 17:59:54 +0200econo_(uid147250@id-147250.tinside.irccloud.com)
2024-04-06 18:05:23 +0200__monty__(~toonn@user/toonn)
2024-04-06 18:12:17 +0200zetef(~quassel@5.2.182.99) (Ping timeout: 256 seconds)
2024-04-06 18:14:17 +0200euleritian(~euleritia@dynamic-176-006-196-063.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-04-06 18:14:36 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-06 18:26:48 +0200billchenchina-(~billchenc@103.152.35.21)
2024-04-06 18:35:40 +0200qqq(~qqq@92.43.167.61)
2024-04-06 18:35:54 +0200qqq(~qqq@92.43.167.61) (Client Quit)
2024-04-06 18:36:38 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-04-06 18:37:18 +0200mei(~mei@user/mei) (Remote host closed the connection)
2024-04-06 18:37:46 +0200mei(~mei@user/mei)
2024-04-06 18:45:10 +0200qqq(~qqq@92.43.167.61)
2024-04-06 18:50:40 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-04-06 18:51:33 +0200euleritian(~euleritia@dynamic-176-006-196-063.176.6.pool.telefonica.de)
2024-04-06 18:58:42 +0200Eoco(~ian@128.101.131.218) (Ping timeout: 252 seconds)
2024-04-06 19:01:53 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 19:03:59 +0200euphores(~SASL_euph@user/euphores) (Quit: Leaving.)
2024-04-06 19:12:30 +0200euphores(~SASL_euph@user/euphores)
2024-04-06 19:13:28 +0200tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-04-06 19:16:20 +0200euleritian(~euleritia@dynamic-176-006-196-063.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-04-06 19:16:39 +0200euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-04-06 19:28:37 +0200bgs(~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection)
2024-04-06 19:30:51 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 19:31:48 +0200Eoco(~ian@128.101.131.218)
2024-04-06 19:37:51 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2024-04-06 19:41:09 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 20:03:55 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 20:05:46 +0200Sgeo(~Sgeo@user/sgeo)
2024-04-06 20:09:36 +0200L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-04-06 20:10:05 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 240 seconds)
2024-04-06 20:19:04 +0200L29Ah(~L29Ah@wikipedia/L29Ah)
2024-04-06 20:24:17 +0200zetef(~quassel@5.2.182.99)
2024-04-06 20:25:31 +0200TonyStone(~TonyStone@074-076-057-186.res.spectrum.com) (Changing host)
2024-04-06 20:25:31 +0200TonyStone(~TonyStone@user/TonyStone)
2024-04-06 20:26:14 +0200philopsos(~caecilius@user/philopsos)
2024-04-06 20:36:05 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 20:43:55 +0200cawfee(~root@2406:3003:2077:1c50::babe) (Ping timeout: 272 seconds)
2024-04-06 20:49:17 +0200 <tri> hi, im trying to reimplement Applicative for State monad and saw that i have 2 versions https://paste.tomsmeding.com/sbgB3yWG
2024-04-06 20:49:42 +0200 <tri> they are both typechecked. Are they both valid implementation?
2024-04-06 20:51:02 +0200 <geekosaur> (I think you have a typo on line 17, compare what it does to what the comment says)
2024-04-06 20:51:18 +0200 <geekosaur> I think the first one violates the Applicative laws?
2024-04-06 20:52:18 +0200 <geekosaur> Haskell's type system isn't in general strong enough to validate laws, which is why they're laws rather than code
2024-04-06 20:52:27 +0200 <geekosaur> or types
2024-04-06 20:52:43 +0200 <ncf> yep that's unlawful
2024-04-06 20:53:23 +0200 <ncf> hint: identity law
2024-04-06 20:53:55 +0200 <Inst_> wait, do we have controlled imports / exports of typeclasses?
2024-04-06 20:53:57 +0200Inst_Inst
2024-04-06 20:54:09 +0200 <Inst> I know we don't of instances (orphan instances problem, unless that's been fixed)
2024-04-06 20:54:41 +0200billchenchina-(~billchenc@103.152.35.21) (Remote host closed the connection)
2024-04-06 20:55:52 +0200 <tri> geekosaur: yea i meant to write secondState on line 17
2024-04-06 20:56:32 +0200 <tri> it's true. I thought about using the applicative law to check it, but it's been a long time and doing so will take some time, so i decided to ask here
2024-04-06 20:57:12 +0200 <EvanR> I'm surprised you didn't first ask chat-gpt!
2024-04-06 20:58:01 +0200 <tri> many of haskell stuff is not really understood by gpt
2024-04-06 20:58:03 +0200 <tomsmeding> @hackage checkers
2024-04-06 20:58:03 +0200 <lambdabot> https://hackage.haskell.org/package/checkers
2024-04-06 20:58:05 +0200 <tomsmeding> https://hackage.haskell.org/package/checkers-0.6.0/docs/Test-QuickCheck-Classes.html#v:applicative
2024-04-06 20:58:34 +0200maxs(~maxs@94.45.154.15)
2024-04-06 20:58:35 +0200 <ski> Inst : yes
2024-04-06 21:00:15 +0200 <ski> tri : `b = ab a' is dead code
2024-04-06 21:00:18 +0200 <Inst> okay, so it's just unnecessary / ugly to throw all your code into typeclasses, right?
2024-04-06 21:00:38 +0200 <tri> thank you ski
2024-04-06 21:00:56 +0200 <ski> both implementations are incorrect
2024-04-06 21:01:16 +0200 <geekosaur> Inst, ugly, slow, and may not work if you're misusing them
2024-04-06 21:01:28 +0200maxs(~maxs@94.45.154.15) (Client Quit)
2024-04-06 21:01:34 +0200 <Inst> I don't use typeclasses enough
2024-04-06 21:01:46 +0200 <Inst> and I realized I kept on getting tripped up by typeclass-based interfaces to libraries
2024-04-06 21:02:04 +0200 <geekosaur> in particular, if you try to treat typeclasses as if they were OOP classes, things won't typecheck
2024-04-06 21:02:26 +0200 <tomsmeding> sounds like a problem that is solved by working with such libraries more often :)
2024-04-06 21:02:50 +0200 <ski> generally, don't use a type class, unless (a) you already have two different instances you want to have; and (b) you want to define operations that are polymorphic constrained in the type class
2024-04-06 21:03:29 +0200 <Inst> tomsmeding: it took me 8 hours to figure out how to use cassava without generics :(
2024-04-06 21:03:55 +0200tomsmedinghas never used cassava
2024-04-06 21:04:49 +0200 <monochrom> I learned and use cassava without generics. The "toy" example that no one else reads helped.
2024-04-06 21:04:54 +0200 <Inst> and it took me like 2 years before I figured out aeson's treemap interface was accessed via its typeclass
2024-04-06 21:05:21 +0200 <geekosaur> Inst, the orphan instances problem is not something that can be fixed, it is a consequence of typeclass instances being global, which is required by the type system
2024-04-06 21:05:27 +0200 <tomsmeding> (aeson treemap?)
2024-04-06 21:05:44 +0200 <EvanR> so you want to load a CSV file, let me first introduce you to generics
2024-04-06 21:06:20 +0200 <geekosaur> (people often think they want local instances, what they really want is ML's functors (parameterized modules) and `open`)
2024-04-06 21:06:23 +0200 <Inst> aeson has an object type that's a map over a sum type of JSON types
2024-04-06 21:06:45 +0200 <tomsmeding> Inst: https://hackage.haskell.org/package/aeson-2.2.1.0/docs/Data-Aeson-KeyMap.html#t:KeyMap ?
2024-04-06 21:07:11 +0200 <tomsmeding> the functions in that module seem to me enough to work with the thing
2024-04-06 21:07:15 +0200skiwants local `data' types, and local instances for them
2024-04-06 21:07:23 +0200 <Inst> yes
2024-04-06 21:07:28 +0200 <tomsmeding> gimme gimme `data` inside `where`
2024-04-06 21:07:41 +0200 <monochrom> Consider "data families" >:)
2024-04-06 21:07:43 +0200 <tomsmeding> haskell makes little helper data types easy, make them even easier
2024-04-06 21:07:47 +0200 <ski> (and, obviously, they ought to be able to reference nonlocal tyvars)
2024-04-06 21:10:47 +0200 <ski> (.. so, the local instance also ought to be able to depend on run-time data)
2024-04-06 21:11:25 +0200 <monochrom> You can only access Int operations via type classes too. That has never posed a problem.
2024-04-06 21:11:50 +0200 <tomsmeding> it's not even true for aeson's KeyMap, it has fromList, lookup, etc. as regular top-level functions
2024-04-06 21:13:10 +0200gehmehgehgmg
2024-04-06 21:13:13 +0200 <tomsmeding> ski: how about a function that passes a local data type down into a recursive call, but the instance on that data type depends on the function argument
2024-04-06 21:13:17 +0200 <tomsmeding> doesn't that result in incoherence
2024-04-06 21:14:03 +0200 <ski> "passes a local data type down into a recursive call" means ?
2024-04-06 21:14:21 +0200cawfee(~root@2406:3003:2077:1c50::babe)
2024-04-06 21:14:36 +0200 <ski> you mean polymorphic recursion or something ?
2024-04-06 21:15:54 +0200 <ski> foo :: forall a. Eq a => Blah -> ...
2024-04-06 21:16:22 +0200 <ski> foo blah = ..(foo @Helper (...) ...)..
2024-04-06 21:16:22 +0200 <ski> where
2024-04-06 21:16:23 +0200yahb2(~yahb2@static.56.27.47.78.clients.your-server.de) (Remote host closed the connection)
2024-04-06 21:16:33 +0200 <ski> data Helper = ..a..
2024-04-06 21:16:38 +0200 <ski> instance Eq Helper
2024-04-06 21:16:41 +0200 <ski> where
2024-04-06 21:16:51 +0200 <ski> ... == ... = ...
2024-04-06 21:16:54 +0200 <ski> something like that ?
2024-04-06 21:17:25 +0200 <Inst> iirc you just want Idris's data anywhere, right?
2024-04-06 21:18:11 +0200yahb2(~yahb2@user/tomsmeding/bot/yahb2)
2024-04-06 21:18:11 +0200ChanServ+v yahb2
2024-04-06 21:19:11 +0200 <ski> (well, with the body of the definition of `(==)' depending on `blah')
2024-04-06 21:19:48 +0200 <ski> anyway .. not really seeing how this would yield incoherence
2024-04-06 21:20:00 +0200 <tomsmeding> yeah not quite, let me think
2024-04-06 21:20:57 +0200chiselfuse(~chiselfus@user/chiselfuse) (Remote host closed the connection)
2024-04-06 21:21:02 +0200 <tomsmeding> hm fun, my idea breaks because stuff in `where` ought (?) not to be in scope in the type signature
2024-04-06 21:21:45 +0200 <ski> yea, just like existentials
2024-04-06 21:22:04 +0200chiselfuse(~chiselfus@user/chiselfuse)
2024-04-06 21:22:17 +0200 <tomsmeding> i want dis
2024-04-06 21:23:10 +0200 <ski> the two things that this gives is (a) not needing to parameterize the data type by nonlocal tyvars; and (b) instances being able to depend on run-time input
2024-04-06 21:23:24 +0200 <tomsmeding> and scoping
2024-04-06 21:23:26 +0200 <ski> (a) is more a convenience thing. (b) is an expressiveness thing
2024-04-06 21:23:56 +0200 <tomsmeding> scoping is definitely a convenience thing, because you can "just" list all the other things in the module in an export list
2024-04-06 21:24:16 +0200 <tomsmeding> but if the data type is local to one function it ought to be _local_ to the function, for cleanliness' sake
2024-04-06 21:24:18 +0200 <ski> oh, and presumably the instance has to be given together with the `data' (or `newtype') declaration .. maybe that could be relaxed a little bit, dunno
2024-04-06 21:24:31 +0200califax(~califax@user/califx) (Remote host closed the connection)
2024-04-06 21:25:29 +0200 <ski> yea, i guess (a) gives you a reasonability thing in that you're assured that other code can't depend on the type
2024-04-06 21:25:31 +0200 <tomsmeding> (tangentially, I feel like I would prefer e.g. rust's way of doing public/private: instead of an export list, put some keyword (`pub` for Rust) before every public declaration)
2024-04-06 21:25:41 +0200califax(~califax@user/califx)
2024-04-06 21:25:59 +0200skiincidentally also wants SML's `local'-`in'-`end', in Haskell
2024-04-06 21:26:12 +0200 <tomsmeding> gets more noisy in modules where you want to export everything, but in larger codebases that's rare anyway
2024-04-06 21:26:32 +0200 <tomsmeding> ski: what does that do?
2024-04-06 21:26:47 +0200sawilagar(~sawilagar@user/sawilagar) (Ping timeout: 260 seconds)
2024-04-06 21:26:56 +0200 <tomsmeding> guessing: local declarations in a set of declarations that get merged into the parent scope?
2024-04-06 21:26:56 +0200 <geekosaur> it's `let` at top level iirc?
2024-04-06 21:27:02 +0200 <tomsmeding> right
2024-04-06 21:27:07 +0200 <ski> makes some declarations local to some other declarations. as opposed to `let'-`in', which makes some declarations local to an *expression*
2024-04-06 21:27:12 +0200 <ski> yes
2024-04-06 21:27:22 +0200 <tomsmeding> that's essentially a weaker version of the local data types idea
2024-04-06 21:27:29 +0200 <tomsmeding> (but also a bit more general because it's not just data types)
2024-04-06 21:27:32 +0200 <ski> (i also want `if'-`then'-`else', and `case'-`of', at the declaration level)
2024-04-06 21:27:35 +0200califax(~califax@user/califx) (Remote host closed the connection)
2024-04-06 21:27:53 +0200califax(~califax@user/califx)
2024-04-06 21:27:54 +0200 <ski> tomsmeding : yea, but it's also useful for normal value declarations
2024-04-06 21:28:14 +0200 <tomsmeding> yeah I can see that
2024-04-06 21:28:18 +0200 <ski> instead of going
2024-04-06 21:28:26 +0200 <ski> (foo,bar) = (theFoo,theBar)
2024-04-06 21:28:28 +0200 <ski> where
2024-04-06 21:28:31 +0200 <tomsmeding> the top-level conditionals would be on compile-time constants, right?
2024-04-06 21:28:32 +0200 <ski> theFoo .. = ...
2024-04-06 21:28:37 +0200 <ski> theBar .. = ...
2024-04-06 21:28:42 +0200 <ski> ..other stuff..
2024-04-06 21:28:43 +0200 <tomsmeding> yeah that's very awkward
2024-04-06 21:29:02 +0200 <ski> "compile-time constants, right?" -- yes
2024-04-06 21:29:15 +0200 <tomsmeding> would that mean that haddock gets to execute code to figure out what the top-level decls are?
2024-04-06 21:29:17 +0200 <ski> or, with functors, can depend on the functor parameter
2024-04-06 21:29:50 +0200michalz(~michalz@185.246.207.221)
2024-04-06 21:29:59 +0200 <ski> all branches define the same identifiers
2024-04-06 21:30:09 +0200 <tomsmeding> ew
2024-04-06 21:30:12 +0200 <ski> (this is not conditional compilation for exposing different interfaces)
2024-04-06 21:30:43 +0200 <tomsmeding> I mean, that requirement restores sanity, but it's also an awkward requirement
2024-04-06 21:31:15 +0200 <ski> why awkward ?
2024-04-06 21:31:44 +0200 <ski> oh, also there should be `if'-`then'-`else', and `case'-`of', commands in `do'
2024-04-06 21:31:55 +0200 <tomsmeding> if you're writing a function that has to return 4 values (in a tuple, say), you have freedom in how you assemble those values before you return them
2024-04-06 21:32:27 +0200 <tomsmeding> here with the declarations, you are limited to structured case trees
2024-04-06 21:32:39 +0200 <ski> i don't follow
2024-04-06 21:32:58 +0200 <tomsmeding> 1sec, people want my attention
2024-04-06 21:33:09 +0200 <ski> np
2024-04-06 21:38:52 +0200byorgey(~byorgey@155.138.238.211) (Changing host)
2024-04-06 21:38:52 +0200byorgey(~byorgey@user/byorgey)
2024-04-06 21:40:42 +0200 <tomsmeding> ski: I guess it's not as bad as I thought; I feel like it's comparable to the hypothetical where if you write a function returning a tuple, at every "return point" you have to write out the whole tuple, you can't pass on a tuple you got from somewhere else
2024-04-06 21:41:24 +0200 <tomsmeding> because (assuming 4 declarations for sake of argument) you have to explicitly write 4 lines, f = ..., g = ..., h = ..., j = ..., in each branch of your case tree
2024-04-06 21:42:22 +0200 <tomsmeding> you can't, say, choose to return ((a,b),c,d) instead of (a,b,c,d) and first produce the (a,b) tuple somehow, and then plug that wholesale in the return tuple
2024-04-06 21:42:43 +0200qqq(~qqq@92.43.167.61) (Ping timeout: 246 seconds)
2024-04-06 21:42:45 +0200 <tomsmeding> because it must be (a,b,c,d), so you have to unpack the (a,b) tuple into a and b, and re-pack them as (a,b,c,d)
2024-04-06 21:43:05 +0200 <tomsmeding> maybe you have the exact same problem with tuples in the first place
2024-04-06 21:43:10 +0200 <tomsmeding> so maybe ignore what I'm saying
2024-04-06 21:43:12 +0200 <tomsmeding> :D
2024-04-06 21:43:46 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 21:46:01 +0200 <ski> "you can't pass on a tuple you got from somewhere else" -- huh ?
2024-04-06 21:47:22 +0200 <tomsmeding> if you defined f', g', h' and j' in some `local` block already, say, you have to write 4 separate lines (f = f'; ...; j = j') to "return" those definitions
2024-04-06 21:48:06 +0200 <tomsmeding> you could write fghj = (_, _, _, _) in the `local` block and then you can pass down the tuple wholesale in a single line, but in the end you still have to write out the 4 lines
2024-04-06 21:48:41 +0200 <tomsmeding> but I'm having difficulty finding a point where this is meaningfully different from how tuples operate in the expression language already
2024-04-06 21:49:04 +0200 <tomsmeding> so maybe I should stop trying
2024-04-06 21:49:33 +0200 <ski> "if you defined f', g', h' and j' in some `local` block already" -- why would you not just directly define `f',`g',`h',`j' in the body, instead ?
2024-04-06 21:50:00 +0200 <ski> i'm not really envisaging the use case / situation you have in mind
2024-04-06 21:50:04 +0200 <tomsmeding> because you might decide with an if-then-else whether to define them in terms of f', g', h', j'
2024-04-06 21:50:15 +0200 <tomsmeding> yeah no I should write out a proper example
2024-04-06 21:51:12 +0200 <tomsmeding> but I'm not going to do that now, I'm just going to take my difficulty in formulating one in the first place as evidence that you're right and there is no problem :
2024-04-06 21:51:15 +0200 <tomsmeding> * :p
2024-04-06 21:51:28 +0200polyphem(~rod@p200300ef2737840025b5ae4e52515c0b.dip0.t-ipconnect.de)
2024-04-06 21:52:08 +0200 <ski> hm .. i guess one might have `DeclarationPuns'
2024-04-06 21:52:24 +0200 <tomsmeding> something like that, yes
2024-04-06 21:54:34 +0200qqq(~qqq@92.43.167.61)
2024-04-06 21:56:01 +0200 <ski> (i didn't really follow the tuple stuff, either. of course you can pass on a tuple you got from somewhere else. maybe you meant that you can't do the corresponding thing with declarations, but what would "getting declarations from somewhere else" even mean ? note that we can't really have recursive computations yielding declarations here (unless, i guess, if we have recursive module functors). but perhaps
2024-04-06 21:56:07 +0200 <ski> you were thinking of not getting all the identifiers defined in the same place, depending on which branch was taken)
2024-04-06 21:59:13 +0200Square2(~Square@user/square)
2024-04-06 22:02:36 +0200 <tomsmeding> ski: would I be able to do something like this? https://paste.tomsmeding.com/Pwd1QyAM
2024-04-06 22:03:22 +0200 <tomsmeding> and also this https://paste.tomsmeding.com/tIIHWhQB
2024-04-06 22:04:47 +0200 <tomsmeding> this is all that is left of my argument I think
2024-04-06 22:05:22 +0200 <ski> sure, that's the point
2024-04-06 22:05:39 +0200 <tomsmeding> right
2024-04-06 22:05:42 +0200 <tomsmeding> ok :)
2024-04-06 22:05:53 +0200yeitrafferin(~user@2a04:4540:7217:ac00:2df5:a77c:945d:95ef) (Quit: Leaving)
2024-04-06 22:06:00 +0200 <ski> especially the `if c3 then (h,j) = ... else h = ...; j = ...' part
2024-04-06 22:06:27 +0200 <ski> (the other `if'-`then'-`else's are just on expressions, not on declarations)
2024-04-06 22:06:42 +0200 <tomsmeding> fair :D
2024-04-06 22:06:49 +0200 <tomsmeding> I almost never use pattern bindings
2024-04-06 22:06:52 +0200 <ski> you can already do
2024-04-06 22:06:55 +0200 <ski> (h,j)
2024-04-06 22:06:57 +0200 <tomsmeding> except for small local stuff
2024-04-06 22:07:06 +0200 <ski> | ... = (...,...)
2024-04-06 22:07:12 +0200 <ski> | otherwise = (...,...)
2024-04-06 22:07:29 +0200 <ski> but that can become annoying
2024-04-06 22:07:40 +0200 <tomsmeding> I don't think I ever do that
2024-04-06 22:07:51 +0200skihas, at times
2024-04-06 22:12:17 +0200vgtw_(~vgtw@user/vgtw)
2024-04-06 22:12:35 +0200vgtw(~vgtw@user/vgtw) (Ping timeout: 264 seconds)
2024-04-06 22:16:42 +0200Square2(~Square@user/square) (Ping timeout: 268 seconds)
2024-04-06 22:20:10 +0200noumenon(~noumenon@113.51-175-156.customer.lyse.net)
2024-04-06 22:21:03 +0200zetef(~quassel@5.2.182.99) (Ping timeout: 256 seconds)
2024-04-06 22:23:08 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-04-06 22:24:25 +0200zetef(~quassel@5.2.182.98)
2024-04-06 22:28:17 +0200sadie-sorceress(~sadie-sor@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-06 22:29:57 +0200sawilagar(~sawilagar@user/sawilagar)
2024-04-06 22:31:19 +0200 <tomsmeding> if I have this: return' = return . return; (<$$>) = fmap . fmap; (<**>) = liftA2 (<*>)
2024-04-06 22:31:22 +0200 <tomsmeding> am I looking for Compose
2024-04-06 22:33:00 +0200 <ncf> yes
2024-04-06 22:33:07 +0200 <tomsmeding> right
2024-04-06 22:33:28 +0200 <tomsmeding> why is `Compose (State s) (w,) a` not valid :(
2024-04-06 22:33:45 +0200 <ncf> i prefer <<$>> and <<*>> for those though
2024-04-06 22:34:00 +0200 <tomsmeding> yeah those are better names
2024-04-06 22:34:04 +0200 <tomsmeding> I want type-level TupleSections
2024-04-06 22:35:37 +0200 <tomsmeding> ah `(,) w` of course
2024-04-06 22:35:51 +0200 <tomsmeding> :t Compose (Identity ("hi", True))
2024-04-06 22:35:52 +0200 <lambdabot> error:
2024-04-06 22:35:52 +0200 <lambdabot> • Data constructor not in scope:
2024-04-06 22:35:53 +0200 <lambdabot> Compose :: Identity ([Char], Bool) -> t
2024-04-06 22:36:08 +0200 <tomsmeding> :t Compose (Identity ("hi", True))
2024-04-06 22:36:09 +0200 <lambdabot> Compose Identity ((,) [Char]) Bool
2024-04-06 22:37:22 +0200 <ski> @type (<**>) -- not that i like this name
2024-04-06 22:37:23 +0200 <lambdabot> Applicative f => f a -> f (a -> b) -> f b
2024-04-06 22:37:37 +0200 <tomsmeding> ncf already complained :)
2024-04-06 22:38:16 +0200 <ski> (i'd prefer `<*>' to be named `<$>', and `<$>' to be named `$>')
2024-04-06 22:38:48 +0200 <tomsmeding> hm maybe yes
2024-04-06 22:39:18 +0200 <ncf> and ($>) to be named...?
2024-04-06 22:39:26 +0200 <tomsmeding> :t ($>)
2024-04-06 22:39:27 +0200 <lambdabot> error:
2024-04-06 22:39:27 +0200 <lambdabot> • Variable not in scope: $>
2024-04-06 22:39:27 +0200 <lambdabot> • Perhaps you meant one of these:
2024-04-06 22:39:37 +0200 <ski> itym `<$' ?
2024-04-06 22:39:38 +0200 <tomsmeding> :t Data.Functor.($>)
2024-04-06 22:39:39 +0200 <lambdabot> error:
2024-04-06 22:39:39 +0200 <lambdabot> Not in scope: data constructor ‘Data.Functor’
2024-04-06 22:39:39 +0200 <lambdabot> No module named ‘Data’ is imported.
2024-04-06 22:39:44 +0200sadie-sorceress(~sadie-sor@c-76-155-235-153.hsd1.co.comcast.net) (Ping timeout: 250 seconds)
2024-04-06 22:39:47 +0200 <tomsmeding> :t (Data.Functor.$>)
2024-04-06 22:39:48 +0200 <lambdabot> Functor f => f a -> b -> f b
2024-04-06 22:39:54 +0200 <ncf> well, flip (<$)
2024-04-06 22:40:22 +0200 <ski> that one could be named `$.>' or something
2024-04-06 22:40:48 +0200 <tomsmeding> $=
2024-04-06 22:41:00 +0200 <ski> (oh, and `(<*>) = liftA2 (,)')
2024-04-06 22:42:34 +0200_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2024-04-06 22:43:37 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2024-04-06 22:44:03 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2024-04-06 22:58:56 +0200 <Inst> btw
2024-04-06 22:59:05 +0200 <Inst> if i write a randomized quicksort in ST for Vector
2024-04-06 22:59:33 +0200 <Inst> am I going to get unwanted caching due to unsafePerformIO use?
2024-04-06 23:00:54 +0200gdd(~gdd@2001:bc8:38ee:100:c8c6:dfff:fe51:8c02) (Ping timeout: 255 seconds)
2024-04-06 23:02:11 +0200 <tomsmeding> where does the unsafePerformIO come in?
2024-04-06 23:02:20 +0200 <tomsmeding> the point of ST is that you don't need unsafePerformIO
2024-04-06 23:02:59 +0200 <tomsmeding> oh you mean for the random seed generation?
2024-04-06 23:04:03 +0200 <tomsmeding> a typical trick is this: https://paste.tomsmeding.com/3ZGP2azB
2024-04-06 23:04:09 +0200 <tri> does anyone use haskell with neovim here? i used haskell with vscode before and the there was code action to fix the code according to the suggestion from the lsp. But in neovim, the only code action i've seen so far is the ability to turn off the suggestion
2024-04-06 23:04:21 +0200 <tri> so it seems like the lsp in neovim is worse than in vscode
2024-04-06 23:04:28 +0200 <tri> unless there is something i dont know
2024-04-06 23:04:36 +0200 <tomsmeding> Inst: the point being to make the computation depend on some important value x in your computation so that unsafeRandomSeed must be recomputed every time
2024-04-06 23:04:59 +0200 <tomsmeding> tri: are you using the built-in lspconfig stuff?
2024-04-06 23:05:11 +0200 <tomsmeding> er, the built-in LSP support with lspconfig
2024-04-06 23:05:28 +0200 <tri> hmm im using mason, if that's what you are asking. Sorry im new to neovim
2024-04-06 23:05:38 +0200 <tomsmeding> how did that action show up in vscode? Was it a "lightbulb" icon?
2024-04-06 23:05:43 +0200saftl(~user@p200300f9173af1001d6b7e3ec038aab9.dip0.t-ipconnect.de)
2024-04-06 23:05:48 +0200 <tri> yea something like that iirc
2024-04-06 23:06:05 +0200 <tomsmeding> tri: with mason-lspconfig.nvim?
2024-04-06 23:06:48 +0200 <tomsmeding> if yes, then you're indeed using the built-in LSP support
2024-04-06 23:06:59 +0200 <tri> let me check
2024-04-06 23:06:59 +0200 <tomsmeding> (as opposed to an independent LSP client implementation such as coc or ALE)
2024-04-06 23:07:34 +0200 <tomsmeding> the built-in nvim lsp client support doesn't support code lenses, nor custom commands, so if the thing was actually a code lens or a custom command, then it will not show up in nvim
2024-04-06 23:08:06 +0200 <tri> yea i see mason-lspconfig.nvim in my config ifle
2024-04-06 23:08:08 +0200 <tri> file*
2024-04-06 23:08:10 +0200 <tomsmeding> code actions do, with <cmd>vim.lsp.buf.code_action() (bound to <space>ca in the suggested bindings)
2024-04-06 23:08:53 +0200 <tri> tomsmeding: i action use that code action that you mention
2024-04-06 23:09:05 +0200 <tri> vim.lsp.buf.code_action()
2024-04-06 23:09:24 +0200 <tomsmeding> was this about hlint suggestions?
2024-04-06 23:09:27 +0200 <tri> and the most it did was the ability to turn off some suggestion
2024-04-06 23:09:38 +0200 <tri> idk what is hlint suggestion
2024-04-06 23:09:51 +0200 <tomsmeding> the things that ghc does not produce :p
2024-04-06 23:09:59 +0200 <tomsmeding> useless stuff like "this could be a newtype"
2024-04-06 23:10:24 +0200Luj(~Luj@2a01:e0a:5f9:9681:ae04:a455:8cc3:9377) (Ping timeout: 256 seconds)
2024-04-06 23:10:29 +0200 <tri> you mean the code analysis shown up in my editor?
2024-04-06 23:10:34 +0200 <tomsmeding> or "rewrite `do x <- <...> ; return (... x ...)` to `(\x -> ...) <$> <...>`
2024-04-06 23:10:38 +0200 <tomsmeding> screenshot? :p
2024-04-06 23:12:42 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 23:13:18 +0200 <tri> where do i paste the screenshot to?
2024-04-06 23:13:48 +0200 <tomsmeding> curl --data-binary @file.png https://tomsmeding.com/gooi/screenshot.png
2024-04-06 23:13:50 +0200hololeap(~quassel@user/hololeap) (Quit: Bye)
2024-04-06 23:14:52 +0200hololeap(~quassel@user/hololeap)
2024-04-06 23:17:03 +0200 <tri> https://tomsmeding.com/vang/tiJrtP/hiworld.png
2024-04-06 23:17:10 +0200 <tri> hmm it cannot view
2024-04-06 23:17:15 +0200 <tri> it doesn't show
2024-04-06 23:17:34 +0200 <tomsmeding> you forgot the @
2024-04-06 23:17:44 +0200 <tri> https://tomsmeding.com/vang/Ew7SwZ/hiworld.png
2024-04-06 23:17:49 +0200 <tri> wow that's cool tool
2024-04-06 23:18:20 +0200 <tomsmeding> typing '1' doesn't work?
2024-04-06 23:18:27 +0200 <tri> it does
2024-04-06 23:18:45 +0200 <tri> what im asking is, the most ive seen it works is only turning off hint or apply hint
2024-04-06 23:18:59 +0200 <tri> whereas in vscode it could suggest to change my code
2024-04-06 23:18:59 +0200 <tomsmeding> the red diagnostics are errors from GHC, the yellow ones are warnings from GHC, and the bluegreenish ones (like these) are lints from hlint
2024-04-06 23:19:25 +0200 <tomsmeding> isn't "apply hint" precisely the same as "change code"?
2024-04-06 23:20:05 +0200tomsmedinghas hlint turned off due to not liking its suggestions
2024-04-06 23:21:12 +0200 <tri> ah no wait i think i get it
2024-04-06 23:21:23 +0200 <tri> thank you
2024-04-06 23:22:46 +0200 <tomsmeding> wait the nvim lsp client has support for code lenses???
2024-04-06 23:23:01 +0200 <tomsmeding> it's just not listed as a suggested keybinding in the lspconfig readme?
2024-04-06 23:23:21 +0200 <tri> hmm no, idk how to describe it correctly but
2024-04-06 23:23:22 +0200 <tomsmeding> that's pretty huge underhanded support for a feature :p
2024-04-06 23:24:00 +0200 <tri> simply put, i assume it just have the ability to turn off a hint
2024-04-06 23:24:07 +0200 <tri> so that's on me being silly
2024-04-06 23:24:25 +0200 <tomsmeding> you expected a different wording, probably
2024-04-06 23:24:48 +0200 <tri> also, i run into this bug, and don't know how to fix it in neovim
2024-04-06 23:24:49 +0200 <tri> https://github.com/haskell/haskell-language-server/issues/3130
2024-04-06 23:24:59 +0200 <tri> i left a comment at the bottom, can you check?
2024-04-06 23:25:15 +0200 <tri> i cannot rename stuff in haskell
2024-04-06 23:25:40 +0200 <yushyin> tomsmeding: :h lsp-codelens, i guess it does have support for it
2024-04-06 23:25:54 +0200 <tomsmeding> tri: can you paste in a pastebin how you've currently set up hls in your nvim config?
2024-04-06 23:26:07 +0200 <tomsmeding> yushyin: yes I just found out that `:lua vim.lsp.codelens.refresh()` does stuff
2024-04-06 23:26:15 +0200jle`(~jle`@2603-8001-3b02-84d4-fc90-a9ba-a756-93bd.res6.spectrum.com) (Quit: WeeChat 4.2.1)
2024-04-06 23:26:16 +0200 <tri> hmmmm i only install hls via mason. I don't have any other config
2024-04-06 23:26:29 +0200ftweedal(~ftweedal@211.30.152.176) (Ping timeout: 240 seconds)
2024-04-06 23:26:32 +0200 <tomsmeding> yushyin: probably my bad for assuming that this is a good overview of the supported features: https://github.com/neovim/nvim-lspconfig?tab=readme-ov-file#suggested-configuration
2024-04-06 23:26:39 +0200jle`(~jle`@2603-8001-3b02-84d4-fc90-a9ba-a756-93bd.res6.spectrum.com)
2024-04-06 23:26:41 +0200 <tomsmeding> tri: how does that look?
2024-04-06 23:26:42 +0200sadie-sorceress(~sadie-sor@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-06 23:26:54 +0200 <yushyin> :D
2024-04-06 23:27:34 +0200jle`(~jle`@2603-8001-3b02-84d4-fc90-a9ba-a756-93bd.res6.spectrum.com) (Client Quit)
2024-04-06 23:27:38 +0200 <tomsmeding> tri: your question here, using (I think) the correct words, is "how do I set configuration for a language server registered via mason"
2024-04-06 23:27:49 +0200 <tri> yes
2024-04-06 23:27:51 +0200 <tomsmeding> i.e. this is a question about mason, not about nvim or hls
2024-04-06 23:27:57 +0200jle`(~jle`@2603-8001-3b02-84d4-fc90-a9ba-a756-93bd.res6.spectrum.com)
2024-04-06 23:28:14 +0200 <tri> yea let mee google that
2024-04-06 23:28:31 +0200 <tri> i didn't know the exact question i was looking for since im new to neovim and both haskell
2024-04-06 23:28:34 +0200 <tomsmeding> in general, language servers expect to be configured by the client (the editor), and it's up to the client to let you enter configuration somewhere
2024-04-06 23:28:51 +0200machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds)
2024-04-06 23:28:52 +0200 <tomsmeding> I know how to do it with plain lspconfig, but you're using an additional package in between (mason)
2024-04-06 23:30:10 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 255 seconds)
2024-04-06 23:30:11 +0200sadie-sorceresssydney
2024-04-06 23:30:23 +0200sydneymadeleine-sydney
2024-04-06 23:30:33 +0200srk(~sorki@user/srk) (Read error: Connection reset by peer)
2024-04-06 23:31:09 +0200 <tri> hmm i will put this config off to another day, im kinda fried from both neovim and haskell now
2024-04-06 23:31:35 +0200madeleine-sydney(~sadie-sor@c-76-155-235-153.hsd1.co.comcast.net) (Changing host)
2024-04-06 23:31:35 +0200madeleine-sydney(~sadie-sor@user/madeleine-sydney)
2024-04-06 23:31:37 +0200 <tri> in the mean time i will just use vim replace word function
2024-04-06 23:32:29 +0200 <tomsmeding> tri: do you have lines like require("lspconfig").hls.setup {} in your config?
2024-04-06 23:32:40 +0200 <tomsmeding> (the important part is the `setup {}`)
2024-04-06 23:33:19 +0200 <tri> a search of .hls doesn't give any result
2024-04-06 23:33:26 +0200tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-04-06 23:33:37 +0200 <tomsmeding> perhaps without the . ?
2024-04-06 23:33:47 +0200 <tri> no either
2024-04-06 23:33:50 +0200 <tomsmeding> how are you telling mason to load hls :p
2024-04-06 23:33:51 +0200srk(~sorki@user/srk)
2024-04-06 23:34:11 +0200 <tri> fwiw, i have require('mason-lspconfig').setup
2024-04-06 23:34:34 +0200tomsmedingis looking at https://github.com/williamboman/mason-lspconfig.nvim?tab=readme-ov-file#setup
2024-04-06 23:35:19 +0200 <tri> I just have mason install hls and that's it
2024-04-06 23:35:26 +0200 <tomsmeding> HOW :p
2024-04-06 23:35:28 +0200 <tri> hls auto turned on when im in a haskell file
2024-04-06 23:35:30 +0200 <tri> ah
2024-04-06 23:35:32 +0200 <tri> using :Mason
2024-04-06 23:35:35 +0200 <tomsmeding> I've asked like 5x now :p
2024-04-06 23:35:37 +0200 <tri> sorry
2024-04-06 23:35:51 +0200 <tri> using :Mason then it shows the dialog to scroll over different lsp's
2024-04-06 23:35:56 +0200 <tomsmeding> I see
2024-04-06 23:35:57 +0200 <tri> then i picked hls
2024-04-06 23:38:27 +0200 <tri> btw tomsmeding
2024-04-06 23:38:57 +0200 <tomsmeding> I suspect you'll need to manually add hls as shown in that Setup section of the mason-lspconfig readme if you want to add settings
2024-04-06 23:39:03 +0200 <tri> so i've been reading all about functor, applicative, monad, reader, state up until monad transformer
2024-04-06 23:39:40 +0200 <tomsmeding> then it would look like: require("lspconfig").hls.setup { settings = { haskell = { plugin = { rename = ... } } } }
2024-04-06 23:39:43 +0200 <tri> does it make sense to know how to implement all functor, applicative, and monad instance of, say, the State monad?
2024-04-06 23:40:01 +0200 <tri> i only know how to use it intuitively
2024-04-06 23:40:18 +0200 <tri> i know how to use a reader
2024-04-06 23:40:19 +0200 <tomsmeding> I think working with multiple different monads, and implementing all the basic ones, is very useful for getting an understanding of them
2024-04-06 23:40:28 +0200 <tomsmeding> so yes, that's good practice
2024-04-06 23:40:30 +0200 <tri> but idk how to implement the applicative, monad, and functor instance of it
2024-04-06 23:40:50 +0200 <tri> hmm ok
2024-04-06 23:41:26 +0200 <tri> i quickly glanced over those sections, so i only know how to use them, not know how to implement these instance for a state or reader monad
2024-04-06 23:41:34 +0200 <tri> i'll have to go back then
2024-04-06 23:41:49 +0200 <tomsmeding> understanding how the basic monads (reader, writer, state, either, etc.) correspond with their newtypes, and how their instances work, will make it easier to make sense of monad transformer stacks
2024-04-06 23:42:16 +0200 <tomsmeding> for example, do you know what the difference is between `StateT s (Either e) a` and `ExceptT e (State s) a`?
2024-04-06 23:42:29 +0200 <tomsmeding> they both combine a "state" effect and an "exception" effect
2024-04-06 23:42:34 +0200 <tomsmeding> but in a different way!
2024-04-06 23:42:41 +0200 <tomsmeding> @unmtl StateT s (Either e) a
2024-04-06 23:42:42 +0200 <lambdabot> s -> Either e (a, s)
2024-04-06 23:42:49 +0200 <tomsmeding> @unmtl ExceptT e (State s) a
2024-04-06 23:42:49 +0200 <lambdabot> s -> (Either e a, s)
2024-04-06 23:42:57 +0200 <tri> yea definitly no
2024-04-06 23:42:58 +0200 <EvanR> tomsmeding, science doesn't answer the why, only how... oh
2024-04-06 23:43:08 +0200 <tomsmeding> this is what you get when you unwrap the newtypes
2024-04-06 23:43:37 +0200 <tomsmeding> being able to read this, and imagine how the corresponding Functor/Applicative/Monad instances will behave, allows you to make sense of those monad transformer stacks
2024-04-06 23:44:13 +0200 <tomsmeding> personally I find e.g. `s -> Either e (a, s)` understandable (after a few seconds of staring at it), but `StateT s (Either e) a` completely opaque
2024-04-06 23:44:23 +0200 <tri> ok, gotta take another few months to work on these again
2024-04-06 23:45:09 +0200 <tomsmeding> so if the monad transformer stack is mildly complicated, or I can't figure out how to write it precisely, I "just" write down the underlying representation and write the F/A/M instances myself
2024-04-06 23:45:28 +0200 <tomsmeding> once you have a good feel for these monads, writing those instances becomes fairly straightforward
2024-04-06 23:45:38 +0200 <tomsmeding> and then you have freedom in your reign over the monads ;)
2024-04-06 23:45:39 +0200 <tri> ok thank you
2024-04-06 23:46:06 +0200 <tomsmeding> that is, if you're interested in knowing more about this
2024-04-06 23:46:45 +0200 <tri> i mean if that's the only way to learn and use haskell
2024-04-06 23:46:59 +0200 <tomsmeding> depends on what kind of haskell code you want to write
2024-04-06 23:47:11 +0200 <tomsmeding> not all haskell code needs fancy monads
2024-04-06 23:47:28 +0200 <tomsmeding> but if you look at codebases in the wild, you may encounter some
2024-04-06 23:47:28 +0200 <tri> i've already invested a lot of time into this, and now im a bit stuck with monad transformer, so im going back to re-learn the F/A/M
2024-04-06 23:47:35 +0200 <tomsmeding> I see
2024-04-06 23:47:50 +0200 <tomsmeding> yeah, my understanding of monad transformers is very much through what I just explained
2024-04-06 23:48:04 +0200 <tri> yea i skimmed a lot in Learn Haskell From First Principle to get a sense of these
2024-04-06 23:48:08 +0200 <tomsmeding> so if you want to understand monad transformers, I recommend looking more into this
2024-04-06 23:48:12 +0200madeleine-sydney(~sadie-sor@user/madeleine-sydney) (Ping timeout: 250 seconds)
2024-04-06 23:48:26 +0200 <tri> the book is really heavy and im so fed up with the wordiness
2024-04-06 23:48:32 +0200 <tomsmeding> heh
2024-04-06 23:48:35 +0200 <tri> so now i take a break and read another book
2024-04-06 23:48:40 +0200 <tri> to get another perspective
2024-04-06 23:49:09 +0200ftweedal(~ftweedal@211.30.152.176)
2024-04-06 23:50:43 +0200 <EvanR> a picture is worth 1000 words, a formula is worth 1000 pictures
2024-04-06 23:50:52 +0200 <EvanR> so next time get a book of formulas xD
2024-04-06 23:51:46 +0200 <tomsmeding> thing is that a formula worth 1000 pictures often takes as long to understand as looking at all of those 1000 pictures
2024-04-06 23:52:27 +0200sadie-sorceress(~sadie-sor@c-76-155-235-153.hsd1.co.comcast.net)
2024-04-06 23:52:41 +0200 <geekosaur> and/or require you to understand 1000 other formulas first
2024-04-06 23:54:08 +0200michalz(~michalz@185.246.207.221) (Quit: ZNC 1.8.2 - https://znc.in)
2024-04-06 23:55:20 +0200 <Inst> thanks tomsmeding
2024-04-06 23:58:27 +0200euphores(~SASL_euph@user/euphores) (Ping timeout: 268 seconds)
2024-04-06 23:58:46 +0200peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)