2022/07/17

2022-07-17 00:07:31 +0200_xor(~xor@74.215.182.83)
2022-07-17 00:10:45 +0200 <[itchyjunk]> Codewars has haskell challanges. I thought I would give one a try. It felt pretty easy :D
2022-07-17 00:10:46 +0200 <[itchyjunk]> https://bpa.st/CQWA
2022-07-17 00:11:13 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Remote host closed the connection)
2022-07-17 00:11:22 +0200 <mrianbloom> Can you improve compile times by being specific about module imports and outputs?
2022-07-17 00:11:33 +0200 <mrianbloom> exports
2022-07-17 00:11:36 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-17 00:11:48 +0200 <c_wraith> I doubt that's going to have a significant impact unless you have a *lot* of modules
2022-07-17 00:12:26 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 244 seconds)
2022-07-17 00:12:50 +0200 <c_wraith> however, good module structure can have a huge impact. If you can set things up so that common changes don't require recompiling most modules, that is a big win
2022-07-17 00:14:16 +0200 <mrianbloom> I see. I have hundreds of modules :)
2022-07-17 00:15:02 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-07-17 00:15:36 +0200 <c_wraith> I'd expect explicit exports to matter more than explicit imports. an import list still needs to be checked against the exports. But the export list shrinking means every import has fewer things to check against.
2022-07-17 00:16:32 +0200 <c_wraith> [itchyjunk]: dnaToRna could just be written as "map go"
2022-07-17 00:16:54 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-07-17 00:17:24 +0200 <qrpnxz> "your language feature is my library" https://hackage.haskell.org/package/named-0.3.0.1/docs/Named.html
2022-07-17 00:17:26 +0200 <qrpnxz> unbelievable
2022-07-17 00:18:01 +0200 <c_wraith> I mean, that *is* using extra language features
2022-07-17 00:18:07 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:5973:6a7e:c03d:efea) (Ping timeout: 244 seconds)
2022-07-17 00:20:10 +0200 <qrpnxz> it's not exposing an underlying named parameter feature, it's constructing one
2022-07-17 00:20:52 +0200 <c_wraith> true, but it's making use of the OverloadedLabels language extension to get syntax to do it
2022-07-17 00:21:07 +0200 <[itchyjunk]> c_wraith, yes someone suggested i can fmap go
2022-07-17 00:21:12 +0200 <qrpnxz> yes
2022-07-17 00:21:17 +0200 <[itchyjunk]> but idk if that's more efficient/better or not hmmm
2022-07-17 00:21:28 +0200 <c_wraith> it's not going to matter in that case.
2022-07-17 00:21:29 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 00:21:35 +0200 <c_wraith> But sometimes it can
2022-07-17 00:21:43 +0200 <[itchyjunk]> hmmmm
2022-07-17 00:23:11 +0200 <qrpnxz> it saves the time of writing that function XD
2022-07-17 00:27:11 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 00:30:36 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:5973:6a7e:c03d:efea)
2022-07-17 00:34:44 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 00:35:09 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 00:36:44 +0200dsrt^(~dsrt@c-73-207-207-252.hsd1.ga.comcast.net) (Ping timeout: 244 seconds)
2022-07-17 00:36:58 +0200seriously(~seriously@ool-18bd55d4.dyn.optonline.net) (Ping timeout: 252 seconds)
2022-07-17 00:37:26 +0200 <[itchyjunk]> :t map
2022-07-17 00:37:27 +0200 <lambdabot> (a -> b) -> [a] -> [b]
2022-07-17 00:37:42 +0200 <[itchyjunk]> :t fmap
2022-07-17 00:37:43 +0200 <lambdabot> Functor f => (a -> b) -> f a -> f b
2022-07-17 00:38:21 +0200 <geekosaur> % :t fmap @[]
2022-07-17 00:38:21 +0200 <yahb2> <interactive>:1:1: error: ; Pattern syntax in expression context: fmap@[] ; Did you mean to enable TypeApplications?
2022-07-17 00:38:39 +0200 <geekosaur> % :set -XTypeApplications
2022-07-17 00:38:39 +0200 <yahb2> <no output>
2022-07-17 00:38:41 +0200 <geekosaur> % :t fmap @[]
2022-07-17 00:38:41 +0200 <yahb2> fmap @[] :: (a -> b) -> [a] -> [b]
2022-07-17 00:38:50 +0200jgeerds(~jgeerds@55d437cf.access.ecotel.net) (Remote host closed the connection)
2022-07-17 00:39:10 +0200 <[itchyjunk]> so map is easy to read, take a function that maps a to b and a list full of a and return a list full of b
2022-07-17 00:39:30 +0200inversed(~inversed@05412f44.skybroadband.com) (Ping timeout: 240 seconds)
2022-07-17 00:39:40 +0200 <[itchyjunk]> in second case, its taking a function that maps a to b
2022-07-17 00:39:52 +0200 <[itchyjunk]> then i am lost :x
2022-07-17 00:40:18 +0200 <geekosaur> :t fmap @Maybe
2022-07-17 00:40:19 +0200 <lambdabot> error:
2022-07-17 00:40:19 +0200 <lambdabot> Pattern syntax in expression context: fmap@Maybe
2022-07-17 00:40:19 +0200 <lambdabot> Did you mean to enable TypeApplications?
2022-07-17 00:40:23 +0200 <geekosaur> whoops
2022-07-17 00:40:27 +0200 <geekosaur> % :t fmap @Maybe
2022-07-17 00:40:27 +0200 <yahb2> fmap @Maybe :: (a -> b) -> Maybe a -> Maybe b
2022-07-17 00:41:00 +0200inversed(~inversed@05412f44.skybroadband.com)
2022-07-17 00:41:34 +0200 <geekosaur> it takes a value "contained in" a type that has a Functor instance. 9"contained in" being a bit of a lie, as IO is a Functor)
2022-07-17 00:41:35 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds)
2022-07-17 00:41:49 +0200 <geekosaur> so it maps over the Functor
2022-07-17 00:41:54 +0200 <yin> think of `[a]` as `[] a`
2022-07-17 00:42:13 +0200pgass(~pg@190.247.245.154)
2022-07-17 00:42:34 +0200 <yin> which you can actually write, foe the same effect
2022-07-17 00:42:36 +0200 <geekosaur> this in fact defines a Functor; it's a type constructor which can retain its shape
2022-07-17 00:43:00 +0200 <[itchyjunk]> hmmm
2022-07-17 00:43:06 +0200 <geekosaur> so [a] becomes [b], Just a becomes Just b, IO a becomes IO b, etc.
2022-07-17 00:43:50 +0200 <yin> f a becomes f b
2022-07-17 00:43:51 +0200 <geekosaur> but Set a can't become Set b because its shape would change (thus Set doesn't have a Functor instance)
2022-07-17 00:44:49 +0200 <[itchyjunk]> Hmm, i vaguely get it. But I don't think i understand shape
2022-07-17 00:45:00 +0200 <geekosaur> it's kinda fuzzy
2022-07-17 00:45:27 +0200 <geekosaur> for things like Maybe and [] it's easy: a Just a can't become a Nothing, it has to become a Just b
2022-07-17 00:46:05 +0200 <geekosaur> for Set it'[s harder, because there's an Ord constraint and that constraint's shape ("ordering") can't be captured by a Functor
2022-07-17 00:47:08 +0200 <[itchyjunk]> hm
2022-07-17 00:47:09 +0200 <geekosaur> there is a more formal definition of what I called "shape", but at some level it becomes fuzzy again 🙂
2022-07-17 00:47:44 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 00:48:34 +0200 <geekosaur> (for a list, you know the resulting list has the same relative ordering and the same number of elements)
2022-07-17 00:48:49 +0200 <geekosaur> (which describes the shape of a list)
2022-07-17 00:50:15 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 276 seconds)
2022-07-17 00:51:23 +0200shapr(~user@2600:4040:2d31:7100:a4a4:5e03:eeb6:d024) (Remote host closed the connection)
2022-07-17 00:56:33 +0200dsrt^(~dsrt@c-73-207-207-252.hsd1.ga.comcast.net)
2022-07-17 00:57:02 +0200Shires(~Shires@user/shires)
2022-07-17 00:57:23 +0200[Leary](~Leary]@122-58-224-198-vdsl.sparkbb.co.nz) (Ping timeout: 244 seconds)
2022-07-17 00:57:52 +0200Shires(~Shires@user/shires) ()
2022-07-17 00:59:23 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:5973:6a7e:c03d:efea) (Ping timeout: 272 seconds)
2022-07-17 01:00:45 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-07-17 01:00:46 +0200moonsheep(~user@user/moonsheep)
2022-07-17 01:02:46 +0200 <c_wraith> thanks to parametricity, "same shape" ends up being formally expressed as "for all x :: T a, (fmap id x) is equivalent to x"
2022-07-17 01:03:41 +0200 <monochrom> fmap f . fmap g = fmap (f . g) also helps.
2022-07-17 01:05:14 +0200 <c_wraith> I'm pretty sure that one doesn't even need to be checked in Haskell, thanks to parametricity.
2022-07-17 01:05:24 +0200 <c_wraith> that just follows from fmap id = id
2022-07-17 01:05:43 +0200 <monochrom> But if you understand "(a->b) -> [] a -> [] b" then fmap is just generalizing from [] to f.
2022-07-17 01:05:50 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-07-17 01:05:59 +0200 <monochrom> Yes that's right, [a] is syntax sugar for [] a
2022-07-17 01:06:08 +0200 <geekosaur> which is why I started out by demonstrating that fmap on [] is map
2022-07-17 01:06:45 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 01:07:25 +0200 <yin> any reason why we can't just generalize map already?
2022-07-17 01:07:58 +0200 <monochrom> I don't know. We did generalize length.
2022-07-17 01:08:05 +0200 <c_wraith> the only reason I think is any good is that it'd break a lot of Functor definitions in the wild
2022-07-17 01:08:34 +0200 <monochrom> Or rather, I know.
2022-07-17 01:09:05 +0200 <monochrom> Standard library decisions are social, cultural, and human; not technical or logically consistent.
2022-07-17 01:09:16 +0200 <yin> c_wraith: how would it break?
2022-07-17 01:09:51 +0200 <yin> we could keep fmap like we kept return
2022-07-17 01:10:03 +0200 <geekosaur> people expect map to force lists
2022-07-17 01:10:22 +0200 <monochrom> Well, I thought people expected length to force lists, too.
2022-07-17 01:11:06 +0200 <geekosaur> sadly that's where generalizing map will bite hardest: the number of people who rely on map to ensure Foldable/Traversable is on a list
2022-07-17 01:11:16 +0200 <yin> people who don't force it in signatures deserve to have their code break >=)
2022-07-17 01:11:18 +0200 <monochrom> On top of that, people hated how length forces Int and asked why it is not synonym of genericLength already.
2022-07-17 01:11:22 +0200 <geekosaur> and to raise a type error if it isn't
2022-07-17 01:12:07 +0200 <yin> slippery slope then, i get it
2022-07-17 01:12:08 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 01:12:36 +0200 <monochrom> Haskell was not designed by AI.
2022-07-17 01:12:49 +0200 <yin> then we would complain about everywhere Int is used innapropriedly
2022-07-17 01:12:54 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 01:12:59 +0200 <Bulby[m]> i want to see a language that was designed by an ai
2022-07-17 01:14:28 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:5973:6a7e:c03d:efea)
2022-07-17 01:15:25 +0200nate4(~nate@98.45.169.16)
2022-07-17 01:17:19 +0200 <[itchyjunk]> hmm
2022-07-17 01:28:18 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:5973:6a7e:c03d:efea) (Quit: WeeChat 3.6)
2022-07-17 01:29:07 +0200 <qrpnxz> type application is standard now in GHC no? so you could do map @[] or "where lmap = map @[]" or "where lmap :: ...; lmap = map" etc. etc. i mean it's such a niche use case to force list so really take your pick and let us have map! (though tbh fmap is just fine though it is just a bit sad that it isn't simply and beautifully "map")
2022-07-17 01:34:12 +0200 <yushyin> map was polymorphic in the past :)
2022-07-17 01:34:21 +0200 <qrpnxz> i'm dead
2022-07-17 01:37:30 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 240 seconds)
2022-07-17 01:38:17 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-07-17 01:39:28 +0200 <yushyin> afaik, it was made monophoric for didactic reasons and fmap was introduced for it. it was probably thought that difficult type errors because of polymorphism could confuse newcomers too much?
2022-07-17 01:41:20 +0200 <geekosaur> …and then we made all the rest of Data.List be Foldable anyway
2022-07-17 01:41:22 +0200 <monochrom> Type application is not standard in GHC.
2022-07-17 01:41:49 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:f45c:29e7:726f:443d) (Ping timeout: 272 seconds)
2022-07-17 01:42:06 +0200 <monochrom> If you want to do fmap@[] you have to turn on the extension.
2022-07-17 01:42:35 +0200 <monochrom> Most of us turn off that extension. That's how de facto non-standard it is.
2022-07-17 01:42:39 +0200 <qrpnxz> it's a stable extension that is part of the GHC2021 set
2022-07-17 01:42:59 +0200 <qrpnxz> why would you turn it off
2022-07-17 01:44:39 +0200 <geekosaur> because you only know how to use it safely if you know the oirder in which type variables were defined
2022-07-17 01:44:54 +0200 <monochrom> I don't need it, and KISS.
2022-07-17 01:45:09 +0200mvk(~mvk@2607:fea8:5ce3:8500::909a)
2022-07-17 01:45:25 +0200 <monochrom> I don't even teach do-notation to my students >:)
2022-07-17 01:45:38 +0200 <geekosaur> they even had to add special syntax so people can define their type variables' visibility in a specific order for TypeApplications
2022-07-17 01:46:05 +0200 <qrpnxz> monochrom: lol oof
2022-07-17 01:46:37 +0200 <qrpnxz> geekosaur: you make explicit forall sound more complicated than it really is lol
2022-07-17 01:46:46 +0200 <geekosaur> it's more than explicit forall
2022-07-17 01:47:11 +0200 <qrpnxz> how
2022-07-17 01:47:33 +0200 <geekosaur> the order in which you write type variables matters. they added extra braces so you can still write type variables in the order they need to be for your type signature, but still declare them for TypeApplications
2022-07-17 01:48:14 +0200 <qrpnxz> mmm could you give an example
2022-07-17 01:49:03 +0200 <geekosaur> https://downloads.haskell.org/ghc/9.2.1/docs/html/users_guide/exts/type_applications.html#ordering…
2022-07-17 01:49:41 +0200 <geekosaur> and the next section talks about the brace syntax
2022-07-17 01:49:46 +0200Tuplanolla(~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) (Quit: Leaving.)
2022-07-17 01:50:08 +0200 <monochrom> I reckon that one day GHC2021 could be pretty standard, but not today.
2022-07-17 01:50:19 +0200 <geekosaur> the result of this is that many people consider TypeApplications fundamentally unstable and unsafe
2022-07-17 01:50:40 +0200 <geekosaur> and are Not Happy that it made GHC2021
2022-07-17 01:50:41 +0200 <qrpnxz> oh i see that's nice
2022-07-17 01:50:54 +0200 <qrpnxz> (talking about the brace syntax)
2022-07-17 01:51:11 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Remote host closed the connection)
2022-07-17 01:52:01 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-17 01:52:17 +0200 <qrpnxz> i don't see how any of what you mentioned either implies unstable or unsafe.
2022-07-17 01:52:52 +0200 <qrpnxz> is it likely that typeapplications will change a lot of fundamentally from how it currently works?
2022-07-17 01:53:00 +0200 <qrpnxz> does it allow unsound things to happen?
2022-07-17 01:53:03 +0200 <geekosaur> change your type signature in a way that should be equivalent, and suddenly TypeApplications breaks
2022-07-17 01:53:07 +0200 <monochrom> I don't go as far as the wordings "unstable" or "unsafe". My wording is the milder "fragile", "the devil is in the details". I mean, it can't be worse than TeX, but TeX has not been described as unstable or unsafe. Just fragile. :)
2022-07-17 01:53:22 +0200 <qrpnxz> geekosaur: well you changed your API, it's like changing the order of your variables
2022-07-17 01:53:30 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 01:53:35 +0200 <geekosaur> but that has never been part of the API
2022-07-17 01:53:42 +0200 <maerwald> didn't SPJ talk about... what was it "big lambda" for types that would make type applications obsolete?
2022-07-17 01:53:47 +0200 <geekosaur> except suddenly it is and there's nothing to help you deal with it
2022-07-17 01:54:02 +0200 <geekosaur> the types would be the same, but TypeApplications suddenly breaks
2022-07-17 01:54:04 +0200 <qrpnxz> didn't you just show how to deal with it tho with the braces?
2022-07-17 01:54:10 +0200 <qrpnxz> and the explicit forall
2022-07-17 01:54:22 +0200 <geekosaur> which you have to know about and opt in to
2022-07-17 01:54:33 +0200 <monochrom> Hrm big lambda would obsolete many many things. Including a large chunk of type inference too :)
2022-07-17 01:54:48 +0200 <qrpnxz> if you haven't opted in then user knows that they cannot relay on your type variables
2022-07-17 01:54:49 +0200 <geekosaur> because someone you don't know a year later decided to use TypeApplications with your library
2022-07-17 01:54:55 +0200 <monochrom> (Unless I'm thinking of a different big lambda.)
2022-07-17 01:55:19 +0200 <qrpnxz> honestly by default you should probably not rely on type variable order unless explicitly documented probably
2022-07-17 01:55:20 +0200 <geekosaur> and the user doesn't know that you didn't declare them
2022-07-17 01:55:52 +0200 <geekosaur> it is, in short, not part of the contract implied by a type signature
2022-07-17 01:57:13 +0200 <qrpnxz> does haddock show explict forall if you put explicit forall in your code
2022-07-17 01:57:42 +0200 <geekosaur> haddock shows forall. it does not show the braces if you need to use them
2022-07-17 01:58:08 +0200 <qrpnxz> eh, too bad. One day :)
2022-07-17 01:59:18 +0200moonsheep(~user@user/moonsheep) (Remote host closed the connection)
2022-07-17 01:59:26 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-17 02:00:19 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 02:01:44 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-17 02:05:11 +0200califax(~califax@user/califx)
2022-07-17 02:06:15 +0200 <SrPx> just a little nice thing I did today: https://twitter.com/VictorTaelin/status/1548458824821944322
2022-07-17 02:06:23 +0200 <SrPx> Debug.Trace with λ-inspecting capabilities
2022-07-17 02:06:53 +0200 <qrpnxz> lovely!
2022-07-17 02:09:51 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 02:10:50 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
2022-07-17 02:14:59 +0200dsrt^(~dsrt@c-73-207-207-252.hsd1.ga.comcast.net) (Remote host closed the connection)
2022-07-17 02:16:30 +0200vglfr(~vglfr@88.155.51.199) (Ping timeout: 240 seconds)
2022-07-17 02:16:58 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 02:17:14 +0200tabemann(~tabemann@2600:380:a15c:4a49:de17:348c:4193:88a8)
2022-07-17 02:17:33 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-07-17 02:22:38 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 244 seconds)
2022-07-17 02:31:20 +0200wbntdodt^(~wbntdodt@c-73-207-207-252.hsd1.ga.comcast.net)
2022-07-17 02:34:15 +0200nate4(~nate@98.45.169.16) (Ping timeout: 276 seconds)
2022-07-17 02:38:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 02:55:21 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 02:58:49 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Ping timeout: 244 seconds)
2022-07-17 02:59:30 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-07-17 03:06:42 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-07-17 03:07:24 +0200tabemann_(~tabemann@h96-61-110-237.mtjltn.dedicated.static.tds.net)
2022-07-17 03:10:10 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
2022-07-17 03:10:19 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com)
2022-07-17 03:10:31 +0200tabemann(~tabemann@2600:380:a15c:4a49:de17:348c:4193:88a8) (Killed (NickServ (GHOST command used by tabemann_!~tabemann@h96-61-110-237.mtjltn.dedicated.static.tds.net)))
2022-07-17 03:10:57 +0200tabemann_tabemann
2022-07-17 03:10:58 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-17 03:11:04 +0200califax_(~califax@user/califx)
2022-07-17 03:11:57 +0200tabemann(~tabemann@h96-61-110-237.mtjltn.dedicated.static.tds.net) (Client Quit)
2022-07-17 03:12:18 +0200califax_califax
2022-07-17 03:14:38 +0200yuv4199(~yuv4199@user/yuv4199)
2022-07-17 03:15:11 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Quit: ,-)
2022-07-17 03:15:49 +0200byorgey(~byorgey@155.138.238.211) (Quit: Lost terminal)
2022-07-17 03:15:50 +0200nate4(~nate@98.45.169.16)
2022-07-17 03:16:54 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 244 seconds)
2022-07-17 03:17:57 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net)
2022-07-17 03:23:50 +0200nate4(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-07-17 03:30:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-07-17 03:31:50 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 03:34:11 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-07-17 03:39:50 +0200benin0(~benin@183.82.24.82) (Ping timeout: 240 seconds)
2022-07-17 03:42:47 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 03:48:15 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-07-17 03:52:45 +0200nate4(~nate@98.45.169.16)
2022-07-17 03:56:47 +0200lainon(~lainon@2600:1700:1bb0:1c10:4df5:d7cd:2eb0:d172)
2022-07-17 03:57:10 +0200nate4(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-07-17 04:00:02 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-17 04:00:29 +0200Lumia(~Lumia@c-24-34-172-110.hsd1.ma.comcast.net) (Quit: ,-)
2022-07-17 04:00:55 +0200califax(~califax@user/califx)
2022-07-17 04:01:51 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 244 seconds)
2022-07-17 04:02:30 +0200mvk(~mvk@2607:fea8:5ce3:8500::909a) (Ping timeout: 240 seconds)
2022-07-17 04:03:41 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-07-17 04:04:07 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 04:04:38 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
2022-07-17 04:06:00 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-07-17 04:09:46 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 04:10:32 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 04:10:51 +0200perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.5)
2022-07-17 04:12:40 +0200lainon(~lainon@2600:1700:1bb0:1c10:4df5:d7cd:2eb0:d172) (Quit: Textual IRC Client: www.textualapp.com)
2022-07-17 04:16:31 +0200jakalx(~jakalx@base.jakalx.net)
2022-07-17 04:17:04 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 04:28:02 +0200ChaiTRex(~ChaiTRex@user/chaitrex) (Ping timeout: 268 seconds)
2022-07-17 04:29:08 +0200ChaiTRex(~ChaiTRex@user/chaitrex)
2022-07-17 04:31:10 +0200mvk(~mvk@2607:fea8:5ce3:8500::909a)
2022-07-17 04:33:18 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 04:40:25 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
2022-07-17 04:40:43 +0200finn_elija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 04:40:43 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-07-17 04:40:43 +0200finn_elijaFinnElija
2022-07-17 04:46:10 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 04:47:19 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.5)
2022-07-17 04:48:55 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
2022-07-17 04:57:20 +0200TonyStone(~TonyStone@2603-7080-8607-c36a-c542-8032-a2eb-86d5.res6.spectrum.com) (Quit: Leaving)
2022-07-17 04:58:30 +0200td_(~td@94.134.91.147) (Ping timeout: 240 seconds)
2022-07-17 05:00:30 +0200td_(~td@94.134.91.33)
2022-07-17 05:02:35 +0200mud(~mud@user/kadoban) (Ping timeout: 272 seconds)
2022-07-17 05:12:55 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 05:14:56 +0200nate4(~nate@98.45.169.16)
2022-07-17 05:15:56 +0200zebrag(~chris@user/zebrag) (Quit: Konversation terminated!)
2022-07-17 05:17:25 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 05:17:34 +0200econo(uid147250@user/econo)
2022-07-17 05:17:38 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 05:19:30 +0200nate4(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-07-17 05:20:53 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 05:25:05 +0200byorgey(~byorgey@155.138.238.211)
2022-07-17 05:25:30 +0200mvk(~mvk@2607:fea8:5ce3:8500::909a) (Ping timeout: 240 seconds)
2022-07-17 05:26:30 +0200marquis_andras(~marquis_a@202-161-119-113.tpgi.com.au) (Ping timeout: 264 seconds)
2022-07-17 05:28:11 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 05:33:07 +0200marquis_andras(~marquis_a@202-161-119-113.tpgi.com.au)
2022-07-17 05:33:25 +0200mud(~mud@user/kadoban)
2022-07-17 05:33:42 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 264 seconds)
2022-07-17 05:45:37 +0200Infinite(~Infinite@2405:201:6014:10d3:ad94:e94c:999a:8ee4)
2022-07-17 05:48:26 +0200benin0(~benin@183.82.24.82)
2022-07-17 06:15:03 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 06:23:49 +0200nate4(~nate@98.45.169.16)
2022-07-17 06:24:59 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 06:25:10 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-07-17 06:27:39 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net)
2022-07-17 06:28:35 +0200nate4(~nate@98.45.169.16) (Ping timeout: 244 seconds)
2022-07-17 06:35:56 +0200qhong(~qhong@DN200ouo5.stanford.edu) (Read error: Connection reset by peer)
2022-07-17 06:36:05 +0200qhong(~qhong@rescomp-21-400677.stanford.edu)
2022-07-17 06:37:39 +0200qhong(~qhong@rescomp-21-400677.stanford.edu) (Read error: Connection reset by peer)
2022-07-17 06:37:49 +0200qhong(~qhong@rescomp-21-400677.stanford.edu)
2022-07-17 06:45:06 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net) (Ping timeout: 244 seconds)
2022-07-17 06:47:43 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-07-17 07:03:33 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 272 seconds)
2022-07-17 07:04:51 +0200perrierjouet(~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
2022-07-17 07:05:53 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 07:06:41 +0200[Leary](~Leary]@122-58-224-198-vdsl.sparkbb.co.nz)
2022-07-17 07:06:51 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 07:11:47 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Ping timeout: 272 seconds)
2022-07-17 07:12:57 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 07:14:06 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net)
2022-07-17 07:14:58 +0200dextaa(~DV@user/dextaa)
2022-07-17 07:21:42 +0200Infinite(~Infinite@2405:201:6014:10d3:ad94:e94c:999a:8ee4) (Quit: Client closed)
2022-07-17 07:22:33 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-07-17 07:24:42 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 07:25:13 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 07:25:25 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 07:29:15 +0200codaraxis__(~codaraxis@user/codaraxis)
2022-07-17 07:30:28 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 07:33:10 +0200codaraxis___(~codaraxis@user/codaraxis) (Ping timeout: 244 seconds)
2022-07-17 07:36:23 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 07:38:10 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-07-17 07:44:14 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 07:44:52 +0200Infinite(~Infinite@2405:201:6014:10d3:4f78:d3da:1ccc:ed35)
2022-07-17 07:44:58 +0200winny(~weechat@user/winny) (Remote host closed the connection)
2022-07-17 07:45:59 +0200winny(~weechat@user/winny)
2022-07-17 07:58:30 +0200pgass(~pg@190.247.245.154) (Ping timeout: 240 seconds)
2022-07-17 07:58:56 +0200kk(uid561904@id-561904.hampstead.irccloud.com)
2022-07-17 08:00:05 +0200redmp(~redmp@mobile-166-170-39-12.mycingular.net)
2022-07-17 08:00:05 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-07-17 08:00:22 +0200kenran(~kenran@200116b82bf92200fbcfdaca0ff5dcd6.dip.versatel-1u1.de)
2022-07-17 08:00:52 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi)
2022-07-17 08:01:42 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:02:09 +0200kenran(~kenran@200116b82bf92200fbcfdaca0ff5dcd6.dip.versatel-1u1.de) (Client Quit)
2022-07-17 08:02:22 +0200kmein(~weechat@user/kmein) (Quit: ciao kakao)
2022-07-17 08:02:23 +0200gleostocha(~runic@c-73-15-32-211.hsd1.ca.comcast.net)
2022-07-17 08:02:54 +0200kmein(~weechat@user/kmein)
2022-07-17 08:06:43 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 08:07:30 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
2022-07-17 08:09:58 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:10:10 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:11:28 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:11:40 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:11:58 +0200nate4(~nate@98.45.169.16)
2022-07-17 08:17:01 +0200nate4(~nate@98.45.169.16) (Ping timeout: 272 seconds)
2022-07-17 08:18:29 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:18:30 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 08:18:42 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:23:22 +0200Infinite(~Infinite@2405:201:6014:10d3:4f78:d3da:1ccc:ed35) (Ping timeout: 252 seconds)
2022-07-17 08:24:42 +0200 <nasosev> any obvious reason why `cabal repl` does not have tab completion for imported modules ?
2022-07-17 08:28:49 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:29:02 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:32:50 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 08:34:45 +0200stefan-_(~cri@42dots.de) (Ping timeout: 272 seconds)
2022-07-17 08:36:12 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 08:38:31 +0200stefan-_(~cri@42dots.de)
2022-07-17 08:38:37 +0200timothy93(~timothy@202-142-132-25.ca8e84.mel.static.aussiebb.net)
2022-07-17 08:40:31 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de)
2022-07-17 08:42:10 +0200 <timothy93> Hi, can someone help me with something? I've made a stream but interleaving them isn't being lazy: https://paste.tomsmeding.com/9HPAOIJN, `Cons a _ = interleaveStreams (streamRepeat 2) undefined` works, but trying to access a gives me the Prelude.undefined exception.
2022-07-17 08:45:09 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:45:10 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-07-17 08:45:22 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:46:18 +0200winny(~weechat@user/winny) (Remote host closed the connection)
2022-07-17 08:46:18 +0200califax(~califax@user/califx) (Read error: Connection reset by peer)
2022-07-17 08:52:59 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 08:53:12 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 08:56:59 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-07-17 08:59:50 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 240 seconds)
2022-07-17 09:10:08 +0200 <c_wraith> timothy93: you're matching the heads of each stream at the same time. That's stricter than necessary - you could delay matching the head of the second argument until producing the first element.
2022-07-17 09:10:15 +0200 <tomsmeding> nasosev: tab completion for what exactly? Should work in my experience
2022-07-17 09:11:47 +0200 <timothy93> c_wraith: thanks, this works: `interleaveStreams (Cons a s) t = Cons a (interleaveStreams t s)`
2022-07-17 09:12:07 +0200 <c_wraith> that's the usual implementation of that function, yes
2022-07-17 09:13:30 +0200califax(~califax@user/califx)
2022-07-17 09:13:35 +0200noteness(~noteness@user/noteness)
2022-07-17 09:13:35 +0200winny(~weechat@user/winny)
2022-07-17 09:14:04 +0200 <nasosev> tomsmeding: for exaple, I have a module named MyModule and a function that s listed in 'exposed-modules' under 'library' in my cabal file. In the repl, typing 'M' then tab, it is not listed
2022-07-17 09:14:34 +0200 <tomsmeding> Oh completion for _module names_
2022-07-17 09:14:35 +0200 <nasosev> although other stuff from base appears
2022-07-17 09:14:45 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 09:15:37 +0200 <tomsmeding> Oh ffs my termux cabal doesn't do repl
2022-07-17 09:15:56 +0200 <[exa]> nasosev: just checking -- if you type the rest of the module name and binding manually, the name exists, right?
2022-07-17 09:16:04 +0200 <nasosev> [exa]: yes
2022-07-17 09:16:25 +0200 <[exa]> what ghc version is that? (I'd say it's more of a ghci problem than cabal problem)
2022-07-17 09:16:49 +0200 <nasosev> 9.2.2
2022-07-17 09:18:48 +0200 <nasosev> it works correctly with `stack ghci` and ghc 9.0.2
2022-07-17 09:19:16 +0200 <nasosev> (i'm in the process of migrating my project to cabal with 9.2.2)
2022-07-17 09:19:49 +0200 <[exa]> it works here for me with 9.0.2 and cabal
2022-07-17 09:19:57 +0200 <[exa]> let's blame 9.2.2? :]
2022-07-17 09:20:05 +0200 <tomsmeding> nasosev: works for me on ghc 8.10.7, completion gives module names in current project in `cabal repl`
2022-07-17 09:20:17 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 09:20:19 +0200 <[exa]> (technically, stack vs cabal choice shouldn't have much influence on the autocompletion)
2022-07-17 09:21:57 +0200 <[exa]> lemme try with 9.2.x
2022-07-17 09:22:07 +0200 <nasosev> i see.not sure I can easily test 9.0.2 cause i just refactored my project to use OverloadedRecordDot
2022-07-17 09:22:10 +0200 <nasosev> ok
2022-07-17 09:22:50 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 09:24:24 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 09:25:02 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 09:25:03 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 09:25:40 +0200 <nasosev> it could also be a problem with my .cabal config ?
2022-07-17 09:26:07 +0200 <[exa]> anything specific that you changed?
2022-07-17 09:26:38 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-07-17 09:27:11 +0200 <nasosev> i started a new cabal project with `cabal init`, and i added all the internal modules to library -> exposed modules since they were not there
2022-07-17 09:27:20 +0200 <[exa]> that should be okay
2022-07-17 09:27:37 +0200 <nasosev> I noticed the stack project has a module called 'Paths_projectName', i guess it was generated by stack? is that related
2022-07-17 09:28:07 +0200 <nasosev> did you test it with 9.2.x btw? i got disconected for a minute when my computer fell asleep
2022-07-17 09:28:09 +0200 <[exa]> okay I have 9.2.3 here and MyModule.mything tabs correctly
2022-07-17 09:28:22 +0200 <tomsmeding> It can be generated for any project, stack chooses to do it always, is not related
2022-07-17 09:29:07 +0200vglfr(~vglfr@88.155.1.22)
2022-07-17 09:29:16 +0200 <nasosev> hmmm... related question, do you know how to get qualified names imported automatically in the repl? i've tried to put 'import My.Module qualified as Module' in my .ghci but it did not work
2022-07-17 09:30:18 +0200 <nasosev> trying to make my repl experience more comfortable... atm i copy and paste a long list of qualified imports from a text file everytime i spin it up
2022-07-17 09:30:46 +0200 <phma> nanosev: I created a stack project called random-ladder, and I get a message "Warning: Multiple files use the same module name: Paths_random_ladder found at the following paths"
2022-07-17 09:31:10 +0200 <tomsmeding> nasosev: why did that not work? Does it work when you write `import qualified My.Module as Module`?
2022-07-17 09:31:30 +0200 <phma> nasosev: any idea what this Paths_ thing is for, or where it is?
2022-07-17 09:32:18 +0200 <nasosev> phma: no idea
2022-07-17 09:32:50 +0200redmp(~redmp@mobile-166-170-39-12.mycingular.net) (Ping timeout: 240 seconds)
2022-07-17 09:33:03 +0200 <tomsmeding> phma: find .stack-work -name 'Paths_*.hs'
2022-07-17 09:33:20 +0200 <tomsmeding> It's a generated file that contains some metadata about the project
2022-07-17 09:33:42 +0200 <nasosev> tomsmeding: yes when i write the exact same line in the repl it works, but if it's in the .ghci it doesn't
2022-07-17 09:33:56 +0200 <tomsmeding> O.o
2022-07-17 09:35:08 +0200 <tomsmeding> Works for me on 8.10.7, `import qualified Prelude as P` as the only thing in ~/.ghci gives me P.head etc
2022-07-17 09:35:34 +0200 <tomsmeding> Oh wait, cabal repl is bound to interfere
2022-07-17 09:35:52 +0200 <nasosev> my .ghci also has some other stuff in it: https://pastebin.com/raw/cY0SjmDc
2022-07-17 09:36:03 +0200 <[exa]> yeah if I do the import MyModule in 9.2.3 ghci, I get a warning that MyModule doesn't exist (yet)
2022-07-17 09:36:12 +0200 <[exa]> s/warning/error/
2022-07-17 09:36:32 +0200 <tomsmeding> Oh no that just works
2022-07-17 09:37:09 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 09:37:16 +0200 <nasosev> without the other stuff still doesn't work
2022-07-17 09:37:35 +0200 <tomsmeding> Yeah importing modules from the current project in .ghci while using cabal repl runs into the issue that [exa] gave
2022-07-17 09:37:51 +0200 <tomsmeding> The modules are only brought in scope in ghci after .ghci runs
2022-07-17 09:38:16 +0200 <tomsmeding> But you should see a warning/error about that
2022-07-17 09:38:27 +0200 <nasosev> oh yeah, i do get that error too, didn't notice it before
2022-07-17 09:38:41 +0200 <[exa]> nasosev: technically, I usually have a toy module that has all the imports right, and I :load it (which is not a big deal, can be done as :l X if you name the module short :] )
2022-07-17 09:38:44 +0200 <nasosev> i tried loading the module in my repl with :m + .. and it also did not work
2022-07-17 09:38:47 +0200 <phma> Should stack.yaml.lock be committed to git or ignored?
2022-07-17 09:39:34 +0200 <tomsmeding> phma: https://docs.haskellstack.org/en/stable/lock_files/#lock-files
2022-07-17 09:39:37 +0200 <nasosev> [exa]: actually I tried that, I have a module that imports all the other modules of my project qualified, but it doesn't work
2022-07-17 09:40:16 +0200 <nasosev> e.g. I have a module MyLib, and in it i have a line `import qualified My.Module`
2022-07-17 09:40:36 +0200 <[exa]> nasosev: alternatively you can make your own "correct" load using `:def`, which should work in .ghci
2022-07-17 09:40:57 +0200 <nasosev> sorry -- 'import qualified My.Module as Module' . Then in ghci, If do ":l MyLib", `Module` is not in scope
2022-07-17 09:41:06 +0200 <[exa]> nasosev: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/ghci.html#ghci-cmd-:def
2022-07-17 09:41:18 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 09:41:36 +0200 <tomsmeding> :def myload \_ -> return "import qualified My.Module as Module\nimport qualified Prelude as P"
2022-07-17 09:41:50 +0200 <[exa]> I'd go for someting like :def L = return "import MyModule\n ..." yeah tomsmeding was faster.
2022-07-17 09:42:16 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:442d:46e5:a654:241a)
2022-07-17 09:42:33 +0200 <nasosev> hm, so if i have 50 modules i want to import I have to list them all after `return "...`
2022-07-17 09:42:55 +0200 <[exa]> you always work with 50 modules?
2022-07-17 09:43:08 +0200 <tomsmeding> This is defining a ghci macro, kinda hacky, so yes
2022-07-17 09:43:29 +0200 <[exa]> like technically the macro can perfectly read the module list from a file :D
2022-07-17 09:43:42 +0200 <tomsmeding> :p it's just haskell
2022-07-17 09:44:03 +0200 <tomsmeding> :def myload \_ -> readFile "imports.txt"
2022-07-17 09:44:22 +0200 <nasosev> yeah i want everything available in the repl with the qualified names
2022-07-17 09:44:32 +0200 <nasosev> tomsmeding: ok that is cool i'll try it
2022-07-17 09:44:46 +0200 <nasosev> i guess i'm trying to workaround this limitation https://stackoverflow.com/questions/4385195/re-export-qualified
2022-07-17 09:45:16 +0200 <tomsmeding> :def source readFile
2022-07-17 09:45:56 +0200xff0x(~xff0x@2405:6580:b080:900:df60:d63b:15e3:9245) (Ping timeout: 244 seconds)
2022-07-17 09:49:10 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 09:49:15 +0200 <nasosev> Ok, I get errors "could not load module.... memember of hidden package [myproject]..perhaps you need to add it to build-depends"
2022-07-17 09:49:45 +0200 <nasosev> i tried doing that but got other errors.. i guess the project cannot depend on itself ? :)
2022-07-17 09:50:07 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 272 seconds)
2022-07-17 09:50:55 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-07-17 09:51:17 +0200noteness(~noteness@user/noteness)
2022-07-17 09:53:33 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-07-17 09:54:35 +0200 <tomsmeding> nasosev: a project depending on itself is a contradiction
2022-07-17 09:54:45 +0200 <tomsmeding> You mean a different component in thr same cabal file?
2022-07-17 09:54:57 +0200 <tomsmeding> Cabal repl can only load one component at a time into the repl
2022-07-17 09:55:09 +0200 <tomsmeding> Hm, though importing should work
2022-07-17 09:55:22 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 09:55:27 +0200 <nasosev> i mean, when i did what you suggested, when the repl boots up it complains that hte modules in my imports.txt are member of the hidden package [myprojectname]
2022-07-17 09:56:11 +0200 <tomsmeding> nasosev: my suggestion was putting that :def in .ghci, and then manually running :myload after ghci has come up and your project has been loaded
2022-07-17 09:56:31 +0200 <nasosev> oh, my bad, i put :myload in the .ghci file
2022-07-17 09:56:38 +0200 <tomsmeding> Calling :myload in .ghci is useless because then you could've just listed the imports there anyway -- which is the same as before :p
2022-07-17 09:57:08 +0200 <tomsmeding> The point is that _first_ .ghci is loaded, _then_ the project is brought into scope, _then_ the interactive shell is started
2022-07-17 09:57:09 +0200 <nasosev> tomsmeding: ok that works great! sorry i was stupid
2022-07-17 09:57:20 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-07-17 09:57:50 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 240 seconds)
2022-07-17 09:58:30 +0200 <nasosev> and even better -- somehow this fixed the autocomplete issue as well! after I do :myload, all the qualified names are available in autocomplete
2022-07-17 09:58:44 +0200xff0x(~xff0x@2405:6580:b080:900:1300:28ff:6b85:b3ee)
2022-07-17 09:58:49 +0200 <nasosev> thank u everyone
2022-07-17 09:58:50 +0200vglfr(~vglfr@88.155.1.22) (Ping timeout: 240 seconds)
2022-07-17 09:59:24 +0200 <tomsmeding> Ah, so they weren't even imported in the first place :)
2022-07-17 09:59:25 +0200 <tomsmeding> Nice
2022-07-17 09:59:56 +0200 <tomsmeding> Glad that it works :)
2022-07-17 10:00:05 +0200 <nasosev> :)
2022-07-17 10:00:25 +0200 <tomsmeding> I just checked -- ghci has a command line flag to ad hoc load another .ghci file into the repl, but that also gets loaded before cabal loads in the modules
2022-07-17 10:00:29 +0200 <tomsmeding> So doesn't help here
2022-07-17 10:00:56 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-17 10:00:56 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 10:01:16 +0200califax(~califax@user/califx)
2022-07-17 10:01:29 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 10:04:07 +0200winny(~weechat@user/winny) (Remote host closed the connection)
2022-07-17 10:04:34 +0200winny(~weechat@user/winny)
2022-07-17 10:07:08 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Remote host closed the connection)
2022-07-17 10:09:21 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-07-17 10:10:32 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-07-17 10:11:48 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 10:15:24 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 244 seconds)
2022-07-17 10:16:02 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 10:17:10 +0200myme1(~myme@2a01:799:d5a:cd00:ae2e:877c:9fc6:a159) (Ping timeout: 272 seconds)
2022-07-17 10:17:50 +0200myme1(~myme@2a01:799:d5a:cd00:bd43:77d0:4f58:e98)
2022-07-17 10:20:18 +0200Tuplanolla(~Tuplanoll@91-159-69-97.elisa-laajakaista.fi)
2022-07-17 10:21:01 +0200 <nasosev> another question about defining stuff in .ghci: I want my pretty-simple printer to use the compact option by default. currently i have pretty-simple loaded with this .ghci file: https://pastebin.com/raw/cY0SjmDc
2022-07-17 10:22:13 +0200 <nasosev> the compact mode is activated by calling "pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompact = True}", but when i put that in .ghci and load the repl, it does not work and prints a message: "Some flags have not been recognized: CheckColorTty, defaultOutputOptionsDarkBg, {outputOptionsCompact, =, True}"
2022-07-17 10:22:20 +0200timothy93(~timothy@202-142-132-25.ca8e84.mel.static.aussiebb.net) (Quit: Client closed)
2022-07-17 10:22:46 +0200 <nasosev> with the definition in the .ghci .... :def! pretty \ _ -> pure ":set -interactive-print Text.Pretty.Simple.pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompact = True}"
2022-07-17 10:23:03 +0200 <tomsmeding> I think -interactive-print just wants a single identifier
2022-07-17 10:24:49 +0200 <nasosev> i had tried defining "printCompact = :def! pretty \ _ -> pure ":set -interactive-print Text.Pretty.Simple.pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompact = True}" in my project before, but now i understand why that won't work since .ghci loads before project
2022-07-17 10:24:53 +0200 <tomsmeding> Yeah, user guide confirms that
2022-07-17 10:25:15 +0200 <nasosev> typo: printCompact = Text.Pretty.Simple.pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompact = True}
2022-07-17 10:25:48 +0200fr33domlover(~fr33@bzq-79-178-75-11.red.bezeqint.net)
2022-07-17 10:25:51 +0200fr33domlover(~fr33@bzq-79-178-75-11.red.bezeqint.net) (Client Quit)
2022-07-17 10:26:21 +0200 <tomsmeding> Write your own package that exports precisely the function you want, install it, and load it in .ghci just like you load pretty-simple? :')
2022-07-17 10:26:26 +0200 <tomsmeding> This is not very ergonomic
2022-07-17 10:26:48 +0200fr33domlover(~fr33@bzq-79-178-75-11.red.bezeqint.net)
2022-07-17 10:27:40 +0200 <tomsmeding> Ghci is basically a surprisingly effective collection of hacks
2022-07-17 10:28:11 +0200 <tomsmeding> Perhaps that doesn't do justice to those working on ghci, sorry
2022-07-17 10:28:17 +0200Vajb(~Vajb@hag-jnsbng11-58c3ad-40.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-07-17 10:28:34 +0200 <tomsmeding> But a bunch of things certainly look like they could be more elegant in design (backwards-incompatibly)
2022-07-17 10:28:42 +0200noteness(~noteness@user/noteness)
2022-07-17 10:28:58 +0200Vajb(~Vajb@n1zigc3rgo9mpde2w-1.v6.elisa-mobile.fi)
2022-07-17 10:31:27 +0200 <nasosev> hmm, ok!
2022-07-17 10:41:06 +0200 <nasosev> i tried this, but does not work:
2022-07-17 10:41:11 +0200 <nasosev> :m + Text.Pretty.Simple
2022-07-17 10:41:11 +0200 <nasosev> :def printCompact \ _ -> pure "printCompact = Text.Pretty.Simple.pPrintStringOpt CheckColorTty defaultOutputOptionsDarkBg {outputOptionsCompact = True}"
2022-07-17 10:41:11 +0200 <nasosev> :printCompact
2022-07-17 10:41:13 +0200 <nasosev> :def! pretty \ _ -> pure ":set -interactive-print printCompact"
2022-07-17 10:44:49 +0200hyiltiz(~quassel@31.220.5.250) (Quit: hyiltiz)
2022-07-17 10:45:19 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 10:45:24 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 10:45:51 +0200nate4(~nate@98.45.169.16)
2022-07-17 10:50:30 +0200nate4(~nate@98.45.169.16) (Ping timeout: 240 seconds)
2022-07-17 10:53:57 +0200hyiltiz(~quassel@31.220.5.250)
2022-07-17 10:55:48 +0200 <tomsmeding> Are you putting this in .ghci?
2022-07-17 10:56:17 +0200 <tomsmeding> nasosev: local definitions in ghci, like your printCompact is, get lost on a :reload
2022-07-17 10:56:41 +0200 <tomsmeding> Hence the suggestion of putting it in a package :p
2022-07-17 10:56:50 +0200 <tomsmeding> % a = 42
2022-07-17 10:56:50 +0200 <yahb2> <no output>
2022-07-17 10:56:52 +0200 <tomsmeding> % a
2022-07-17 10:56:53 +0200 <yahb2> 42
2022-07-17 10:56:56 +0200 <tomsmeding> % :r
2022-07-17 10:56:56 +0200 <yahb2> Ok, one module loaded.
2022-07-17 10:56:58 +0200 <tomsmeding> % a
2022-07-17 10:56:58 +0200 <yahb2> <interactive>:166:1: error: Variable not in scope: a
2022-07-17 10:58:15 +0200 <nasosev> ohhh i see, damn. so ideally the maintainer of pretty-simple should make the compact option a single identifier
2022-07-17 10:59:27 +0200 <nasosev> putting it in a packag edoesn't seem like a good long term option, as i would have to keep it up to date manually?
2022-07-17 10:59:54 +0200 <tomsmeding> Yes to both, though there's not much to be kept up to date :D
2022-07-17 11:00:17 +0200 <tomsmeding> Unless pretty-simple updates and you want functionality from the new version
2022-07-17 11:00:47 +0200 <tomsmeding> Hm, not shre what happens if the local project uses a newer version of pretty-simple than the suggested ad hoc library does...
2022-07-17 11:00:51 +0200 <tomsmeding> *sure
2022-07-17 11:03:30 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-07-17 11:03:55 +0200gmg(~user@user/gehmehgeh)
2022-07-17 11:04:57 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de)
2022-07-17 11:07:00 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 268 seconds)
2022-07-17 11:07:31 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 11:09:53 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-07-17 11:10:51 +0200wbntdodt^(~wbntdodt@c-73-207-207-252.hsd1.ga.comcast.net) (Remote host closed the connection)
2022-07-17 11:12:16 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Ping timeout: 272 seconds)
2022-07-17 11:13:31 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-07-17 11:14:13 +0200gmg(~user@user/gehmehgeh)
2022-07-17 11:16:02 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 11:16:29 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de)
2022-07-17 11:16:35 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 11:17:59 +0200coot(~coot@213.134.190.95)
2022-07-17 11:19:30 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 11:19:40 +0200alternateved(~user@staticline-31-183-144-54.toya.net.pl)
2022-07-17 11:20:19 +0200cfricke(~cfricke@user/cfricke)
2022-07-17 11:20:34 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:442d:46e5:a654:241a) (Ping timeout: 268 seconds)
2022-07-17 11:24:27 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com)
2022-07-17 11:25:07 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 272 seconds)
2022-07-17 11:27:54 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Ping timeout: 276 seconds)
2022-07-17 11:30:00 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 11:30:36 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 11:32:19 +0200dextaa(~DV@user/dextaa)
2022-07-17 11:33:58 +0200mmhat(~mmh@p200300f1c70559c1ee086bfffe095315.dip0.t-ipconnect.de)
2022-07-17 11:36:38 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-07-17 11:38:51 +0200 <nasosev> tomsmeding: actually, a nice solution for me is to just put it at the top of my imports.txt file :)
2022-07-17 11:39:16 +0200 <tomsmeding> 👍
2022-07-17 11:40:58 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-07-17 11:41:03 +0200fr33domlover(~fr33@bzq-79-178-75-11.red.bezeqint.net) (Quit: fr33domlover)
2022-07-17 11:41:41 +0200gmg(~user@user/gehmehgeh)
2022-07-17 11:43:38 +0200 <[exa]> (lovely how autoexec.bat eventually crawls to every platform!)
2022-07-17 11:46:45 +0200 <turlando> I have this function that evolves by recurring with updated values. It has a lot of "state" values. I managed to remove one of the arguments by abstracting it in a state monad. I'd love to abstract in the same way other params as well. Do I need to use StateT in order to avoid nesting of state monads? What's the cleanest/easiest way to do it?
2022-07-17 11:47:16 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-07-17 11:47:58 +0200wootehfoot(~wootehfoo@user/wootehfoot) (Ping timeout: 240 seconds)
2022-07-17 11:48:35 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 11:49:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 11:51:39 +0200 <[exa]> turlando: better have 1 state monad that holds a type with several fields
2022-07-17 11:52:12 +0200wootehfoot(~wootehfoo@user/wootehfoot)
2022-07-17 11:52:18 +0200 <[exa]> like, `data MyState = { this :: Int, that :: String }` and then use `State MyState a` as the monad
2022-07-17 11:53:40 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 11:54:10 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 11:54:22 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 11:54:32 +0200 <[exa]> there are nice utility functions that make this quite bearable. You will like `gets` which can be used as `i <- gets this` or `str <- gets that` with the above data
2022-07-17 11:54:54 +0200 <turlando> [exa]: Kinda wanted to avoid that since the fields are quite different: one is a monotonic counter, that I use by binding a «next :: State Int a» function, another is an instance of RandomGen, another is a kind of priority queue. I'd love to keep operations on them separated, not sure if that's a good idea though
2022-07-17 11:54:55 +0200 <[exa]> then there's partial structure updates, `modify $ \s -> s{this=123}`
2022-07-17 11:55:10 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 11:55:22 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 11:56:40 +0200 <[exa]> turlando: technically you won't gain much by separating them physically. But maybe you might want to make a few utility functions that access this for you
2022-07-17 11:56:57 +0200 <[exa]> like, `nextRandom :: State MyState Int` and so
2022-07-17 11:58:16 +0200 <[exa]> this hides the field accesses from the "user" code, and if you later decide to migrate to some other kind of monad (e.g. RWST), you just change the utility functions layer and the rest of the code stays same
2022-07-17 11:58:43 +0200 <turlando> I see, and this way I guess I can keep the "local" utilities I need that operate on the specific state, say the counter, (so I can test and use them individually) and wrap them in the "global" state/record, right?
2022-07-17 11:59:39 +0200 <[exa]> yes. Also, if you need to explicitly make sure your user code can't "break" the monad, just wrap this type in a newtype and write the Functor/Applicative/Monad instances for it (should be trivial)
2022-07-17 11:59:58 +0200 <[exa]> as in `newtype MyMonad a = MyMonad (State MyState a)`
2022-07-17 12:00:01 +0200 <turlando> That's a great tip, thanks
2022-07-17 12:00:02 +0200 <[exa]> (roughly)
2022-07-17 12:00:19 +0200 <[exa]> finally, there's lenses that play veeeeeery well with State
2022-07-17 12:00:33 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 12:00:56 +0200 <turlando> I kinda wanted to stay away from lenses right now, both for mental complexity and for compile time explosion due templatehaskell
2022-07-17 12:01:25 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 12:01:40 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2022-07-17 12:02:06 +0200 <[exa]> it's not that bad with compiletimes tbh, and you don't really need TH, writing lenses manually is easy. In any case you can get roughly this: https://hackage.haskell.org/package/lens-5.1.1/docs/Control-Lens-Operators.html#v:.-61-
2022-07-17 12:02:53 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 12:03:17 +0200 <[exa]> anyway, if I guess your usecase right, the wrap+utils approach is probably the best one here
2022-07-17 12:03:59 +0200 <turlando> Thanks for linking that page, I will keep in mind for the future, but right now I don't think that importing lens and all that jazz is justified for what I have to do
2022-07-17 12:04:14 +0200 <[exa]> :]
2022-07-17 12:05:08 +0200 <[exa]> `zoom` is IMO the coolest tool there, e.g. `zoom both` from the example here: https://hackage.haskell.org/package/lens-5.1.1/docs/Control-Lens-Combinators.html#v:zoom
2022-07-17 12:08:08 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de)
2022-07-17 12:08:12 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 276 seconds)
2022-07-17 12:09:11 +0200Player-205[m](~sashaserp@2001:470:69fc:105::2:30b8) (Quit: issued !quit command)
2022-07-17 12:09:42 +0200winny(~weechat@user/winny) (Remote host closed the connection)
2022-07-17 12:09:49 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 12:10:18 +0200winny(~weechat@user/winny)
2022-07-17 12:13:25 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-07-17 12:14:16 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-07-17 12:14:40 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 12:15:50 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 240 seconds)
2022-07-17 12:16:55 +0200dextaa(~DV@user/dextaa)
2022-07-17 12:18:53 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 244 seconds)
2022-07-17 12:19:48 +0200OscarZ(~oscarz@188.126.80.50) (Quit: Leaving)
2022-07-17 12:21:10 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 12:21:29 +0200jakalx(~jakalx@base.jakalx.net)
2022-07-17 12:28:20 +0200mmhat(~mmh@p200300f1c70559c1ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.6)
2022-07-17 12:43:44 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds)
2022-07-17 12:45:35 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 12:50:37 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2022-07-17 12:51:52 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:64ed:563e:8ed6:402)
2022-07-17 12:52:00 +0200MajorBiscuit(~MajorBisc@2a02-a461-129d-1-6d4c-38a4-18b7-4b48.fixed6.kpn.net)
2022-07-17 12:56:08 +0200Cale(~cale@cpef48e38ee8583-cm30b7d4b3fc20.cpe.net.cable.rogers.com) (Remote host closed the connection)
2022-07-17 12:57:18 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:64ed:563e:8ed6:402) (Ping timeout: 240 seconds)
2022-07-17 13:02:08 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 13:03:38 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 13:05:48 +0200dextaa(~DV@user/dextaa)
2022-07-17 13:07:43 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds)
2022-07-17 13:09:04 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 13:09:28 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 13:09:43 +0200zxx7529(~Thunderbi@user/zxx7529) (Ping timeout: 268 seconds)
2022-07-17 13:10:02 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-07-17 13:10:39 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) ()
2022-07-17 13:10:59 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-07-17 13:13:25 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru)
2022-07-17 13:13:30 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 13:14:03 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Ping timeout: 272 seconds)
2022-07-17 13:15:02 +0200nate4(~nate@98.45.169.16)
2022-07-17 13:15:20 +0200 <yuv4199> Hello! I am new to Dhall, coming from Haskell and really like it for writing configurations. Now, there are `dhall` bindings for Haskell and I was wondering if it is possible to pack an existential type and use it in Haskell. Basically, I would like to have some type class `class Fooable a where foo :: a -> Text` and a type `data Foo = forall a.
2022-07-17 13:15:21 +0200 <yuv4199> Fooable a => Foo a` then I would like to configure values from Dhall: writing `{foo = Natural/show}` in Dhall and read that into a `Foo` from Haskell with `Dhall.input`
2022-07-17 13:15:24 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 13:15:43 +0200wbntdodt^(~wbntdodt@c-73-207-207-252.hsd1.ga.comcast.net)
2022-07-17 13:16:06 +0200 <yuv4199> I already asked in #dhall but didn't get an answer and the only thing I could find was this article (https://bkase.dev/posts/data-abstraction-dhall) but I don't think it helps..
2022-07-17 13:20:12 +0200nate4(~nate@98.45.169.16) (Ping timeout: 268 seconds)
2022-07-17 13:20:25 +0200frost(~frost@user/frost)
2022-07-17 13:20:31 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 13:22:30 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 13:23:55 +0200 <[exa]> yuv4199: this looks as very easily impossible. Where precisely you want to pack the existential? Define the existential in Dhall and have Haskell interpret the definitions from the Dhall language?
2022-07-17 13:24:33 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-07-17 13:24:44 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 13:27:27 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:5e21:fc87:3c21:5fd2)
2022-07-17 13:28:39 +0200 <yin> can something like Typeable or Generics be considered "metaprogramming" in haskell?
2022-07-17 13:30:16 +0200 <[exa]> yuv4199: I'd say it's reflection, which people could categorize in metaprogramming
2022-07-17 13:30:26 +0200 <[exa]> yin: ^ mishighlight, sorry
2022-07-17 13:31:03 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-07-17 13:31:37 +0200chexum(~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
2022-07-17 13:31:57 +0200noteness(~noteness@user/noteness)
2022-07-17 13:31:59 +0200 <[exa]> technically, metaprogramming is "manipulating source by a custom program before running the result" which is what Typeable and Generics dodges using a pretty nice abstraction
2022-07-17 13:33:10 +0200chexum(~quassel@gateway/tor-sasl/chexum)
2022-07-17 13:33:38 +0200 <[exa]> the current implementation gives a very rich description of your datatypes to your program to play with them, but unless you throw it to TemplateHaskell, you do not really manipulate and create the source code by your program
2022-07-17 13:33:59 +0200 <yuv4199> exa: yeah, the idea would be to unpack and interpret within Haskell. I wouldn't mind using TH or write some Generics instances.
2022-07-17 13:34:08 +0200 <yin> yeah usually it's moving computations from runtime to compile time but all this happening at the type level, and types being otherwise erased before runtime
2022-07-17 13:34:26 +0200 <yin> it feels loke it's the other way around
2022-07-17 13:34:51 +0200 <[exa]> yin: do you have some tiny usecase or something, just to materialize the idea?
2022-07-17 13:35:18 +0200 <yin> not at all. just a random thought
2022-07-17 13:36:35 +0200 <[exa]> ah okay. well, my 50 cent: 1] you can certainly translate whatever Dhall to Haskell code and generate programs from that using TemplateHaskell but I wouldn't say it's going to give you a very transparent system in the end
2022-07-17 13:37:56 +0200 <[exa]> 2] unless you need the result to be magically fast (i.e., benefit from ghc optimizations or something), I'd just suggest trying to reuse the dhall evaluation functions to make a smal interpreter in Haskell and use it instead of the existentials
2022-07-17 13:38:35 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
2022-07-17 13:39:30 +0200arahael(~arahael@121-44-2-189.tpgi.com.au) (Ping timeout: 240 seconds)
2022-07-17 13:39:45 +0200 <[exa]> like, your "Foo" above is basically "a packed program that generates Text". You can almost equivalently have "A source of a program that generates Text".
2022-07-17 13:40:20 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 13:40:34 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 13:44:36 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 13:44:37 +0200 <yuv4199> In my usecase it would stay a function though, what I really would want to pass to Haskell is two functions `A -> T` and `U -> A`
2022-07-17 13:44:37 +0200 <yuv4199>  for fix `T` and `U`. I guess I could leave those as is, read with TH and pack them but it wouldn't be transparent like you said. Initially I wanted to pass something like `{handlers : List Foo, ...}`
2022-07-17 13:44:50 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 13:44:53 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-07-17 13:45:00 +0200 <[exa]> oh whoops looks like I confused the answer from yin with your answer, sorry :D
2022-07-17 13:45:22 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 13:46:25 +0200 <[exa]> y[tab] didn't really help.
2022-07-17 13:47:05 +0200 <[exa]> yuv4199: so you'd code the 2 functions in Dhall, and have the Haskell program work with them somehow, right?
2022-07-17 13:48:25 +0200 <yuv4199> Exactly, yeah
2022-07-17 13:48:27 +0200 <[exa]> yin: with Generics it's like exposing enough information about the types that ghc can compile the code that works over the generic information to something that looks like you'd write it manually or produce it with TemplateHaskell. But without metaprogramming and TemplateHaskell.
2022-07-17 13:51:19 +0200 <[exa]> yuv4199: you might hit a bit of a conceptual wall there, Dhall is supposed to produce the "json-like structure", which doesn't really describe functions well. You might need to use the Dhall library code in a slightly nonstandard way to get the functions out nicely
2022-07-17 13:52:06 +0200 <[exa]> (possible reduction to a more tangible problem: how do you put a dhall function into json?)
2022-07-17 13:53:52 +0200 <yuv4199> Ah, wait. If that is not possible then I can forget it - yeah. I am quite new to Dhall, so I was not aware of that limitation. I assumed that'd work since I can write records containing functions (though I did not yet try to use them from within Haskell)
2022-07-17 13:54:03 +0200arahael(~arahael@14-200-134-141.tpgi.com.au)
2022-07-17 13:55:08 +0200 <[exa]> yeah if you want the "standard behavior dhall", you certainly should think how to encode the information into json. :]
2022-07-17 13:56:56 +0200 <yuv4199> Oh, okay but it works. I just tested this: `f <- input auto "./f.dhall`; print @Text (f (101 :: Natural))` with `f.dhall` containing `Natural/show`, so we can pass functions from Dhall to Haskell and evaluate them there
2022-07-17 13:57:04 +0200 <yuv4199> So that shouldn't be a limitation.
2022-07-17 14:00:08 +0200 <[exa]> oh good so it's got its own nice transparent interpreter
2022-07-17 14:01:00 +0200 <[exa]> lovely https://hackage.haskell.org/package/dhall-1.41.1/docs/Dhall-Marshal-Decode.html#g:8
2022-07-17 14:04:17 +0200MajorBiscuit(~MajorBisc@2a02-a461-129d-1-6d4c-38a4-18b7-4b48.fixed6.kpn.net) (Ping timeout: 244 seconds)
2022-07-17 14:06:00 +0200mrmr(~mrmr@user/mrmr)
2022-07-17 14:16:20 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-07-17 14:18:09 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 14:20:33 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds)
2022-07-17 14:21:59 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 14:24:56 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 14:25:53 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:5e21:fc87:3c21:5fd2) (Ping timeout: 255 seconds)
2022-07-17 14:33:55 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com)
2022-07-17 14:38:37 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 14:38:51 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 14:40:47 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 14:41:00 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 14:42:16 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 14:43:02 +0200GoldsteinQ(~goldstein@goldstein.rs) (Ping timeout: 244 seconds)
2022-07-17 14:50:48 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 14:51:01 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 14:53:02 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Remote host closed the connection)
2022-07-17 14:53:35 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 14:54:35 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 14:55:08 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-17 14:56:27 +0200iteratee(~kyle@162.218.222.107) (Read error: Connection reset by peer)
2022-07-17 14:56:28 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds)
2022-07-17 14:58:05 +0200img(~img@user/img)
2022-07-17 14:58:19 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 14:59:01 +0200iteratee(~kyle@162.218.222.107)
2022-07-17 14:59:29 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Ping timeout: 268 seconds)
2022-07-17 15:04:26 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-07-17 15:04:38 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 15:05:09 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au)
2022-07-17 15:05:22 +0200nasosev(~nasosev@193-116-244-197.tpgi.com.au) (Client Quit)
2022-07-17 15:06:57 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 276 seconds)
2022-07-17 15:08:04 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-07-17 15:08:47 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 15:10:59 +0200img(~img@user/img)
2022-07-17 15:11:11 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 15:11:39 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net)
2022-07-17 15:13:07 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-07-17 15:15:35 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Ping timeout: 244 seconds)
2022-07-17 15:16:24 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-07-17 15:26:16 +0200jargon(~jargon@184.101.188.251)
2022-07-17 15:32:08 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 15:32:22 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 15:33:59 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 15:34:10 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 15:35:09 +0200adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 15:36:08 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 15:37:35 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 15:38:17 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 15:38:20 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-07-17 15:39:08 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 15:39:25 +0200chomwitt(~chomwitt@2a02:587:dc00:5a00:c8e4:ebdd:c459:66df)
2022-07-17 15:51:34 +0200jargon(~jargon@184.101.188.251) (Remote host closed the connection)
2022-07-17 15:55:58 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 15:57:56 +0200pgass(~pg@190.247.245.154)
2022-07-17 15:58:13 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 15:58:35 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 16:03:05 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 16:03:15 +0200 <[itchyjunk]> I am having issue understanding this problem statement. https://bpa.st/QDLQ
2022-07-17 16:03:19 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 16:03:38 +0200 <[itchyjunk]> so this list can contain ints or strings. i am to identify ints, sum them up and return?
2022-07-17 16:03:52 +0200 <[itchyjunk]> "as if all were numbers"
2022-07-17 16:04:03 +0200 <[itchyjunk]> i don't get that part
2022-07-17 16:04:39 +0200 <tomsmeding> [itchyjunk]: underspecified
2022-07-17 16:04:48 +0200 <tomsmeding> But sounds like [Either String Int] -> Int
2022-07-17 16:05:01 +0200 <tomsmeding> Or perhaps Num a => [Either String a] -> a
2022-07-17 16:05:12 +0200 <tomsmeding> Which might actually be more appropriate
2022-07-17 16:05:13 +0200 <[itchyjunk]> yes they give one line of code to start with which says :
2022-07-17 16:05:14 +0200 <[itchyjunk]> sumMix :: [Either String Int] -> Int
2022-07-17 16:05:17 +0200 <tomsmeding> Ah
2022-07-17 16:05:32 +0200 <tomsmeding> sum . map (either read id)
2022-07-17 16:06:01 +0200 <[itchyjunk]> oh google is telling me Either is like the `Maybe` thingy, right?
2022-07-17 16:06:03 +0200 <geekosaur> that sums them all, sounds like they want just the Ints?
2022-07-17 16:06:10 +0200 <[itchyjunk]> So i have left a or right a
2022-07-17 16:06:20 +0200 <[itchyjunk]> oh, is it just ints? hmm
2022-07-17 16:06:25 +0200 <geekosaur> filter out the Rights and sum them
2022-07-17 16:06:53 +0200 <[itchyjunk]> It's Rights just because of the ordering that says Either String Int?
2022-07-17 16:07:05 +0200 <geekosaur> mm, I guess that raises the question of what "filter out" means 🙂
2022-07-17 16:07:06 +0200 <[itchyjunk]> If it was Either Int String, i would be lefts, correct?
2022-07-17 16:07:12 +0200 <geekosaur> yes
2022-07-17 16:07:16 +0200 <[itchyjunk]> that it does :x
2022-07-17 16:07:35 +0200 <geekosaur> but if it saus "identify ints, sum them up" then you want whichever side has the Ints
2022-07-17 16:08:05 +0200 <tomsmeding> geekosaur: nothing so well-defined https://bpa.st/QDLQ
2022-07-17 16:08:06 +0200 <[itchyjunk]> so from some list, i can extract each element (x:xs). now if Right x then i want to sum this but if it's Left x i want to ignore it
2022-07-17 16:08:25 +0200 <[itchyjunk]> "return the sum of the array values as if all were numbers."
2022-07-17 16:08:32 +0200 <[itchyjunk]> why does it say "as if all were numbers"?
2022-07-17 16:08:44 +0200 <geekosaur> because I went by your description, which was wrong
2022-07-17 16:09:00 +0200 <geekosaur> tomsmeding had it right, you need to convert the Strings to numbers
2022-07-17 16:09:08 +0200 <geekosaur> not just ignore them
2022-07-17 16:09:22 +0200 <[itchyjunk]> hmmmmm
2022-07-17 16:09:24 +0200 <geekosaur> (which assumes the Strings contain String representations of numbers, but)
2022-07-17 16:09:58 +0200 <[itchyjunk]> i'll think about this a bit more i guess
2022-07-17 16:11:01 +0200 <geekosaur> tomsmeding already gave you the answer (which was probably a bad idea)
2022-07-17 16:11:17 +0200 <tomsmeding> (maybe, sorry)
2022-07-17 16:12:16 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 16:14:21 +0200 <geekosaur> anyway the key here is you want something that does one thing if it's a Left and something else if it's a Right. you should have been shown something that fits that description already
2022-07-17 16:14:27 +0200ulvarref`(~user@188.124.56.153)
2022-07-17 16:14:52 +0200nate4(~nate@98.45.169.16)
2022-07-17 16:15:38 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-07-17 16:16:05 +0200ulvarrefr(~user@185.24.53.152) (Ping timeout: 260 seconds)
2022-07-17 16:20:10 +0200nate4(~nate@98.45.169.16) (Ping timeout: 260 seconds)
2022-07-17 16:24:38 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-07-17 16:26:01 +0200mimmy(~mimmy@38.126.149.170)
2022-07-17 16:26:58 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 16:27:36 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 16:33:06 +0200n0den1te(~n0den1te@182.77.107.91)
2022-07-17 16:35:16 +0200n0den1te(~n0den1te@182.77.107.91) (Quit: leaving)
2022-07-17 16:37:05 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-07-17 16:39:17 +0200wbntdodt^(~wbntdodt@c-73-207-207-252.hsd1.ga.comcast.net) (Ping timeout: 244 seconds)
2022-07-17 16:48:04 +0200brence(~brence@2a01:4b00:895f:3d00:ccf8:b008:7015:50b0)
2022-07-17 16:49:10 +0200 <brence> can we have a Num instance for primitive types (Int# etc.)?
2022-07-17 16:49:27 +0200 <geekosaur> not currently
2022-07-17 16:49:34 +0200 <geekosaur> there's been some discussion about it
2022-07-17 16:49:44 +0200 <tomsmeding> :k Num
2022-07-17 16:49:45 +0200 <lambdabot> * -> Constraint
2022-07-17 16:49:53 +0200 <tomsmeding> :k Int#
2022-07-17 16:49:55 +0200 <lambdabot> error:
2022-07-17 16:49:55 +0200 <lambdabot> Not in scope: type constructor or class ‘Int#’
2022-07-17 16:49:55 +0200 <lambdabot> Perhaps you meant one of these:
2022-07-17 16:50:21 +0200 <merijn> brence: Unboxed types have a different kind than boxed types
2022-07-17 16:50:43 +0200 <merijn> Which, as tomsmeding attempted to show, doesn't match the kind signature of the Num class
2022-07-17 16:50:46 +0200 <geekosaur> iirc there are more fundamental issues than that
2022-07-17 16:50:56 +0200 <tomsmeding> % :k Int#
2022-07-17 16:50:56 +0200 <yahb2> Int# :: TYPE 'IntRep
2022-07-17 16:51:00 +0200 <brence> Ah, I see thanks
2022-07-17 16:51:18 +0200 <tomsmeding> % :k Int
2022-07-17 16:51:18 +0200 <yahb2> Int :: *
2022-07-17 16:51:21 +0200 <merijn> geekosaur: Like?
2022-07-17 16:51:37 +0200 <brence> geekosaur: the discussions were about making Num levity polymorphic?
2022-07-17 16:51:50 +0200euandreh(~euandreh@189.6.33.250) (Ping timeout: 240 seconds)
2022-07-17 16:52:00 +0200 <merijn> brence: That would make the class look horrifically complex for beginners, though
2022-07-17 16:52:13 +0200 <brence> yeah, I agree
2022-07-17 16:52:38 +0200 <geekosaur> it should in theory be possible to rephrase Num such that be levity polymorphic, but it would introduce other issues. I'm looking for the discussion
2022-07-17 16:54:46 +0200 <brence> Does GHC -O2 replace Int with Int# and (+) with (+#) when it's an obvious optimization?
2022-07-17 16:54:54 +0200 <tomsmeding> https://play-haskell.tomsmeding.com/play/paste/FJsVvd8M/1
2022-07-17 16:55:08 +0200 <merijn> brence: The strictness analyzer tries to do that where possible, yes
2022-07-17 16:55:16 +0200 <geekosaur> brence, if it can determine strictness, yes
2022-07-17 16:55:16 +0200 <tomsmeding> brence: also look up the worker-wrapper optimisation
2022-07-17 16:55:58 +0200 <merijn> brence: In fact, this is why the pedantic distinction between "Haskell is non-strict" (i.e. *not* lazy!) and "Haskell is lazy" matters
2022-07-17 16:56:43 +0200 <tomsmeding> (And `UNum LiftedRep Int` also results in a valid instance in that paste)
2022-07-17 16:57:09 +0200 <merijn> brence: If Haskell was defined as lazy, making code strict like that would violate the semantics. By specifying "non-strict" (i.e. "it should work, if it works when the code is lazy") means that GHC is allowed to make code strict IFF it knows for sure making it strict does not break anything
2022-07-17 16:57:15 +0200 <tomsmeding> merijn: "haskell is at least as defined as lazy evaluation"?
2022-07-17 16:57:39 +0200 <tomsmeding> What you said :p
2022-07-17 16:59:40 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 16:59:43 +0200 <geekosaur> brence, someone asked the same thing you did (making Num levity polymorphic)
2022-07-17 16:59:59 +0200 <geekosaur> I think it was in #ghc, but I started out by checking the mailing lists
2022-07-17 17:01:52 +0200dextaa(~DV@user/dextaa)
2022-07-17 17:02:14 +0200 <tomsmeding> Didn't edwardk also do stuff with unlifted types in type classes
2022-07-17 17:02:30 +0200 <merijn> Probably
2022-07-17 17:02:42 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 17:02:50 +0200 <merijn> Isn't the answer to "didn't edwardk also do X?" always "probably"? :p
2022-07-17 17:03:11 +0200 <geekosaur> "No variable may have a levity-polymorphic type."
2022-07-17 17:03:22 +0200 <geekosaur> (tyvars, iirc)
2022-07-17 17:03:41 +0200 <geekosaur> so as yet you can't really use levity polymorphism in a lot of places
2022-07-17 17:04:41 +0200 <geekosaur> I think this includes classes with instances of different levities
2022-07-17 17:04:59 +0200dextaa(~DV@user/dextaa)
2022-07-17 17:05:12 +0200 <geekosaur> so maybe you can't have levity polymorphic Num after all
2022-07-17 17:06:18 +0200 <brence> geekosaur: isn't that what tomsmeding did in the paste?
2022-07-17 17:06:24 +0200 <tomsmeding> geekosaur: edited version of the paste above: https://play-haskell.tomsmeding.com/play/paste/Es18J95w/1
2022-07-17 17:06:31 +0200 <geekosaur> (the strictness analyzer runs after typechecking, so it's allowed to switch levity)
2022-07-17 17:07:19 +0200dextaa(~DV@user/dextaa) (Read error: Connection reset by peer)
2022-07-17 17:07:20 +0200 <geekosaur> huh
2022-07-17 17:07:31 +0200 <tomsmeding> 8.6.5 even allows it :p
2022-07-17 17:07:50 +0200 <geekosaur> I may well lbe misunderstanding the discussion I found, I am far from expert on this
2022-07-17 17:07:54 +0200 <tomsmeding> To be honest I had no clue and just typed what seemed to make sense to me
2022-07-17 17:08:21 +0200 <geekosaur> maybe it's undeclared lecity polymorphism or something
2022-07-17 17:09:16 +0200 <tomsmeding> The obvious simplification `class UNum (a :: k) where add :: a -> a -> a` is rejected, in any case, but that makes sense because random kinds might not have inhabitable types
2022-07-17 17:09:35 +0200dextaa(~DV@user/dextaa)
2022-07-17 17:10:06 +0200jmorris(uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-17 17:11:18 +0200 <brence> geekosaur: I think the quote means you can't make a single variable levity polymorphic but this doesn't mean a function can't be levity polymorphic in its arguments?
2022-07-17 17:12:00 +0200 <tomsmeding> Ah, so where geekosaur assumed "tyvars", "variable" actually referred to value variables?
2022-07-17 17:12:04 +0200 <geekosaur> functions have always permitted levity polymorphic parameters
2022-07-17 17:12:05 +0200 <tomsmeding> That sounds likely
2022-07-17 17:12:11 +0200 <geekosaur> results used to have to be kind *
2022-07-17 17:12:17 +0200 <tomsmeding> `add` is always lifted because of the ->
2022-07-17 17:12:21 +0200 <geekosaur> but that has changed over time
2022-07-17 17:12:36 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-07-17 17:13:54 +0200 <tomsmeding> Hm `x :: UNum r t => t ; x = undefined` compiles fine
2022-07-17 17:14:43 +0200 <geekosaur> :k (->)
2022-07-17 17:14:44 +0200 <lambdabot> * -> * -> *
2022-07-17 17:16:26 +0200 <tomsmeding> % :set -fprint-explicit-runtime-reps
2022-07-17 17:16:26 +0200 <yahb2> <no output>
2022-07-17 17:16:27 +0200 <geekosaur> https://downloads.haskell.org/ghc/9.2.1/docs/html/users_guide/exts/levity_polymorphism.html#no-lev…
2022-07-17 17:16:32 +0200 <tomsmeding> % :k (->)
2022-07-17 17:16:32 +0200 <yahb2> (->) :: TYPE q -> TYPE r -> *
2022-07-17 17:16:35 +0200ridcully(~ridcully@pd951f3bf.dip0.t-ipconnect.de) (Remote host closed the connection)
2022-07-17 17:16:46 +0200ridcully(~ridcully@pd951f3bf.dip0.t-ipconnect.de)
2022-07-17 17:17:11 +0200 <geekosaur> back in the day that used to print something ridiculous with ? and ?? or something like that. would have to restore logs from my old desktop to se
2022-07-17 17:17:13 +0200 <geekosaur> e
2022-07-17 17:18:20 +0200nate4(~nate@98.45.169.16)
2022-07-17 17:18:38 +0200 <tomsmeding> % -set -fprint-explicit-foralls -fprint-explicit-kinds
2022-07-17 17:18:39 +0200 <yahb2> <interactive>:186:2: error: ; • Variable not in scope: set ; • Perhaps you meant ‘seq’ (imported from Prelude) ; ; <interactive>:186:7: error: ; • Variable not in scope: fprint ; •...
2022-07-17 17:18:50 +0200 <tomsmeding> % :set -fprint-explicit-foralls -fprint-explicit-kinds
2022-07-17 17:18:50 +0200 <yahb2> <no output>
2022-07-17 17:19:03 +0200 <tomsmeding> % :k (->)
2022-07-17 17:19:04 +0200 <yahb2> (->) :: forall {q :: RuntimeRep} {r :: RuntimeRep}. ; TYPE q -> TYPE r -> *
2022-07-17 17:19:40 +0200 <tomsmeding> geekosaur: yeah that quote in the user guide I think refers to valur variables
2022-07-17 17:19:40 +0200mimmy(~mimmy@38.126.149.170) (Ping timeout: 260 seconds)
2022-07-17 17:19:58 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-17 17:20:03 +0200 <tomsmeding> Interesting then that my paste is accepted
2022-07-17 17:21:07 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 244 seconds)
2022-07-17 17:21:20 +0200GoldsteinQ(~goldstein@goldstein.rs)
2022-07-17 17:22:35 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-07-17 17:24:23 +0200kazaf(~kazaf@94.180.63.53)
2022-07-17 17:29:12 +0200 <albet70> how I can construct a value has StreamingBody? https://hackage.haskell.org/package/wai-3.0.2.3/docs/Network-Wai.html#t:StreamingBody
2022-07-17 17:29:54 +0200 <edwardk> tomsmeding: https://github.com/ekmett/unboxed
2022-07-17 17:29:57 +0200 <albet70> I don't know how to use this stream function from https://hackage.haskell.org/package/scotty-0.10.1/docs/Web-Scotty-Trans.html#v:stream
2022-07-17 17:30:14 +0200 <albet70> there's no example...
2022-07-17 17:32:08 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 17:32:13 +0200mimmy(~mimmy@38.126.149.170)
2022-07-17 17:33:17 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 17:34:31 +0200mc47(~mc47@xmonad/TheMC47)
2022-07-17 17:35:03 +0200 <hpc> geekosaur: iirc it was ? -> ?? -> *
2022-07-17 17:35:24 +0200 <hpc> ? is * or any unboxed, and ?? was * and unboxed (except for unboxed tuples)
2022-07-17 17:35:31 +0200 <hpc> but don't quote me on that, it's been forever for me too
2022-07-17 17:36:43 +0200OscarZ(~oscarz@85.194.207.119)
2022-07-17 17:36:47 +0200 <int-e> hmm, unboxed tuples should be in the return type, so I think you've swapped the explanation of ? and ??
2022-07-17 17:37:33 +0200 <hpc> possibly
2022-07-17 17:37:49 +0200 <[exa]> albet70: https://hackage.haskell.org/package/wai-3.0.2.3/docs/Network-Wai.html#v:responseStream
2022-07-17 17:38:21 +0200 <[exa]> albet70: your function is given 2 handler (write & flush) and you can do whatever you want with them
2022-07-17 17:40:47 +0200 <albet70> [exa]: I want to stream a media file, is that ok? like a x.mp4
2022-07-17 17:41:30 +0200 <albet70> I saw that readFile which read entire file, it could be used in this?
2022-07-17 17:42:18 +0200pgass(~pg@190.247.245.154) (Ping timeout: 276 seconds)
2022-07-17 17:42:32 +0200brence(~brence@2a01:4b00:895f:3d00:ccf8:b008:7015:50b0) (Ping timeout: 252 seconds)
2022-07-17 17:43:01 +0200 <albet70> I need a readFile which can read specific count from a file?
2022-07-17 17:43:01 +0200 <int-e> hpc: Actually, no, it's the arguments of (->) that are swapped. It was (->) :: ?? -> ? -> *. Yeah, it's been a long time.
2022-07-17 17:43:25 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Remote host closed the connection)
2022-07-17 17:47:50 +0200cyphase_eviltwin(~cyphase@user/cyphase) (Ping timeout: 240 seconds)
2022-07-17 17:51:39 +0200 <hpc> a simpler time, when nobody knew how functions worked
2022-07-17 17:51:50 +0200 <merijn> albet70: You want hRead from bytestring
2022-07-17 17:52:55 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds)
2022-07-17 17:53:03 +0200 <merijn> eh, wait, hGetSome I mean
2022-07-17 17:53:21 +0200 <merijn> albet70: See https://hackage.haskell.org/package/bytestring-0.11.3.1/docs/Data-ByteString.html#v:hGet
2022-07-17 17:53:53 +0200 <merijn> albet70: Going to the right offset can be done via hSeek https://hackage.haskell.org/package/base-4.16.2.0/docs/System-IO.html#v:hSeek
2022-07-17 17:54:52 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 17:58:13 +0200Guest58452222224(~Guest5845@modemcable048.16-160-184.mc.videotron.ca)
2022-07-17 17:58:25 +0200kazaf(~kazaf@94.180.63.53) (Quit: Konversation terminated!)
2022-07-17 18:02:21 +0200safinaskar(~quassel@178.160.244.66)
2022-07-17 18:02:32 +0200 <albet70> merijn: could hGet do that?
2022-07-17 18:02:41 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 18:03:37 +0200 <safinaskar> is there any work on GHC2022?
2022-07-17 18:04:07 +0200 <albet70> do {handle <- openBinaryFile "./Downloads/30.mp4" ReadMode;bytestring <- hGet handle 1000}
2022-07-17 18:04:28 +0200pgass(~pg@190.247.245.154)
2022-07-17 18:04:52 +0200 <albet70> but this hGet could return empty::ByteString, how I can detect it? there's no isEmtpy :: ByteString -> Bool
2022-07-17 18:07:14 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 18:07:20 +0200 <albet70> hSeek return IO() not ByteString
2022-07-17 18:07:23 +0200 <geekosaur> (BS.length == 0) seems entirely usable?
2022-07-17 18:07:38 +0200 <geekosaur> hSeek doesn't return data, it just moves to a partoicular offset in a file
2022-07-17 18:08:02 +0200 <albet70> hSeek then hGet?
2022-07-17 18:08:08 +0200 <geekosaur> yes
2022-07-17 18:08:18 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 276 seconds)
2022-07-17 18:08:32 +0200 <geekosaur> hSeek h offset >> hGet h 1000
2022-07-17 18:10:26 +0200 <albet70> x <- liftIO (hSeek h offset >> hGet h 1000) is ok?
2022-07-17 18:12:03 +0200 <geekosaur> yes
2022-07-17 18:13:41 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-17 18:14:26 +0200 <geekosaur> well, hSeek is actually a little more complex than that, yuou can specify absolute or relative positioning
2022-07-17 18:15:10 +0200 <geekosaur> https://downloads.haskell.org/ghc/8.10.7/docs/html/libraries/base-4.14.3.0/System-IO.html#g:13
2022-07-17 18:16:44 +0200alternateved(~user@staticline-31-183-144-54.toya.net.pl) (Ping timeout: 255 seconds)
2022-07-17 18:16:58 +0200econo(uid147250@user/econo)
2022-07-17 18:18:28 +0200nate4(~nate@98.45.169.16) (Ping timeout: 244 seconds)
2022-07-17 18:19:35 +0200Infinite(~Infinite@2405:201:6014:10d3:37af:d7b8:df9e:4b8b)
2022-07-17 18:20:45 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
2022-07-17 18:21:23 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net)
2022-07-17 18:21:45 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 18:23:20 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Remote host closed the connection)
2022-07-17 18:30:17 +0200 <maerwald> https://hackage.haskell.org/package/unix-2.7.2.2/docs/System-Posix-IO.html#g:5
2022-07-17 18:30:24 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 276 seconds)
2022-07-17 18:31:09 +0200kenran(~kenran@200116b82bf92200813e311e2ff66f2d.dip.versatel-1u1.de)
2022-07-17 18:32:12 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 18:32:31 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 18:32:41 +0200kenran(~kenran@200116b82bf92200813e311e2ff66f2d.dip.versatel-1u1.de) (Client Quit)
2022-07-17 18:34:18 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 18:35:07 +0200benin0(~benin@183.82.24.82) (Quit: The Lounge - https://thelounge.chat)
2022-07-17 18:36:18 +0200mimmy(~mimmy@38.126.149.170) (Ping timeout: 240 seconds)
2022-07-17 18:36:55 +0200alternateved(~user@staticline-31-183-144-54.toya.net.pl)
2022-07-17 18:37:10 +0200`2jt(~jtomas@141.red-88-17-65.dynamicip.rima-tde.net)
2022-07-17 18:37:44 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Remote host closed the connection)
2022-07-17 18:40:13 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-07-17 18:40:44 +0200 <albet70> the number with hGet, what it unit?
2022-07-17 18:41:04 +0200 <albet70> hGet with 1024 mean 1KB?
2022-07-17 18:42:23 +0200brence(~brence@2a01:4b00:895f:3d00:ccf8:b008:7015:50b0)
2022-07-17 18:44:01 +0200`2jt(~jtomas@141.red-88-17-65.dynamicip.rima-tde.net) (Ping timeout: 272 seconds)
2022-07-17 18:45:49 +0200 <geekosaur> should be bytes
2022-07-17 18:49:00 +0200cyphase_eviltwin(~cyphase@user/cyphase)
2022-07-17 18:51:21 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 18:54:33 +0200zebrag(~chris@user/zebrag)
2022-07-17 19:01:07 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 272 seconds)
2022-07-17 19:01:21 +0200safinaskar(~quassel@178.160.244.66) ()
2022-07-17 19:02:39 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-07-17 19:05:22 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 19:06:30 +0200Guest58452222224(~Guest5845@modemcable048.16-160-184.mc.videotron.ca) (Ping timeout: 252 seconds)
2022-07-17 19:09:32 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-07-17 19:09:48 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
2022-07-17 19:10:45 +0200maroloccio(~marolocci@37.100.36.239)
2022-07-17 19:11:15 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds)
2022-07-17 19:14:56 +0200Infinite(~Infinite@2405:201:6014:10d3:37af:d7b8:df9e:4b8b) (Ping timeout: 252 seconds)
2022-07-17 19:15:28 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Remote host closed the connection)
2022-07-17 19:18:41 +0200gdown(~gavin@h69-11-149-231.kndrid.broadband.dynamic.tds.net) (Remote host closed the connection)
2022-07-17 19:24:07 +0200maroloccio(~marolocci@37.100.36.239) (Quit: WeeChat 3.0)
2022-07-17 19:24:23 +0200 <tomsmeding> edwardk: oof https://github.com/ekmett/unboxed/blob/main/src/Unboxed/Class.hs
2022-07-17 19:25:07 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 19:25:29 +0200 <tomsmeding> geekosaur: brence: https://github.com/ekmett/unboxed/blob/main/internal/Unboxed/Internal/Class.hs#L146
2022-07-17 19:26:18 +0200brence(~brence@2a01:4b00:895f:3d00:ccf8:b008:7015:50b0) (Ping timeout: 252 seconds)
2022-07-17 19:26:37 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 19:33:05 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 19:33:05 +0200zxx7529(~Thunderbi@user/zxx7529) (Read error: Connection reset by peer)
2022-07-17 19:33:44 +0200zxx7529(~Thunderbi@user/zxx7529)
2022-07-17 19:34:12 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-07-17 19:37:41 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 19:40:06 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net) (Ping timeout: 244 seconds)
2022-07-17 19:40:28 +0200 <[itchyjunk]> Hm, sorry i didn't work on the problem earlier. I am writing a helper function called `go` do deal with `Either`. But I am stuck with the signature of `go` already.
2022-07-17 19:41:14 +0200 <[itchyjunk]> i want `go :: Either -> Int` in pseudo code, i think. I wanna take this Either data type and turn it all into Int datatype so i can add it, right?
2022-07-17 19:41:48 +0200 <geekosaur> it can't simply be Either; it's Either Something SomethingElse
2022-07-17 19:42:20 +0200Pickchea(~private@user/pickchea)
2022-07-17 19:42:45 +0200 <[itchyjunk]> `go :: Either String Int -> Int` ?
2022-07-17 19:43:07 +0200 <geekosaur> yes
2022-07-17 19:43:24 +0200 <Pickchea> Hey, I'm using stack for my project and it's been working find but all of a sudden I get "Prelude.chr: bad argument: 4127195140" every time I try `stack ghci` or `stack exec ...`. Any clue what the problem could be?
2022-07-17 19:43:57 +0200 <Pickchea> *working fine
2022-07-17 19:44:01 +0200 <[itchyjunk]> So `go Right x = x` seems like the easy part because i just get the Int for free
2022-07-17 19:44:17 +0200 <[itchyjunk]> so my only missing case is `go Left x = ?` i think
2022-07-17 19:44:18 +0200 <geekosaur> you need parentheses
2022-07-17 19:44:39 +0200 <geekosaur> and you should already know how to parse a String
2022-07-17 19:46:11 +0200 <[itchyjunk]> ah for the string i'd want `go Left "x" = ?` ? or was the parentheses needed somewhere else?
2022-07-17 19:46:35 +0200 <maerwald> Pickchea: https://gitlab.haskell.org/ghc/ghc/-/issues/19452
2022-07-17 19:46:55 +0200 <geekosaur> go (Left x) =
2022-07-17 19:46:56 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 19:47:07 +0200 <geekosaur> `go Left x` is two parameters, one of which is a function
2022-07-17 19:47:11 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds)
2022-07-17 19:47:15 +0200 <[itchyjunk]> oh right..
2022-07-17 19:47:33 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
2022-07-17 19:47:46 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net) (Remote host closed the connection)
2022-07-17 19:48:06 +0200 <Pickchea> maerwald, thanks!
2022-07-17 19:49:48 +0200mimmy(~mimmy@37.19.212.128)
2022-07-17 19:49:49 +0200mimmy(~mimmy@37.19.212.128) (Client Quit)
2022-07-17 19:52:22 +0200 <qrpnxz> there a way to do max/min on type level naturals? the ones that ghc comes with anyway
2022-07-17 19:52:41 +0200 <[itchyjunk]> I found a solution with google and then looked at what tomsmeding said. he seems to have also used `read`. https://bpa.st/EFZQ
2022-07-17 19:52:49 +0200 <[itchyjunk]> Time to try and understand his one liner solution i guess
2022-07-17 19:53:41 +0200 <tomsmeding> [itchyjunk]: my one-liner is something that I might write in my code, but is probably not suitable to learn from directly
2022-07-17 19:53:42 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net)
2022-07-17 19:54:00 +0200 <[itchyjunk]> ah
2022-07-17 19:54:03 +0200 <tomsmeding> Ah I see you got a solution yourself now too
2022-07-17 19:54:26 +0200 <[itchyjunk]> is my solution similar to yours? I see you use `sum` and looking up, seems like it's good for lists
2022-07-17 19:54:28 +0200 <tomsmeding> [itchyjunk]: have you seen `case` expressions already?
2022-07-17 19:54:47 +0200 <qrpnxz> sum . fmap go?
2022-07-17 19:54:49 +0200 <[itchyjunk]> Yes i have. but haven't used it comfortably yet
2022-07-17 19:54:54 +0200 <tomsmeding> Yeah I'm using sum and map instead of your explicit recursion and (+)
2022-07-17 19:55:24 +0200 <tomsmeding> sumMix l = ...
2022-07-17 19:55:28 +0200 <qrpnxz> [itchyjunk]: sum work on any foldable
2022-07-17 19:55:35 +0200 <tomsmeding> Here l is of type [Either String Int]
2022-07-17 19:56:17 +0200 <tomsmeding> qrpnxz: they aren't even comfortable with `sum` at all, it's not a good idea to start talking about Foldable at this point
2022-07-17 19:56:32 +0200 <geekosaur> or with `either` apparently
2022-07-17 19:56:50 +0200 <qrpnxz> lol
2022-07-17 19:56:59 +0200 <[itchyjunk]> I'd not seen `Either` before. :x but this is one of the "fundamental" problems apparently
2022-07-17 19:57:26 +0200 <tomsmeding> [itchyjunk]: the idea is to split the walking of the list in two parts: first applying `go` to every element of the list (resulting in [Int], because go :: Either String Int -> Int), then sum this list of Int values to a single Int
2022-07-17 19:57:55 +0200 <tomsmeding> [itchyjunk]: data Either a b = Left a | Right b
2022-07-17 19:57:57 +0200 <tomsmeding> Does that help?
2022-07-17 19:58:06 +0200 <tomsmeding> It's literally the definition
2022-07-17 19:58:46 +0200 <[itchyjunk]> yes that makes sense. i go from [Either String Int] -> [Int] then i can `sum` to go from [Int]->Int
2022-07-17 19:59:01 +0200 <qrpnxz> 👍
2022-07-17 19:59:16 +0200 <tomsmeding> :t map
2022-07-17 19:59:17 +0200 <lambdabot> (a -> b) -> [a] -> [b]
2022-07-17 20:00:01 +0200 <tomsmeding> % :t map @(Either String Int) @Int
2022-07-17 20:00:01 +0200 <yahb2> map @(Either String Int) @Int ; :: (Either String Int -> Int) -> [Either String Int] -> [Int]
2022-07-17 20:00:34 +0200zxx7529(~Thunderbi@user/zxx7529) (Remote host closed the connection)
2022-07-17 20:00:56 +0200 <tomsmeding> (the @ stuf is something that you haven't seen yet, and don't need to understand yet. Intuitively: I'm specialising the type of `map` so that it gets precisely the type that I wanted to show)
2022-07-17 20:01:24 +0200 <tomsmeding> [itchyjunk]: now fill in the whole sumMix :)
2022-07-17 20:04:16 +0200pgass(~pg@190.247.245.154) (Ping timeout: 272 seconds)
2022-07-17 20:04:19 +0200 <[itchyjunk]> `sumMix xs = sum.map (go xs)` in the non empty case?
2022-07-17 20:05:11 +0200 <[itchyjunk]> i want to apply sum to the result of `map go xs`
2022-07-17 20:05:15 +0200 <[itchyjunk]> oh i didn't need the ()
2022-07-17 20:08:15 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Ping timeout: 272 seconds)
2022-07-17 20:09:47 +0200 <[itchyjunk]> Next problem is much easier :x https://bpa.st/J24A
2022-07-17 20:11:27 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 20:11:34 +0200Sgeo(~Sgeo@user/sgeo)
2022-07-17 20:12:37 +0200phma(phma@2001:5b0:212a:ccf8:28d4:d0ee:6a25:5e66) (Read error: Connection reset by peer)
2022-07-17 20:13:18 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:a1fe:a697:e665:8e0a)
2022-07-17 20:13:37 +0200 <marcusxavier> Do you think that exercism exercises are a good way to practice?
2022-07-17 20:15:50 +0200nate4(~nate@98.45.169.16)
2022-07-17 20:16:10 +0200Haskelytic(~Haskelyti@118.179.211.17) (Ping timeout: 252 seconds)
2022-07-17 20:17:31 +0200 <qrpnxz> [itchyjunk]: watch out, (sum.map) (go xs) is not the same as (sum.map go) xs
2022-07-17 20:19:55 +0200 <[Leary]> [itchyjunk]: `product` alone is a complete solution there, suggesting they don't want you to use it, but rather to implement it. And I don't know why they keep saying 'array' when they're dealing with Haskell (linked) lists. The phrasing of the problems suggests a lack of familiarity with the language.
2022-07-17 20:20:44 +0200nate4(~nate@98.45.169.16) (Ping timeout: 272 seconds)
2022-07-17 20:22:01 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-17 20:30:26 +0200epolanski(uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
2022-07-17 20:33:16 +0200Pickchea(~private@user/pickchea) (Quit: Leaving)
2022-07-17 20:33:22 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 20:33:39 +0200ByronJohnson(~bairyn@50-250-232-19-static.hfc.comcastbusiness.net)
2022-07-17 20:35:33 +0200pgass(~pg@190.247.245.154)
2022-07-17 20:41:38 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-07-17 20:43:08 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 244 seconds)
2022-07-17 20:44:27 +0200MoC(~moc@user/moc)
2022-07-17 20:44:38 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-07-17 20:45:53 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 20:46:53 +0200alternateved(~user@staticline-31-183-144-54.toya.net.pl) (Ping timeout: 272 seconds)
2022-07-17 20:47:41 +0200John_Ivan(~John_Ivan@user/john-ivan/x-1515935)
2022-07-17 20:47:51 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Remote host closed the connection)
2022-07-17 20:48:43 +0200__monty__(~toonn@user/toonn)
2022-07-17 20:48:46 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net)
2022-07-17 20:49:13 +0200 <John_Ivan> hi. could anyone explain to me the insight of how functional programming is laid out **from a mathematical point of view?** because I don't seem to understand the structure of an expression
2022-07-17 20:49:37 +0200 <monochrom> Who were that exercise? It is also missing out the teaching moment that multiplying an empty list is also valid.
2022-07-17 20:49:49 +0200 <monochrom> err, s/Who were/Who wrote/
2022-07-17 20:49:59 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 20:51:13 +0200 <geekosaur> John_Ivan, if you're talking about Haskell expressions, that has less to do with mathematics as such than about partial application
2022-07-17 20:51:34 +0200 <geekosaur> which often has more to do with convenience
2022-07-17 20:51:45 +0200 <John_Ivan> geekosaur, well, maybe I should present an example. let's the following:
2022-07-17 20:52:04 +0200 <John_Ivan> myFunction :: Int -> String -> IO ()
2022-07-17 20:52:13 +0200 <John_Ivan> myFunction x y = do ...
2022-07-17 20:52:27 +0200 <John_Ivan> geekosaur, this layout in particular.
2022-07-17 20:52:46 +0200 <John_Ivan> what does it "mean" and what is my goal/scope?
2022-07-17 20:53:27 +0200 <John_Ivan> I'm referring to the 2nd line.
2022-07-17 20:54:06 +0200yauhsien(~yauhsien@61-231-46-226.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
2022-07-17 20:54:09 +0200marcusxavier(~marcusxav@2804:6660:ff12:ef70:a1fe:a697:e665:8e0a) (Quit: WeeChat 3.6)
2022-07-17 20:54:17 +0200 <John_Ivan> geekosaur, I know what it does. I don't know what it means or why it is like that.
2022-07-17 20:54:23 +0200 <geekosaur> as I said, this has more to do with partial application. it's the same as `myFunction = \x -> \y -> do …` and if you only provide the `x` then its result is the `\y -> do ...`
2022-07-17 20:55:10 +0200 <John_Ivan> geekosaur, https://en.wikipedia.org/wiki/Partial_application this?
2022-07-17 20:55:16 +0200coot(~coot@213.134.190.95)
2022-07-17 20:55:31 +0200 <geekosaur> yes
2022-07-17 20:55:57 +0200 <geekosaur> it's a fundamental aspect of Haskell but not most other languages, including other functional programming languages
2022-07-17 20:56:34 +0200 <geekosaur> (and notably is also absent from lambda calculus whoich is usually taken as the basis for functional programming)
2022-07-17 20:57:55 +0200tdodrlt^(~tdodrlt@12.187.69.131)
2022-07-17 20:58:03 +0200sammelweis_(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10)
2022-07-17 20:58:08 +0200 <John_Ivan> hmm
2022-07-17 20:58:10 +0200 <John_Ivan> "The practical motivation for partial application is that very often the functions obtained by supplying some but not all of the arguments to a function are useful; for example, many languages have a function or operator similar to plus_one. Partial application makes it easy to define these functions, for example by creating a function that represents the addition operator with 1 bound as its first argument."
2022-07-17 20:58:24 +0200 <John_Ivan> ok. I get that aspect
2022-07-17 20:59:12 +0200 <John_Ivan> geekosaur, what would the ultimate goal of functional programming be?
2022-07-17 20:59:22 +0200 <int-e> geekosaur: hmpf, what's the distinction that makes it present in Haskell but absent in lambda calculus?
2022-07-17 20:59:28 +0200sammelweis(~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Read error: Connection reset by peer)
2022-07-17 21:00:06 +0200 <geekosaur> John_Ivan, I'm not sure iut has a specific goal distinct from other languages. It's an approach, not a goal
2022-07-17 21:00:37 +0200 <John_Ivan> sure. but approaches themselves have smaller goals. for example, in imperative programming, the ultimate goal is assignment.
2022-07-17 21:00:49 +0200 <geekosaur> just as OOP has its own distinct approach (well, several approaches) but the same goals as other general purpose languages
2022-07-17 21:00:51 +0200 <monochrom> That escalated to meta philosophy quickly.
2022-07-17 21:01:24 +0200 <int-e> (If you worry about this at a low enough level... you can do the same kind of arity analysis that GHC does in any lambda calculus, and then you get /actual/ partial applications.)
2022-07-17 21:01:42 +0200 <geekosaur> int-e, yeh, I've been considering how true that actually was. I think I was focusing more on combinator calculus, where it's less than obvious how to partially apply, say, `S`
2022-07-17 21:01:54 +0200 <monochrom> All languages have as ultimate goal "do it my way and get off my lawn".
2022-07-17 21:02:01 +0200 <John_Ivan> every single line of code in an imperative language, be it a function call, an expression, a declaration, or whatever, falls down to the goal of "assignment" or making "permanent" changes to variables.
2022-07-17 21:02:29 +0200 <John_Ivan> I don't really see what the goal is in functional.
2022-07-17 21:02:53 +0200 <EvanR> your program is an expression, and expressions are composed of more expressions, until you have the primitives
2022-07-17 21:03:15 +0200 <EvanR> like (previously introduced by binders) variables, numeric literals
2022-07-17 21:03:20 +0200 <John_Ivan> EvanR, I "think" that might be the answer to what I'm looking for. Why is that?
2022-07-17 21:03:29 +0200 <int-e> geekosaur: That's fair. Though... hmm, when I implemented a combinatory logic interpreter I did end up with explicit partial applications, ala data Term = S | S1 Term | S2 Term Term | K | K1 Term | I, precisely to capture partial applications during evaluation.
2022-07-17 21:03:57 +0200 <EvanR> expression languages are more easily amenable to denotational semantics
2022-07-17 21:04:13 +0200 <EvanR> don't quote me on that YMMV
2022-07-17 21:04:13 +0200 <int-e> geekosaur: Whoops, that's missing an App case.
2022-07-17 21:04:38 +0200 <John_Ivan> EvanR, my son. you give me answers to questions that are in need of further questions...
2022-07-17 21:04:52 +0200 <John_Ivan> what is denotational semantic?
2022-07-17 21:04:52 +0200 <EvanR> welcome to the jungle
2022-07-17 21:05:34 +0200 <EvanR> or as a random cameo by bruce banner at the end of shang chi put it, the circus
2022-07-17 21:05:49 +0200benin0(~benin@183.82.24.82)
2022-07-17 21:05:56 +0200 <monochrom> Lambda calculus certainly has partial application. Maybe most people don't use it very often, but it's there.
2022-07-17 21:06:28 +0200 <int-e> monochrom: the philosophical angle on this is that when all functions are unary, you can't partially apply those
2022-07-17 21:06:48 +0200 <John_Ivan> EvanR, according to wikipedia, it's the basic block to mathematical objects to represent an expression
2022-07-17 21:06:49 +0200 <int-e> since then they are either unapplied or fully applied
2022-07-17 21:07:05 +0200 <John_Ivan> ok. this seems to be going towards the goal I'm after with my question :)
2022-07-17 21:07:08 +0200 <monochrom> Maybe most people use no-application at all. They get a function like (\x. \y. x) and they say "that's boolean true, I'm done, I'm not even giving it any argument, much less one argument!"
2022-07-17 21:07:11 +0200 <John_Ivan> will read soemore more. thanks.
2022-07-17 21:07:11 +0200 <EvanR> the word expression is a placeholder for some unit of currency in a syntax
2022-07-17 21:07:19 +0200 <int-e> anyway, that's not a *useful* angle.
2022-07-17 21:07:39 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-17 21:07:45 +0200 <int-e> monochrom: who doesn't like arguments though?
2022-07-17 21:07:49 +0200 <EvanR> people use other words for the same thing, for example "term", esp if there is are different syntactic sorts to track
2022-07-17 21:07:57 +0200 <geekosaur> yeh, I reconsidered that aside from the shorthand of λxy being the same as λxλy there's not actually a context in which partial application is meaningful
2022-07-17 21:08:04 +0200 <int-e> ...especially inconsequential ones...
2022-07-17 21:08:30 +0200 <monochrom> Well, we don't have to say "partial application" in Haskell either.
2022-07-17 21:08:52 +0200 <geekosaur> (aside, I need to bind a key to one of the lambdas)
2022-07-17 21:08:56 +0200 <int-e> which is why I mentioned arity analysis earlier
2022-07-17 21:09:08 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 21:11:00 +0200 <EvanR> just bind it to λ. C:λUsersλEvanRλProgram FilesλEtc
2022-07-17 21:11:53 +0200 <int-e> /home/int-e/haskell/...
2022-07-17 21:12:01 +0200 <int-e> this is why Windows is inferior :P
2022-07-17 21:12:05 +0200 <monochrom> "(\x y -> x) (\z -> z)" is either "partial application" in both Haskell and lambda calculus or "simply application, there is only one kind" is both Haskell and lambda calculus.
2022-07-17 21:12:21 +0200 <monochrom> s/is both/in both/
2022-07-17 21:12:25 +0200 <int-e> monochrom: yep
2022-07-17 21:13:43 +0200 <EvanR> in haskell there is only single argument functions. Also in haskell we have multiple argument functions xD
2022-07-17 21:13:56 +0200 <EvanR> after you get compiled at least
2022-07-17 21:14:26 +0200 <int-e> @quote fugue
2022-07-17 21:14:26 +0200 <lambdabot> monochrom says: Welcome to #haskell, where your questions are answered in contrapuntal fugues.
2022-07-17 21:15:12 +0200 <EvanR> mutually contradictory true facts don't help the case where people complain about the language being too hard xD
2022-07-17 21:15:54 +0200 <int-e> But it is part of what makes Haskell *fun*. :P
2022-07-17 21:15:58 +0200phma(~phma@host-67-44-208-65.hnremote.net)
2022-07-17 21:16:05 +0200 <c_wraith> Eh. One of those is language semantics, the other is a compilation detail that occasionally matters when optimizing code.
2022-07-17 21:16:07 +0200 <EvanR> in haskell we have functors, but also, we don't have functors
2022-07-17 21:16:18 +0200 <monochrom> No, it is the same fact but rendered under two competing definitions.
2022-07-17 21:16:32 +0200 <EvanR> set is a functor but also set can't be a functor
2022-07-17 21:16:52 +0200 <int-e> it's not a hard concept when you start with a typical operation like addition.
2022-07-17 21:17:07 +0200 <int-e> it's just hard to make formal :P
2022-07-17 21:17:42 +0200 <int-e> > id id id id id () -- what's the arity of `id` again
2022-07-17 21:17:44 +0200 <lambdabot> ()
2022-07-17 21:18:22 +0200 <int-e> (arity is the hard one; once you have an arity larger than one, partial applications will make sense)
2022-07-17 21:18:22 +0200 <monochrom> Just like there is no conflict between "natural numbers are >= 1" and "natural numbers are >= 0" because they are using different definitions of "natural numbers".
2022-07-17 21:18:37 +0200 <monochrom> And that one won't be resolved for the next 1000 years.
2022-07-17 21:19:10 +0200aveltras[m](~aveltrasm@2001:470:69fc:105::3ef9) (Ping timeout: 240 seconds)
2022-07-17 21:19:16 +0200 <EvanR> I was confronted by someone who demanded to know is pluto or is pluto not a planet
2022-07-17 21:19:30 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 21:19:45 +0200 <EvanR> even if I was someone who could weigh in on this, the whole question is bad lol
2022-07-17 21:19:47 +0200 <dolio> The answer is, who cares?
2022-07-17 21:20:16 +0200 <geekosaur> "The only correct statement about Pluto is that it is jointly captured by the Sun and Neptune."
2022-07-17 21:20:29 +0200 <geekosaur> personally I think the whole notion of defining "planet" is a lose
2022-07-17 21:21:25 +0200 <geekosaur> move Mercury out past Neptune and it's just a rock, not a planet any more
2022-07-17 21:21:29 +0200 <EvanR> maybe arity in haskell is like pluto xD
2022-07-17 21:22:00 +0200 <int-e> It's fine either way, what's weird is that the status changed, and we cope with that in different ways :P
2022-07-17 21:22:42 +0200 <EvanR> so planethood is an exercise in cache invalidation? xD
2022-07-17 21:23:14 +0200 <int-e> In german, Pluto not being a planet broke a nice mnemoinic that in particular relied on Neptun[e] and "neun"="nine" having the same initial letters.
2022-07-17 21:23:49 +0200 <int-e> EvanR: hehe
2022-07-17 21:23:51 +0200Midjak(~Midjak@82.66.147.146) (Quit: This computer has gone to sleep)
2022-07-17 21:23:53 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 255 seconds)
2022-07-17 21:24:47 +0200 <c_wraith> Whenever they find the next planet out there, should it be given a name so that the german mnemonic works again?
2022-07-17 21:25:04 +0200 <EvanR> it's already called planet nine xD
2022-07-17 21:25:08 +0200 <monochrom> Move Mercury past Neptune and it's still a programming language, though. ;)
2022-07-17 21:25:34 +0200 <c_wraith> hmm.. is Pluto planet nein?
2022-07-17 21:25:41 +0200 <monochrom> hahaha
2022-07-17 21:25:53 +0200 <int-e> EvanR: Or... how many Teslas do we have to ship to Pluto to make it a planet. (Okay, what's our off-topic channel again? -blah?)
2022-07-17 21:26:06 +0200 <monochrom> -offtopic
2022-07-17 21:26:07 +0200 <geekosaur> -offtopic
2022-07-17 21:26:12 +0200 <EvanR> what happened to -blah
2022-07-17 21:26:14 +0200 <monochrom> But I'm biased :)
2022-07-17 21:26:23 +0200 <monochrom> I don't like -blah
2022-07-17 21:26:44 +0200 <EvanR> right there's still two even after the freenodalypse
2022-07-17 21:27:09 +0200 <geekosaur> how many people in it?
2022-07-17 21:28:13 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-07-17 21:29:26 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 21:31:03 +0200aveltras[m](~aveltrasm@2001:470:69fc:105::3ef9)
2022-07-17 21:33:45 +0200dos__^^(~user@user/dos/x-1723657) (Ping timeout: 272 seconds)
2022-07-17 21:34:07 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 21:39:40 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 21:39:50 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 21:39:53 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 21:52:51 +0200APic(apic@apic.name) (Read error: Connection reset by peer)
2022-07-17 21:54:18 +0200 <[itchyjunk]> [Leary], ah, i was going to do prod [] = 0; prod (x:xs) = x * prod xs but thought using inbuilts are better
2022-07-17 21:54:45 +0200 <geekosaur> why 0?
2022-07-17 21:55:09 +0200 <[itchyjunk]> hmm, empty list should evaluate to
2022-07-17 21:55:18 +0200foul_owl(~kerry@23.82.194.109) (Ping timeout: 264 seconds)
2022-07-17 21:55:21 +0200 <[itchyjunk]> hmmmmm i didn't put much thought into it i guess
2022-07-17 21:55:34 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-07-17 21:55:35 +0200 <geekosaur> I'd go for the multiplicative identity
2022-07-17 21:55:36 +0200 <[itchyjunk]> oh, maybe i want 1. else i always get 0?
2022-07-17 21:55:40 +0200 <[itchyjunk]> right
2022-07-17 21:57:31 +0200 <[itchyjunk]> qrpnxz, i want to apply sum to the result of a function map go xs so i want sum.(map go xs) ?
2022-07-17 21:57:50 +0200 <monochrom> sum (map go xs)
2022-07-17 21:58:34 +0200 <[itchyjunk]> hmmm f.g x = f(g(x)) so your syntax is the RHS kind right?
2022-07-17 21:58:41 +0200 <[itchyjunk]> but how would i write it using the . operator?
2022-07-17 21:58:47 +0200 <geekosaur> also I'd beware of using (.) without a space in front, thanks to RecordDotSyntax
2022-07-17 21:58:56 +0200 <monochrom> If you want to use . you have to learn: map go xs = (map go) xs
2022-07-17 21:59:28 +0200 <monochrom> DO NOT USE INTUITION
2022-07-17 21:59:32 +0200 <[itchyjunk]> :x
2022-07-17 22:00:03 +0200 <geekosaur> and remember that (f . g) x = f (g x)
2022-07-17 22:01:02 +0200 <[itchyjunk]> (sum . map) go xs => sum (map go xs) so this would be the right syntax i think :x
2022-07-17 22:01:37 +0200 <monochrom> Well let's turn the crank on that one too. No intuition, just algebra.
2022-07-17 22:01:49 +0200 <monochrom> (sum . map) go xs = ((sum . map) go) xs
2022-07-17 22:02:05 +0200 <monochrom> = (sum (map go)) xs
2022-07-17 22:02:14 +0200 <monochrom> = sum (map go) xs
2022-07-17 22:02:57 +0200 <monochrom> You know what, maybe stick to "(f x) y" and don't write "f x y" for the few next days.
2022-07-17 22:04:10 +0200 <monochrom> Backus gave us two valuable inventions, and people are throwing both away.
2022-07-17 22:04:33 +0200 <[itchyjunk]> I'll try to be more explicit till I get the issue mentally sorted :x
2022-07-17 22:05:12 +0200 <monochrom> One is you can write "z = (x + y) * t", you don't have to write "tmp = x + y; z = tmp * t"
2022-07-17 22:05:21 +0200APic(apic@apic.name)
2022-07-17 22:05:59 +0200 <monochrom> The other is functional programming so you can use algebra to predict what your code means, you don't have to use misguided intuition.
2022-07-17 22:06:04 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 22:06:12 +0200 <monochrom> Well, OOP people hate the first, and all programmers hate the second.
2022-07-17 22:07:12 +0200 <[itchyjunk]> I shall surpass them both and hate both!
2022-07-17 22:07:33 +0200 <monochrom> Well yeah "all programmers" include OOP people too.
2022-07-17 22:08:22 +0200 <monochrom> Yes they truly testify that they prefer "tmp = x.add(y); z = tmp.mul(t)"
2022-07-17 22:08:52 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de)
2022-07-17 22:09:07 +0200 <monochrom> They're like "do not even write x.add(y).mul(t) or t.mul(x.add(y))"
2022-07-17 22:09:22 +0200 <geekosaur> welcome back to cobol
2022-07-17 22:09:34 +0200 <monochrom> OK, the JQuery people are beginning to appreciate the benefits of the former.
2022-07-17 22:09:52 +0200 <qrpnxz> geekosaur: does anybody actually use recorddotsyntax knowing lenses are a thing?
2022-07-17 22:10:02 +0200 <geekosaur> yes, sadly
2022-07-17 22:10:24 +0200 <qrpnxz> 🥹
2022-07-17 22:10:38 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net) (Ping timeout: 240 seconds)
2022-07-17 22:16:17 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection)
2022-07-17 22:21:02 +0200califax(~califax@user/califx) (Ping timeout: 268 seconds)
2022-07-17 22:22:06 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in)
2022-07-17 22:22:16 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 268 seconds)
2022-07-17 22:22:22 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-07-17 22:23:00 +0200califax(~califax@user/califx)
2022-07-17 22:23:04 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 22:24:21 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-07-17 22:25:34 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-07-17 22:28:28 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 22:30:17 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 268 seconds)
2022-07-17 22:30:37 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 244 seconds)
2022-07-17 22:30:54 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-07-17 22:30:54 +0200winny(~weechat@user/winny) (Ping timeout: 268 seconds)
2022-07-17 22:30:54 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
2022-07-17 22:30:54 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-07-17 22:31:33 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-07-17 22:31:47 +0200 <maerwald> that's like saying "does anybody actually use debian, knowing nix is a thing?"
2022-07-17 22:32:25 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-07-17 22:32:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-07-17 22:32:55 +0200califax(~califax@user/califx)
2022-07-17 22:32:55 +0200winny(~weechat@user/winny)
2022-07-17 22:33:24 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-07-17 22:34:19 +0200jpds(~jpds@gateway/tor-sasl/jpds)
2022-07-17 22:34:53 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-07-17 22:36:22 +0200michalz(~michalz@185.246.204.77)
2022-07-17 22:39:13 +0200 <monochrom> I think I may disagree :)
2022-07-17 22:39:30 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 22:39:54 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 22:39:56 +0200 <monochrom> But not strongly. I may see your point too.
2022-07-17 22:41:21 +0200gmg(~user@user/gehmehgeh) (Quit: Leaving)
2022-07-17 22:41:54 +0200 <maerwald> Many advanced haskellers use lenses only occasionally. Definitely not something you want to bother beginners with. If my code is simple, I'm not gonna import optics. So there's definitely a gap to be filled.
2022-07-17 22:42:09 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net) (Ping timeout: 272 seconds)
2022-07-17 22:42:50 +0200 <monochrom> Perhaps let's try: Does anyone actually use RecordDotNotation, knowing that selector application exists? >:)
2022-07-17 22:43:45 +0200 <monochrom> (Selector application means: whereas record dot notation says "o.f", selector application says "f o".)
2022-07-17 22:44:32 +0200 <monochrom> And I do take that attitude. I don't teach do-notation to my students, because >>= already exists.
2022-07-17 22:44:45 +0200machinedgod(~machinedg@d172-219-86-154.abhsia.telus.net)
2022-07-17 22:45:10 +0200 <monochrom> And it is especially because my students are beginners.
2022-07-17 22:45:35 +0200 <monochrom> No need to distract them with lenses, dot notation, or do notation >:)
2022-07-17 22:47:30 +0200christiansen(~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 240 seconds)
2022-07-17 22:48:44 +0200 <monochrom> Oh yeah, in my unix-and-C course, I recommend students to install ubuntu, not debian or nix. :)
2022-07-17 22:49:04 +0200 <monochrom> But that's really just because school lab has gone for ubuntu.
2022-07-17 22:49:13 +0200 <qrpnxz> monochrom: selectors can't set :)
2022-07-17 22:49:24 +0200 <monochrom> If school lab uses Solaris, I might have recommended installing your own Solaris too haha.
2022-07-17 22:49:44 +0200 <monochrom> Does RecordDotNotation allow setting? Like o.f = 4?
2022-07-17 22:49:58 +0200 <qrpnxz> probably or it would be extremely useless
2022-07-17 22:50:08 +0200 <monochrom> OK so you don't actually know.
2022-07-17 22:50:14 +0200 <monochrom> Well, I don't actually know either.
2022-07-17 22:50:19 +0200 <qrpnxz> i'll look one sec
2022-07-17 22:50:39 +0200 <monochrom> I wouldn't be surprised either way though.
2022-07-17 22:51:03 +0200 <qrpnxz> i'd be very surprised if it didn't because then it would just be the worse extension ever lol
2022-07-17 22:51:06 +0200 <monochrom> I have seen how pointless OOP-minded people can be when they just whine about syntax.
2022-07-17 22:52:00 +0200 <qrpnxz> ya know, the GHC manual doesn't actually say. Maybe it's get only i can't believe it
2022-07-17 22:52:20 +0200 <monochrom> OK sorry, s/people/ideas/
2022-07-17 22:52:27 +0200 <qrpnxz> lol
2022-07-17 22:53:17 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl)
2022-07-17 22:53:31 +0200 <exarkun> https://github.com/ghc-proposals/ghc-proposals/pull/282/files#diff-05d6456bad56dfbda9ecf23d6daa02d…
2022-07-17 22:53:42 +0200 <exarkun> I guess it does allow setting?
2022-07-17 22:54:01 +0200 <qrpnxz> seems so
2022-07-17 22:54:04 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-07-17 22:54:06 +0200 <qrpnxz> given a quick skim
2022-07-17 22:54:49 +0200 <geekosaur> it's pointless. it steals syntax to do what can already be done multiple ways
2022-07-17 22:55:01 +0200 <monochrom> OK but it is restricted to a fairly specific context.
2022-07-17 22:55:10 +0200 <geekosaur> just to make people happy who expect . to be a record separator
2022-07-17 22:55:40 +0200 <monochrom> It doesn't do standalone "o.f = 4", it only does "r(o.f = 4)" when o is a field of and outer record r.
2022-07-17 22:56:21 +0200 <monochrom> Not to deny that it helps that use case.
2022-07-17 22:56:56 +0200__monty__(~toonn@user/toonn) (Quit: leaving)
2022-07-17 22:57:03 +0200segfaultfizzbuzz(~segfaultf@157-131-253-58.fiber.dynamic.sonic.net)
2022-07-17 22:57:50 +0200merijn(~merijn@c-001-001-023.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-07-17 23:00:16 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-07-17 23:00:20 +0200 <monochrom> SML has record dot syntax but it has that since day 1 together with the decision to use o for function application. That's right you write "(sum o map f) xs".
2022-07-17 23:00:21 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124) (Remote host closed the connection)
2022-07-17 23:00:53 +0200 <monochrom> Whereas in the Haskell case it is duct-taped.
2022-07-17 23:00:56 +0200 <qrpnxz> an infix op that is just a letter. Seems like a smell for the parser
2022-07-17 23:01:05 +0200 <qrpnxz> but looks nice for the most part
2022-07-17 23:01:32 +0200 <monochrom> I would not call it duct-taped if the proponents made a concession and chose a different symbol so that the parser didn't have to suck.
2022-07-17 23:02:01 +0200 <monochrom> Yeah I think I heard that writing a parser for SML was not easy :)
2022-07-17 23:02:31 +0200 <monochrom> Whereas Haskell says you can write like x `div` y,
2022-07-17 23:02:45 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 23:02:56 +0200laman(~laman@rego.ai)
2022-07-17 23:02:58 +0200 <qrpnxz> we have so few symbols on standard keyboard that every character is overloaded to hell unfortunately. I wish using more unicode was norm. Like i put my keyboard into haskell mode and my numpad gets keys for lambda symbol, composition symbol and so on
2022-07-17 23:02:59 +0200 <monochrom> SML says you make a declaration "infixl 6 div" and now you write x div y
2022-07-17 23:03:30 +0200tdodrlt^(~tdodrlt@12.187.69.131) (Ping timeout: 240 seconds)
2022-07-17 23:04:33 +0200 <qrpnxz> monochrom: oh wow lol
2022-07-17 23:06:10 +0200 <monochrom> So basically the parser builds a preliminary parse tree that is known to be likely wrong and later fix it after knowing that div and o are infix operators.
2022-07-17 23:06:25 +0200 <monochrom> err, maybe s/parse tree/abstract syntax tree/
2022-07-17 23:06:40 +0200stiell(~stiell@gateway/tor-sasl/stiell) (Ping timeout: 268 seconds)
2022-07-17 23:06:54 +0200matthewmosior(~matthewmo@173.170.253.91) (Ping timeout: 244 seconds)
2022-07-17 23:07:01 +0200 <monochrom> It's doable because "wrong" just means wrong shape, the data are OK.
2022-07-17 23:07:31 +0200 <geekosaur> ghc does the same in a sense, because it can't know fixities until it has parsed the whole thing
2022-07-17 23:07:39 +0200 <tomsmeding> In agda you can: if_then_else_ : Bool -> t -> t -> t ; if True x _ = x ; if False _ y = y. And then you can write `if a == b then 1 else 2`
2022-07-17 23:07:54 +0200 <monochrom> I think you also have to do something like that to Haskell, on the ground that operator precedence declarations can also come in late.
2022-07-17 23:07:57 +0200 <tomsmeding> Talking about weird fixities
2022-07-17 23:08:03 +0200 <monochrom> Yeah, that.
2022-07-17 23:08:11 +0200 <qrpnxz> that's some smalltalk level idioms right there haha
2022-07-17 23:08:30 +0200acidjnk_new(~acidjnk@p200300d6e705864510d29662a0d17642.dip0.t-ipconnect.de)
2022-07-17 23:09:06 +0200hpc. o O ( breadth-first parser )
2022-07-17 23:09:24 +0200 <tomsmeding> This is also the reason why you have to write (1 , 2) for a pair in agda, as opposed to (1, 2). Indeed, the pair construction operator is defined as _,_ and (1, 2) would be parsed as two tokens: 1, and 2
2022-07-17 23:09:42 +0200 <monochrom> :'(
2022-07-17 23:09:54 +0200 <tomsmeding> Or maybe it only holds for letters, a , b
2022-07-17 23:10:05 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 23:10:17 +0200 <tomsmeding> Numbers _might_ be excluded from the game, not sure
2022-07-17 23:10:30 +0200acidjnk_new3(~acidjnk@p200300d6e705864510d29662a0d17642.dip0.t-ipconnect.de)
2022-07-17 23:10:30 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 23:12:10 +0200stiell(~stiell@gateway/tor-sasl/stiell)
2022-07-17 23:12:23 +0200acidjnk(~acidjnk@p200300d6e705864588abf31f379d9ca5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2022-07-17 23:12:56 +0200 <qrpnxz> given that if then else example, pretty sure that language is super not context-free. What are compile times like?
2022-07-17 23:13:10 +0200acidjnk_new(~acidjnk@p200300d6e705864510d29662a0d17642.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-07-17 23:13:35 +0200 <hpc> parsing isn't the slow part of agda
2022-07-17 23:13:46 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2022-07-17 23:13:48 +0200 <monochrom> I think this is just a small deviation from CFG, it won't cost really a lot of parsing time.
2022-07-17 23:14:06 +0200adanwan(~adanwan@gateway/tor-sasl/adanwan)
2022-07-17 23:15:03 +0200jpds1(~jpds@gateway/tor-sasl/jpds)
2022-07-17 23:15:06 +0200tdodrlt^(~tdodrlt@12.187.69.131)
2022-07-17 23:16:57 +0200 <int-e> qrpnxz: Here's a little secret... virtually no programming languages are context-free. The CFG is just a first approximation which is useful because programmers tend to understand the grammar, and because with some care, you can feed it to a parser generator and get a kind of pre-parser. You'll still need to check a ton of things... like matching identifiers, declarations and definitions...
2022-07-17 23:17:09 +0200jpds(~jpds@gateway/tor-sasl/jpds) (Ping timeout: 268 seconds)
2022-07-17 23:17:19 +0200 <monochrom> :)
2022-07-17 23:17:29 +0200 <monochrom> As long as the post-processing is linear-time we're fine.
2022-07-17 23:17:37 +0200 <int-e> https://en.wikipedia.org/wiki/Brainfuck *is* a context-free language ;-)
2022-07-17 23:17:55 +0200 <monochrom> http://www.vex.net/~trebla/weblog/declare-before-use.xhtml
2022-07-17 23:22:51 +0200 <darkling> int-e: But not regular. :)
2022-07-17 23:23:58 +0200Kaiepi(~Kaiepi@156.34.47.253) (Read error: Connection reset by peer)
2022-07-17 23:24:10 +0200matthewmosior(~matthewmo@173.170.253.91)
2022-07-17 23:26:23 +0200foul_owl(~kerry@174-21-132-202.tukw.qwest.net)
2022-07-17 23:28:40 +0200michalz(~michalz@185.246.204.77) (Remote host closed the connection)
2022-07-17 23:30:52 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:5546:a014:fe40:2124)
2022-07-17 23:31:35 +0200 <qrpnxz> int-e: what's why i said "super". Though i think Go is context-free, or about as context-free as you get
2022-07-17 23:31:41 +0200 <qrpnxz> :)
2022-07-17 23:32:35 +0200 <qrpnxz> forth and scheme also context free afaik
2022-07-17 23:34:05 +0200 <Rembane> IIRC APL is contectful
2022-07-17 23:34:12 +0200 <Rembane> *contextful
2022-07-17 23:35:51 +0200 <monochrom> Scheme still has a define-before-use condition, so it is not context-free.
2022-07-17 23:36:01 +0200 <monochrom> Shell scripting and Python though...
2022-07-17 23:36:02 +0200MoC(~moc@user/moc) (Quit: Konversation terminated!)
2022-07-17 23:38:22 +0200 <qrpnxz> that's only relevant in the interpretation of the program, not the parsing
2022-07-17 23:40:34 +0200 <int-e> monochrom: python has indentation, try capturing that :P
2022-07-17 23:40:58 +0200 <hpc> python has define-before-use too, just in a much sillier way
2022-07-17 23:41:34 +0200 <hpc> functions get defined in order, but the functions they call don't need to be valid until you actually call that function
2022-07-17 23:41:49 +0200 <hpc> so you can define two functions out of order just fine, but you can't do
2022-07-17 23:41:53 +0200 <hpc> foo(); def foo(): ...
2022-07-17 23:42:06 +0200 <qrpnxz> worse of both static and dynamic, nice
2022-07-17 23:42:57 +0200tdodrlt^(~tdodrlt@12.187.69.131) (Ping timeout: 272 seconds)
2022-07-17 23:43:35 +0200 <monochrom> Oh oops I forgot python layout hehe
2022-07-17 23:46:08 +0200 <qrpnxz> i refuse to use python. I think i haven't touched it in many years
2022-07-17 23:47:05 +0200pavonia(~user@user/siracusa)
2022-07-17 23:47:06 +0200 <geekosaur> every time I touch it I get forcibly reminded of why I don't use it
2022-07-17 23:47:08 +0200 <hpc> i like to say i learned haskell because i was too stupid for python
2022-07-17 23:47:21 +0200 <hpc> only half joking
2022-07-17 23:47:32 +0200 <hpc> *and that's only half joking
2022-07-17 23:47:43 +0200 <exarkun> What's the non-joke half
2022-07-17 23:48:04 +0200 <qrpnxz> lol
2022-07-17 23:49:02 +0200 <exarkun> (err maybe that's the opposite of what I meant to say)
2022-07-17 23:49:11 +0200 <monochrom> I have a similar sentiment. I choose static typing because I'm too stupid for everything Alan Kay boasts about being dynamic and oh so flexible.
2022-07-17 23:50:30 +0200 <monochrom> Dijkstra has a similar sentiment too. He promotes doing algebra because he (and I) is too stupid for "intuitive" thinking. ("thinking")
2022-07-17 23:52:07 +0200 <hpc> fun fact, the latin root of "intuitive" is "no teaching"
2022-07-17 23:52:42 +0200 <hpc> try not to think about the etymology of "amused" while being amused by that fact :P
2022-07-17 23:53:25 +0200 <monochrom> heh now you've got me curious. But I'll ask m-w.com
2022-07-17 23:53:31 +0200 <hpc> also try not to think about how that fact is wrong
2022-07-17 23:53:41 +0200hpc. o O ( next time google it first )
2022-07-17 23:54:18 +0200 <maerwald> hpc: the trick when writing python is not to try to write *correct* code. That's why it's hard for you
2022-07-17 23:54:41 +0200 <qrpnxz> dynamism can be nice, but having *everything* be dynamic is like too much desert. Just gives you tummy ache. Haskell has deferred type error and Data.Dynamic and such, and i'm sure it gets used, but it's just a totally waste to not specify actual type in 99.999% of cases
2022-07-17 23:54:51 +0200 <qrpnxz> i'm too lazy for dynamic typing xD
2022-07-17 23:55:16 +0200 <maerwald> qrpnxz: well, Haskells complete lack for good structural typing is not so amusing
2022-07-17 23:55:19 +0200wombat875(~wombat875@pool-141-155-7-175.nycmny.fios.verizon.net)
2022-07-17 23:55:20 +0200 <qrpnxz> well, i say specify but i don't even have to do that lol
2022-07-17 23:55:31 +0200cheater(~Username@user/cheater) (Quit: (BitchX) Size DOES matter)
2022-07-17 23:55:47 +0200 <maerwald> but these things are more important when doing frontend stuff... I don't do frontend in Haskell.
2022-07-17 23:55:54 +0200 <hpc> maerwald: my problem with python is the opposite, i spend 10 minutes typing out a thing and then another hour and a half trying to find all the dumb type errors
2022-07-17 23:56:00 +0200 <monochrom> Haha OK, I haven't found the etymology of "amused", but yeah "intuitive" does not trace back to "no teaching".
2022-07-17 23:56:06 +0200 <qrpnxz> maerwald: i think you can do that with Generic
2022-07-17 23:56:14 +0200 <maerwald> qrpnxz: not really
2022-07-17 23:56:14 +0200cheater(~Username@user/cheater)
2022-07-17 23:56:15 +0200 <geekosaur> a-muse
2022-07-17 23:56:15 +0200 <hpc> if i tried to be more correct in python maybe it would work better
2022-07-17 23:56:18 +0200 <qrpnxz> you can also safely coerce types with same rep
2022-07-17 23:56:34 +0200 <hpc> or maybe i would just spend 6 hours typing out a thing and another 3 trying to find all the dumb type errors
2022-07-17 23:56:37 +0200 <geekosaur> (without a muse, remembering that the muses were quasideities)
2022-07-17 23:56:46 +0200 <qrpnxz> but really the only duck-typing i care about type classes can do so