Home liberachat/#haskell: Logs Calendar

Logs on 2024-06-08 (liberachat/#haskell)

00:09:08 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
00:09:10 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
00:10:29 Lord_of_Life_ is now known as Lord_of_Life
00:11:58 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 246 seconds)
00:14:37 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:17:30 × jjhoo_ quits (jahakala@user/jjhoo) (Ping timeout: 256 seconds)
01:18:25 joeyadams joins (~joeyadams@38.48.105.67)
01:25:17 × xam_ quits (~dev@2405:201:c062:801d:8728:7618:dd19:eaef) (Ping timeout: 240 seconds)
01:26:28 dev2 joins (~dev@2405:201:c062:801d:74fb:a90f:fd55:89e8)
01:34:05 jjhoo joins (~jahakala@user/jjhoo)
01:59:08 × CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer)
02:01:17 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
02:07:03 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 268 seconds)
02:28:54 × joeyadams quits (~joeyadams@38.48.105.67) (Quit: Leaving)
02:37:49 bilegeek joins (~bilegeek@2600:1008:b012:5182:bbcf:8156:6b3:93d9)
02:50:17 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
02:50:49 rvalue joins (~rvalue@user/rvalue)
03:00:23 × td_ quits (~td@i53870928.versanet.de) (Ping timeout: 268 seconds)
03:02:07 td_ joins (~td@i53870927.versanet.de)
03:43:39 × xigua quits (~xigua@user/xigua) (Read error: Connection reset by peer)
03:43:53 xigua joins (~xigua@user/xigua)
03:44:47 × dcoutts quits (~duncan@77.109.149.106) (Ping timeout: 268 seconds)
03:46:31 × euleritian quits (~euleritia@dynamic-176-006-010-205.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
03:46:49 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
03:50:46 aforemny joins (~aforemny@i59F516E7.versanet.de)
03:51:05 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
03:51:29 × aforemny_ quits (~aforemny@2001:9e8:6cfe:9000:f190:2088:3129:672b) (Ping timeout: 272 seconds)
03:55:06 dcoutts joins (~duncan@77.109.149.106)
04:13:11 × dmj` quits (uid72307@id-72307.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
04:26:57 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds)
04:27:49 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
04:30:17 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
04:31:21 × dcoutts quits (~duncan@77.109.149.106) (Ping timeout: 268 seconds)
04:47:45 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
04:48:25 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
04:57:54 × bilegeek quits (~bilegeek@2600:1008:b012:5182:bbcf:8156:6b3:93d9) (Quit: Leaving)
05:02:14 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:04:16 troydm joins (~troydm@user/troydm)
05:05:06 × troydm quits (~troydm@user/troydm) (Client Quit)
05:05:24 troydm joins (~troydm@user/troydm)
05:18:34 × troydm quits (~troydm@user/troydm) (Ping timeout: 246 seconds)
05:32:10 Feuermagier joins (~Feuermagi@user/feuermagier)
05:46:26 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
05:50:44 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds)
05:52:20 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
05:54:32 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
05:57:10 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Remote host closed the connection)
05:57:37 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
06:03:32 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
06:04:52 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
06:08:43 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
06:08:47 × m1dnight_ quits (~christoph@82.146.125.185) (Quit: WeeChat 4.2.2)
06:09:29 m1dnight joins (~christoph@82.146.125.185)
06:16:42 Lycurgus joins (~georg@user/Lycurgus)
06:17:46 × causal quits (~eric@50.35.88.207) (Quit: WeeChat 4.1.1)
06:29:07 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
06:30:34 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
06:33:49 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
06:35:00 harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
06:48:29 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
06:50:35 cpressey joins (~weechat@33b62f0c.skybroadband.com)
06:51:41 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds)
06:52:18 euleritian joins (~euleritia@dynamic-176-006-005-097.176.6.pool.telefonica.de)
06:52:40 × euleritian quits (~euleritia@dynamic-176-006-005-097.176.6.pool.telefonica.de) (Read error: Connection reset by peer)
06:53:38 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
06:59:44 × chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection)
07:01:04 chiselfuse joins (~chiselfus@user/chiselfuse)
07:10:11 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 264 seconds)
07:11:49 × ft quits (~ft@p508db8fc.dip0.t-ipconnect.de) (Quit: leaving)
07:12:02 ambareesh joins (~ambareesh@2601:646:8f01:3aac:aef7:fb34:9419:a905)
07:13:25 × ambareesh quits (~ambareesh@2601:646:8f01:3aac:aef7:fb34:9419:a905) (Client Quit)
07:16:22 cpressey joins (~weechat@33b62f0c.skybroadband.com)
07:17:30 Axman6 joins (~Axman6@user/axman6)
07:20:50 × harveypwca quits (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Quit: Leaving)
07:27:52 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 260 seconds)
07:28:26 acidjnk joins (~acidjnk@p200300d6e714dc900cd3e2d9c55a017d.dip0.t-ipconnect.de)
07:29:59 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 264 seconds)
07:32:30 Maxdamantus joins (~Maxdamant@user/maxdamantus)
07:34:48 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 268 seconds)
07:36:28 michalz joins (~michalz@185.246.207.200)
07:40:22 cpressey joins (~weechat@33b62f0c.skybroadband.com)
07:43:26 gmg joins (~user@user/gehmehgeh)
08:02:20 Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi)
08:06:37 oo_miguel joins (~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
08:11:48 × TonyStone quits (~TonyStone@user/TonyStone) (Ping timeout: 268 seconds)
08:13:27 <haskellbridge> <linj> Hi, I am new to Haskell. What is the newest GHC feature to solve a record-related problem once and for all mentioned here? https://youtu.be/rf-lie7U04Q?list=PLOJjn67NeYg9cWA4hyIWcxfaeX64pwo1c&t=2139
08:13:39 × robobub quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
08:16:27 <tomsmeding> presumably he's referring to https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/overloaded_record_dot.html#extension-OverloadedRecordDot , but I'm not sure if that "solves a big problem"
08:16:40 <tomsmeding> it's an alternative syntax that makes some code a bit nicer to read
08:17:51 <haskellbridge> <linj> thanks
08:48:12 target_i joins (~target_i@user/target-i/x-6023099)
08:50:40 × michalz quits (~michalz@185.246.207.200) (Quit: ZNC 1.9.0 - https://znc.in)
08:51:46 noumenon joins (~noumenon@113.51-175-156.customer.lyse.net)
08:54:38 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:56:05 × oo_miguel quits (~Thunderbi@78-11-181-16.static.ip.netia.com.pl) (Ping timeout: 252 seconds)
09:20:31 × tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz)
09:21:31 wootehfoot joins (~wootehfoo@user/wootehfoot)
09:24:42 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
09:25:11 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
09:25:34 × stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
09:26:25 stiell joins (~stiell@gateway/tor-sasl/stiell)
09:31:30 dcoutts joins (~duncan@2001:620:130:6092:8b6f:ee09:26cb:f12f)
09:33:48 <Franciman> hi, I am encountering a very strange behaviour. This is my code: https://bpa.st/FUZQ
09:34:06 <Franciman> i used runhaskell to execute it and it takes 7 seconds, so i had to resort to compilation, and it takes 0.6s to execute
09:34:30 <Franciman> on my fully lazy interpreter, it takes 0.14s to execute the same term
09:34:37 <Franciman> why is haskell's optimization so lame?
09:35:42 <Franciman> outperforming ghc by 500x?
09:35:44 <Franciman> what's wrong
09:36:51 wootehfoot joins (~wootehfoo@user/wootehfoot)
09:38:43 dsrt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net)
09:39:12 <int-e> GHC doesn't do CSE
09:39:25 <int-e> (not entirely true, but true enough to explain this case)
09:39:31 × dcoutts quits (~duncan@2001:620:130:6092:8b6f:ee09:26cb:f12f) (Ping timeout: 256 seconds)
09:39:40 <tomsmeding> link 404s for me?
09:40:08 <int-e> yeah it does 404 now for me too... guess I caught it just in time
09:40:23 <Franciman> my interpreter neither
09:40:25 <int-e> "This paste expires on 2024-06-15 09:33:40.961704."
09:40:29 <Franciman> oh sorry it expired
09:40:31 <Franciman> wait
09:40:52 <Franciman> https://bpa.st/VTCQ
09:41:19 <int-e> gamma x y = let z = x id in (z `seq` z) y
09:41:32 <Franciman> lewl
09:41:39 <Franciman> why doesn't haskell implement full laziness?
09:41:42 <int-e> if you do that instead it'll be fast.
09:42:03 <int-e> because it interferes with controlling memory usage
09:42:15 <int-e> z `seq` z is just z of course; GHC will actually realize that
09:43:11 <Franciman> int-e: doesn't laziness also interfer with controlling memory usage?
09:43:24 <int-e> yes?
09:44:04 <int-e> you can always introduce your own sharing if you need it for performance
09:44:19 <int-e> it's hard to get the compiler to avoid sharing and it would be harder if it did this kind of CSE
09:44:49 <tomsmeding> classic example is something like `length [1..100000] + length [1..100000]`
09:45:00 <int-e> pragmatically... full laziness makes too many programs slower
09:45:02 <tomsmeding> that's pretty fast and low-memory, but if you CSE the two lists it gets horrendous
09:45:33 <int-e> (or run out of memory)
09:45:49 <tomsmeding> (perhaps you need to add 3 more zeros for it to get really bad)
09:46:34 <Franciman> int-e: isn't that the same with lazienss compared to call by value?
09:47:20 <int-e> Franciman: also your math is off, 7/0.14 is 50
09:48:03 <int-e> Franciman: "We already have this problem, so let's make it as bad as we possibly can" isn't pragmatic.
09:50:08 <int-e> Laziness and sharing aren't exactly the same thing either. We have `seq` to reduce laziness when it's harmful. We have `let` to introduce sharing when it's helpful. There's "opportunistic CSE" in GHC that also introduces sharing which exists because it's helpful most of the time. It's not always a win and people actually struggle to avoid sharing when that happens.
09:51:22 <Franciman> indeed...
09:51:24 <Franciman> oh yes 50x
09:51:27 <Franciman> sorry
09:51:55 <Franciman> having controlled laziness is better
09:52:02 <Franciman> call by value wins
09:52:04 <tomsmeding> what do you mean with "full laziness"? Do you mean something like the "optimal" graph reduction algorithms?
09:52:09 <int-e> And I guess, ultimately, GHC is not primarily optimized for doing fast beta reductions. It's actually more important to have fast pattern matching on data.
09:52:46 <Franciman> tomsmeding: it's extracting subexpressions of a lambda that don't depend on the argument
09:52:57 <Franciman> so that if you evalaute that lambda too many times, the shared parts are evaluated only once
09:53:12 <Franciman> err, if you apply that lambda many times*
09:53:14 × phma quits (phma@2001:5b0:2172:c168:223e:807a:618e:7153) (Read error: Connection reset by peer)
09:53:17 tomsmeding thought that was what ghc did with -ffull-laziness, which is default, right?
09:53:26 <Franciman> it does not do it at its fullest
09:53:32 <tomsmeding> I see
09:53:38 <Franciman> it's partial full laziness
09:53:42 phma joins (~phma@host-67-44-208-65.hnremote.net)
09:53:47 <tomsmeding> maybe it only does it if the subexpression in question is already let-bound or something
09:53:58 <int-e> "Default: off but enabled by -O"
09:54:12 <Franciman> i applied it, but still no improvement
09:54:20 <int-e> yeah it only does it for let bindings
09:54:20 <tomsmeding> (and -O is default when compiling with cabal :p)
09:54:23 <tomsmeding> ah
09:54:40 <int-e> https://downloads.haskell.org/ghc/latest/docs/users_guide/using-optimisation.html#ghc-flag--ffull-laziness has a note.
09:54:49 <tomsmeding> makes sense -- "let" tells ghc that you want to share this thing, and then if you want to do it anyway, let's share it completely
09:55:03 falafel joins (~falafel@185-147-214-70.mad.as54203.net)
09:56:12 <Franciman> now if i run ghc -O to compile it, finally i get something close to my 0.14s lol
09:56:15 <Franciman> IN SHAMBLES
09:56:25 <tomsmeding> "now", is that with the let?
09:56:26 <Leary> Well, it's probably not that simple. GHC's simplifier /creates/ a lot more `let`s than you write. Just, most of them are heuristically just to be better off inlined than shared.
09:56:36 <Franciman> this program is so unlikely to happen in practice btw
09:56:42 <Leary> judged*
09:56:53 <Franciman> a fun thing is that it also behaves badly with call by value
09:57:00 falafel_ joins (~falafel@2a0c:5a87:3103:ec01::62b8)
09:57:20 <Franciman> tomsmeding: i think ghc is smart enough to figure that let out
09:57:26 <Franciman> because it's a CSE case
09:58:04 <Franciman> if i changed the arguments then maybe it would struggle more
09:58:39 lxsameer joins (~lxsameer@Serene/lxsameer)
09:59:12 <tomsmeding> this is a question of "how smart is your optimiser", though; it's not very much related to CBV vs non-strictness
09:59:24 <Franciman> that's why full laziness is nice
09:59:29 <Franciman> it's not about smartness
09:59:35 <Franciman> of the optimiser
09:59:50 <tomsmeding> hm?
09:59:59 × falafel quits (~falafel@185-147-214-70.mad.as54203.net) (Ping timeout: 264 seconds)
09:59:59 <Franciman> a dumb ~100 lines interpreter beating >20 years of optimisations
10:00:05 <tomsmeding> do you mean the floating-out of expressions that don't depend on arguments?
10:00:09 <tomsmeding> that is an optimisation
10:00:20 <Franciman> so is laziness wrt call by name
10:00:26 <tomsmeding> or a fancy graph-reducing evaluation model
10:00:37 <tomsmeding> laziness is evaluation semantics
10:00:48 <Franciman> where is the line sorry?
10:00:51 <tomsmeding> if you use a graph reducer as your evaluation, then you can also get something like your full laziness
10:01:07 <tomsmeding> but if you don't, then you need some explicit transformation to lift out the independent expression
10:01:46 <Franciman> laziness also requires some sort of that
10:01:51 <tomsmeding> does it?
10:01:52 <Franciman> you don't really act on lambda terms per se
10:02:01 <Franciman> yes, otherwise how do you define the evaluation semantics?
10:02:14 <Franciman> you can express laziness with explicit substitutions or using graphs
10:02:18 <Franciman> or using lambda lifting
10:02:23 <tomsmeding> or using a heap and beta reduction
10:02:30 <tomsmeding> which is the "standard" formulation
10:02:38 <tomsmeding> er
10:02:43 <tomsmeding> a heap and WHNF evaluation
10:03:00 <tomsmeding> nothing in that does CSE for you
10:03:26 <Franciman> you can use a heap and whnf evaluation + extraction of maximally free subexpressions from a term
10:03:30 <Franciman> what's the difference?
10:03:32 × falafel_ quits (~falafel@2a0c:5a87:3103:ec01::62b8) (Remote host closed the connection)
10:03:51 <tomsmeding> it's true that the distinction between "evaluation semantics" and "optimisation" is a bit vague; you could apply some optimisations on-the-fly while evaluating, and then you'd blur the boundaries
10:03:56 __monty__ joins (~toonn@user/toonn)
10:04:20 <Franciman> tomsmeding: just to make it clear, i wanted to understand your point, not trying to argue you are wrong
10:04:31 <tomsmeding> yeah no you're right
10:04:38 <tomsmeding> I was making a distinction that does not _really_ exist
10:04:40 <tomsmeding> only conventionally
10:05:22 <tomsmeding> though I _can_ say that you don't need extraction of independent subexpressions from within binding scopes to achieve laziness
10:05:34 <tomsmeding> unless you make that part of the definition of "laziness", which is unconventional
10:05:45 <Franciman> true
10:05:52 <tomsmeding> ghc achieves laziness in the traditional sense, not in this extended sense
10:05:59 <Franciman> because you actually extract common variables
10:06:16 <Franciman> i mean you do sharing on variables inside a lambda
10:06:25 <Franciman> the the variable occurrences bound by a lambda, to be more precise
10:06:37 <tomsmeding> yes, but that's sharing directly implied by the syntax
10:06:42 <Franciman> true
10:06:48 <tomsmeding> a single name has a single shared value on the heap
10:06:57 <tomsmeding> and that's all sharing that the evaluator introduces
10:07:32 <tomsmeding> this yields a straightforward evaluator that's quite efficient
10:07:51 <tomsmeding> if you want to do more, you typically have to sacrifice efficiency of individual reductions to achieve better asymptotics for some programs
10:07:54 <Franciman> and there is a fun theory to prove that it is complete and sound w.r.t call by name
10:08:08 <Franciman> using non-idempotent set types
10:08:12 <tomsmeding> graph reduction evaluators buy in on this idea quite deeply, and can still be fast but that takes significant cleverness
10:08:18 <tomsmeding> ghc is more traditional
10:08:53 <tomsmeding> also, ghc's model allows you to do stuff like use unsafePerformIO and not break the world in doing so
10:09:06 <tomsmeding> good luck with doing that sensibly in an evaluator with full laziness everywhere
10:09:17 sawilagar joins (~sawilagar@user/sawilagar)
10:09:32 <Franciman> that would be a great problem
10:09:34 <Franciman> lol
10:10:07 <tomsmeding> and having unsafePerformIO allows your haskell code to be fast on bytestrings, which people have apparently found more important than better asymptotics for certain functional patterns that you can also just fix by being a bit more explicit with the sharing that you want
10:10:58 <tomsmeding> there's a place for full laziness evaluators, but ghc optimises less for those usecases
10:11:32 <tomsmeding> heck, people have said that the GHC has a suspiciously good concurrent, asynchronous IO manager in its RTS for a pure functional language
10:13:15 <tomsmeding> Maia Victor has done a bunch of work on graph reduction engines in Formality (apparently now Kind + HVM or something)
10:13:41 <tomsmeding> they've written some blog posts etc on it if you're interested in that space
10:13:45 <Franciman> thanks
10:29:35 falafel joins (~falafel@2a0c:5a87:3103:ec01::62b8)
10:35:45 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
10:36:48 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
10:42:31 × falafel quits (~falafel@2a0c:5a87:3103:ec01::62b8) (Ping timeout: 272 seconds)
10:43:55 × noumenon quits (~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
10:51:56 ss4 joins (~wootehfoo@user/wootehfoot)
10:53:45 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
10:57:20 × gorignak quits (~gorignak@user/gorignak) (Quit: quit)
10:57:22 wootehfoot joins (~wootehfoo@user/wootehfoot)
10:57:36 gorignak joins (~gorignak@user/gorignak)
10:58:03 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Quit: WeeChat 4.1.2)
10:58:51 × ss4 quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
11:02:15 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
11:17:43 dcoutts joins (~duncan@2001:620:130:6092:8b6f:ee09:26cb:f12f)
11:20:11 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
11:21:22 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
11:27:22 rvalue- joins (~rvalue@user/rvalue)
11:27:25 TactfulCitrus joins (~al@2a02:8012:87a6:0:fbe0:6116:6e30:e047)
11:28:31 × rvalue quits (~rvalue@user/rvalue) (Ping timeout: 268 seconds)
11:31:20 rvalue- is now known as rvalue
11:32:01 <lxsameer> hey folks let's say we have a record with a field like `X :: IO (Y a)`, how can i hide that a entirely since it doesn't matter for the rest of my code ?
11:32:39 <lxsameer> would i make sense to have a record of functions that use X exposed to user rather than exposing X?
11:32:41 <Franciman> you mean make it unaccessible?
11:33:13 <Franciman> maybe you can use the existential quantifier on X?
11:33:20 <lxsameer> Franciman: no, I mean hide the implementation, let me give you a more concrete example
11:33:21 <Franciman> so you give it a type that you can't readily use from outside the record
11:33:43 <Franciman> i mean something like: data Recordo = forall a. { X :: a, ... }
11:34:00 <lxsameer> X :: IO (Pool a) a can be a connection type of different databases (sqlit, postgres....)
11:34:29 <Franciman> sorry
11:34:37 <Franciman> data Recordo = forall a. Recordo { X :: a, ... }
11:34:41 <Franciman> https://wiki.haskell.org/Existential_type
11:35:10 <lxsameer> thanks let me read it
11:35:39 noumenon joins (~noumenon@113.51-175-156.customer.lyse.net)
11:38:27 <lxsameer> Franciman: thanks, I was looking for this
11:40:02 <Franciman> maybe GADTs can be helpful too
11:40:13 <lxsameer> cheers, I'll have a look
11:54:41 michalz joins (~michalz@185.246.207.203)
11:57:12 × TactfulCitrus quits (~al@2a02:8012:87a6:0:fbe0:6116:6e30:e047) (Ping timeout: 268 seconds)
12:02:05 × dsrt^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection)
12:08:12 × michalz quits (~michalz@185.246.207.203) (Quit: ZNC 1.9.0 - https://znc.in)
12:20:44 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
12:20:47 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
12:21:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:21:27 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
12:22:22 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer)
12:23:21 chexum joins (~quassel@gateway/tor-sasl/chexum)
12:23:51 <lxsameer> b
12:24:26 × titibandit quits (e33ffbab65@user/titibandit) (Remote host closed the connection)
12:24:26 × eso quits (a0662dfd5e@2a03:6000:1812:100::1266) (Write error: Connection reset by peer)
12:24:26 × cjb quits (813b6d8c75@user/cjb) (Remote host closed the connection)
12:24:26 × henrytill quits (e0180937c3@2a03:6000:1812:100::e8c) (Read error: Connection reset by peer)
12:24:26 × cpli quits (77fc530071@2a03:6000:1812:100::252) (Remote host closed the connection)
12:24:26 × arcadewise quits (52968ed80d@2a03:6000:1812:100::3df) (Read error: Connection reset by peer)
12:24:26 × probie quits (cc0b34050a@user/probie) (Read error: Connection reset by peer)
12:24:26 × akspecs quits (00cc8321af@sourcehut/user/akspecs) (Read error: Connection reset by peer)
12:24:26 × kuruczgy quits (55b66dd3ae@2a03:6000:1812:100::127f) (Write error: Connection reset by peer)
12:24:26 × JoelMcCracken quits (5ea8252fbb@2a03:6000:1812:100::10e3) (Remote host closed the connection)
12:24:26 × samhh quits (7569f027cf@2a03:6000:1812:100::e4) (Remote host closed the connection)
12:24:26 × aniketd quits (32aa4844cd@2a03:6000:1812:100::dcb) (Remote host closed the connection)
12:24:26 × pmk quits (6afe4476a1@2a03:6000:1812:100::26d) (Read error: Connection reset by peer)
12:24:26 × ursa-major quits (114efe6c39@2a03:6000:1812:100::11f3) (Write error: Connection reset by peer)
12:24:26 × chaitlatte0 quits (ea29c0bb16@2a03:6000:1812:100::1124) (Remote host closed the connection)
12:24:26 × whereiseveryone quits (206ba86c98@2a03:6000:1812:100::2e4) (Read error: Connection reset by peer)
12:24:26 × filwisher quits (2e6936c793@2a03:6000:1812:100::170) (Write error: Broken pipe)
12:24:26 × fgaz_ quits (1ff9197ed6@2a03:6000:1812:100::11ea) (Write error: Broken pipe)
12:24:26 × bsima1 quits (9d7e39c8ad@2a03:6000:1812:100::dd) (Remote host closed the connection)
12:24:26 × jmcantrell quits (644f1bed9a@user/jmcantrell) (Write error: Connection reset by peer)
12:24:26 × jleightcap quits (7bc4014b62@user/jleightcap) (Write error: Connection reset by peer)
12:24:27 × shreyasminocha quits (51fdc93eda@user/shreyasminocha) (Write error: Connection reset by peer)
12:24:27 × fluffyballoon quits (45ce440a48@2a03:6000:1812:100::e2) (Remote host closed the connection)
12:24:27 × rselim quits (ce261f06ff@user/milesrout) (Remote host closed the connection)
12:24:27 × lukec quits (9dfd4d094e@2a03:6000:1812:100::10e) (Write error: Broken pipe)
12:24:27 × sus quits (1b7af6299f@user/zeromomentum) (Remote host closed the connection)
12:24:27 × raghavgururajan quits (ea769b8000@user/raghavgururajan) (Read error: Connection reset by peer)
12:24:27 × fn_lumi quits (3d621153a5@2a03:6000:1812:100::df7) (Remote host closed the connection)
12:24:27 × evanrelf quits (3addc196af@2a03:6000:1812:100::f0) (Remote host closed the connection)
12:24:27 × samhh_ quits (7569f027cf@2a03:6000:1812:100::e4) (Remote host closed the connection)
12:24:27 × Ankhers quits (e99e97ef8e@2a03:6000:1812:100::2a2) (Remote host closed the connection)
12:24:28 × jakzale quits (6291399afa@user/jakzale) (Remote host closed the connection)
12:24:28 × brettgilio quits (a35ba67324@2a03:6000:1812:100::260) (Remote host closed the connection)
12:24:28 × ggb quits (a62ffbaf4f@2a03:6000:1812:100::3ac) (Remote host closed the connection)
12:24:28 × alethkit quits (23bd17ddc6@sourcehut/user/alethkit) (Read error: Connection reset by peer)
12:24:28 × fvr quits (ef3e56ca8b@2a03:6000:1812:100::3c4) (Remote host closed the connection)
12:24:28 × ymherklotz quits (cb2c9cfbdd@2a03:6000:1812:100::29a) (Remote host closed the connection)
12:24:28 × lane quits (809450f172@2a03:6000:1812:100::1300) (Remote host closed the connection)
12:24:28 × duncan quits (c6181279e3@user/meow/duncan) (Remote host closed the connection)
12:24:28 × sm2n quits (ae95cb1267@user/sm2n) (Read error: Connection reset by peer)
12:24:28 × b0o quits (0e4a0bf4c9@2a03:6000:1812:100::1bf) (Read error: Connection reset by peer)
12:24:28 × jkoshy quits (99b9359beb@user/jkoshy) (Remote host closed the connection)
12:24:35 lane joins (809450f172@2a03:6000:1812:100::1300)
12:24:35 bsima1 joins (9d7e39c8ad@2a03:6000:1812:100::dd)
12:24:36 whereiseveryone joins (206ba86c98@2a03:6000:1812:100::2e4)
12:24:36 ggb joins (a62ffbaf4f@2a03:6000:1812:100::3ac)
12:24:36 raghavgururajan joins (ea769b8000@user/raghavgururajan)
12:24:36 filwisher joins (2e6936c793@2a03:6000:1812:100::170)
12:24:37 jakzale joins (6291399afa@user/jakzale)
12:24:37 jmcantrell joins (644f1bed9a@user/jmcantrell)
12:24:37 fgaz_ joins (1ff9197ed6@2a03:6000:1812:100::11ea)
12:24:38 pmk joins (6afe4476a1@2a03:6000:1812:100::26d)
12:24:38 eso joins (a0662dfd5e@2a03:6000:1812:100::1266)
12:24:38 fluffyballoon joins (45ce440a48@2a03:6000:1812:100::e2)
12:24:38 aniketd joins (32aa4844cd@2a03:6000:1812:100::dcb)
12:24:38 lukec joins (9dfd4d094e@2a03:6000:1812:100::10e)
12:24:39 fn_lumi joins (3d621153a5@2a03:6000:1812:100::df7)
12:24:39 henrytill joins (e0180937c3@2a03:6000:1812:100::e8c)
12:24:39 evanrelf joins (3addc196af@2a03:6000:1812:100::f0)
12:24:40 brettgilio joins (a35ba67324@2a03:6000:1812:100::260)
12:24:40 jkoshy joins (99b9359beb@user/jkoshy)
12:24:41 duncan joins (c6181279e3@user/meow/duncan)
12:24:42 JoelMcCracken joins (5ea8252fbb@2a03:6000:1812:100::10e3)
12:24:42 jleightcap joins (7bc4014b62@user/jleightcap)
12:24:42 fvr joins (ef3e56ca8b@2a03:6000:1812:100::3c4)
12:24:42 cpli joins (77fc530071@2a03:6000:1812:100::252)
12:24:42 cjb joins (813b6d8c75@user/cjb)
12:24:42 titibandit joins (e33ffbab65@user/titibandit)
12:24:42 b0o joins (0e4a0bf4c9@2a03:6000:1812:100::1bf)
12:24:43 ursa-major joins (114efe6c39@2a03:6000:1812:100::11f3)
12:24:43 sm2n joins (ae95cb1267@user/sm2n)
12:24:44 probie joins (cc0b34050a@user/probie)
12:24:44 kuruczgy joins (55b66dd3ae@2a03:6000:1812:100::127f)
12:24:45 akspecs joins (00cc8321af@sourcehut/user/akspecs)
12:24:46 alethkit joins (23bd17ddc6@sourcehut/user/alethkit)
12:24:46 arcadewise joins (52968ed80d@2a03:6000:1812:100::3df)
12:24:46 shreyasminocha joins (51fdc93eda@user/shreyasminocha)
12:24:47 × d34df00d quits (~d34df00d@2600:1702:4f1b:7c10::43) (Excess Flood)
12:24:47 ymherklotz joins (cb2c9cfbdd@2a03:6000:1812:100::29a)
12:24:49 sus joins (1b7af6299f@user/zeromomentum)
12:24:50 samhh_ joins (7569f027cf@2a03:6000:1812:100::e4)
12:24:51 Ankhers joins (e99e97ef8e@2a03:6000:1812:100::2a2)
12:24:51 chaitlatte0 joins (ea29c0bb16@user/chaitlatte0)
12:24:51 samhh joins (7569f027cf@2a03:6000:1812:100::e4)
12:24:51 rselim joins (ce261f06ff@user/milesrout)
12:25:47 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds)
12:25:56 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
12:28:34 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Quit: WeeChat 4.1.2)
12:31:57 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 255 seconds)
12:38:12 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
12:38:34 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 260 seconds)
12:38:50 euleritian joins (~euleritia@dynamic-176-006-192-047.176.6.pool.telefonica.de)
12:39:35 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
12:39:37 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
12:40:27 zetef joins (~quassel@5.14.129.50)
12:41:27 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
12:41:43 ft joins (~ft@i5C743B45.versanet.de)
12:42:44 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Client Quit)
12:43:52 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
12:44:21 cpressey joins (~weechat@33b62f0c.skybroadband.com)
12:52:46 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
12:55:48 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 255 seconds)
13:00:58 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 260 seconds)
13:01:19 chexum joins (~quassel@gateway/tor-sasl/chexum)
13:02:06 × euleritian quits (~euleritia@dynamic-176-006-192-047.176.6.pool.telefonica.de) (Ping timeout: 255 seconds)
13:02:58 euleritian joins (~euleritia@dynamic-176-004-183-058.176.4.pool.telefonica.de)
13:06:46 dagit4374 joins (~dagit@2001:558:6025:38:71c6:9d58:7252:8976)
13:08:59 × dagit quits (~dagit@24.21.226.72) (Ping timeout: 264 seconds)
13:14:58 danza joins (~francesco@151.57.150.48)
13:18:57 × AlexZenon quits (~alzenon@178.34.163.65) (Ping timeout: 272 seconds)
13:25:42 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
13:26:16 AlexZenon joins (~alzenon@178.34.163.65)
13:27:28 × noumenon quits (~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving)
13:28:12 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 255 seconds)
13:31:22 × AlexZenon quits (~alzenon@178.34.163.65) (Ping timeout: 255 seconds)
13:39:15 AlexZenon joins (~alzenon@178.34.163.65)
13:43:02 verde joins (~user@2a04:4540:7202:1e00:ee9e:56f5:e3d8:f038)
13:45:44 wootehfoot joins (~wootehfoo@user/wootehfoot)
13:52:24 × verde quits (~user@2a04:4540:7202:1e00:ee9e:56f5:e3d8:f038) (Changing host)
13:52:24 verde joins (~user@user/verde)
13:54:48 × verde quits (~user@user/verde) (Quit: Leaving)
13:54:56 verde joins (~user@user/verde)
13:59:43 × AlexZenon quits (~alzenon@178.34.163.65) (Ping timeout: 255 seconds)
14:00:04 × danza quits (~francesco@151.57.150.48) (Read error: Connection reset by peer)
14:01:31 × zmt01 quits (~zmt00@user/zmt00) (Ping timeout: 260 seconds)
14:02:36 tremon joins (~tremon@83.80.159.219)
14:09:20 AlexZenon joins (~alzenon@178.34.163.65)
14:13:23 × zetef quits (~quassel@5.14.129.50) (Remote host closed the connection)
14:16:37 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 256 seconds)
14:23:18 wootehfoot joins (~wootehfoo@user/wootehfoot)
14:42:01 × verde quits (~user@user/verde) (Ping timeout: 255 seconds)
14:46:39 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
14:55:37 × rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer)
14:56:07 rvalue joins (~rvalue@user/rvalue)
15:00:00 × driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat)
15:03:52 driib3 joins (~driib@vmi931078.contaboserver.net)
15:10:25 Square joins (~Square@user/square)
15:13:04 × waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 255 seconds)
15:13:38 Maeda joins (~Maeda@91-161-10-149.subs.proxad.net)
15:21:06 harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
15:23:17 oo_miguel joins (~Thunderbi@78-11-181-16.static.ip.netia.com.pl)
15:28:08 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
15:31:55 × dagit4374 quits (~dagit@2001:558:6025:38:71c6:9d58:7252:8976) (Remote host closed the connection)
15:33:20 dagit joins (~dagit@2001:558:6025:38:71c6:9d58:7252:8976)
15:50:57 Inst_ joins (~Inst@user/Inst)
15:53:28 × Inst quits (~Inst@user/Inst) (Ping timeout: 246 seconds)
16:01:50 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
16:05:46 Lycurgus joins (~georg@user/Lycurgus)
16:37:48 × Lycurgus quits (~georg@user/Lycurgus) (Quit: leaving)
16:45:28 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
16:48:09 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
17:10:56 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
17:11:51 × dcoutts quits (~duncan@2001:620:130:6092:8b6f:ee09:26cb:f12f) (Ping timeout: 255 seconds)
17:12:38 dolio joins (~dolio@130.44.134.54)
17:15:26 Heffalump joins (~ganesh@urchin.earth.li)
17:16:07 Heffalump parts (~ganesh@urchin.earth.li) ()
17:17:38 × dolio quits (~dolio@130.44.134.54) (Quit: ZNC 1.8.2 - https://znc.in)
17:19:12 talukara joins (~talukara@user/talukara)
17:19:19 × talukara quits (~talukara@user/talukara) (Max SendQ exceeded)
17:19:45 talukara joins (~talukara@user/talukara)
17:22:47 dolio joins (~dolio@130.44.134.54)
17:23:14 × talukara quits (~talukara@user/talukara) (Client Quit)
17:25:13 dcoutts joins (~duncan@77.109.149.106)
17:28:27 tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net)
17:29:05 Heffalump joins (~ganesh@urchin.earth.li)
17:29:16 × xdminsy quits (~xdminsy@117.147.70.212) (Ping timeout: 268 seconds)
17:29:32 boukenshaou joins (~Boukensha@2401:4900:1cd4:b07a:78ff:838f:4850:1823)
17:30:09 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
17:30:17 xdminsy joins (~xdminsy@117.147.70.212)
17:38:30 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:44:47 Sgeo joins (~Sgeo@user/sgeo)
17:56:16 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:01:20 × harveypwca quits (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288) (Remote host closed the connection)
18:01:39 × hammond quits (proscan@gateway02.insomnia247.nl) (Read error: Connection reset by peer)
18:01:56 harveypwca joins (~harveypwc@2601:246:d080:b40:1889:d9bf:2dd8:b288)
18:05:53 hammond joins (proscan@gateway02.insomnia247.nl)
18:19:07 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:22:07 cpressey joins (~weechat@33b62f0c.skybroadband.com)
18:23:29 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
18:24:27 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
18:25:10 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
18:29:57 troydm joins (~troydm@user/troydm)
18:30:53 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
18:39:02 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 256 seconds)
18:45:22 × gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds)
18:47:41 gmg joins (~user@user/gehmehgeh)
18:58:27 × euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.)
19:04:27 euphores joins (~SASL_euph@user/euphores)
19:14:44 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 256 seconds)
19:21:30 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 268 seconds)
19:23:24 × Square quits (~Square@user/square) (Read error: Connection reset by peer)
19:25:06 Square joins (~Square@user/square)
19:35:46 cpressey joins (~weechat@33b62f0c.skybroadband.com)
19:48:05 × remedan quits (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Ping timeout: 240 seconds)
19:51:12 remedan joins (~remedan@ip-62-245-108-153.bb.vodafone.cz)
19:56:49 michalz joins (~michalz@185.246.207.203)
20:01:32 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection)
20:02:04 ChaiTRex joins (~ChaiTRex@user/chaitrex)
20:02:39 × JimL quits (~quassel@89.162.16.26) (Quit: No Ping reply in 180 seconds.)
20:03:43 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:03:57 waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se)
20:04:02 JimL joins (~quassel@89.162.16.26)
20:19:28 × Square quits (~Square@user/square) (Ping timeout: 246 seconds)
20:19:33 L29Ah joins (~L29Ah@wikipedia/L29Ah)
20:21:28 × euleritian quits (~euleritia@dynamic-176-004-183-058.176.4.pool.telefonica.de) (Read error: Connection reset by peer)
20:21:45 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
20:25:30 × ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex)
20:25:31 × CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
20:28:05 CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de)
20:28:08 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
20:31:31 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer)
20:32:31 euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de)
20:33:54 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
20:39:41 × lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 240 seconds)
20:41:08 L29Ah parts (~L29Ah@wikipedia/L29Ah) ()
20:44:29 × inedia quits (~irc@2600:3c00:e000:287::1) (Quit: WeeChat 4.2.2)
20:47:39 inedia joins (~irc@2600:3c00:e000:287::1)
20:50:27 machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net)
20:54:07 × Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving)
20:58:22 pavonia joins (~user@user/siracusa)
21:07:33 × boukenshaou quits (~Boukensha@2401:4900:1cd4:b07a:78ff:838f:4850:1823) (Remote host closed the connection)
21:09:13 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:17:46 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
21:41:25 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Ping timeout: 255 seconds)
21:46:50 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:48:49 cpressey joins (~weechat@33b62f0c.skybroadband.com)
21:49:50 tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl)
21:50:40 × michalz quits (~michalz@185.246.207.203) (Quit: ZNC 1.9.0 - https://znc.in)
21:53:52 Feuermagier is now known as Guest9152
21:53:52 Feuermagier_ joins (~Feuermagi@user/feuermagier)
21:53:52 × Guest9152 quits (~Feuermagi@user/feuermagier) (Killed (lead.libera.chat (Nickname regained by services)))
21:53:52 Feuermagier_ is now known as Feuermagier
21:58:16 × cpressey quits (~weechat@33b62f0c.skybroadband.com) (Quit: WeeChat 4.3.0)
22:04:25 × tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:08:29 × inedia quits (~irc@2600:3c00:e000:287::1) (Quit: WeeChat 4.2.2)
22:09:03 × euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 272 seconds)
22:13:22 euleritian joins (~euleritia@77.22.252.56)
22:17:05 Lycurgus joins (~georg@user/Lycurgus)
22:19:59 × machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 256 seconds)
22:20:06 dcoutts_ joins (~duncan@77.109.149.106)
22:20:27 × dcoutts quits (~duncan@77.109.149.106) (Read error: Connection reset by peer)
22:21:07 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:21:54 × Jackneill quits (~Jackneill@94-21-193-177.pool.digikabel.hu) (Ping timeout: 255 seconds)
22:30:31 <hololeap> this is one of those vague questions that I seem to get in trouble for here, but does anyone have any ideas in regards to this kind of boilerplate for writing Monoid instances and how to automate it somehow: https://bpa.st/YD4A
22:32:00 <hololeap> or a deeper understanding. I see a lot of that same pattern but I haven't quite figured out what I'm seeing
22:32:39 <hololeap> (and yes I wrote that)
22:32:59 <geekosaur> it's just the definitions of semigroup and monoid
22:34:06 <hololeap> right, but there's often times a constructor that will "dominate", for instance: HelpMode <> _ = HelpMode; _ <> HelpMode = HelpMode
22:34:07 <geekosaur> semigroup captures the notion of "combining values", monoid captures the notion of "identity value when combining"
22:34:27 <geekosaur> yes, but that depends on the type
22:34:36 <haskellbridge> <Heffalump (@hsenag:matrix.org)> I think you'd probably spend more effort defining a clever specification language for that than you would save in writing the boilerplate
22:34:42 <haskellbridge> <Heffalump (@hsenag:matrix.org)> unless you have a _lot_ of it
22:34:51 <geekosaur> sometimes you get that, sometimes you don't (neither lists nor numbers work that way, for example)
22:35:00 <hololeap> ok, maybe I'm the only one who has recognized this pattern
22:35:58 <hololeap> It's usually something like: X <> _ = X; _ <> X = X; Y x1 <> Y x2 = ...
22:37:12 <haskellbridge> <Heffalump (@hsenag:matrix.org)> I think what you have done is defined a semilattice or similar
22:37:52 <hololeap> Heffalump: I think you're right. I watched a talk on that a while back and I kind of get it
22:39:17 <EvanR> haskell monoid instance IS the nice specification language xD
22:39:36 <hololeap> because here if someone specifies --help, that should override anything else on the command line
22:40:02 <haskellbridge> <Heffalump (@hsenag:matrix.org)> EvanR: I don't think it's that simple, hololeap's one has some extra structure
22:40:41 <hololeap> so if HelpMode shows up even once in the list from getOpt, it needs to be what remains after running mconcat on the list
22:40:47 <hololeap> does that make sense?
22:41:15 <EvanR> X <> _ = X; _ <> X = X; Y x1 <> Y x2 = f x1 x2 where ...
22:42:05 <EvanR> but shoehorning the behavior of the parsed command line arguments into a monoid instance seems kind like shoehorning
22:42:19 <EvanR> parsing them in the first place is another story
22:42:46 <hololeap> EvanR: do you want to see the full code? using mconcat worked pretty well
22:43:19 <EvanR> I can imagine the config monoid reacting to --help by simply setting the flag in the record saying --help was provided
22:43:30 <EvanR> and letting something else deal with the business logic
22:43:44 <hololeap> it's just a one file .hs project
22:44:24 × acidjnk quits (~acidjnk@p200300d6e714dc900cd3e2d9c55a017d.dip0.t-ipconnect.de) (Ping timeout: 255 seconds)
22:44:48 <hololeap> https://github.com/gentoo-haskell/gentoo-haskell/blob/74e70146bf3a60f06966e7239075523568baaced/scripts/scan-ghc-library-versions.hs#L178-L191
22:45:17 <hololeap> mconcat is at line 203
22:46:13 <EvanR> not saying it won't work but it just seems like a non obvious way to go about it
22:46:51 <hololeap> what would be a more obvious way to do this?
22:47:11 <hololeap> I tend to think of things in terms of monoids :p
22:47:13 <EvanR> do what, implement --help, --verbose, and whatever else?
22:47:55 <EvanR> you're lucky you want to do something which can be construed as a valid monoid xD
22:48:16 <EvanR> (semigroup)
22:48:29 <hololeap> getOpt returns a list of valid options on the command line. if there's even a single --help in there, it needs to show the help menu. otherwise it needs to know if --verbose was passed, even once
22:48:50 <EvanR> and you happen to not care what else was passed if --help appears anywhere, just a fluke
22:49:04 <monochrom> hololeap: I wonder if you accept "code up the isomorphism with Maybe Verbose, then you can just use Maybe's monoidness"
22:49:14 <EvanR> e.g. some programs might want --help <topic> to work
22:49:27 <EvanR> or --help <topic> --color xD
22:49:43 <hololeap> monochrom: yeah here I could, since it's either help menu or normal mode + verbose option
22:50:08 <hololeap> yeah this is a really simple utility
22:50:24 <geekosaur> fwiw I agree this feels like "abuse of Monoid/Semigroup"
22:50:24 <monochrom> And then if you're reckless, isomorphism = unsafeCoerce haha
22:50:50 <hololeap> how would unsafeCoerce work on sum types
22:51:00 <geekosaur> intended to say that earlier but I had to run down and meat the grubhub driver 🙂
22:51:31 <EvanR> I'm here to call out waste fraud and abuse when you're not here
22:52:29 <hololeap> geekosaur: I really thought this was *appropriate* use of monoid/semigroup
22:52:33 <EvanR> hololeap, in my reimagining, I implement this short circuiting behavior with an if statement, if --help was provided, do this, otherwise do that xD
22:52:48 <hololeap> like, it passes all the monoid/semigroup laws
22:53:12 <EvanR> you could also use a monad where all return types are ()
22:53:15 <EvanR> but why
22:53:42 <hololeap> well, fair, but that's a step further
22:53:50 <EvanR> it would pass all laws!
22:53:57 <hololeap> I'm just not sure what the step backward would be
22:53:57 <EvanR> (but not make any damn sense)
22:54:13 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:54:19 <EvanR> like I said, you want it to do X if --help was provided, Y otherwise
22:54:37 <EvanR> there's way less code that does that
22:54:47 <hololeap> so basically write what I have but don't call it monoid/semigroup :p
22:55:01 <geekosaur> hololeap, informally (that is, without recourse to laws) I would expect a mon oid to preserve information. your HelpMode loses it
22:55:26 <EvanR> a type use for monoid here is to combine the provided configuration options into a coherence final config record
22:55:29 <EvanR> typical*
22:55:37 <EvanR> coherent*
22:55:38 <geekosaur> the semantics should be "combine", not "replace"
22:56:06 <hololeap> have you not seen Data.Semigroup.{First,Last}
22:56:18 <EvanR> the semilattice idea does result in losing information
22:56:49 <EvanR> it obeys laws
22:56:56 <EvanR> you're up there in the evolution of the haskell programmer xD
22:56:57 <ncf> i completely disagree that this is an "abuse of Monoid", or "shoehorning", fwiw
22:57:29 <ncf> command-line arguments form a monoid under concatenation, so it's only natural to interpret them into a monoid
22:57:41 <EvanR> that's not what the instance does or is used like
22:59:14 <ncf> ?
22:59:27 <EvanR> it doesn't concatenate as such
22:59:51 <EvanR> --help deletes the other options
23:00:40 <ncf> ..yes, you interpret them into a *different* monoid
23:00:41 × gmg quits (~user@user/gehmehgeh) (Quit: Leaving)
23:00:42 <EvanR> it's acting like the infinity for a max monoid
23:00:59 <EvanR> it works just a weird way to go about it
23:01:27 <ncf> the CLI is a list (i.e. free monoid) of arguments, so you use the universal property to interpret them into the monoid you actually want
23:01:32 <ncf> it's not weird at all, it's very principled
23:01:35 <EvanR> you sure can
23:01:44 <EvanR> it doesn't help achieve the goal really
23:02:02 <EvanR> just my perspective from a "can I explain this code to a normal person" angle xD
23:03:02 <hololeap> I would hope haskell devs at least understand monoids. I appreciate your perspective EvanR
23:03:05 <mauke> > (1 > 2) `max` any even [3, 5, 2]
23:03:07 <lambdabot> True
23:03:32 <hololeap> and I came here for differing opinions so lay them on
23:04:14 × sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 256 seconds)
23:04:39 <EvanR> i.e. "what's this code doing" is it "interpreting the universal monoid into one which is something like a semi lattice" vs "shows help if they do --help" xD
23:05:25 <EvanR> code looks like the first but could look like the second
23:06:58 causal joins (~eric@50.35.88.207)
23:10:03 <hololeap> hm good point
23:11:27 <hololeap> especially since the monoid/semigroup instance only used once it could be more readable as a custom function
23:14:15 <hololeap> thanks. these kind of insights are hard to come by when you're coding by yourself
23:21:16 shailangsa joins (~shailangs@host86-186-127-241.range86-186.btcentralplus.com)
23:31:37 × hiredman quits (~hiredman@frontier1.downey.family) (Quit: Lost terminal)
23:34:21 × tremon quits (~tremon@83.80.159.219) (Quit: getting boxed in)
23:40:29 × target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving)
23:43:35 × Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.)
23:48:43 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
23:52:53 × peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 240 seconds)
23:56:42 peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com)
23:57:35 <monochrom> I am against explaining to "normal" people.
23:58:47 <EvanR> what an elitist!!!
23:59:02 <monochrom> s/elit/profession/
23:59:08 <EvanR> retreat to the ivory tower!
23:59:40 <monochrom> Every profession will have a lot of things unexplanable to outsiders. This is simply the inevitable consequence of specialization.
23:59:54 <monochrom> The alternative is to keep programming unprofessional.

All times are in UTC on 2024-06-08.