2024/03/16

2024-03-16 00:00:00 +0100 <int-e> unsafeIOtoST presumably
2024-03-16 00:00:02 +0100 <lyxia> also it's an internal function, the primary use case is to implement the public pure API
2024-03-16 00:00:16 +0100 <c_wraith> well. More relevantly, with a "safely" involved.
2024-03-16 00:00:55 +0100 <lyxia> Yeah that was a rethorical question to raehik
2024-03-16 00:01:16 +0100 <int-e> oh
2024-03-16 00:02:00 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 00:02:08 +0100 <int-e> stToIO is safe, but yeah you'll have trouble actually using it.
2024-03-16 00:02:31 +0100 <c_wraith> oh, huh. ByteString changed its internal representation at last.
2024-03-16 00:04:22 +0100 <geekosaur> latest release I think?
2024-03-16 00:05:15 +0100 <int-e> wait, no more offsets?
2024-03-16 00:05:45 +0100 <c_wraith> raehik: if you want to create ByteStrings efficiently without poking pointers over and over, isn't that what builders are for?
2024-03-16 00:06:38 +0100 <c_wraith> int-e: the backing store is on the foreign heap now!
2024-03-16 00:10:33 +0100Square(~Square@user/square) (Ping timeout: 256 seconds)
2024-03-16 00:14:47 +0100 <int-e> Wasn't that always the case, hmm.
2024-03-16 00:15:20 +0100 <int-e> But `Foreign.ForenPtr.plusForeignPtr` was only added in 2017, and that's why the offset is no longer needed.
2024-03-16 00:17:10 +0100 <int-e> Hmm.
2024-03-16 00:18:48 +0100__monty__(~toonn@user/toonn) (Quit: leaving)
2024-03-16 00:18:53 +0100 <int-e> Actually I don't know what you mean. Allocation uses https://hackage.haskell.org/package/base-4.19.1.0/docs/GHC-ForeignPtr.html#v:mallocPlainForeignPtr
2024-03-16 00:20:36 +0100 <int-e> (that means pinned bytearrays)
2024-03-16 00:21:25 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection)
2024-03-16 00:21:37 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2024-03-16 00:22:46 +0100gmg(~user@user/gehmehgeh) (Quit: Leaving)
2024-03-16 00:24:27 +0100petrichor(~znc-user@user/petrichor) (Ping timeout: 255 seconds)
2024-03-16 00:29:33 +0100smalltalkman(uid545680@id-545680.hampstead.irccloud.com)
2024-03-16 00:31:44 +0100 <c_wraith> oh. I meant it doesn't necessarily *need* to be on the heap.
2024-03-16 00:32:00 +0100 <c_wraith> Or was that also true
2024-03-16 00:32:21 +0100 <int-e> that was also true
2024-03-16 00:39:09 +0100 <int-e> It was ForeignPtr-based all along, as far as I can remember. The tricky part was to get it to allocate from the heap (avoiding finalizers, which is a win).
2024-03-16 00:47:53 +0100shapr`(~user@c-24-218-186-89.hsd1.ma.comcast.net)
2024-03-16 00:49:51 +0100shapr(~user@c-24-218-186-89.hsd1.ma.comcast.net) (Ping timeout: 260 seconds)
2024-03-16 00:50:54 +0100myxos(~myxos@065-028-251-121.inf.spectrum.com) (Remote host closed the connection)
2024-03-16 00:52:20 +0100Ptival(~Ptival@2601:1c0:4580:7650:cdf6:fe66:cfea:400d)
2024-03-16 00:53:17 +0100stanrifkin(~stanrifki@p200300dbcf3c3000008223fe5b49b811.dip0.t-ipconnect.de)
2024-03-16 00:54:36 +0100 <Ptival> hi, is there a way to pass a data constructor as an argument to a type family? I'm contemplating hacking together some TH that would give me a tuple type for the payload of a data constructor.
2024-03-16 00:56:14 +0100 <Ptival> This may exist already, so a pointer to something similar would also be useful. Essentially, for `data Foo = A Int Bool | B Float`, I'd like a "type family"-like `PayloadOf` s.t. `PayloadOf 'A` would reduce to `(Int, Bool)`.
2024-03-16 00:58:37 +0100 <Ptival> I guess I'd be willing to settle down for `PayloadOf Foo 1` if passing `A` is too spicy
2024-03-16 00:58:55 +0100myxos(~myxos@065-028-251-121.inf.spectrum.com)
2024-03-16 01:00:48 +0100 <c_wraith> I mean, you can always write that, if you don't mind writing all the instances by hand
2024-03-16 01:05:13 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 01:05:34 +0100 <Ptival> I'm eventually trying to have it be TH-generated. But currently, I'm simply hitting the wall that different data constructors have different types, so it's not clear how to even declare the type family to begin with.
2024-03-16 01:05:54 +0100 <c_wraith> Make the type family polykinded
2024-03-16 01:06:27 +0100 <Ptival> ah, just putting a type variable for the kind?
2024-03-16 01:06:35 +0100 <c_wraith> yeah
2024-03-16 01:06:37 +0100 <Ptival> indeed, thanks :)
2024-03-16 01:10:08 +0100noumenon(~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
2024-03-16 01:18:04 +0100zer0bitz(~zer0bitz@user/zer0bitz) (Ping timeout: 260 seconds)
2024-03-16 01:20:21 +0100zetef(~quassel@5.2.182.98) (Remote host closed the connection)
2024-03-16 01:34:34 +0100zenstoic(uid461840@id-461840.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2024-03-16 01:41:47 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 272 seconds)
2024-03-16 01:50:13 +0100d34df00d(~d34df00d@2600:1702:4f1b:7c10::43) (Remote host closed the connection)
2024-03-16 01:50:50 +0100d34df00d(~d34df00d@2600:1702:4f1b:7c10::43)
2024-03-16 02:04:13 +0100rosco(~rosco@111.221.54.95)
2024-03-16 02:04:35 +0100mulk(~mulk@p5b112d0c.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2024-03-16 02:08:14 +0100joel_(~joel@185.107.56.65)
2024-03-16 02:09:04 +0100mulk(~mulk@p5b112381.dip0.t-ipconnect.de)
2024-03-16 02:11:26 +0100joel_(~joel@185.107.56.65) (Good Bye)
2024-03-16 02:23:50 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection)
2024-03-16 02:24:08 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2024-03-16 02:29:40 +0100Joao[3](~Joao003@190.108.99.67)
2024-03-16 02:34:14 +0100Joao[3](~Joao003@190.108.99.67) (Read error: Connection reset by peer)
2024-03-16 02:45:58 +0100benkard(~mulk@p5b11225e.dip0.t-ipconnect.de)
2024-03-16 02:46:37 +0100mulk(~mulk@p5b112381.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2024-03-16 02:46:37 +0100benkardmulk
2024-03-16 02:55:27 +0100xff0x(~xff0x@2405:6580:b080:900:480d:c341:fe03:d988) (Ping timeout: 256 seconds)
2024-03-16 02:55:51 +0100xff0x(~xff0x@ai082039.d.east.v6connect.net)
2024-03-16 03:04:09 +0100Ptival(~Ptival@2601:1c0:4580:7650:cdf6:fe66:cfea:400d) (Ping timeout: 250 seconds)
2024-03-16 03:06:13 +0100Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
2024-03-16 03:06:28 +0100Lord_of_Life_(~Lord@user/lord-of-life/x-2819915)
2024-03-16 03:07:48 +0100Lord_of_Life_Lord_of_Life
2024-03-16 03:12:30 +0100renpose(~renpose@user/renpose) (Quit: Client closed)
2024-03-16 03:24:02 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 03:24:35 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 03:35:38 +0100otto_s(~user@p5b0443a3.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2024-03-16 03:36:55 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2024-03-16 03:37:20 +0100otto_s(~user@p4ff27f66.dip0.t-ipconnect.de)
2024-03-16 03:39:54 +0100euleritian(~euleritia@dynamic-176-006-197-068.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-03-16 03:40:11 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 03:50:18 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 03:50:31 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 03:51:44 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2024-03-16 04:05:32 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Ping timeout: 268 seconds)
2024-03-16 04:19:37 +0100shapr`(~user@c-24-218-186-89.hsd1.ma.comcast.net) (Ping timeout: 264 seconds)
2024-03-16 04:52:05 +0100td_(~td@i53870934.versanet.de) (Ping timeout: 252 seconds)
2024-03-16 04:53:51 +0100td_(~td@i53870919.versanet.de)
2024-03-16 04:58:03 +0100Lycurgus(~georg@user/Lycurgus) (Quit: leaving)
2024-03-16 05:00:51 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 05:01:23 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 05:16:57 +0100aforemny_(~aforemny@i59F516D9.versanet.de) (Ping timeout: 255 seconds)
2024-03-16 05:17:01 +0100stanrifkin_(~stanrifki@p200300dbcf072400c0217626a9f38655.dip0.t-ipconnect.de)
2024-03-16 05:17:03 +0100aforemny(~aforemny@i59F516EC.versanet.de)
2024-03-16 05:20:13 +0100stanrifkin(~stanrifki@p200300dbcf3c3000008223fe5b49b811.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
2024-03-16 05:21:13 +0100mud(~mud@user/kadoban) (Quit: quit)
2024-03-16 05:23:19 +0100xff0x(~xff0x@ai082039.d.east.v6connect.net) (Ping timeout: 260 seconds)
2024-03-16 05:24:23 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 05:24:36 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 05:25:36 +0100xff0x(~xff0x@2405:6580:b080:900:480d:c341:fe03:d988)
2024-03-16 05:46:37 +0100derpyxdhs(~Thunderbi@user/derpyxdhs)
2024-03-16 05:52:53 +0100raym(~ray@user/raym) (Ping timeout: 240 seconds)
2024-03-16 05:55:03 +0100raym(~ray@user/raym)
2024-03-16 06:01:51 +0100sam113102(~sam@24.157.253.231)
2024-03-16 06:02:13 +0100sam113101(~sam@modemcable043.190-201-24.mc.videotron.ca) (Ping timeout: 264 seconds)
2024-03-16 06:02:17 +0100sam113102sam113101
2024-03-16 06:10:39 +0100tcard__(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2024-03-16 06:11:02 +0100tcard_(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection)
2024-03-16 06:11:03 +0100oneeyedalien(~oneeyedal@user/oneeyedalien)
2024-03-16 06:11:46 +0100derpyxdhs(~Thunderbi@user/derpyxdhs) (Quit: derpyxdhs)
2024-03-16 06:12:23 +0100mulk(~mulk@p5b11225e.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2024-03-16 06:16:18 +0100rosco(~rosco@111.221.54.95) (Quit: Lost terminal)
2024-03-16 06:16:27 +0100mulk(~mulk@p5b2dce9f.dip0.t-ipconnect.de)
2024-03-16 06:55:09 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-03-16 06:55:24 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 07:02:50 +0100mulk(~mulk@p5b2dce9f.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2024-03-16 07:05:01 +0100mulk(~mulk@p5b2dccc5.dip0.t-ipconnect.de)
2024-03-16 07:11:35 +0100TimeLapse(~TimeLapse@176.254.244.83) (Ping timeout: 260 seconds)
2024-03-16 07:12:00 +0100oneeyedalien(~oneeyedal@user/oneeyedalien) (Quit: Leaving)
2024-03-16 07:16:18 +0100 <cheater> hello
2024-03-16 07:17:20 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 07:28:23 +0100takuan(~takuan@178-116-218-225.access.telenet.be)
2024-03-16 07:29:30 +0100derpyxdhs(~Thunderbi@user/derpyxdhs)
2024-03-16 07:37:25 +0100oo_miguel(~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
2024-03-16 07:44:46 +0100oo_miguel(~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 268 seconds)
2024-03-16 07:49:23 +0100Daxson(~Daxson@176.254.244.83)
2024-03-16 07:57:18 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 08:03:25 +0100tcard__(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Remote host closed the connection)
2024-03-16 08:03:37 +0100tcard__(~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303)
2024-03-16 08:06:44 +0100 <edwardk> it is time for me to up my hiring bar. i just fed chatgpt the first part of my usual suite of interview questions about rank-select dictionaries and how to derive coselect and the corollary about the existence of right adjoint to the cumulative density function in statistics rather than the usual "inverse" cdf used for quantiles... and er.. it basically got it right.
2024-03-16 08:08:07 +0100 <edwardk> i haven't finished the usual interview with all the machinery to rederive wavelet trees, mainly because that gets awkward to type out.
2024-03-16 08:12:21 +0100derpyxdhs(~Thunderbi@user/derpyxdhs) (Quit: derpyxdhs)
2024-03-16 08:14:15 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds)
2024-03-16 08:23:00 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 08:23:35 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-03-16 08:24:18 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 08:26:27 +0100econo_(uid147250@id-147250.tinside.irccloud.com) (Quit: Connection closed for inactivity)
2024-03-16 08:32:27 +0100wootehfoot(~wootehfoo@user/wootehfoot)
2024-03-16 08:38:30 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 08:41:54 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-03-16 08:42:37 +0100euleritian(~euleritia@77.22.252.56)
2024-03-16 08:52:17 +0100euleritian(~euleritia@77.22.252.56) (Read error: Connection reset by peer)
2024-03-16 08:53:07 +0100euleritian(~euleritia@77.22.252.56)
2024-03-16 08:55:11 +0100euleritian(~euleritia@77.22.252.56) (Read error: Connection reset by peer)
2024-03-16 08:55:26 +0100euleritian(~euleritia@77.22.252.56)
2024-03-16 09:00:23 +0100euleritian(~euleritia@77.22.252.56) (Read error: Connection reset by peer)
2024-03-16 09:00:37 +0100danza__(~francesco@151.19.247.93)
2024-03-16 09:01:05 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 09:01:41 +0100petrichor(~znc-user@user/petrichor)
2024-03-16 09:04:30 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-03-16 09:06:01 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2024-03-16 09:08:35 +0100tzh(~tzh@c-73-164-206-160.hsd1.or.comcast.net) (Quit: zzz)
2024-03-16 09:14:47 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
2024-03-16 09:16:00 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 09:29:28 +0100dcoutts(~duncan@cpc69402-oxfd27-2-0-cust903.4-3.cable.virginm.net) (Ping timeout: 260 seconds)
2024-03-16 09:36:38 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2024-03-16 09:46:46 +0100elnegro(elnegro@r167-57-85-191.dialup.adsl.anteldata.net.uy)
2024-03-16 09:48:20 +0100elnegro(elnegro@r167-57-85-191.dialup.adsl.anteldata.net.uy) (Client Quit)
2024-03-16 09:54:28 +0100CiaoSen(~Jura@5.83.182.225)
2024-03-16 09:56:42 +0100amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com) (Remote host closed the connection)
2024-03-16 09:57:20 +0100amjoseph(~amjoseph@static-198-44-128-146.cust.tzulo.com)
2024-03-16 10:09:08 +0100danza_(~francesco@151.43.237.40)
2024-03-16 10:11:43 +0100danza__(~francesco@151.19.247.93) (Ping timeout: 260 seconds)
2024-03-16 10:16:41 +0100ski(~ski@ext-1-033.eduroam.chalmers.se)
2024-03-16 10:18:09 +0100krei-se(~krei-se@p57af28c6.dip0.t-ipconnect.de) (Quit: ZNC 1.8.2 - https://znc.in)
2024-03-16 10:29:55 +0100CiaoSen(~Jura@5.83.182.225) (Ping timeout: 260 seconds)
2024-03-16 10:30:29 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
2024-03-16 10:31:41 +0100CiaoSen(~Jura@2a05:5800:29d:1100:e6b9:7aff:fe80:3d03)
2024-03-16 10:36:01 +0100arthurvlearthy
2024-03-16 10:43:22 +0100tired(~tired@user/tired) (Quit: /)
2024-03-16 10:45:40 +0100tired(~tired@user/tired)
2024-03-16 10:47:16 +0100agrosant(~agrosant@62.1.112.240.dsl.dyn.forthnet.gr)
2024-03-16 10:50:24 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk) (Ping timeout: 255 seconds)
2024-03-16 10:52:32 +0100gabriel_sevecek(~gabriel@188-167-229-200.dynamic.chello.sk)
2024-03-16 10:56:59 +0100agrosant(~agrosant@62.1.112.240.dsl.dyn.forthnet.gr) (Ping timeout: 264 seconds)
2024-03-16 10:57:02 +0100CiaoSen(~Jura@2a05:5800:29d:1100:e6b9:7aff:fe80:3d03) (Ping timeout: 256 seconds)
2024-03-16 11:05:48 +0100Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2024-03-16 11:15:53 +0100CiaoSen(~Jura@2a05:5800:2d3:4900:e6b9:7aff:fe80:3d03)
2024-03-16 11:22:08 +0100zer0bitz(~zer0bitz@user/zer0bitz)
2024-03-16 11:24:53 +0100CiaoSen(~Jura@2a05:5800:2d3:4900:e6b9:7aff:fe80:3d03) (Ping timeout: 240 seconds)
2024-03-16 11:27:06 +0100CiaoSen(~Jura@2a05:5800:2d3:8f00:e6b9:7aff:fe80:3d03)
2024-03-16 11:29:21 +0100adanwan_(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2024-03-16 11:29:53 +0100adanwan(~adanwan@gateway/tor-sasl/adanwan)
2024-03-16 11:30:28 +0100kuribas(~user@ptr-17d51entmeoj3fjxzy1.18120a2.ip6.access.telenet.be)
2024-03-16 11:36:15 +0100adanwan(~adanwan@gateway/tor-sasl/adanwan) (Remote host closed the connection)
2024-03-16 11:36:37 +0100adanwan(~adanwan@gateway/tor-sasl/adanwan)
2024-03-16 11:43:27 +0100CiaoSen(~Jura@2a05:5800:2d3:8f00:e6b9:7aff:fe80:3d03) (Ping timeout: 256 seconds)
2024-03-16 11:48:55 +0100Square(~Square@user/square)
2024-03-16 11:59:27 +0100mulk(~mulk@p5b2dccc5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
2024-03-16 12:01:46 +0100oo_miguel(~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
2024-03-16 12:02:32 +0100steew(~steew@user/steew)
2024-03-16 12:04:07 +0100pagnol(~user@2a02:a210:a41:dc00:1b3:5588:73e9:6aa6)
2024-03-16 12:04:46 +0100 <pagnol> is it correct that optics are kind of a new thing that supplants lenses but at the same time lenses are also called "optics"?
2024-03-16 12:04:55 +0100 <pagnol> I'm confused
2024-03-16 12:04:56 +0100Tuplanolla(~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
2024-03-16 12:06:47 +0100 <mauke> I understand optics to be the general concept that includes lenses, prisms, etc
2024-03-16 12:10:11 +0100 <danza_> makes sense
2024-03-16 12:11:16 +0100 <Rembane> To make things more confusing there's a library called lens and a library called optics. Both do lenses etc, but in different ways.
2024-03-16 12:22:01 +0100 <probie> Most things in the lens library aren't lenses
2024-03-16 12:24:00 +0100mulk(~mulk@p5b2dc99c.dip0.t-ipconnect.de)
2024-03-16 12:29:58 +0100danza_(~francesco@151.43.237.40) (Ping timeout: 268 seconds)
2024-03-16 12:30:22 +0100 <Franciman> hi, does haskell have intersection types?
2024-03-16 12:31:12 +0100acidjnk(~acidjnk@p200300d6e737e7738008c85cfa684e75.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
2024-03-16 12:32:18 +0100 <ncf> no
2024-03-16 12:33:00 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-03-16 12:33:14 +0100CiaoSen(~Jura@2a05:5800:2d3:8f00:e6b9:7aff:fe80:3d03)
2024-03-16 12:52:29 +0100CiaoSen(~Jura@2a05:5800:2d3:8f00:e6b9:7aff:fe80:3d03) (Ping timeout: 240 seconds)
2024-03-16 12:53:21 +0100target_i(~target_i@user/target-i/x-6023099)
2024-03-16 12:56:31 +0100 <Axman6> edwardk: well damn, I guess AI did take me job, I only gove myself a 40% chance of understanding that ofbots explained to me =)
2024-03-16 13:00:19 +0100misterfish(~misterfis@84.53.85.146)
2024-03-16 13:02:30 +0100 <pagnol> I am looking at the book "Optics by Example" and it seems it is mainly concerned with lenses, not "optics" in the stricter sense, or am I missing something?
2024-03-16 13:04:19 +0100shapr(~user@2603:3005:b31:e100:b75f:93d6:ea52:ce90)
2024-03-16 13:07:52 +0100 <ncf> table of contents looks like it covers more than just lenses
2024-03-16 13:08:06 +0100komikat_(~akshitkr@218.185.248.66)
2024-03-16 13:08:14 +0100komikat(~akshitkr@218.185.248.66) (Read error: Connection reset by peer)
2024-03-16 13:08:24 +0100 <ncf> » Lenses, Folds, Traversals, Prisms and Isos are all types of optics which we’ll explore throughout the book!
2024-03-16 13:11:31 +0100gmg(~user@user/gehmehgeh)
2024-03-16 13:15:28 +0100 <pagnol> ncf: ah, thanks for checking
2024-03-16 13:28:52 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 13:30:32 +0100tv(~tv@user/tv) (Quit: derp)
2024-03-16 13:31:04 +0100tv(~tv@user/tv)
2024-03-16 13:34:12 +0100ChaiTRex(~ChaiTRex@user/chaitrex) (Remote host closed the connection)
2024-03-16 13:35:01 +0100ChaiTRex(~ChaiTRex@user/chaitrex)
2024-03-16 13:43:35 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 13:46:53 +0100kuribas(~user@ptr-17d51entmeoj3fjxzy1.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 27.1))
2024-03-16 13:52:03 +0100pagnol(~user@2a02:a210:a41:dc00:1b3:5588:73e9:6aa6) (Remote host closed the connection)
2024-03-16 13:53:38 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 14:10:07 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 14:10:59 +0100fedorafan(~fedorafan@user/fedorafan)
2024-03-16 14:11:27 +0100 <fedorafan> o/ just looking after someone ok
2024-03-16 14:11:32 +0100 <fedorafan> have a nice day guys
2024-03-16 14:11:43 +0100fedorafan(~fedorafan@user/fedorafan) (Textual IRC Client: www.textualapp.com)
2024-03-16 14:14:11 +0100misterfish(~misterfis@84.53.85.146) (Ping timeout: 268 seconds)
2024-03-16 14:16:16 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Remote host closed the connection)
2024-03-16 14:16:48 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net)
2024-03-16 14:17:12 +0100mei(~mei@user/mei) (Quit: mei)
2024-03-16 14:19:37 +0100shapr(~user@2603:3005:b31:e100:b75f:93d6:ea52:ce90) (Quit: shopping)
2024-03-16 14:21:00 +0100tri(~tri@ool-18bc2e74.dyn.optonline.net) (Ping timeout: 255 seconds)
2024-03-16 14:24:14 +0100fedorafan(~fedorafan@user/fedorafan)
2024-03-16 14:24:30 +0100 <fedorafan> ah i stay here
2024-03-16 14:24:34 +0100 <fedorafan> gonna watch how the mood is here
2024-03-16 14:25:17 +0100 <yushyin> ok
2024-03-16 15:09:09 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 15:13:49 +0100xff0x(~xff0x@2405:6580:b080:900:480d:c341:fe03:d988) (Ping timeout: 256 seconds)
2024-03-16 15:14:12 +0100xff0x(~xff0x@ai082039.d.east.v6connect.net)
2024-03-16 15:20:10 +0100renpose(~renpose@user/renpose)
2024-03-16 15:22:24 +0100mik3d(~mik3d@pool-173-61-131-199.cmdnnj.fios.verizon.net)
2024-03-16 15:23:16 +0100pastly(~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection)
2024-03-16 15:23:53 +0100pastly(~pastly@gateway/tor-sasl/pastly)
2024-03-16 15:27:20 +0100tertek(~tertek@user/tertek) (Ping timeout: 252 seconds)
2024-03-16 15:27:40 +0100tertek(~tertek@user/tertek)
2024-03-16 15:28:16 +0100pastly(~pastly@gateway/tor-sasl/pastly) (Remote host closed the connection)
2024-03-16 15:28:25 +0100sudden(~cat@user/sudden) (Ping timeout: 246 seconds)
2024-03-16 15:28:37 +0100pastly(~pastly@gateway/tor-sasl/pastly)
2024-03-16 15:29:34 +0100sudden(~cat@user/sudden)
2024-03-16 15:31:00 +0100mik3d(~mik3d@pool-173-61-131-199.cmdnnj.fios.verizon.net) (Read error: Connection reset by peer)
2024-03-16 15:33:02 +0100gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2024-03-16 15:34:14 +0100gmg(~user@user/gehmehgeh)
2024-03-16 15:41:11 +0100fun-safe-math(~fun-safe-@24.21.106.247) (Ping timeout: 260 seconds)
2024-03-16 15:42:42 +0100shapr(~user@c-24-218-186-89.hsd1.ma.comcast.net)
2024-03-16 15:45:10 +0100ania123(~ania123@94-43-231-47.dsl.utg.ge)
2024-03-16 15:47:07 +0100 <fedorafan> 608 users and its so calm
2024-03-16 15:47:14 +0100 <fedorafan> no worries i wont spam here around
2024-03-16 15:54:09 +0100 <yushyin> it's mainly a channel where people ask haskell related questions and wait for answers. So if you have questions, it will become more lively here eventually
2024-03-16 15:55:52 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2024-03-16 16:19:48 +0100 <fedorafan> i see
2024-03-16 16:19:58 +0100ania123(~ania123@94-43-231-47.dsl.utg.ge) (Quit: Client closed)
2024-03-16 16:20:26 +0100 <fedorafan> didnt plan to learn haskell maybe in some time when i am bored or i need to but yeah a lot of people here many users
2024-03-16 16:20:48 +0100 <fedorafan> yushyin where is it used what kind of niches
2024-03-16 16:21:32 +0100tv(~tv@user/tv) (Ping timeout: 260 seconds)
2024-03-16 16:22:57 +0100L29Ah(~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer)
2024-03-16 16:26:19 +0100ania123(~ania123@94-43-231-47.dsl.utg.ge)
2024-03-16 16:26:45 +0100 <yushyin> it is a general-purpose language, it is used for a wide range of applications
2024-03-16 16:27:53 +0100 <fedorafan> do you have an example
2024-03-16 16:31:26 +0100CAT_SCATS
2024-03-16 16:32:10 +0100 <yushyin> shellcheck, hledger, pandoc, xmonad, agda, purescript, git-annex
2024-03-16 16:32:33 +0100 <yushyin> (off the top of my head)
2024-03-16 16:34:43 +0100acidjnk(~acidjnk@p200300d6e737e7694d901d7278c02256.dip0.t-ipconnect.de)
2024-03-16 16:34:47 +0100tv(~tv@user/tv)
2024-03-16 16:34:58 +0100 <fedorafan> ok thanks
2024-03-16 16:39:05 +0100 <haskellbridge> <s​m> https://www.reddit.com/r/haskell/comments/eddwbu/top_nonprogrammingrelated_haskell_apps/ https://wiki.haskell.org/Haskell_in_industry
2024-03-16 16:43:50 +0100pastly(~pastly@gateway/tor-sasl/pastly) (Ping timeout: 260 seconds)
2024-03-16 16:45:35 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)
2024-03-16 16:46:48 +0100euleritian(~euleritia@dynamic-176-006-187-161.176.6.pool.telefonica.de)
2024-03-16 16:50:38 +0100pastly(~pastly@gateway/tor-sasl/pastly)
2024-03-16 17:05:19 +0100tv(~tv@user/tv) (Ping timeout: 256 seconds)
2024-03-16 17:12:11 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2024-03-16 17:14:11 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2024-03-16 17:18:46 +0100tv(~tv@user/tv)
2024-03-16 17:25:25 +0100tzh(~tzh@c-73-164-206-160.hsd1.or.comcast.net)
2024-03-16 17:32:44 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
2024-03-16 17:34:57 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2024-03-16 17:39:39 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-03-16 17:44:37 +0100Lycurgus(~georg@li1192-118.members.linode.com)
2024-03-16 17:44:37 +0100Lycurgus(~georg@li1192-118.members.linode.com) (Changing host)
2024-03-16 17:44:37 +0100Lycurgus(~georg@user/Lycurgus)
2024-03-16 17:51:19 +0100mik3d(~mik3d@pool-173-61-131-199.cmdnnj.fios.verizon.net)
2024-03-16 18:02:54 +0100michalz(~michalz@185.246.207.193)
2024-03-16 18:03:11 +0100mik3d(~mik3d@pool-173-61-131-199.cmdnnj.fios.verizon.net) (Read error: Connection reset by peer)
2024-03-16 18:03:59 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
2024-03-16 18:07:40 +0100zenstoic(uid461840@id-461840.hampstead.irccloud.com)
2024-03-16 18:08:40 +0100mei(~mei@user/mei)
2024-03-16 18:20:50 +0100Volt_(~Volt_@c-73-47-181-152.hsd1.ma.comcast.net)
2024-03-16 18:23:10 +0100mik3d(~mik3d@2607:fb90:e9c0:4382:3d8f:f3ae:dc66:8b5f)
2024-03-16 18:26:43 +0100TMA(tma@twin.jikos.cz) (Ping timeout: 268 seconds)
2024-03-16 18:27:39 +0100mik3d(~mik3d@2607:fb90:e9c0:4382:3d8f:f3ae:dc66:8b5f) (Read error: Connection reset by peer)
2024-03-16 18:29:08 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 18:34:05 +0100ania123(~ania123@94-43-231-47.dsl.utg.ge) (Ping timeout: 250 seconds)
2024-03-16 18:34:10 +0100TMA(tma@twin.jikos.cz)
2024-03-16 18:37:14 +0100gmg(~user@user/gehmehgeh) (Ping timeout: 260 seconds)
2024-03-16 18:37:30 +0100rvalue(~rvalue@user/rvalue) (Ping timeout: 268 seconds)
2024-03-16 18:38:06 +0100michalz(~michalz@185.246.207.193) (Read error: Connection reset by peer)
2024-03-16 18:39:15 +0100gmg(~user@user/gehmehgeh)
2024-03-16 18:40:11 +0100michalz(~michalz@185.246.207.217)
2024-03-16 18:43:37 +0100mechap(~mechap@user/mechap) (Ping timeout: 264 seconds)
2024-03-16 18:43:43 +0100gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2024-03-16 18:43:59 +0100meiGuest589
2024-03-16 18:43:59 +0100Guest589(~mei@user/mei) (Killed (calcium.libera.chat (Nickname regained by services)))
2024-03-16 18:44:05 +0100mei(~mei@user/mei)
2024-03-16 18:44:26 +0100gmg(~user@user/gehmehgeh)
2024-03-16 18:45:03 +0100mechap(~mechap@user/mechap)
2024-03-16 18:48:02 +0100rvalue(~rvalue@user/rvalue)
2024-03-16 18:50:15 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Remote host closed the connection)
2024-03-16 18:50:56 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl)
2024-03-16 18:52:11 +0100euleritian(~euleritia@dynamic-176-006-187-161.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
2024-03-16 18:52:29 +0100euleritian(~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
2024-03-16 19:12:13 +0100tabemann_(~tabemann@2600:1700:7990:24e0:b651:977a:44b1:1ec6) (Quit: Leaving)
2024-03-16 19:19:26 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
2024-03-16 19:20:19 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 19:21:43 +0100mmhat(~mmh@p200300f1c7271778ee086bfffe095315.dip0.t-ipconnect.de)
2024-03-16 19:23:08 +0100mmhat(~mmh@p200300f1c7271778ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit)
2024-03-16 19:26:20 +0100derpyxdhs(~Thunderbi@user/derpyxdhs)
2024-03-16 19:26:32 +0100raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2024-03-16 19:33:48 +0100destituion(~destituio@2a02:2121:655:c95b:a1ec:ac61:8d62:b83e) (Ping timeout: 260 seconds)
2024-03-16 19:34:10 +0100destituion(~destituio@2001:4644:c37:0:6086:64f4:a213:b80d)
2024-03-16 19:42:27 +0100Sgeo(~Sgeo@user/sgeo)
2024-03-16 19:44:13 +0100fun-safe-math(~fun-safe-@24.21.106.247)
2024-03-16 19:45:49 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com)
2024-03-16 19:55:53 +0100Volt_(~Volt_@c-73-47-181-152.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
2024-03-16 20:27:38 +0100[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2024-03-16 20:28:10 +0100derpyxdhs(~Thunderbi@user/derpyxdhs) (Quit: derpyxdhs)
2024-03-16 20:32:05 +0100mechap(~mechap@user/mechap) (Ping timeout: 240 seconds)
2024-03-16 20:34:21 +0100mechap(~mechap@user/mechap)
2024-03-16 20:37:59 +0100L29Ah(~L29Ah@wikipedia/L29Ah) ()
2024-03-16 20:44:01 +0100jinsun(~jinsun@user/jinsun)
2024-03-16 20:56:21 +0100monochrom(~trebla@216.138.220.146) (Quit: ZNC 1.8.2+deb3.1 - https://znc.in)
2024-03-16 20:57:32 +0100hseg(~gesh@77.137.76.75)
2024-03-16 20:59:03 +0100monochrom(trebla@216.138.220.146)
2024-03-16 21:00:58 +0100 <hseg> Hi, am building some packages for arch linux using stack. For some reason, stack build on a system that doesn't have a GHC installed errors out with 'Failed to determine machine word size', but if I first call stack setup it does work. Any ideas, or should I report?
2024-03-16 21:02:45 +0100YuutaW(~YuutaW@mail.yuuta.moe) (Ping timeout: 256 seconds)
2024-03-16 21:03:23 +0100machinedgod(~machinedg@d173-183-246-216.abhsia.telus.net)
2024-03-16 21:04:29 +0100YuutaW(~YuutaW@mail.yuuta.moe)
2024-03-16 21:08:29 +0100 <glguy> Arch Linux being difficult to use for GHC development is a known issue
2024-03-16 21:08:40 +0100 <haskellbridge> <s​m> hseg, do you want stack to install required GHCs for you (rather than doing it yourself, eg with ghcup ?) If so you may need to configure that, see the stack user guide
2024-03-16 21:08:49 +0100 <glguy> If you're writing Haskell, and not just using package manager installed executables, you'll want to isolate yourself from it
2024-03-16 21:13:02 +0100 <hseg> My situation is slightly weird, in that I'm both writing Haskell code and packaging haskell software for arch. Hence, I have a ghcup-vendored GHC+Cabal with which I write my code, and in parallel I have a distro-vendored stack that I package with (which is supposed to pick up system libraries). It's the latter that I'm having trouble with
2024-03-16 21:13:44 +0100 <haskellbridge> <s​m> nice :)
2024-03-16 21:14:31 +0100 <hseg> (in fact, I package all my haskell software as static builds to avoid the dynamic linking side of the problem. since they're builds of git HEAD, this shouldn't have the usual static linking problems (apart from bloat))
2024-03-16 21:15:17 +0100 <haskellbridge> <s​m> I would guess the arch-packaged stack is configured to not install GHCs for you (though the error message sounds suboptimal)
2024-03-16 21:15:58 +0100 <haskellbridge> <s​m> show us the whole output if you like
2024-03-16 21:16:58 +0100 <hseg> Bumped stack version as recommended in repo (though it was a minor verbump, so am not expecting wonders) and am testing, will post log if I can reproduce
2024-03-16 21:17:35 +0100 <hseg> Ironically, the package I'm testing this with is a static build of ghcup
2024-03-16 21:21:39 +0100agrosant(~agrosant@77.49.162.195.dsl.dyn.forthnet.gr)
2024-03-16 21:26:54 +0100 <hololeap> I have a question about aeson: it seems like deriving FromJSON is able to automatically decode JSON { url: "http:/blah" } to a data type and put it in a field named "url" . what if "url" is used in different data types? would you have to manually create a FromJSON instance for each, or are there other tricks that can be used here?
2024-03-16 21:29:26 +0100 <tomsmeding> hololeap: one option is putting the fields in question in a newtype, and putting the url-ish FromJSON instance on that newtype
2024-03-16 21:32:59 +0100agrosant(~agrosant@77.49.162.195.dsl.dyn.forthnet.gr) (Ping timeout: 264 seconds)
2024-03-16 21:34:10 +0100 <hololeap> I'm worried about name clashes with record syntax. I'm hoping it can handle different naming conventions on the record, i.e. you can have `data This = This { thisUrl :: Text } deriving FromJSON` and `data That = That { thatUrl :: Text } deriving FromJSON`, and both are automatically able to decode JSON fields named "url"
2024-03-16 21:34:46 +0100waleee(~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
2024-03-16 21:35:38 +0100 <hololeap> or maybe that's what you're addressing tomsmeding? it wasn't clear to me
2024-03-16 21:35:49 +0100 <tomsmeding> hololeap: the idea would be to have `data This = This { thisUrl :: URL } deriving FromJSON` and `data That = { thatUrl :: URL } deriving FromJSON`
2024-03-16 21:35:53 +0100 <tomsmeding> and give URL the proper FromJSON instance
2024-03-16 21:36:04 +0100 <hseg> sm: So it failed despite the update. Log: https://0x0.st/HCDZ.txt
2024-03-16 21:36:33 +0100 <hololeap> oh, ok I think I understand. so JSON would then automatically convert anything named "url" to a URL?
2024-03-16 21:36:38 +0100 <hololeap> *aeson
2024-03-16 21:36:54 +0100 <tomsmeding> no, you are the one who chooses which fields get interpreted as a URL
2024-03-16 21:37:01 +0100 <tomsmeding> by not putting a Text there but a URL
2024-03-16 21:37:07 +0100 <tomsmeding> which is newtype URL = URL Text
2024-03-16 21:37:17 +0100 <tomsmeding> oh wait
2024-03-16 21:37:22 +0100 <tomsmeding> that's not what you're asking
2024-03-16 21:37:29 +0100tomsmedingwas blabbering
2024-03-16 21:37:46 +0100 <hololeap> no worries, I'm struggling with being clear on this myself
2024-03-16 21:38:49 +0100 <hololeap> I'm also brand new to aeson, except for a couple really simple use cases in the past
2024-03-16 21:38:54 +0100 <tomsmeding> hololeap: are you looking for 'instance FromJSON This where parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = drop 4 }'?
2024-03-16 21:39:29 +0100 <tomsmeding> sorry I was addressing the question (that you didn't ask) of how to use the same parser for fields in various data types
2024-03-16 21:39:42 +0100 <hololeap> possibly, I haven't looked at the fieldLabelModifier function
2024-03-16 21:39:47 +0100 <tomsmeding> as in, "I have an aeson parser for url strings and I have various fields in various data types where I want to use that parser"
2024-03-16 21:40:07 +0100 <tomsmeding> to which one possible solution is, put that parser on a newtype ("URL") and use that newtype in those fields
2024-03-16 21:40:22 +0100 <haskellbridge> <s​m> hseg: the "configure: error: Failed to determine machine word size. Does your toolchain actually work?" I am guessing comes from the previous "size of void" check. It might be a correct message, or it might need improving - I'd ask Mike Pilgrem in #haskell-stack:matrix.org
2024-03-16 21:40:35 +0100 <hseg> OK, ty!
2024-03-16 21:41:02 +0100 <hseg> wait, is that channel not bridged with IRC?
2024-03-16 21:41:17 +0100 <haskellbridge> <s​m> no, you'll have to use a matrix client for that one
2024-03-16 21:41:22 +0100 <tomsmeding> hseg sm: that looks very suspiciously like autotools 'configure' output
2024-03-16 21:41:29 +0100 <hololeap> tomsmeding: that's definitely the section of the docs I need to study
2024-03-16 21:41:31 +0100 <haskellbridge> <s​m> yup
2024-03-16 21:41:31 +0100 <tomsmeding> even more because it says "configure"
2024-03-16 21:41:41 +0100 <tomsmeding> and if so that output has zero to do with haskell
2024-03-16 21:41:46 +0100 <hseg> yup -- presumably because stack is running make install on the ghc bindist
2024-03-16 21:41:49 +0100 <haskellbridge> <s​m> hseg: the bigger issue is that you are asking stack to install a ghc for you, on arch. It's trying to download (fedora-ish) source and build stack. This seems very likely to fail and is probably not what you want to do
2024-03-16 21:42:12 +0100 <tomsmeding> on arch, ghcup takes the fedora builds iirc
2024-03-16 21:42:16 +0100 <hseg> ^
2024-03-16 21:42:28 +0100 <haskellbridge> <s​m> shouldn't you be forcing it to use your arch-packaged ghc for this use case ?
2024-03-16 21:42:48 +0100 <geekosaur> I'd need to see config.log from that but I don't know how you could get it. that said, stack really shouldn't be building it in this case, as previously said
2024-03-16 21:43:05 +0100 <hseg> possibly, but the arch-packaged stack pulls in all of the dynamically linked libs, so I'd rather avoid that
2024-03-16 21:43:21 +0100 <tomsmeding> why do you need to use arch-packaged stack but are fine using non-arch-packaged ghc?
2024-03-16 21:43:23 +0100 <hseg> geekosaur: afaict, it's running make install on the bindist or somesuch
2024-03-16 21:43:32 +0100 <tomsmeding> if you're building statically anyway, can't you just build with your favourite toolchain?
2024-03-16 21:43:37 +0100 <geekosaur> why does it need to know the machine word size in that case?
2024-03-16 21:43:45 +0100 <hseg> geekosaur: *shrug*
2024-03-16 21:43:45 +0100 <tomsmeding> autotools (tm)
2024-03-16 21:43:50 +0100 <geekosaur> (more specifically it's checking the size of (void *)
2024-03-16 21:43:51 +0100 <tomsmeding> look at it looking for strings.h
2024-03-16 21:44:04 +0100 <tomsmeding> and the 100 other things that ghc doesn't necessarily use
2024-03-16 21:44:19 +0100 <hseg> tomsmeding: was papering over the fact that I'm actually using https://aur.archlinux.org/packages/stack-static
2024-03-16 21:44:23 +0100 <haskellbridge> <s​m> (for anyone that missed it, note hseg's special use case at start of thread)
2024-03-16 21:44:29 +0100 <geekosaur> I saw that
2024-03-16 21:44:58 +0100 <tomsmeding> hseg: why do you need to use that stack?
2024-03-16 21:45:09 +0100 <hseg> though in hindsight, probably should be using the standard stack
2024-03-16 21:45:14 +0100 <geekosaur> I also saw that one autotools macro wasn't eexpanded, and it complained that it couldn't find libgmp.so.3 (which if I had to guess is why it's failing)
2024-03-16 21:45:23 +0100 <tomsmeding> oh wait are you creating an AUR package
2024-03-16 21:45:27 +0100 <hseg> yup
2024-03-16 21:45:32 +0100 <tomsmeding> hence it needs to build on the user's machine
2024-03-16 21:45:34 +0100 <tomsmeding> I see
2024-03-16 21:45:37 +0100 <hseg> yeah
2024-03-16 21:45:46 +0100 <hseg> (eg I package the static pandoc build)
2024-03-16 21:46:08 +0100tomsmedingis largely unaware of the AUR haskell landscape due to 'cabal install'ing everything
2024-03-16 21:46:12 +0100 <hseg> Probably should be using the standard stack, given that that's what AUR users will be using
2024-03-16 21:46:12 +0100 <geekosaur> that is, the executable it builds to test things is being linked against -lgmp and it's not found
2024-03-16 21:46:40 +0100 <hseg> hrm. weird that it's looking for libgmp.so.3 *and* libgmp.so.10, though?
2024-03-16 21:47:48 +0100 <tomsmeding> one possible debugging route is installing this ghc version with a "standard" stack from ghcup in the same verbose mode, and diffing the logs
2024-03-16 21:48:27 +0100 <geekosaur> interesting
2024-03-16 21:48:46 +0100 <tomsmeding> if that also fails that's one source of trouble (AUR stack-static) eliminated; if it doesn't, hopefully the diff teaches something
2024-03-16 21:48:58 +0100 <tomsmeding> s/trouble/potential trouble/
2024-03-16 21:49:00 +0100 <hseg> yeah. also testing arch-packaged stack vs aur stack-static
2024-03-16 21:49:11 +0100 <haskellbridge> <s​m> I'm not sure you must use the arch-packaged stack, but ensuring your stack use an arch-packaged ghc sounds like it might be a good idea
2024-03-16 21:49:15 +0100agrosant(~agrosant@62.1.178.30.dsl.dyn.forthnet.gr)
2024-03-16 21:49:35 +0100 <tomsmeding> sm: arch-packaged ghc is 9.0, this log looks like it's installing 9.6.4
2024-03-16 21:50:08 +0100 <hseg> yeah -- another reason I prefer divorcing myself from arch packaging here -- it lags a bit behind (for understandable reasons)
2024-03-16 21:50:11 +0100 <haskellbridge> <s​m> yes, so maybe hseg needs to build this pandoc package with arch's ghc 9.0
2024-03-16 21:50:25 +0100 <tomsmeding> also I'm questioning how much arch user will like it to suddenly have a stack installation including a 2.5 GB ghc installation on their machine just because they installed an AUR package
2024-03-16 21:50:29 +0100 <haskellbridge> <s​m> (or maybe that's not necessary)
2024-03-16 21:50:53 +0100 <haskellbridge> <s​m> right, tomsmeding
2024-03-16 21:51:10 +0100 <haskellbridge> <s​m> that is never a good look for pandoc or haskell :)
2024-03-16 21:51:32 +0100 <tomsmeding> was this for pandoc or for ghcup, as hseg was suggesting earlier? If for the latter, that's even more ironic :p
2024-03-16 21:51:37 +0100 <hseg> right... actually, the static builds only really make sense if someone is ditributing the binary packages, not if someone actually needs to pull in 2.5GB of stackage (and periodically empty it)
2024-03-16 21:51:54 +0100 <hseg> Was testing it on the static ghcup package, yes
2024-03-16 21:52:26 +0100 <tomsmeding> "I want to install a GHC so I install ghcup, so I get a free 2.5 GB GHC installation that I didn't ask for and I still don't have a ghc, only ghcup"
2024-03-16 21:52:28 +0100 <tomsmeding> :p
2024-03-16 21:52:34 +0100 <monochrom> On that tangent, I stopped asking students to install cabal-install on their school accounts because when you do "cabal update" the index file fill up like 90% of their disk quota. :)
2024-03-16 21:52:43 +0100 <tomsmeding> lol
2024-03-16 21:52:53 +0100 <haskellbridge> <s​m> ouch
2024-03-16 21:53:11 +0100 <hseg> yeah... there's gotta be a better story here
2024-03-16 21:54:10 +0100 <monochrom> It didn't help that back then the error message did not expose the "disk quota" message/code, so some students had "cabal update" successful, some others had mysterious errors, and there was almost no way to know why.
2024-03-16 21:54:16 +0100 <tomsmeding> -rw-r--r-- 1 tom tom 857M Mar 13 23:23 01-index.tar
2024-03-16 21:54:33 +0100 <tomsmeding> that be large indeed
2024-03-16 21:54:48 +0100 <haskellbridge> <s​m> hseg: for easy install by arch users, you probably want to go with the grain of what's already in arch, no ?
2024-03-16 21:55:15 +0100 <haskellbridge> <s​m> monochrom: ugh
2024-03-16 21:55:28 +0100 <tomsmeding> hseg: what is the end-goal here? packaging ghcup, or something else?
2024-03-16 21:55:35 +0100pwntips(~pwntips@user/pwntips) (Quit: pwntips)
2024-03-16 21:55:43 +0100 <tomsmeding> because as packaging goals go, ghcup is a bit of a special one perhaps
2024-03-16 21:55:57 +0100 <tomsmeding> (in terms of what's convenient and conventional, not in technical terms)
2024-03-16 21:56:02 +0100 <int-e> sm: install ghc with arch; compile ghc from source using that, never use the system installed ghc for anything ever again (uninstall it)
2024-03-16 21:56:41 +0100 <hseg> packages I'm packaging here: graphmod, hlint, ormolu, pandoc, pandoc-crossref, stack-clean-old
2024-03-16 21:56:42 +0100tomsmeding. o O ( download a ghcup binary )
2024-03-16 21:57:12 +0100 <int-e> I know, I know. But then how do I get my slim ghc installation without profiling libs and documentation ;)
2024-03-16 21:57:19 +0100 <tomsmeding> hseg: if they build using the arch system ghc, that's probably the best route
2024-03-16 21:57:32 +0100 <tomsmeding> unless you want to set up a whole parallel haskell ecosystem in the AUR
2024-03-16 21:57:33 +0100 <hseg> though of these, only graphmod and stack-clean-old aren't already packaged in-arch
2024-03-16 21:57:43 +0100 <hseg> so gains are lesser here
2024-03-16 21:58:29 +0100 <hseg> (otoh, the pandoc and pandoc-crossref builds are HEAD builds, to keep up with their development)
2024-03-16 21:58:52 +0100 <tomsmeding> with the disclaimer that I haven't interacted with the haskell ecosystem in the AUR, and very little with the system's at that, I would expect any haskell-related package on arch, including the AUR, to use the arch system ghc infra
2024-03-16 21:59:49 +0100 <tomsmeding> there are downsides to that infra, but at least then the "system packages" are consistent and you don't get multiple ghcs all over the place when you install different haskell-related packages
2024-03-16 21:59:52 +0100 <int-e> The main problem is that every update breaks all your compiled programs because of a mix of frequent updates in AUR, Arch preferring shared libraries, and ghc not having any ABI compatibility for shared libraries between versions.
2024-03-16 22:00:27 +0100 <geekosaur> with a side helping of "they forget to rebuild their own dependent packages sometimes"
2024-03-16 22:00:34 +0100 <tomsmeding> and if you don't want that, you're necessarily setting up a parallel haskell ecosystem in the AUR, at which point I would suggest to actually set up a parallel ecosystem
2024-03-16 22:00:46 +0100 <int-e> What I said above is what I've actually done when I used Arch. And the workflow is ancient, it predates both ghcup and stack.
2024-03-16 22:01:07 +0100 <tomsmeding> sure :)
2024-03-16 22:01:57 +0100 <int-e> ghcup is probably the sanest way these days
2024-03-16 22:02:04 +0100 <hseg> tomsmeding: right, hence why I've dropped the pretense of managing the libraries pulled in by these packages and am only using this workflow for actual userspace tools
2024-03-16 22:02:05 +0100 <tomsmeding> but setting up a parallel ecosystem risks triggering https://xkcd.com/927/
2024-03-16 22:02:39 +0100 <tomsmeding> if you're building a static executable on the user's side, why not just distribute that executable?
2024-03-16 22:02:48 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2024-03-16 22:03:07 +0100 <tomsmeding> saves disk space because you need neither stack nor ghc in the build-time dependencies then :p
2024-03-16 22:03:17 +0100 <monochrom> It's not that bad in practice. Networking effects usually cause convergence to at most 5 dominant attractors.
2024-03-16 22:03:32 +0100 <hseg> because that would require setting up an entire repository, which is more responsibility than I care for
2024-03-16 22:03:41 +0100 <int-e> (owned by 1-3 companies)
2024-03-16 22:03:48 +0100 <tomsmeding> except that every attractor here will install a GHC on the user's machine, which is 5 * 2.5 = 12.5 GB
2024-03-16 22:04:12 +0100 <int-e> tomsmeding: some will install several on a whim (stack)!
2024-03-16 22:04:17 +0100 <tomsmeding> :D
2024-03-16 22:04:23 +0100 <tomsmeding> and I'm not counting the compiled libraries
2024-03-16 22:04:25 +0100 <monochrom> I think most users will just choose one. :)
2024-03-16 22:04:36 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net) (Client Quit)
2024-03-16 22:04:38 +0100tomsmedingchooses 0
2024-03-16 22:04:52 +0100 <int-e> tomsmeding: one reason why I still build my own ghcs: https://paste.debian.net/1310958/
2024-03-16 22:04:53 +0100 <hseg> int-e: hence why I locally patch packages to all use a small number of resolvers
2024-03-16 22:05:05 +0100Maeda(~Maeda@91-161-10-149.subs.proxad.net)
2024-03-16 22:05:37 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2024-03-16 22:05:47 +0100 <monochrom> OK, programmers who use Mac are more experienced in this. Do you install two parallel ecosystems, e.g., both xcode and homebrew?
2024-03-16 22:05:59 +0100 <tomsmeding> int-e: that's just 3 more than I have :p
2024-03-16 22:06:10 +0100 <int-e> tomsmeding: but look at the individual sizes
2024-03-16 22:06:13 +0100 <geekosaur> "yes, because half the time you need xcode to build stuff in brew"
2024-03-16 22:06:20 +0100 <tomsmeding> int-e: oh good point O.o
2024-03-16 22:06:21 +0100 <monochrom> haha OK
2024-03-16 22:06:25 +0100 <geekosaur> (thanks apple)
2024-03-16 22:06:43 +0100 <tomsmeding> int-e: ghc got smaller in 9.6 -> 9.8!
2024-03-16 22:06:50 +0100 <haskellbridge> <s​m> monochrom: I get most things from homebrew. I don't need xcode for anything (except a few more command line tools, always required on a new mac), but would use it if building mac or iphone guid apps
2024-03-16 22:07:15 +0100 <monochrom> OK I'll weasel out with "O(12.5GB) = O(1)" and concede. >:)
2024-03-16 22:07:23 +0100 <int-e> (that's without profiling libs and docs. I can rebuild with profiling libs when I need them)
2024-03-16 22:08:04 +0100_ht(~Thunderbi@28-52-174-82.ftth.glasoperator.nl) (Quit: _ht)
2024-03-16 22:08:42 +0100 <int-e> tomsmeding: Hmm I wonder whether the forced move to hadrian has anything to do with that.
2024-03-16 22:09:22 +0100 <int-e> I had a 4.7G ghc-9.8.2 installation.... that was with profiling libs and debug symbols. (ouch)
2024-03-16 22:10:12 +0100 <haskellbridge> <s​m> wow
2024-03-16 22:11:02 +0100 <geekosaur> int-e, the hadrian move was in 9.4
2024-03-16 22:11:25 +0100 <int-e> geekosaur: the make-based system worked until 9.6
2024-03-16 22:13:56 +0100 <hseg> hrm. Am second-guessing my choices here, will reconsider later. In any case, My Workflow Has Previously Worked, so I will be reporting this.
2024-03-16 22:17:34 +0100shapr(~user@c-24-218-186-89.hsd1.ma.comcast.net) (Quit: reboot)
2024-03-16 22:21:01 +0100ph88(~ph88@2a02:8109:9e26:c800:f65f:251b:cec:1ffa)
2024-03-16 22:22:44 +0100 <int-e> . o O ( https://xkcd.com/1172/ )
2024-03-16 22:23:13 +0100 <hseg> yes, I know. hey, at least I'm not using it to cook dinner!
2024-03-16 22:26:10 +0100 <haskellbridge> <s​m> Who Moved My Cheese, stack devs please fix :)
2024-03-16 22:28:34 +0100 <monochrom> https://www.youtube.com/watch?v=y8iOz9KfJUg "Gaming PC & Pizza Warming Platform Prototype Construction"
2024-03-16 22:36:09 +0100L29Ah(~L29Ah@wikipedia/L29Ah)
2024-03-16 22:36:14 +0100CiaoSen(~Jura@2a05:5800:2d3:8f00:e6b9:7aff:fe80:3d03)
2024-03-16 22:37:51 +0100tomboy64(~tomboy64@user/tomboy64) (Read error: Connection reset by peer)
2024-03-16 22:38:14 +0100tomboy64(~tomboy64@user/tomboy64)
2024-03-16 22:38:29 +0100 <tomsmeding> is there a clever way to do `mconcat <$> traverse f xs`
2024-03-16 22:39:31 +0100 <Rembane> :t foldMap
2024-03-16 22:39:32 +0100 <lambdabot> (Foldable t, Monoid m) => (a -> m) -> t a -> m
2024-03-16 22:39:57 +0100 <Rembane> foldMap was a red herring.
2024-03-16 22:40:00 +0100 <tomsmeding> :t \f xs -> mconcat <$> traverse f xs
2024-03-16 22:40:01 +0100 <lambdabot> (Monoid b, Applicative f) => (a -> f b) -> [a] -> f b
2024-03-16 22:40:10 +0100 <tomsmeding> yeah I don't think foldMap works here
2024-03-16 22:40:48 +0100 <tomsmeding> :t \f xs -> foldMap id <$> traverse f xs
2024-03-16 22:40:49 +0100 <lambdabot> (Monoid b, Traversable t, Applicative f) => (a -> f b) -> t a -> f b
2024-03-16 22:41:06 +0100 <tomsmeding> this makes it even more palpable that there must be a nicer way to do this
2024-03-16 22:41:26 +0100 <tomsmeding> :t \f xs -> fold <$> traverse f xs -- okay duh
2024-03-16 22:41:27 +0100 <lambdabot> (Monoid b, Traversable t, Applicative f) => (a -> f b) -> t a -> f b
2024-03-16 22:42:30 +0100 <tomsmeding> hm, most of my uses of this pattern have the 'map' in there, but some are just `mconcat <$> sequence [...]`
2024-03-16 22:43:29 +0100 <tomsmeding> @hoogle foldMapM
2024-03-16 22:43:29 +0100 <lambdabot> Data.Conduit.Combinators foldMapM :: (Monad m, Monoid w) => (a -> m w) -> ConduitT a o m w
2024-03-16 22:43:29 +0100 <lambdabot> Data.Conduit.List foldMapM :: (Monad m, Monoid b) => (a -> m b) -> ConduitT a o m b
2024-03-16 22:43:29 +0100 <lambdabot> RIO.Prelude foldMapM :: (Monad m, Monoid w, Foldable t) => (a -> m w) -> t a -> m w
2024-03-16 22:43:34 +0100 <Rembane> There is a fold in there somehow, the question is which one.
2024-03-16 22:43:46 +0100 <Rembane> :t foldM
2024-03-16 22:43:47 +0100 <lambdabot> (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b
2024-03-16 22:44:08 +0100 <tomsmeding> there is no directionality here, so a fold{l,r,M} seems too strong
2024-03-16 22:44:24 +0100tomboy64(~tomboy64@user/tomboy64) (Read error: Connection reset by peer)
2024-03-16 22:44:38 +0100zenstoic(uid461840@id-461840.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
2024-03-16 22:44:41 +0100tomboy64(~tomboy64@user/tomboy64)
2024-03-16 22:45:43 +0100 <monochrom> Perhaps \f xs -> getAp (foldMap (Ap . f) xs))
2024-03-16 22:45:50 +0100 <monochrom> @type \f xs -> getAp (foldMap (Ap . f) xs))
2024-03-16 22:45:51 +0100 <lambdabot> error: parse error on input ‘)’
2024-03-16 22:45:55 +0100 <tomsmeding> funny how that RIO hit (and also a Relude hit if you hoogle online) has Monad in there, which is too strong (Applicative is sufficient)
2024-03-16 22:45:56 +0100 <monochrom> @type \f xs -> getAp (foldMap (Ap . f) xs)
2024-03-16 22:45:57 +0100 <lambdabot> forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1
2024-03-16 22:46:36 +0100tabemann(~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
2024-03-16 22:46:55 +0100 <tomsmeding> right
2024-03-16 22:47:07 +0100 <fedorafan> yushyin oh wow happy hour :D
2024-03-16 22:47:09 +0100 <tomsmeding> (why does ghci not simplify that Monoid (Ap f a1) constraint)
2024-03-16 22:47:13 +0100 <Rembane> That's a spicy type signature
2024-03-16 22:47:14 +0100 <monochrom> Monoid (Ap f a1) can be obtained from (Monoid a1, Applicative f)
2024-03-16 22:47:23 +0100 <Rembane> We need more weak fold
2024-03-16 22:47:43 +0100peterbecich(~Thunderbi@047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds)
2024-03-16 22:48:10 +0100 <tomsmeding> that's actually a good question, why does ghci not reduce that Monoid constraint
2024-03-16 22:48:15 +0100 <tomsmeding> the instance is right there!
2024-03-16 22:49:40 +0100tomsmedingconcedes that this does the thing but somehow doesn't feel happy with it
2024-03-16 22:49:47 +0100tomboy64(~tomboy64@user/tomboy64) (Ping timeout: 264 seconds)
2024-03-16 22:49:50 +0100 <tomsmeding> but that's probably just me :p
2024-03-16 22:50:00 +0100 <tomsmeding> I've never liked Ap-based stuff subjectively
2024-03-16 22:52:33 +0100johah(~Kayzen@p200300ca7f01db0062e546154c67a65f.dip0.t-ipconnect.de)
2024-03-16 22:53:04 +0100 <johah> j
2024-03-16 22:53:06 +0100 <johah> j
2024-03-16 22:53:08 +0100 <johah> j
2024-03-16 22:53:21 +0100 <tomsmeding> monochrom: do your magic
2024-03-16 22:53:26 +0100ChanServ+o monochrom
2024-03-16 22:53:39 +0100monochrom+b *!*@p200300ca7f01db0062e546154c67a65f.dip0.t-ipconnect.de
2024-03-16 22:53:39 +0100johahmonochrom (johah)
2024-03-16 22:53:45 +0100tomboy64(~tomboy64@user/tomboy64)
2024-03-16 22:54:22 +0100 <tomsmeding> what's in it for them
2024-03-16 22:54:38 +0100 <tomsmeding> at least if they try to send you to a link with an exploit or so, I get the point
2024-03-16 22:54:57 +0100 <Rembane> Bored fourteen year olds?
2024-03-16 22:55:27 +0100 <tomsmeding> I guess I'd rather they spend their boredom on spamming 'j' than on doing drugs or something
2024-03-16 22:55:49 +0100monochrom-o monochrom
2024-03-16 22:56:17 +0100 <monochrom> This is why humans are not more intelligent than LLMs.
2024-03-16 22:56:36 +0100zetef(~quassel@5.2.182.98)
2024-03-16 22:56:45 +0100 <Rembane> LLMs are basically humans but condensed
2024-03-16 22:57:23 +0100 <int-e> do you mean dense?
2024-03-16 22:57:29 +0100 <Rembane> Yup
2024-03-16 22:57:32 +0100 <Rembane> Neutronhumans
2024-03-16 22:57:38 +0100 <monochrom> When asked "do you think there is intelligent life on exoplanets?", Stephen Hawking asked back "is there intelligent life on Earth?"
2024-03-16 22:57:58 +0100 <tomsmeding> that is to say, "how do you define 'intelligent'"
2024-03-16 22:58:11 +0100 <int-e> . o O ( didn't we have an off topic channel? )
2024-03-16 22:58:17 +0100 <tomsmeding> at some point
2024-03-16 22:58:23 +0100 <monochrom> OK sorry!
2024-03-16 23:07:55 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
2024-03-16 23:12:34 +0100germ(~quassel@user/mipsel3) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
2024-03-16 23:20:47 +0100michalz(~michalz@185.246.207.217) (Quit: ZNC 1.8.2 - https://znc.in)
2024-03-16 23:21:49 +0100 <ph88> is there a shorter form of this function? https://bpa.st/6BRA
2024-03-16 23:21:58 +0100stanrifkin_(~stanrifki@p200300dbcf072400c0217626a9f38655.dip0.t-ipconnect.de) (Leaving)
2024-03-16 23:22:24 +0100 <tomsmeding> b f = fmap (second f)
2024-03-16 23:22:34 +0100 <tomsmeding> also fmap (fmap f)
2024-03-16 23:22:43 +0100 <tomsmeding> oh wait no
2024-03-16 23:23:30 +0100 <tomsmeding> ph88: why does f take an Eff argument :p
2024-03-16 23:23:45 +0100 <hololeap> that looks like ExceptT (Eff es) to me
2024-03-16 23:24:12 +0100 <tomsmeding> :t mapExceptT
2024-03-16 23:24:13 +0100 <lambdabot> (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b
2024-03-16 23:24:43 +0100 <tomsmeding> hm no of course there's no method for this
2024-03-16 23:25:01 +0100 <ph88> no map function available here https://hackage.haskell.org/package/effectful-core-2.3.0.1/docs/Effectful-Error-Static.html
2024-03-16 23:25:06 +0100 <tomsmeding> because it's unclear what it's supposed to call f with -- calling it with 'pure' always, like in b, seems weird
2024-03-16 23:25:20 +0100 <hololeap> isn't is just (=<<) using (ExceptT (Eff es)) ?
2024-03-16 23:25:24 +0100 <tomsmeding> why does f take an Eff-typed argument in the first place if it's always going to be invoked like f (pure y) anyway
2024-03-16 23:25:38 +0100 <hololeap> or yeah not 100% exactly but pretty close
2024-03-16 23:25:50 +0100 <ph88> because f needs to run functions that are themselves in Eff
2024-03-16 23:25:52 +0100dolio(~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
2024-03-16 23:26:07 +0100 <tomsmeding> hololeap: ~none of the 'ExceptT e m a' methods do anything with an 'm a'
2024-03-16 23:26:17 +0100 <tomsmeding> and 'Eff es a' is 'm a' here
2024-03-16 23:26:30 +0100 <tomsmeding> ph88: that's about the return type of f
2024-03-16 23:26:34 +0100 <tomsmeding> why is f not b -> Eff es c
2024-03-16 23:26:58 +0100 <tomsmeding> does f do anything with the fact that it's passed an _action_ and not a value?
2024-03-16 23:27:07 +0100 <ph88> taken from https://bpa.st/JLIA
2024-03-16 23:27:08 +0100 <tomsmeding> if so, it's probably not going to do the expected thing if you just pass it a pure value
2024-03-16 23:27:41 +0100 <tomsmeding> ah so f is 'a' here, which indeed could have just taken a non-Eff argument
2024-03-16 23:27:43 +0100 <tomsmeding> :p
2024-03-16 23:27:56 +0100 <ph88> yes let me do that
2024-03-16 23:27:59 +0100hseg(~gesh@77.137.76.75) (Quit: WeeChat 4.2.1)
2024-03-16 23:29:28 +0100 <hololeap> Control.Arrow.right on Kleisli (Eff es) ?
2024-03-16 23:29:30 +0100destituion(~destituio@2001:4644:c37:0:6086:64f4:a213:b80d) (Ping timeout: 268 seconds)
2024-03-16 23:29:49 +0100 <hololeap> not quite either
2024-03-16 23:29:56 +0100 <ph88> yes that's better already https://bpa.st/JVKA still a lot of refactoring to do. Is there a replacement for `b` ?
2024-03-16 23:30:00 +0100 <tomsmeding> :t \f m -> m >>= traverse @(Either String) f
2024-03-16 23:30:01 +0100 <lambdabot> error:
2024-03-16 23:30:01 +0100 <lambdabot> Pattern syntax in expression context: traverse@(Either String)
2024-03-16 23:30:01 +0100 <lambdabot> Did you mean to enable TypeApplications?
2024-03-16 23:30:08 +0100 <ph88> i think just a single fmap right ?
2024-03-16 23:30:09 +0100 <tomsmeding> % :t \f m -> m >>= traverse @(Either String) f
2024-03-16 23:30:09 +0100 <yahb2> \f m -> m >>= traverse @(Either String) f ; :: Monad m => ; (a -> m b) -> m (Either String a) -> m (Either String b)
2024-03-16 23:30:36 +0100 <tomsmeding> % :t traverse @(Either String)
2024-03-16 23:30:36 +0100 <yahb2> traverse @(Either String) ; :: Applicative f => ; (a -> f b) -> Either String a -> f (Either String b)
2024-03-16 23:30:38 +0100 <ph88> oh traverse, thanks
2024-03-16 23:30:45 +0100 <tomsmeding> @quote traverse
2024-03-16 23:30:45 +0100 <lambdabot> shachaf says: In order to get the last element of a list, you have to traverse the whole list. This can be an expensive, inefficient, unlazy operation, so you should develop a distaste for it like
2024-03-16 23:30:45 +0100 <lambdabot> the rest of us.
2024-03-16 23:30:52 +0100 <tomsmeding> meh
2024-03-16 23:30:57 +0100 <tomsmeding> the answer is always traverse
2024-03-16 23:31:21 +0100dolio(~dolio@130.44.134.54)
2024-03-16 23:31:38 +0100 <geekosaur> @quote traverse.*always
2024-03-16 23:31:38 +0100 <lambdabot> No quotes match. My pet ferret can type better than you!
2024-03-16 23:31:39 +0100 <ph88> replacing b with traverse is no good
2024-03-16 23:31:48 +0100 <geekosaur> @quote always.*traverse
2024-03-16 23:31:48 +0100 <lambdabot> No quotes match. I don't think I can be your friend on Facebook anymore.
2024-03-16 23:31:48 +0100 <tomsmeding> ph88: it's >>= plus traverse
2024-03-16 23:32:01 +0100 <tomsmeding> b f x = x >>= traverse f
2024-03-16 23:32:20 +0100 <ph88> cool
2024-03-16 23:32:43 +0100 <tomsmeding> run the 'Eff es (Either a b)' computation to an Either, *then* (>>=) traverse f through the Either
2024-03-16 23:33:43 +0100dolio(~dolio@130.44.134.54) (Client Quit)
2024-03-16 23:34:49 +0100dolio(~dolio@130.44.134.54)
2024-03-16 23:36:16 +0100 <hololeap> % :t \f x -> runExceptT $ lift . f =<< ExceptT x
2024-03-16 23:36:17 +0100 <yahb2> <interactive>:1:9: error: ; Variable not in scope: runExceptT :: m0 b0 -> b1 ; ; <interactive>:1:22: error: ; Variable not in scope: lift :: b -> m0 b0 ; ; <interactive>:1:35: error: ; ...
2024-03-16 23:36:17 +0100zetef(~quassel@5.2.182.98) (Ping timeout: 252 seconds)
2024-03-16 23:36:28 +0100 <hololeap> % import Control.Monad.Except
2024-03-16 23:36:28 +0100 <yahb2> <no output>
2024-03-16 23:36:30 +0100 <hololeap> % :t \f x -> runExceptT $ lift . f =<< ExceptT x
2024-03-16 23:36:30 +0100 <yahb2> \f x -> runExceptT $ lift . f =<< ExceptT x ; :: Monad m => (a1 -> m a2) -> m (Either e a1) -> m (Either e a2)
2024-03-16 23:36:38 +0100 <hololeap> I wasn't too far off
2024-03-16 23:38:17 +0100 <hololeap> :D
2024-03-16 23:40:15 +0100 <ph88> i reduced it to this https://bpa.st/BCRA
2024-03-16 23:41:34 +0100 <tomsmeding> that's quite a bit smaller :p
2024-03-16 23:41:38 +0100 <ph88> :D :D :D
2024-03-16 23:42:10 +0100 <ph88> sweat, blood and tears and finally converted a library to effectful .. what a learning experience as well
2024-03-16 23:42:19 +0100 <ph88> that moment when all tests go green
2024-03-16 23:42:46 +0100 <tomsmeding> :o
2024-03-16 23:43:16 +0100tomsmedingwas already thinking, "that function looks like a test function, sounds like good progress"
2024-03-16 23:44:44 +0100 <ph88> why does hlint put this as warning? https://bpa.st/KACA imo it's more clear with variables
2024-03-16 23:45:04 +0100 <Rembane> Because hlint sometimes has bad taste.
2024-03-16 23:45:54 +0100 <tomsmeding> hlint also says that `(\x -> ...) <$> some action` is better than `do x <- some action \n return ...`
2024-03-16 23:46:02 +0100 <tomsmeding> well, no, the former is bloody unreadable, thank you
2024-03-16 23:46:17 +0100 <tomsmeding> if that lambda function could then be eta-reduced to a short thing, sure
2024-03-16 23:46:25 +0100 <tomsmeding> but it suggests it also if the result is terribly unwieldy
2024-03-16 23:46:38 +0100tomsmedingturns off hlint (and stan, these days) first thing when setting up hls
2024-03-16 23:46:45 +0100 <hololeap> I usually run hlint every now and again just to see if it finds anything reasonable, but its word is not law. it's annoying most of the time
2024-03-16 23:47:00 +0100 <tomsmeding> that is fair
2024-03-16 23:47:11 +0100 <ph88> what is this suggestion about? https://bpa.st/VTNA
2024-03-16 23:47:15 +0100 <hololeap> like maybe once a year :D
2024-03-16 23:47:36 +0100 <tomsmeding> that it likes sections?
2024-03-16 23:47:39 +0100 <hololeap> -Wall is much more informative
2024-03-16 23:48:14 +0100 <tomsmeding> -Wall is imperative unless you can clearly and convincingly argue that you know better and select your warnings manually
2024-03-16 23:48:49 +0100 <tomsmeding> ph88: that section suggestion could be something I'd do as well, depending on where it is in the code
2024-03-16 23:49:12 +0100 <hololeap> what's everyone's favored library to write XML these days? I want to write an XSPF playlist
2024-03-16 23:49:31 +0100destituion(~destituio@2a02:2121:655:c95b:abcd:4b31:c415:3114)
2024-03-16 23:49:40 +0100shapr(~user@c-24-218-186-89.hsd1.ma.comcast.net)
2024-03-16 23:49:43 +0100 <hololeap> https://wiki.videolan.org/XSPF/#Example_of_XSPF_with_VLC_extensions
2024-03-16 23:49:47 +0100 <geekosaur> my favored way is to find some way to avoid XML /s
2024-03-16 23:50:57 +0100 <ph88> tomsmeding, what are sections though and why is it the same to swap these two things around ?
2024-03-16 23:51:12 +0100 <geekosaur> a section is a partially applied operator
2024-03-16 23:51:14 +0100 <tomsmeding> :t (2 +)
2024-03-16 23:51:15 +0100 <lambdabot> Num a => a -> a
2024-03-16 23:51:20 +0100 <tomsmeding> > (2 +) 42
2024-03-16 23:51:22 +0100 <lambdabot> 44
2024-03-16 23:51:29 +0100 <tomsmeding> > (/ 2) 42
2024-03-16 23:51:30 +0100 <lambdabot> 21.0
2024-03-16 23:51:36 +0100 <tomsmeding> > (2 /) 42
2024-03-16 23:51:37 +0100 <lambdabot> 4.7619047619047616e-2
2024-03-16 23:51:49 +0100 <tomsmeding> :t ("hi" ++)
2024-03-16 23:51:50 +0100 <lambdabot> [Char] -> [Char]
2024-03-16 23:52:33 +0100 <tomsmeding> note that in the section notation (hlint's suggested replacement), '++' is _not_ in parentheses
2024-03-16 23:53:11 +0100 <geekosaur> might be more correct to say it is, but the supplied parameter goes inside the parens
2024-03-16 23:53:34 +0100 <tomsmeding> right
2024-03-16 23:53:35 +0100 <geekosaur> so if you have (*), a partial application can be (2+) or (+2)
2024-03-16 23:54:07 +0100 <tomsmeding> '(*)' is a partial application of '*' to 0 arguments; '(2 *)' is a partial application of '*' to one argument, its first
2024-03-16 23:54:17 +0100 <tomsmeding> '(* 2)' is a partial application of '*' to one argument, its second
2024-03-16 23:54:23 +0100 <tomsmeding> i.e. \x -> x * 2
2024-03-16 23:54:28 +0100dolio(~dolio@130.44.134.54) (Ping timeout: 268 seconds)
2024-03-16 23:54:37 +0100 <ph88> tomsmeding, with what you said that ++ is not in parenthesis i got it :D
2024-03-16 23:56:59 +0100 <hololeap> this doesn't look terrible. it could use better documentation: https://hackage.haskell.org/package/xml-conduit-writer-0.1.1.5/docs/Text-XML-Writer.html
2024-03-16 23:57:20 +0100tromp(~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)