Home freenode/#haskell: Logs Calendar

Logs on 2020-12-02 (freenode/#haskell)

00:01:25 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Ping timeout: 240 seconds)
00:01:25 cosimone_ is now known as cosimone
00:02:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
00:02:40 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
00:04:04 × vfaronov quits (5f54d24e@broadband-95-84-210-78.ip.moscow.rt.ru) (Remote host closed the connection)
00:04:47 <justsomeguy> interact is pretty useful for text filter utilities.
00:05:01 <justsomeguy> I think that's the main intended use case.
00:05:36 × anhydrite quits (~anhydrite@4e69b241.skybroadband.com) (Ping timeout: 240 seconds)
00:07:43 × srk quits (~sorki@gateway/tor-sasl/sorki) (Ping timeout: 240 seconds)
00:08:08 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
00:09:10 <glguy> It can be used interactively, but it's not a great idea or easy to do
00:09:20 ihopeyoudie is now known as okfinesangy
00:09:43 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Ping timeout: 260 seconds)
00:10:32 <glguy> mivael: https://paste.tomsmeding.com/M4WoY6OQ
00:10:53 × rprije quits (~rprije@194-193-160-114.tpgi.com.au) (Ping timeout: 260 seconds)
00:16:05 × bergey` quits (~user@107.181.19.30) (Ping timeout: 240 seconds)
00:16:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:19:25 × triteraflops quits (~triterafl@host-208-96-90-136.public.eastlink.ca) (Ping timeout: 264 seconds)
00:21:21 srk joins (~sorki@gateway/tor-sasl/sorki)
00:21:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:21:37 da39a3ee5e6b4b0d joins (~da39a3ee5@mx-ll-171.5.161-165.dynamic.3bb.co.th)
00:26:03 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
00:27:09 × zebrag quits (~inkbottle@aaubervilliers-654-1-77-32.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!)
00:27:09 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
00:27:19 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
00:27:47 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:29:28 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds)
00:30:55 × cosimone quits (~cosimone@5.170.116.30) (Quit: cosimone)
00:31:21 zebrag joins (~inkbottle@aaubervilliers-654-1-77-32.w86-212.abo.wanadoo.fr)
00:31:49 × balbirs quits (~balbirs__@bilbo.ozlabs.org) (Quit: ZNC 1.8.2+deb1 - https://znc.in)
00:34:03 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 240 seconds)
00:34:43 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Ping timeout: 240 seconds)
00:34:54 × da39a3ee5e6b4b0d quits (~da39a3ee5@mx-ll-171.5.161-165.dynamic.3bb.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:35:08 jpds joins (~jpds@gateway/tor-sasl/jpds)
00:35:20 <monochrom> I wonder what motivates the question. Is it an online exam question? I can only think of low-quality exams to ask such naïve black-and-white questions.
00:36:49 × borne quits (~fritjof@200116b864506b008cdf581d4c1cc02f.dip.versatel-1u1.de) (Ping timeout: 244 seconds)
00:39:26 <mivael> monochrom: no, that was mine. I was stuck, forgot to use (unlines), used (show) instead. I was not used (interact) for really interactive things, so started to question my knowledge :)
00:39:28 × jmchael quits (~Chi1thang@87.112.60.168) (Ping timeout: 260 seconds)
00:40:06 <monochrom> Then you did not question yourself enough.
00:40:09 <mivael> glguy: thank you! sorry for the delay as well
00:40:44 × alp_ quits (~alp@88.126.45.36) (Remote host closed the connection)
00:41:03 <monochrom> Your program mentioned "show", "interact", and I'm sure a dozen other functions.
00:41:19 <monochrom> Why pick on interact? Why not pick on every one of them?
00:41:25 cheater1 joins (~user@unaffiliated/cheater)
00:41:33 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 256 seconds)
00:41:39 cheater1 is now known as cheater
00:41:51 <monochrom> "Is show suitable for output?" is as legit a question as "is interact suitable for I/O?"
00:42:25 <monochrom> I respect questioning, I just can't respect biases.
00:42:30 <mivael> monochrom: yes, I did not question myself enough, sorry for that
00:42:37 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
00:42:43 superstar64 joins (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net)
00:43:34 <superstar64> is there any way to derive the free monoid from the monoid laws, and if so can someone link me to some resources that do that?
00:46:06 <mivael> monochrom: it was not a bias, it was a statement on which I hoped to get a "no" answer. But, indeed, I was too fast to ask without checking harder.
00:48:06 inkbottle joins (~inkbottle@aaubervilliers-654-1-157-224.w86-212.abo.wanadoo.fr)
00:49:05 × zebrag quits (~inkbottle@aaubervilliers-654-1-77-32.w86-212.abo.wanadoo.fr) (Ping timeout: 240 seconds)
00:50:05 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
00:50:14 <mivael> monochrom: but I really checked the docs (and a couple of web search attempts) before asking -- and I could not find a clear statement about usage of (interact) except for non-interactive text filters
00:50:51 <monochrom> If there were one, I wouldn't trust it. As always, the correct answer is "it depends". All other answers are wrong.
00:51:12 <mivael> well, okay :)
00:51:55 stree_ joins (~stree@50-108-92-113.adr01.mskg.mi.frontiernet.net)
00:52:19 × z0k quits (~user@101.50.127.33) (Ping timeout: 256 seconds)
00:52:44 <mivael> (unlines) is a key point for simple interactive use cases, as I understood it now
00:53:14 z0k joins (~user@101.50.127.33)
00:53:14 × stree quits (~stree@50-108-97-52.adr01.mskg.mi.frontiernet.net) (Ping timeout: 256 seconds)
00:53:33 × sleblanc quits (~sleblanc@unaffiliated/sebleblanc) (Quit: Leaving)
00:53:51 × CMCDragonkai2 quits (~Thunderbi@120.17.186.107) (Read error: Connection reset by peer)
00:55:43 × Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 272 seconds)
00:56:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:57:13 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
01:00:31 × jollygood2 quits (~bc8165ab@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
01:02:15 × Feuermagier_ quits (~Feuermagi@213.178.26.41) (Quit: Leaving)
01:03:46 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:06:05 × jonatanb_ quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
01:07:20 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-upkmxhtxsvcjopkm) (Quit: Connection closed for inactivity)
01:09:13 × ezzieyguywuf quits (~wolfie@unaffiliated/ezzieyguywuf) (Remote host closed the connection)
01:09:43 mounty joins (~mounty@2001:8000:2f59:0:c056:3de3:d9b3:22a8)
01:12:23 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
01:13:10 × gnu-linuxera quits (~kvirc@185.228.155.198) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
01:17:35 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
01:19:32 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.161.165)
01:22:45 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
01:23:02 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
01:23:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
01:26:37 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 264 seconds)
01:27:17 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
01:27:32 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
01:29:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
01:42:34 × mivael quits (c16e4caa@193.110.76.170) (Ping timeout: 245 seconds)
01:42:42 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 272 seconds)
01:43:05 Lord_of_Life joins (~Lord@46.217.220.157)
01:45:18 × Wuzzy quits (~Wuzzy@p549c9976.dip0.t-ipconnect.de) (Remote host closed the connection)
01:46:48 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
01:51:05 falafel joins (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net)
01:52:08 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:690b:f4aa:bb1f:cfec) (Remote host closed the connection)
01:54:00 wei2912 joins (~wei2912@unaffiliated/wei2912)
01:54:13 <iqubic> Anyone know the time complexity of IntSet.fromList on an unsorted list?
01:55:17 × miguel_clean quits (~Miguel@89-72-187-203.dynamic.chello.pl) (Quit: Leaving.)
01:56:07 anhydrite joins (~anhydrite@4e69b241.skybroadband.com)
01:58:35 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
02:00:06 <koz_> O(n*min(n,W))
02:00:15 <koz_> Where W is the word size of the platform in bits.
02:00:52 <iqubic> Weird.
02:00:58 <iqubic> That's so bizarre.
02:01:12 <koz_> Why?
02:01:16 <nshepperd> which doesn't really make sense as an asymptotic bound
02:01:58 <nshepperd> i bet if you benchmark it on realistic values of n you get something else
02:02:25 <ephemient> nah, I think it makes sense
02:02:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:02:38 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
02:03:10 <iqubic> Well, I have a solution to part 1 of yesterday's Advent of Code that's O(n), if you already have an IntSet of the input, and something else if you don't.
02:03:14 <ephemient> the patricia tree is somewhat fancier, but just imagine if you built a binary tree from each bit, MSB to LSB
02:03:16 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
02:03:38 <koz_> It makes sense. Insert bound is min(n,W), and you've got n-many inserts.
02:03:49 <koz_> It's maybe not as tight as it could be, but it's O, not Theta.
02:05:23 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:ad64:8506:64d2:1c94) (Ping timeout: 272 seconds)
02:07:18 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
02:07:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
02:08:08 × tdammers quits (~tdammers@unaffiliated/tdammers) (Ping timeout: 260 seconds)
02:08:12 <int-e> . o O ( W is constant )
02:08:27 tdammers joins (~tdammers@unaffiliated/tdammers)
02:09:32 <ephemient> I mean, in some sense everything that terminates is O(number of states your physical hardware can be in), which is a finite number
02:09:57 <ephemient> not super useful though
02:10:23 × pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca) (Read error: Connection reset by peer)
02:10:28 <int-e> O(n*min(n,W)) looks like an abuse of big O to me, trying to convey more information than it rightfully can.
02:10:55 pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca)
02:12:16 <nshepperd2> nobody uses computers with asymptotically large values of W
02:12:16 <koz_> int-e: Abuse of big-O is pretty much standard practice among algorithm analysis folks. :P
02:12:42 <koz_> (they're even kind enough to admit it sometimes)
02:12:46 <koz_> (thanks Fredkin trie)
02:13:09 <iqubic> Wish me luck, as I'm going to be trying out the Haskell LSP.
02:13:44 <int-e> koz_: I know. The sad thing is that I'm trying to convince myself that O(n*min(n,W)) should be replaced by O(n) and I can't. :P
02:14:15 <koz_> int-e: I mean, I don't think it's _that_ bad, honestly. Taking W as a parameter that _isn't_ a constant is somewhat justifiable.
02:14:39 <koz_> Yeah, it's not gonna grow without bound, fair.
02:15:04 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
02:15:05 <int-e> Yeah it kind of is, and it conveys some information about the internal behavior.
02:15:16 × falafel quits (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net) (Ping timeout: 260 seconds)
02:15:50 triteraflops joins (~triterafl@host-208-96-90-136.public.eastlink.ca)
02:15:50 <int-e> anyway... maybe I can find another bikeshed to choose a color for.
02:16:04 <koz_> What bothers me more is that we have IntSet and not EnumSet. Although I guess _that_ would require Enum to not be a tyre fire.
02:16:16 <koz_> (see also IntMap versus EnumMap)
02:16:21 <int-e> koz_: I give you... Floats.
02:16:41 <koz_> int-e: What of them? The fact they have instances that lie to your face isn't unique to Enum.
02:16:46 <koz_> (assuming they have one)
02:17:11 drbean joins (~drbean@TC210-63-209-208.static.apol.com.tw)
02:17:15 <ephemient> > 0/0 == 0/0
02:17:17 <lambdabot> False
02:17:30 ericsagn1 joins (~ericsagne@2405:6580:0:5100:d83e:9e9c:25a6:e9a5)
02:17:33 <int-e> koz_: Somehow, Ix is perhaps the better class for this purpose.
02:17:39 rprije joins (~rprije@203.214.94.91)
02:17:50 <int-e> (The Data.Array one)
02:18:19 <koz_> int-e: Except Ix is no saint either.
02:18:30 <koz_> (look at 'index')
02:18:31 <int-e> better != perfect
02:19:10 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
02:19:17 <koz_> I honestly dislike them both intensely.
02:19:26 <koz_> They could both be better both in design and in implementation.
02:19:34 koz_ looks at Enum instance for Word and sighs.
02:19:42 <int-e> Wat about index? Oh you're one of those people who dislike partial functions.
02:19:48 koz_ then also notes the Ix instance for Word has the same problem.
02:20:02 <koz_> Uhh, yeah, I don't think disliking partiality is _that_ controversial.
02:20:11 <Vulfe> partial functions aren't even functions at all >:~(
02:20:21 <koz_> Vulfe: Abuse of nomenclature, yes. :P
02:21:07 <int-e> koz_: Doesn't change the fact that I had to sit back and think for a moment to figure out what the issue is.
02:21:19 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
02:21:29 <koz_> int-e: Sorry if I wasn't specific - it practically leaps at my face and tries to eat it.
02:21:40 Jonkimi727406120 joins (~Jonkimi@119.123.243.225)
02:22:33 <int-e> koz_: And I do think it is controversial... the controversy is not about whether partial functions can be dangerous, but about the amount of inconvenience people are willing to accept in order to avoid it.
02:23:06 <int-e> I also hardly ever use Ix methods directly.
02:23:57 bitmagie joins (~Thunderbi@200116b806cac600055ef8926da547c5.dip.versatel-1u1.de)
02:24:14 <koz_> If you don't give me a total alternative, inconvenience or none, I'm calling shenanigans.
02:24:48 <koz_> If you want to have unsafeCanExplodeInYourFaceDoWhatever, you can - just give us the option to use something which won't.
02:25:03 × superstar64 quits (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection)
02:25:49 × drbean quits (~drbean@TC210-63-209-208.static.apol.com.tw) (Ping timeout: 256 seconds)
02:26:21 × xff0x quits (~fox@2001:1a81:52c4:e700:de91:e102:2d9b:dc8d) (Ping timeout: 244 seconds)
02:28:17 xff0x joins (~fox@2001:1a81:5348:9f00:6dc0:7df:3cf:92d4)
02:28:38 dyeplexer joins (~lol@unaffiliated/terpin)
02:29:43 × srk quits (~sorki@gateway/tor-sasl/sorki) (Ping timeout: 240 seconds)
02:33:27 <justsomeguy> How do you avoid partial functions? Do you just know which ones in Prelude are partial by heart, or use an alternate Prelude, or...?
02:33:55 <int-e> justsomeguy: You just work in the Maybe applicative at all times
02:34:22 <int-e> Or you define dozens of new types to capture various properties of the values.
02:34:29 BlackCapCoder joins (~blackcap@48.80-203-23.nextgentel.com)
02:34:31 <koz_> justsomeguy: More seriously, you can have alternatives to the partials, depending on the partial.
02:34:42 <koz_> It's not a one-size-fits-all solution.
02:35:51 <koz_> There are cases where partiality is hard, inefficient or awkward to avoid though.
02:37:03 <int-e> koz_: fwiw, I do agree that there should be a Maybe version of index in Data.Array, probably in the Ix class itself.
02:37:26 <int-e> (even though you can implement it using inRange and index)
02:37:39 <koz_> int-e: And FWIW, I don't think paranoid evasion of all partiality under all circumstances is a worthwhile thing.
02:37:46 <koz_> It seems nuance _does_ exist, lol. :P
02:38:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:38:43 <int-e> I suspect Ix was designed for efficiency in a context where people felt that Bool can get special treatment to be cheap... while pattern matching a Maybe result was awkward.
02:39:09 <koz_> Does Bool get special treatment to be cheap in that setting though?
02:39:12 <int-e> (That's speculation, of course. But it seems plausible to me.)
02:39:24 <koz_> I mean, yeah, it _could_ I guess, but I don't think that ever happened.
02:39:46 <int-e> For ghc, pattern matchin a Maybe or a Bool shouldn't make much of a difference.
02:40:30 <int-e> No clue what the story was for hugs, which was still relevant when Ix was designed.
02:40:50 <int-e> (And probably nhc as well.)
02:40:52 × triteraflops quits (~triterafl@host-208-96-90-136.public.eastlink.ca) (Quit: Lost terminal)
02:40:56 <koz_> Also, is there any particular reason why indexes are Int everywhere in Haskell?
02:41:25 <int-e> Well when you index an Array...
02:41:53 <int-e> It's efficiency again; the overhead for big integers is real.
02:42:01 <ephemient> if you're indexing in-memory data structures, you're not going to be able to use indices larger than it anyway… so might as well use Int, I guess
02:42:06 <int-e> And yes, that means we have overflows.
02:42:32 <koz_> The thing is, negative indexes don't make much sense - why not Word?
02:42:47 <int-e> Did we have Word?
02:42:57 <iqubic> In the beginning there was the Word.
02:42:58 srk joins (~sorki@gateway/tor-sasl/sorki)
02:43:02 <ephemient> Word doesn't exist in Haskell 98
02:43:12 <koz_> ephemient: What about 2010?
02:43:41 <ephemient> 2010, yes
02:44:06 <int-e> 1998: Numeric types: Int, Integer, Float, Double. The semantics of these instances is given next.
02:44:32 <koz_> So, hysterical raisins. Got it. :D
02:44:34 <int-e> Ix is a Haskell 98 class and nobody changed it in the meantime.
02:44:37 <monochrom> Indexes also participate in subtractions in which sometimes an intemediate negative number makes sense.
02:44:39 Stanley00 joins (~stanley00@unaffiliated/stanley00)
02:45:05 <monochrom> I mean in the rest of a program.
02:45:12 <int-e> (Possibly even older?)
02:45:32 <koz_> monochrom: Is this like size_t versus ptrdiff_t in C?
02:45:36 <monochrom> This I learned from geekosaur or glguy, I forgot which.
02:45:37 <int-e> Yeah, I'd agree that subtracting indices is common.
02:45:43 jollygood2 joins (~bc8165ab@217.29.117.252)
02:45:52 <int-e> And we don't have implicit conversions to make that bearable. :P
02:46:53 <int-e> But the fact that we didn't have Word in Haskell 98 is quite interesting :)
02:48:12 <monochrom> and that after we have Word, it took another decade before the symmetry Int : Word :: Integer : Natural was completed.
02:48:50 × m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 256 seconds)
02:48:51 <monochrom> It's like someone really needed a larger collider to finally nail the Higgs boson.
02:49:11 <dminuoso> What does `Int : Word :: Integer : Natural` denote?
02:49:13 <monochrom> and so late that when it was done, no one cared any more.
02:49:29 <monochrom> analogical symmetry
02:49:42 <dminuoso> As in "Int is to Word as Integer is to Natural"?
02:49:42 <ephemient> nat is unbounded non-negative, word is bounded non-negative
02:49:48 <monochrom> yes
02:49:56 zebrag joins (~inkbottle@aaubervilliers-654-1-118-216.w86-198.abo.wanadoo.fr)
02:50:06 <int-e> ...so Integer has half the positive range of Natural...
02:50:24 <monochrom> I think you worded that wrong :)
02:50:38 <dminuoso> Speaking of that.. I see very little use of Word or Natural around..
02:50:42 <monochrom> Also Hilbert's Hotel taught us that it's tricky to say "half"...
02:51:09 <int-e> monochrom: no, it's really easy :)
02:51:11 <monochrom> I am dirty-minded, I use Hilbert's Brothel instead.
02:51:18 <int-e> monochrom: it just doesn't affect the cardinality
02:51:18 × inkbottle quits (~inkbottle@aaubervilliers-654-1-157-224.w86-212.abo.wanadoo.fr) (Ping timeout: 260 seconds)
02:51:41 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
02:51:54 <monochrom> Oh haha I now get your joke.
02:51:56 <int-e> . o O ( actually it's super easy, barely an inconvenience )
02:52:12 <koz_> What Hilbert's Hospitality Establishment taught us is 'infinity is one hell of a drug'.
02:55:14 × joaj quits (~joaj@2001:818:e326:8200:5273:55b7:3a86:e6ca) (Ping timeout: 264 seconds)
02:55:42 falafel joins (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net)
02:55:43 <BlackCapCoder> Is Unfoldable related to Traversable? https://gist.github.com/BlackCapCoder/4e33bd44bd01b5c99535712bfdaeb4d4
02:55:51 joaj joins (~joaj@2001:818:e326:8200:9fc:6bde:c18a:1771)
02:56:08 × iqubic quits (~user@2601:602:9500:4870:d783:bda7:f9aa:ba36) (Remote host closed the connection)
02:56:34 <koz_> Only in the way Foldable is.
02:56:46 <dminuoso> BlackCapCoder: Yes.
02:57:10 <BlackCapCoder> How? Is it weaker or stronger?
02:57:17 <dminuoso> Different.
02:57:46 <koz_> dminuoso: I wonder what an Untraversable (or some better name) would look like.
02:58:43 <BlackCapCoder> Foldr has a traversable instance (basically just []), so Foldable + Unfoldable => Traversable
02:59:43 <koz_> BlackCapCoder: Can you implement a lawful traverse method given Foldable and Unfoldable only? What would it look like?
02:59:44 iqubic joins (~user@2601:602:9500:4870:d783:bda7:f9aa:ba36)
02:59:50 <dminuoso> BlackCapCoder: It's hard to reason about Unfoldable, it doesn't seem to come with any laws. At least none are listed.
03:01:51 <BlackCapCoder> hold on, let me try to extract that from my spagetti
03:02:51 <dminuoso> BlackCapCoder: The thing is, there's this notion how Traversable lets you fill an existing structure from a list.
03:03:14 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
03:03:33 <dminuoso> (This thinking brings you into lens-land)
03:04:39 <BlackCapCoder> koz_: http://termbin.com/0p4k
03:05:38 <BlackCapCoder> (the traversable instance is copy/paste from [] in base)
03:06:26 <koz_> BlackCapCoder: That's not quite what I meant. As I read your claim, you say that for any 'f', Foldable f and Unfoldable f imply Traversable f.
03:06:31 <koz_> Did I misunderstand?
03:07:18 <dminuoso> Id say that holds true
03:07:21 <dminuoso> given what I just said
03:07:25 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
03:07:42 <BlackCapCoder> right, but we can freely convert from/to Foldr
03:07:51 <BlackCapCoder> tail = unfold . foldrTail . unfold
03:08:02 <BlackCapCoder> This is going through Foldr
03:08:39 <dminuoso> So in lens the idea is that a `Traversal s t a b` is handwavingly equivalent to a pair of functions `contents :: S -> A^n` and `fill :: S*B^n -> T`
03:08:56 <dminuoso> With some constraints on the n, namely that it must match the length of the container
03:09:26 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
03:09:32 <dminuoso> That justified van Laarhovens representation of `data FunList a b t = Done t | More a (FunList a b (b -> t))`
03:09:49 <dminuoso> BlackCapCoder: Does that make any sense?
03:10:26 × darjeeling_ quits (~darjeelin@115.215.41.204) (Ping timeout: 256 seconds)
03:10:40 adm_ joins (~adm@117.230.23.38)
03:11:05 <BlackCapCoder> It makes some sence
03:11:14 <BlackCapCoder> I never got into lens
03:11:33 <dminuoso> % :i Traversal
03:11:34 <yahb> dminuoso: type role ReifiedTraversal representational nominal representational nominal; type ReifiedTraversal :: * -> * -> * -> * -> *; newtype ReifiedTraversal s t a b = Traversal {...}; -- Defined in `Control.Lens.Reified'; type Traversal :: * -> * -> * -> * -> *; type Traversal s t a b = forall (f :: * -> *). Applicative f => (a -> f b) -> s -> f t; -- Defined in `Control.Lens.Type'
03:11:52 <dminuoso> So the term Traversal really is the same as a given traverse
03:11:55 <dminuoso> % :t traverse
03:11:56 <yahb> dminuoso: (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
03:12:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:12:07 <dminuoso> Almost
03:12:27 <dminuoso> Well not quite the same, but traverse is a valid Traversal
03:12:57 × revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Read error: Connection reset by peer)
03:13:07 revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net)
03:13:33 <dminuoso> So to say a structure is Traversable means there exists a canonical Traversal for it. IOWs we can pack it to a list, modify it it and fill it back
03:13:56 <dminuoso> And indeed, we can do
03:14:38 × adm_ quits (~adm@117.230.23.38) (Remote host closed the connection)
03:16:01 <dminuoso> % traverse %~ (+1) $ [1,2,3]
03:16:01 <yahb> dminuoso: [2,3,4]
03:16:04 <dminuoso> Doing just that
03:16:19 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
03:16:35 <dminuoso> % traverse.traverse %~ (+1) $ [[1,2,3],[10,20,30]]
03:16:35 <yahb> dminuoso: [[2,3,4],[11,21,31]]
03:16:47 <dminuoso> BlackCapCoder: Does that example help?
03:20:05 <BlackCapCoder> There's a functional perl that implements a zipper for any traversable. I think lens is like that
03:23:08 <BlackCapCoder> and that is indeed very similar to what I am doing with my Unfoldable
03:24:33 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
03:25:01 <dminuoso> BlackCapCoder: Mmm the relationship between zippers and traversals is not immediately obvious to me.
03:25:05 <dminuoso> What did you have in mind exactly?
03:26:14 <BlackCapCoder> http://okmij.org/ftp/continuations/zipper.html
03:26:22 <dminuoso> I understand what a zipper is
03:27:00 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
03:27:03 <dminuoso> I guess it makes sense when you think of a zipper as a suspended traversal
03:27:14 <BlackCapCoder> data FunList a b t = Done t | More a (FunList a b (b -> t))
03:27:19 <BlackCapCoder> data Zipper t a = ZDone (t a) | Z a (Maybe a -> Zipper t a)
03:27:27 × vg quits (~vg@139.59.59.230) (Quit: vg)
03:27:43 vg joins (~vg@139.59.59.230)
03:27:51 <dminuoso> BlackCapCoder: These types are subtly different here.
03:27:51 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
03:27:57 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
03:27:59 <dminuoso> Note that FunList is an irregular type?
03:28:08 vg joins (~vg@139.59.59.230)
03:28:50 <dminuoso> Although there is a striking resemblence.
03:29:06 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 272 seconds)
03:29:42 <BlackCapCoder> What do you mean by irregular?
03:29:59 <dminuoso> data FunList a b t = Done t | More a (FunList a b (b -> t))
03:30:08 <dminuoso> See how the third parameter changes at each depth?
03:31:36 falafel_ joins (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net)
03:33:17 <siraben> Is there a foldr/scanl fusion law?
03:33:18 <siraben> `bar l = foldr (\a b -> max (process a) b) 0 (scanl go (0, 0, head l, 0, Flat) (tail l))`
03:33:51 <BlackCapCoder> so we are building up a list by consing functions essentially
03:34:23 × falafel quits (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net) (Ping timeout: 256 seconds)
03:34:32 <dminuoso> BlackCapCoder: the length of the list defines the final function
03:34:41 <BlackCapCoder> got it
03:34:44 dopplergange joins (~dop@195.158.249.53)
03:35:06 lagothrix is now known as Guest5268
03:35:07 × Guest5268 quits (~lagothrix@unaffiliated/lagothrix) (Killed (card.freenode.net (Nickname regained by services)))
03:35:12 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
03:35:25 <dminuoso> let x1 = Done 'c'; x2 = More 'c' (Done toUpper); etc..
03:37:52 × theDon quits (~td@94.134.91.186) (Ping timeout: 260 seconds)
03:39:14 argent0 joins (~argent0@168.227.97.23)
03:39:34 theDon joins (~td@94.134.91.130)
03:41:40 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
03:42:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:42:57 <sshine> siraben, as in, if it can exist or if it's embedded in base?
03:43:56 <siraben> Found it, it's in "Algebra Identities for Program Calculation"
03:44:03 <siraben> sshine: I just forgot the law and hlint doesn't appear to suggest it
03:44:10 <siraben> Very useful law
03:44:30 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
03:46:48 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
03:48:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
03:48:27 × vg quits (~vg@139.59.59.230) (Quit: vg)
03:48:33 <siraben> HECK YES, after a long calculation, managed to derive the efficient linear time solution from the naive one
03:48:42 vg joins (~vg@139.59.59.230)
03:48:59 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
03:49:09 vg joins (~vg@139.59.59.230)
03:50:26 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:9189:9740:2cd9:fac9) (Ping timeout: 264 seconds)
03:51:13 zaquest joins (~notzaques@5.128.210.178)
03:51:55 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
03:51:56 <jle`> heck yeaaa
03:53:44 × bitmagie quits (~Thunderbi@200116b806cac600055ef8926da547c5.dip.versatel-1u1.de) (Quit: bitmagie)
03:54:27 × vg quits (~vg@139.59.59.230) (Quit: vg)
03:54:43 vg joins (~vg@139.59.59.230)
03:54:58 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
03:55:00 × howdoi quits (uid224@gateway/web/irccloud.com/x-ynxizjcdcvtgzlrl) (Quit: Connection closed for inactivity)
03:55:13 vg joins (~vg@139.59.59.230)
03:56:15 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
03:56:40 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
03:57:48 × Jonkimi727406120 quits (~Jonkimi@119.123.243.225) (Ping timeout: 260 seconds)
03:58:31 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
04:00:26 Rudd0 joins (~Rudd0@185.189.115.108)
04:00:27 × vg quits (~vg@139.59.59.230) (Quit: vg)
04:00:38 × joaj quits (~joaj@2001:818:e326:8200:9fc:6bde:c18a:1771) (Ping timeout: 264 seconds)
04:00:44 vg joins (~vg@139.59.59.230)
04:00:57 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:01:08 vg joins (~vg@139.59.59.230)
04:01:18 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:01:39 vg joins (~vg@139.59.59.230)
04:01:58 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
04:02:23 × srk quits (~sorki@gateway/tor-sasl/sorki) (Remote host closed the connection)
04:03:04 srk joins (~sorki@gateway/tor-sasl/sorki)
04:05:45 <siraben> note to self, useful theorems for program calculation: foldr/map fusion, Horner's rule, scanl/foldl fusion, scan lemmas, foldr -> foldl if binop is associative, and of course the usual list functor laws
04:07:02 × vg quits (~vg@139.59.59.230) (Quit: vg)
04:07:03 <siraben> Some of these are in hlint but only in one direction (e.g. map f . map g → map (f . g))
04:07:18 vg joins (~vg@139.59.59.230)
04:07:33 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:07:44 vg joins (~vg@139.59.59.230)
04:07:45 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
04:07:56 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:08:03 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
04:11:22 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
04:11:52 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:12:17 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
04:12:34 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
04:14:47 <iqubic> What's Horner's rule?
04:15:25 <iqubic> I know what a Horner form is for a polynomial, but I fail to see how that's useful here.
04:15:52 <koz_> siraben: In the case of that _particular_ rule, it's not commonly useful to 'un-fuse' versus 'fuse'.
04:15:58 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 272 seconds)
04:16:35 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
04:16:43 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
04:17:07 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
04:17:28 <iqubic> Yeah, going from "map (f . g)" to "map f . map g" isn't too useful.
04:17:42 <iqubic> Does this rule hold for all functors, if you switch to fmap?
04:17:47 conal joins (~conal@64.71.133.70)
04:18:02 <iqubic> Yes. This is a basic functor law.
04:18:25 <koz_> It's actually implied by parametricity from 'fmap id = id'.
04:18:33 EyalSK joins (~EyalSK@bzq-84-109-128-227.red.bezeqint.net)
04:18:39 × EyalSK quits (~EyalSK@bzq-84-109-128-227.red.bezeqint.net) (Remote host closed the connection)
04:18:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:18:59 <iqubic> Oh, is this one of the theorems for free type things?
04:20:37 plutoniix joins (~q@ppp-223-24-162-25.revip6.asianet.co.th)
04:22:12 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
04:22:44 × jchia quits (~jchia@58.32.35.67) (Read error: Connection reset by peer)
04:24:33 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
04:24:43 conal_ joins (~conal@107.181.166.176)
04:24:49 × conal quits (~conal@64.71.133.70) (Ping timeout: 264 seconds)
04:24:52 jchia joins (~jchia@58.32.35.67)
04:25:29 × rprije quits (~rprije@203.214.94.91) (Quit: Leaving)
04:25:31 Jonkimi727406120 joins (~Jonkimi@119.123.243.225)
04:26:33 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
04:26:37 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 272 seconds)
04:27:16 × falafel_ quits (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net) (Ping timeout: 240 seconds)
04:29:55 × Jonkimi727406120 quits (~Jonkimi@119.123.243.225) (Ping timeout: 246 seconds)
04:35:06 blankhart joins (~blankhart@c-71-232-98-152.hsd1.ma.comcast.net)
04:35:15 darjeeling_ joins (~darjeelin@112.16.171.8)
04:36:38 × iqubic quits (~user@2601:602:9500:4870:d783:bda7:f9aa:ba36) (Ping timeout: 264 seconds)
04:36:56 iqubic joins (~user@c-67-171-38-72.hsd1.wa.comcast.net)
04:42:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
04:46:05 × xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Remote host closed the connection)
04:46:42 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:46:58 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
04:50:48 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
04:53:29 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
04:54:48 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
04:56:54 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-awydjlcjvlqxqotf) ()
04:57:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
04:58:10 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
04:58:49 Jonkimi727406120 joins (~Jonkimi@119.123.243.225)
05:01:27 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Remote host closed the connection)
05:02:09 Stanley00 joins (~stanley00@unaffiliated/stanley00)
05:02:59 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
05:03:00 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
05:03:05 × Jonkimi727406120 quits (~Jonkimi@119.123.243.225) (Ping timeout: 240 seconds)
05:03:13 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
05:06:24 <siraben> iqubic: indeed
05:06:38 <siraben> theorems for free is a great paper, I read it recently
05:07:19 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 256 seconds)
05:08:25 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 240 seconds)
05:08:40 pfurla joins (~pfurla@216.151.180.165)
05:09:43 ezzieyguywuf joins (~Unknown@unaffiliated/ezzieyguywuf)
05:10:28 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
05:10:29 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
05:10:33 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
05:11:01 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
05:13:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:16:03 × livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds)
05:18:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
05:19:50 tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net)
05:21:16 × blankhart quits (~blankhart@c-71-232-98-152.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
05:23:11 falafel_ joins (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net)
05:24:10 elliott_ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
05:25:55 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
05:27:51 <glguy> If you're doing AoC this year in Haskell, jump on the leaderboard in the topic, and join us in ##adentofcode to compare notes
05:28:08 <glguy> (of course haskell aoc questions are still welcome here)
05:31:31 Lycurgus joins (~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
05:36:05 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds)
05:37:55 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
05:38:51 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
05:40:01 doct0rhu[m] joins (doct0rhumo@gateway/shell/matrix.org/x-aytbanrbppvolhap)
05:41:06 × argent0 quits (~argent0@168.227.97.23) (Remote host closed the connection)
05:41:33 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Ping timeout: 260 seconds)
05:42:49 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
05:45:04 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
05:45:27 <siraben> Ooh
05:45:39 <siraben> glguy: adentofcode or adventofcode?
05:46:01 <aoei> probably adventofcode lol
05:46:06 <glguy> Advent
05:47:36 sord937 joins (~sord937@gateway/tor-sasl/sord937)
05:47:40 <koz_> Yep, it's full on AoC fever round here.
05:47:53 <aoei> well its #haskell on freenode
05:47:56 <aoei> what do you expect :D
05:47:59 <koz_> Sometimes, I think I'm the only one _not_ participating. :P
05:48:24 <aoei> i haven't commited anything to code yet but ive been participating by trying to work out a solution to day 1 part 1 that isn't O(n^2)
05:48:27 <dsal> Thank you for being an exception to the rule.
05:48:34 <aoei> plus i did also sign up
05:48:36 <aoei> so
05:48:38 <aoei> there's that
05:48:39 <glguy> Yes, the only one. We just need you to join for 100% participation
05:48:45 <aoei> glguy: XD
05:48:46 <koz_> glguy: Not gonna happen, sorry.
05:49:05 <glguy> Ok, then I guess we change the denominator
05:49:22 <glguy> :nod: time to misuse my op powers
05:49:28 <koz_> Lol.
05:49:43 <dsal> I always spend too much time trying to write a parser or something to do the puzzles. I'll eventually get better at megaparsec.
05:50:36 <koz_> dsal: Megaparsec parsers (and parser combinators in general) in my experience go something like this: 5 minutes to write, 5 hours to debug.
05:50:43 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving)
05:50:58 <dminuoso> *parsers
05:50:58 <dsal> heh. There are always edge cases I don't quite get.
05:51:20 <dminuoso> Ever tried debugging a bison parser?
05:51:22 <koz_> dminuoso: ... I spelled it correctly?
05:51:28 <dminuoso> koz_: No that was not the joke.
05:51:31 <koz_> dminuoso: No, because I value braincells and don't use C.
05:51:38 <dminuoso> The problem is not C.
05:51:40 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
05:51:54 <dminuoso> Im not quite sure why, but it seems debugging parsers in general is complicated.
05:51:58 <koz_> dminuoso: I still value braincells, and if you're _not_ using C, why use bison?
05:52:11 <koz_> Like, 100% there are better options in other languages, surely.
05:52:22 <dminuoso> Im sure happy has similar problems
05:52:23 × plutoniix quits (~q@ppp-223-24-162-25.revip6.asianet.co.th) (Quit: Leaving)
05:52:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:52:50 <koz_> dminuoso: I've never tried happy or alex, mostly because I don't think it's easier than using {mega,atto,whatever}parsec.
05:52:54 <koz_> (or faster for that matter)
05:53:17 <glguy> Happy and Alex are worth learning
05:53:34 <koz_> Also, I just realized the 'mega-' and 'atto-' prefix both indicate multiples, but one's really big, and the other really small.
05:53:34 Jonkimi727406120 joins (~Jonkimi@119.123.243.225)
05:53:44 <koz_> glguy: Why do you reckon?
05:53:52 <int-e> koz_: maybe if you spent more time writing them you wouldn't spend so much time debugging them? :)
05:54:03 <koz_> int-e: Yeah, but I can only type so slow. :P
05:54:08 <glguy> You do get a faster parser, and you get a much more recognizable grammar
05:54:09 inja joins (~inja@pd9f82e18.dip0.t-ipconnect.de)
05:54:15 <dminuoso> koz_: LALR parser generators tend to perform rather well, and they give you static analyzability like shift/reduce conflicts
05:54:16 <koz_> Maybe if I was like Axman6?
05:54:20 <dminuoso> But that comes at the cost of diagnostics
05:54:34 <glguy> Parser combinators make it too easy to make a mess of things
05:54:38 <dminuoso> Happy generates blazing fast parsers. GHC is a prominent example why
05:54:46 <int-e> AoC is starting out with really easy problems this year
05:54:46 <koz_> dminuoso: Diagnostics means 'errors'?
05:54:49 <dminuoso> koz_: Yeah
05:55:00 <glguy> And you still have to rearrange your grammar to fit in them
05:55:01 <koz_> Are *parsec parsers better in this regard?
05:55:02 <dminuoso> If the parser chokes on grammar, LALR parsers tend to give horrible errors
05:55:14 <dminuoso> *choke on input
05:55:48 <dminuoso> glguy: Indeed. With parser combinators you (should) end up writing something that loosely resembles BNF anyway
05:55:48 <glguy> You can add error productions to help
05:57:05 × elliott_ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 240 seconds)
05:57:51 doct0rhu joins (~orctarorg@pool-72-88-158-154.nwrknj.fios.verizon.net)
05:59:57 <dminuoso> Btw, when I write `f "foo"` where f is an external library and has type `f :: ByteString -> T`, then with OverloadedStrings this compiles even if bytestring is not in my build-depends
06:00:13 <dminuoso> That seems strange, I keep expecting this should fail. Why doesn't it?
06:02:09 <dolio> Because IsString is from base, and the instance is in scope from any module that transitively depends on the one that defines the ByteString instance.
06:02:20 <koz_> I guess it's because it treats "foo" as having type IsString s => s, and given that f's type forces it to ByteString, and that fits.... dolio ninja'd me.
06:03:18 remby joins (~remby@2607:fea8:2c40:307::18d9)
06:03:26 <remby> is there a book for haskell like sicp?
06:04:46 <koz_> remby: There are several, but I don't think any of them are specifically aiming at the same space SICP is.
06:05:09 <koz_> . o O (Structure and Interpretation of Haskell Programs - SIHP?)
06:05:28 <koz_> (SIFP maybe?)
06:05:40 <jle`> Structure and Interpretation of Matlab Programs = ?
06:06:02 <jle`> or i guess i should have used Miranda since this is a Haskell channel
06:06:08 × BlackCapCoder quits (~blackcap@48.80-203-23.nextgentel.com) (Ping timeout: 260 seconds)
06:06:18 <koz_> jle`: ROFLLLLLL
06:06:24 <koz_> That's topos-level humour.
06:07:56 <topos> i approve
06:08:27 <int-e> Structure and Interpretation of Low-Level Yak
06:08:52 <dminuoso> dolio: Ah. That is somewhat unfortunate.
06:08:52 <koz_> :D
06:09:02 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:d83e:9e9c:25a6:e9a5) (Ping timeout: 264 seconds)
06:09:19 <koz_> topos: If your first book doesn't have a similar initialism, I will be disappoint.
06:09:33 <doct0rhu> Hi I have a question about `haddock`. Is it possible to document private items?
06:09:50 × mounty quits (~mounty@2001:8000:2f59:0:c056:3de3:d9b3:22a8) (Quit: Konversation terminated!)
06:10:53 × remby quits (~remby@2607:fea8:2c40:307::18d9) (Quit: remby)
06:12:13 × d_ed1 quits (~d_ed@185.163.110.116) (Ping timeout: 264 seconds)
06:13:41 <int-e> doct0rhu: does the `ignore-exports` attribute do what you want? https://www.haskell.org/haddock/doc/html/module-attributes.html
06:14:16 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 240 seconds)
06:14:38 <doct0rhu> I've found this attribute. But is it possible to use this as a CLI flag?
06:15:19 <int-e> there's --ignore-all-exports
06:15:25 <doct0rhu> `cabal new-haddock --haddock-all` only build public items. `--haddock-internal` crashes..
06:16:08 Tario joins (~Tario@201.192.165.173)
06:16:28 <int-e> (that's a haddock option, should be --haddock-option=--ignore-all-exports for cabal)
06:16:31 hekkaidekapus_ is now known as hekkaidekapus
06:16:55 <doct0rhu> let me see
06:17:19 guest122 joins (~user@49.5.6.87)
06:17:42 <doct0rhu> > cabal: renderBuildTargetProblem: unexpected status (TargetDisabledByUser,Nothing)
06:17:42 <doct0rhu> CallStack (from HasCallStack):
06:17:42 <doct0rhu> error, called at ./Distribution/Client/CmdErrorMessages.hs:331:14 in main:Distribution.Client.CmdErrorMessages
06:17:44 <lambdabot> error: Variable not in scope: cabalerror:
06:17:44 <lambdabot> Variable not in scope: renderBuildTargetProblemerror:
06:17:44 <lambdabot> Variable not in scope: unexpected :: t0 -> (a1, Maybe a0) -> [a]error:
06:18:39 <int-e> @where paste
06:18:39 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
06:18:51 <doct0rhu> That's the same error I saw when I `cabal new-haddock --haddock-internal`
06:19:24 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
06:19:38 Tario joins (~Tario@201.192.165.173)
06:19:57 <doct0rhu> https://paste.tomsmeding.com/uKGkFjPc
06:20:25 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
06:20:31 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
06:20:37 ericsagn1 joins (~ericsagne@2405:6580:0:5100:5edc:6c03:7218:210e)
06:21:22 × inja quits (~inja@pd9f82e18.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
06:21:22 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
06:22:54 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
06:23:03 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Ping timeout: 260 seconds)
06:23:11 <int-e> Ah I missed --haddock-internal. That error though...
06:23:30 <doct0rhu> I've also tried `stack build <my package> --haddock --haddock-arguments=--ignore-all-exports --open`
06:23:42 <int-e> does new-haddock by itself work?
06:23:42 <doct0rhu> that doesn't build any doc..
06:24:01 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:24:38 <doct0rhu> well.. new-haddock alone also panics with same error
06:24:48 <doct0rhu> only new-haddock --haddock-all works
06:25:02 × texasmynsted quits (~texasmyns@212.102.45.123) (Remote host closed the connection)
06:25:12 <int-e> let me guess, it's an executable... so you need --haddock-executables ?
06:25:34 <int-e> And then --haddock-internal as well to get the internal symbols
06:25:56 <doct0rhu> FYI, I've 2 executables. So --haddock-executables and --haddock-all both work
06:26:10 <int-e> (--haddock-all implies --haddock-executables)
06:26:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
06:26:57 <int-e> But the "all" refers to targets (executables, benchmarks, testsuites), not to symbols; it doesn't imply --haddock-internal.
06:28:05 <doct0rhu> you're right, but `--haddock-all --haddock-internal` crashes too
06:28:18 <doct0rhu> `--haddock-executables --haddock-internal` worked just now, but no internal items
06:28:31 <doct0rhu> now i'm trying to add that ignore-all-exports too
06:28:37 <doct0rhu> it's building now
06:28:59 shinobi__ joins (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net)
06:29:34 JohninLex joins (~JohninLex@185.204.1.185)
06:29:56 <doct0rhu> oh finally that worked..
06:30:15 <int-e> The crashes are bugs, of course (maybe fixed in a newer version of cabal-install?)
06:30:31 <doct0rhu> I actually have global ghc-options `--haddock` set in my stack config but it never worked.. now I figured out why
06:30:36 × vicfred quits (~vicfred@unaffiliated/vicfred) (Remote host closed the connection)
06:31:46 × shinobi_ quits (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) (Ping timeout: 240 seconds)
06:31:54 <doct0rhu> is it possible to have stack build it then..
06:32:29 vicfred joins (~vicfred@unaffiliated/vicfred)
06:32:41 <doct0rhu> what `stack haddock` did is building docs for all my dependencies except my own package..
06:33:06 × vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded)
06:36:07 × dave_uy quits (~david@108.61.193.26) (Quit: The Lounge - https://thelounge.chat)
06:38:01 Iceland_jack joins (~user@31.124.48.169)
06:38:32 dave_uy joins (~david@108.61.193.26)
06:42:01 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
06:43:33 Sose joins (~sose@2a01:4f9:c010:e5da::1)
06:45:53 Buggys joins (buggy@charger.kire.net)
06:46:07 Buggys parts (buggy@charger.kire.net) ("Textual IRC Client: www.textualapp.com")
06:47:24 Buggys joins (buggy@charger.kire.net)
06:52:27 × doct0rhu quits (~orctarorg@pool-72-88-158-154.nwrknj.fios.verizon.net) (Quit: Leaving)
06:53:38 × Lycurgus quits (~niemand@cpe-45-46-137-210.buffalo.res.rr.com) (Quit: Exeunt)
06:54:04 × conal_ quits (~conal@107.181.166.176) (Quit: Computer has gone to sleep.)
06:54:05 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Quit: leaving)
06:55:32 BlackCapCoder joins (~blackcap@48.80-203-23.nextgentel.com)
06:56:41 × Jonkimi727406120 quits (~Jonkimi@119.123.243.225) (Ping timeout: 256 seconds)
06:59:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:59:29 × Younder quits (~john@33.51-174-155.customer.lyse.net) (Quit: Leaving)
07:03:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
07:07:25 ggole joins (~ggole@2001:8003:8119:7200:485d:ac18:c2cb:d77f)
07:10:21 Jonkimi727406120 joins (~Jonkimi@119.123.243.225)
07:11:11 julm joins (~julm@revolt129.abo.ilico.org)
07:11:30 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
07:12:49 adm_ joins (~adm@117.208.22.42)
07:13:41 shinobi joins (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net)
07:15:57 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
07:16:52 × shinobi__ quits (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) (Ping timeout: 256 seconds)
07:17:06 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Connection closed)
07:17:28 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
07:20:16 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds)
07:23:31 jespada joins (~jespada@90.254.245.49)
07:24:02 toorevitimirp joins (~tooreviti@117.182.183.16)
07:27:29 adm__ joins (~adm@117.208.22.42)
07:28:14 × xff0x quits (~fox@2001:1a81:5348:9f00:6dc0:7df:3cf:92d4) (Remote host closed the connection)
07:28:30 alp joins (~alp@2a01:e0a:58b:4920:6494:ebf2:fc26:3786)
07:28:32 xff0x joins (~fox@2001:1a81:5348:9f00:4aad:b7c8:6288:cb49)
07:29:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:30:49 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 264 seconds)
07:31:09 inja joins (~inja@pd9f82e18.dip0.t-ipconnect.de)
07:31:17 Mathmoose joins (~mathias@31-208-78-204.cust.bredband2.com)
07:32:45 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
07:32:45 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Client Quit)
07:33:08 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
07:34:16 hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
07:37:20 <carbolymer> well, realworldhaskell domain expired and the book is gone: https://book.realworldhaskell.org/ :/
07:37:35 funkatronixxx joins (~funkatron@2001:981:f73:1:b048:68d2:a9f5:c605)
07:38:35 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
07:38:49 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
07:39:33 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
07:42:48 × Lord_of_Life quits (~Lord@46.217.220.157) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine)
07:43:54 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Client Quit)
07:44:36 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
07:44:42 × ziman quits (~ziman@c25-5.condornet.sk) (Ping timeout: 256 seconds)
07:45:08 <int-e> carbolymer: nah, the domain is fine. http://book.realworldhaskell.org/ works. the SSL certificate is broken though
07:45:11 Lord_of_Life joins (~Lord@46.217.220.157)
07:46:04 ziman joins (~ziman@c25-5.condornet.sk)
07:46:05 <carbolymer> int-e, it wasn't a 10 mins ago
07:46:37 <carbolymer> int-e, oh, someone has borked http server configuration
07:46:43 <carbolymer> int-e, click on link I've posted
07:47:28 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
07:48:36 × jollygood2 quits (~bc8165ab@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
07:49:02 <boxscape> but the book is still gone?
07:49:41 <int-e> http works.
07:49:46 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
07:50:05 <boxscape> yeah but http://book.realworldhaskell.org/read 404s
07:50:46 <int-e> no
07:50:56 <boxscape> huh
07:50:57 <int-e> are you sure the browser isn't automatically switching to https
07:51:02 <boxscape> ohh it is
07:51:22 <boxscape> why does it direct me to red bean software
07:51:26 <int-e> (which I agree is broken)
07:51:31 <int-e> because they host that contents
07:51:32 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
07:51:35 <boxscape> I see
07:52:05 <int-e> book.realworldhaskell.org. 86400 IN CNAME www.red-bean.com.
07:53:08 <int-e> all the links I've found are http, so presumably https never worked.
07:53:44 <int-e> Which is a bit of a pity these days, of course.
07:56:36 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
07:56:51 coot joins (~coot@37.30.53.191.nat.umts.dynamic.t-mobile.pl)
08:01:22 knupfer joins (~Thunderbi@200116b82c334300a5d4e0f98230f991.dip.versatel-1u1.de)
08:01:25 <boxscape> I guess the real problem then is that the server accepts https connections at all?
08:01:37 adm___ joins (~adm@117.208.22.42)
08:01:41 <boxscape> otherwise firefox wouldn't redirect to https
08:02:50 × adm__ quits (~adm@117.208.22.42) (Ping timeout: 256 seconds)
08:03:13 <int-e> boxscape: why wouldn't it accept https connections? on that level it can't distinguish whether it's for its main website, www.red-bean.com, or for the second class citizen that is book.realworldhaskell.org
08:03:55 <boxscape> ah, I didn't know you can't control that on a domain level
08:04:27 <opqdonut> well the https port is open on that IP
08:04:28 plakband joins (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net)
08:04:32 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:04:36 <int-e> Yeah the DNS only resolves names to IP addresses, it doesn't care about ports.
08:04:38 <opqdonut> there's no domains or urls when the TCP SYN gets done
08:04:52 <boxscape> that makes sense
08:08:44 vg joins (~vg@139.59.59.230)
08:08:59 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
08:09:02 × pavonia quits (~user@unaffiliated/siracusa) (Read error: Connection reset by peer)
08:09:13 vg joins (~vg@139.59.59.230)
08:10:19 × whald quits (~trem@2a02:810a:8100:11a6:6dd2:b8f3:b9d4:9820) (Remote host closed the connection)
08:10:26 <plakband> I have a library with two modules (both exposed), but cabal new-repl only imports 1 at startup for some reason. I can manually import it, but I need it to load both at startup for ghcid. Anybody here know how to make it load all modules?
08:11:11 adm_ joins (~adm@117.208.22.42)
08:11:12 adm__ joins (~adm@117.208.22.42)
08:13:20 × mbomba quits (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca) (Quit: WeeChat 3.0)
08:13:39 <iqubic> May I just say that the Haskell LSP is the best thing ever.
08:14:19 × inja quits (~inja@pd9f82e18.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
08:14:28 × adm___ quits (~adm@117.208.22.42) (Ping timeout: 260 seconds)
08:14:29 × vg quits (~vg@139.59.59.230) (Quit: vg)
08:15:14 vg joins (~vg@139.59.59.230)
08:16:00 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 272 seconds)
08:16:24 jollygood2 joins (~bc8165ab@217.29.117.252)
08:16:53 <int-e> boxscape: FWIW I'm not sure about whether the book is intended to be "second class" like this... it may just be an oversight by the admins.
08:17:21 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
08:17:22 × knupfer quits (~Thunderbi@200116b82c334300a5d4e0f98230f991.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
08:17:33 <boxscape> to be fair any website that doesn't support https deserves to be second class ;)
08:17:46 <boxscape> unless
08:17:50 <boxscape> is that also the admins' fault?
08:18:34 pavonia joins (~user@unaffiliated/siracusa)
08:18:38 knupfer joins (~Thunderbi@i59F7FFB7.versanet.de)
08:19:05 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
08:19:41 inja joins (~inja@pd9f82e18.dip0.t-ipconnect.de)
08:19:51 Varis joins (~Tadas@unaffiliated/varis)
08:27:40 contiver_ joins (~contiver@84-115-64-113.wifi.dynamic.surfer.at)
08:27:54 <int-e> boxscape: Well it's up to the web server and the management of the server certificate... so all in the admin's power. But somebody has to tweak the right knobs and test the result. And looking at red-bean this looks like a small community hobby project.
08:29:53 <boxscape> hm, yeah
08:30:54 sreudianflip joins (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7)
08:31:22 <tomsmeding> plakband: 'cabal new-repl' without further arguments does that? that is very strange, is there a reproducing example you can share?
08:33:03 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
08:34:14 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
08:34:52 <int-e> confusingly, www.realworldhaskell.org (which was hosted elsewhere by one of the authors) *is* gone.
08:36:22 Amras joins (~Amras@unaffiliated/amras)
08:38:44 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
08:39:13 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
08:39:27 × sreudianflip quits (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:41:10 sreudianflip joins (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7)
08:42:30 × adm__ quits (~adm@117.208.22.42) (Ping timeout: 256 seconds)
08:42:48 <plakband> tomsmeding: https://github.com/jonascarpay/cabal-new-repl-example
08:43:04 ph88_ joins (~ph88@2a02:8109:9e00:7e5c:51c4:aed6:17c7:3978)
08:44:59 <tomsmeding> oh, right, only _imports_ one module. Why do you need both for ghcid? ghcid works for me even if not all modules get imported, because all _do_ get compiled
08:44:59 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
08:45:04 <tomsmeding> plakband: ^
08:45:19 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
08:45:21 DavidEichmann joins (~david@62.110.198.146.dyn.plus.net)
08:46:50 <tomsmeding> plakband: in particular, if I run ghcid in a clone of your repo, warnings in both modules show up in ghcid
08:47:03 miguel_clean joins (~Miguel@89-72-187-203.dynamic.chello.pl)
08:47:11 <plakband> tomsmeding: because --test=expr only works with imported modules
08:47:12 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
08:47:25 × sreudianflip quits (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:47:56 <plakband> it's not a huge deal, but it feels kinda dumb
08:48:13 <plakband> I need to reorder my modules based on what test I want to run
08:48:21 adm_ joins (~adm@117.208.22.42)
08:48:34 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
08:50:29 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
08:50:31 <tomsmeding> plakband: and passing the wanted module name to ghcid doesn't work?
08:50:46 <tomsmeding> also I can't seem to make --test work at all, but that's probably just my unfamiliarity with ghcid
08:52:12 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
08:52:20 <tomsmeding> oh I see, I indeed get the behaviour you describe
08:52:56 <plakband> tomsmeding: afaict not, it only seems to accept actual components..
08:54:43 <tomsmeding> plakband: what seems to work for me is pass the names of all modules as command-line parameters, with the one you want imported (containing your test function) listed first
08:55:30 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
08:55:38 <plakband> tomsmeding: oh hey, how did I miss that.. thanks, that'll do!
08:55:50 adm__ joins (~adm@117.208.22.42)
08:55:53 nik0 joins (~niko@freenode/staff/ubuntu.member.niko)
08:56:04 <tomsmeding> awesome :)
08:56:27 <tomsmeding> (listing all modules seems to be necessary to load them all)
08:56:32 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
08:58:19 × alp quits (~alp@2a01:e0a:58b:4920:6494:ebf2:fc26:3786) (Ping timeout: 272 seconds)
08:58:56 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.161.165) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:59:04 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 272 seconds)
08:59:25 × knupfer quits (~Thunderbi@i59F7FFB7.versanet.de) (Ping timeout: 246 seconds)
08:59:36 × niko quits (~niko@freenode/staff/ubuntu.member.niko) (Ping timeout: 600 seconds)
09:01:49 Aquazi joins (uid312403@gateway/web/irccloud.com/x-zwjlkmtgfeptdpkc)
09:01:58 oish joins (~charlie@228.25.169.217.in-addr.arpa)
09:02:11 <plakband> tomsmeding: hmmm looks like I celebrated too early, it does still get picked up in the order specified in the cabal file on my end. Does swapping them change the imported module for you?
09:02:19 sreudianflip joins (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7)
09:02:47 <tomsmeding> it did for me, but I tried it on an executable; perhaps it's different for a library, let's see
09:03:00 × bliminse quits (~bliminse@host86-134-63-68.range86-134.btcentralplus.com) (Quit: leaving)
09:03:09 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
09:03:43 solonarv joins (~solonarv@anancy-651-1-197-136.w109-217.abo.wanadoo.fr)
09:03:56 × contiver_ quits (~contiver@84-115-64-113.wifi.dynamic.surfer.at) (Ping timeout: 240 seconds)
09:04:43 borne joins (~fritjof@200116b864cc28008cdf581d4c1cc02f.dip.versatel-1u1.de)
09:04:45 × darjeeling_ quits (~darjeelin@112.16.171.8) (Ping timeout: 256 seconds)
09:04:48 <tomsmeding> plakband: yes I put 'a :: Int; a = 1' in Module1.hs and 'b :: Int; b = 2' in Module2.hs, and 'ghcid --test a' works, 'ghcid --test b' does not, but 'ghcid Module2 Module1 --test b' does work for me
09:05:02 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:06:26 <tomsmeding> plakband: try 'ghcid --test yourthing --setup ":l YourModule"'
09:06:42 bliminse joins (~bliminse@host86-134-63-68.range86-134.btcentralplus.com)
09:06:43 <tomsmeding> that seems like the correct way to do this, lesson: RTFM :)
09:07:11 <tomsmeding> (penultimate faq item on https://github.com/ndmitchell/ghcid)
09:09:05 kritzefitz joins (~kritzefit@p2e5a5f99.dip0.t-ipconnect.de)
09:09:44 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
09:09:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
09:09:59 kuribas joins (~user@ptr-25vy0i9ut9m296caj2d.18120a2.ip6.access.telenet.be)
09:10:29 × vg quits (~vg@139.59.59.230) (Quit: vg)
09:10:30 Franciman joins (~francesco@host-212-171-88-43.pool212171.interbusiness.it)
09:10:44 vg joins (~vg@139.59.59.230)
09:11:04 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
09:11:13 whatisRT joins (~whatisRT@2002:5b41:6a33:0:c1d9:9eec:f1:1d14)
09:11:35 zatwai joins (~zatwai@80.211.175.241)
09:11:58 vg joins (~vg@139.59.59.230)
09:12:09 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
09:12:15 <plakband> tomsmeding: Even better, Module.test works fine. Definitely should've R'd the FM. Thanks again!
09:12:20 contiver_ joins (~contiver@84-115-65-109.wifi.dynamic.surfer.at)
09:12:25 vg joins (~vg@139.59.59.230)
09:12:42 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
09:12:55 vg joins (~vg@139.59.59.230)
09:12:55 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
09:13:12 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
09:15:34 sh9 joins (~sh9@softbank060116136158.bbtec.net)
09:16:37 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-rqemnoiqazmaxvua) (Quit: Connection closed for inactivity)
09:17:00 × kritzefitz quits (~kritzefit@p2e5a5f99.dip0.t-ipconnect.de) (Ping timeout: 256 seconds)
09:17:18 kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49)
09:17:24 × sreudianflip quits (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:18:31 × Lord_of_Life quits (~Lord@46.217.220.157) (Changing host)
09:18:31 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
09:18:56 × funkatronixxx quits (~funkatron@2001:981:f73:1:b048:68d2:a9f5:c605) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:20:28 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:23:01 day joins (~Unknown@unaffiliated/day)
09:24:52 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
09:28:22 × Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving)
09:29:07 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
09:31:02 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
09:31:28 × brown121407 quits (~brown1214@fsf/member/brown121407) (Ping timeout: 260 seconds)
09:31:56 sreudianflip joins (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7)
09:32:02 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:32:05 thc202 joins (~thc202@unaffiliated/thc202)
09:34:01 × toorevitimirp quits (~tooreviti@117.182.183.16) (Remote host closed the connection)
09:34:27 toorevitimirp joins (~tooreviti@117.182.183.16)
09:38:50 shangxiao joins (~davids@101.181.159.140)
09:38:56 adm_ joins (~adm@117.208.22.42)
09:40:14 __monty__ joins (~toonn@unaffiliated/toonn)
09:40:54 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
09:41:13 × jonn quits (~sweater@206.81.18.26) (Quit: WeeChat 2.8)
09:42:09 × adm__ quits (~adm@117.208.22.42) (Ping timeout: 256 seconds)
09:42:13 plutoniix joins (~q@ppp-223-24-162-25.revip6.asianet.co.th)
09:43:48 Lonias joins (58c54083@88.197.64.131)
09:44:06 alp joins (~alp@2a01:e0a:58b:4920:6494:ebf2:fc26:3786)
09:44:46 × contiver_ quits (~contiver@84-115-65-109.wifi.dynamic.surfer.at) (Ping timeout: 256 seconds)
09:45:49 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
09:46:27 × a3f quits (~a3f@chimeria.ext.pengutronix.de) (Ping timeout: 272 seconds)
09:49:18 × Iceland_jack quits (~user@31.124.48.169) (Ping timeout: 256 seconds)
09:49:19 × sreudianflip quits (~textual@2a02:c7f:677:da00:61e2:aa76:22fc:3cd7) (Quit: Textual IRC Client: www.textualapp.com)
09:49:53 ubert joins (~Thunderbi@p200300ecdf1e533ee6b318fffe838f33.dip0.t-ipconnect.de)
09:53:31 watt799 joins (~watt799@124.123.106.149)
09:54:08 × Xnuk quits (~xnuk@45.76.202.58) (Quit: ZNC - https://znc.in)
09:54:14 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
09:54:23 Xnuk joins (~xnuk@vultr.xnu.kr)
09:55:35 niko joins (~niko@freenode/staff/ubuntu.member.niko)
09:56:55 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
09:57:45 × nik0 quits (~niko@freenode/staff/ubuntu.member.niko) (Ping timeout: 260 seconds)
09:58:48 × niko quits (~niko@freenode/staff/ubuntu.member.niko) (Client Quit)
09:59:24 joaoh82 joins (~joaoh82@157-131-134-210.dedicated.static.sonic.net)
09:59:50 berberman_ joins (~berberman@unaffiliated/berberman)
10:00:05 darjeeling_ joins (~darjeelin@115.215.41.204)
10:01:01 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
10:01:37 niko joins (~niko@freenode/staff/ubuntu.member.niko)
10:02:32 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
10:02:56 CMCDragonkai2 joins (~Thunderbi@124.19.3.250)
10:05:52 graf_blutwurst joins (~user@2001:171b:226e:adc0:5d47:81b7:1f45:39a6)
10:07:33 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds)
10:09:52 xiinotulp joins (~q@ppp-27-55-79-72.revip3.asianet.co.th)
10:13:10 oish joins (~charlie@228.25.169.217.in-addr.arpa)
10:13:19 × plutoniix quits (~q@ppp-223-24-162-25.revip6.asianet.co.th) (Ping timeout: 256 seconds)
10:15:01 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 246 seconds)
10:15:38 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
10:18:02 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:c1d9:9eec:f1:1d14) (Quit: ZNC 1.7.5 - https://znc.in)
10:18:10 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 246 seconds)
10:18:20 × nados quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving)
10:18:56 adm__ joins (~adm@117.208.22.42)
10:19:12 mbomba joins (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca)
10:19:31 fendor joins (~fendor@178.165.131.152.wireless.dyn.drei.com)
10:20:07 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 256 seconds)
10:20:40 danza joins (~francesco@151.74.103.112)
10:21:57 <merijn> Man...megaparsec haddocks are a mess
10:25:45 × guest122 quits (~user@49.5.6.87) (Remote host closed the connection)
10:26:04 son0p joins (~son0p@181.58.39.182)
10:26:23 atralheaven joins (~atralheav@37.48.90.208)
10:29:17 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
10:29:47 <atralheaven> Hi, I watched this talk recently (https://www.youtube.com/watch?v=03mUs5NlT6U) it's about "correct by construction" software, I couldn't thought of something like this even in my dreams, I really liked the idea.
10:30:49 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 264 seconds)
10:31:33 <atralheaven> The thing is, I'm not familiar with the technical stuff, I know nothing about them, but it looked like something that haskell might be able to do, although I also know nothing about haskell
10:33:36 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
10:35:09 <tdammers> atralheaven: "correct by construction" is always going to be a relative/partial effort, but for reasonable degrees of it, Haskell is an excellent tool
10:35:09 <atralheaven> so I wanted to ask, does haskell support something like this? that thing is so good that if I can have that in haskell, I will learn haskell with all the category theory and monads and monoids for it
10:36:04 <tdammers> also, you absolutely do not need to learn any category theory for haskell
10:36:36 <atralheaven> that's really good
10:36:47 <tdammers> an informal grasp of set theory may be helpful for reasoning about types, but even that isn't strictly required
10:36:50 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
10:37:07 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
10:37:17 <atralheaven> can I know specifically which parts of my code can be CbC and which parts can go wrong?
10:37:35 <tdammers> generally mostly yes, though there are a few subtleties
10:37:58 <__monty__> Is there a hackage url I can browse to that will either land me on a package page or search results? Currently I can either search then click or try a package url then click "search instead" if it doesn't exist.
10:38:45 shatriff joins (~vitaliish@176.52.219.10)
10:38:59 <tdammers> a big caveat (though it doesn't actually matter a lot in practice) is that there are "backdoors" for bypassing type safety and purity, and that there's this thing called "bottom"
10:39:16 <__monty__> merijn: What makes them hard to read for me is many of the useful combinators come from other more general libraries. Nice conceptually but makes discovery hard if you don't know about them yet.
10:39:24 <atralheaven> tdammers: great, should I use a tool or library with haskell for it or it's just how haskell is?
10:39:36 <merijn> __monty__: The organisation is a mess
10:39:39 <tdammers> it's a way of writing code more than anything
10:39:42 <merijn> __monty__: No logical grouping
10:40:10 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
10:40:13 × Jonkimi727406120 quits (~Jonkimi@119.123.243.225) (Ping timeout: 260 seconds)
10:40:26 <tdammers> the most important feature to help you with "correct by construction" in Haskell is the type system, which allows you to narrow down the things a function can accept and produce
10:40:43 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
10:41:05 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
10:41:43 <tdammers> e.g., if you write a function that is typed as Int -> String, then the compiler will make sure that this function 1) will only ever be fed integers as inputs, 2) can only ever produce strings as its output, and 3) cannot have any side effects, such as touching the file system, making network requests, manipulating mutable variables, or introducing randomness
10:42:56 <tdammers> trying to call such a function with an argument that isn't an Int is a compiler error. implementing its body such that it tries to do things with the argument that cannot be done on integers is a compiler error. trying to make it return something that isn't a String (including Nothing, a rough equivalent of NULL in other languages) is a compiler error. etc.
10:43:16 <merijn> ffs
10:43:19 <tdammers> so the "correct by construction" approach in Haskell boils down to designing your functions and data structures such that they can only represent "valid" or "desirable" states
10:43:25 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
10:43:49 merijn resets the "It has been N days since I was screwed over by Map having the wrong Monoid instance"-counter back to 0
10:44:00 <atralheaven> I do prefer compiler errors to runtime errors
10:44:01 <merijn> A pox upon the house of whoever decided on the current monoid
10:44:40 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.161.165)
10:45:26 <atralheaven> do you know a good video course for haskell? right now I'm familiar with python and elixir
10:45:28 <tdammers> atralheaven: preaching to the choir :D
10:46:50 adm_ joins (~adm@117.208.22.42)
10:47:15 × alp quits (~alp@2a01:e0a:58b:4920:6494:ebf2:fc26:3786) (Ping timeout: 272 seconds)
10:47:33 <AWizzArd> Emacs users: is there a code formatter that will format a marked region vs the whole file?
10:47:34 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 246 seconds)
10:49:35 × adm__ quits (~adm@117.208.22.42) (Ping timeout: 256 seconds)
10:50:22 × Franciman quits (~francesco@host-212-171-88-43.pool212171.interbusiness.it) (Quit: Leaving)
10:51:04 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 246 seconds)
10:52:48 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
10:54:14 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
10:57:09 <tomsmeding> merijn: what did you want <> to do? unionWith (<>) ?
10:57:26 <merijn> tomsmeding: Obviously >.>
10:57:41 <merijn> That's so *infinitely* more useful then this nonsense
10:57:58 <tomsmeding> isn't the current behaviour unionWith (flip const)?
10:58:18 <merijn> It keeps the left most one, so it's just "unionWith const"
10:58:24 <tomsmeding> ah
10:58:47 adm_ joins (~adm@117.208.22.42)
10:59:01 <tomsmeding> I believe I've actually used the current monoid instance correctly in the past where, but then I would have been perfectly okay with writing 'unionWith const'
10:59:15 <tomsmeding> also my mistake just now probably indicates why unionWith (<>) is better
10:59:37 <merijn> "Map key (Sum Int)" is such a useful pattern
10:59:43 <merijn> And completely ruined by this >.>
10:59:51 tomsmeding should use the monoid wrappers more
11:00:04 <merijn> I've literally never wanted the left-biased union :\
11:00:29 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
11:00:29 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Excess Flood)
11:00:34 <__monty__> Haskell doesn't have comparison operator chaining, does it? I.e., `a < b < c` being shorthand for `a < b && b < c`.
11:00:48 <merijn> Which, incidentally is just "Map key (First val)"
11:00:52 <merijn> __monty__: no
11:01:56 aoeusnth joins (7458bdce@116.88.189.206)
11:02:06 <tdammers> unionWith (<>) would require an additional Monoid constraint on the values
11:02:18 <merijn> tdammers: only Semigroup
11:02:21 aoeusnth parts (7458bdce@116.88.189.206) ()
11:02:25 aoeusnth joins (7458bdce@116.88.189.206)
11:02:27 <tdammers> right, yes, ofc
11:02:41 <tdammers> still, it would need an additional constraint, and so not all Maps would have a Monoid instance
11:02:47 <merijn> tdammers: which can be trivially recovered via First
11:03:07 <merijn> tdammers: THere's always just union/unions
11:03:15 <tdammers> fwiw, I've found the existing one useful more often than not
11:03:34 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
11:03:35 <tdammers> we can of course argue whether left or right biasing would be better
11:03:38 <merijn> tdammers: Accumulating by key is so useful it's a shame to sacrifice with 0 gained power
11:03:53 <tdammers> you can still do it, just not via the monoid instance
11:03:55 <tdammers> vOv
11:04:01 <merijn> tdammers: My proposal is strictly more powerful
11:04:08 <merijn> tdammers: It is *incredibly* inconvenient, though
11:04:23 <merijn> tdammers: Can't use foldMap to easily aggregate
11:04:39 <tdammers> idk, newtype it then?
11:04:42 <merijn> tdammers: Gotta do a separate map, followed by "fromListWith
11:04:52 × CMCDragonkai2 quits (~Thunderbi@124.19.3.250) (Quit: CMCDragonkai2)
11:05:00 <merijn> tdammers: Assuming you have a list, else you first have to convert to a list
11:05:05 funkatronixxx joins (~funkatron@2001:981:f73:1:b048:68d2:a9f5:c605)
11:05:45 <merijn> tdammers: newtype means none of the functions work, so you'd have to re-export the entire containers API to get anything useful (which I might just do if I get annoyed/bit by this again with actual spare time)
11:06:16 <tdammers> hmhm
11:06:57 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
11:08:16 <tomsmeding> -package containers-but-then-with-useful-monoids
11:08:24 zatwai parts (~zatwai@80.211.175.241) ("Leaving")
11:09:02 <tdammers> again, I've found the existing instance useful more than once
11:09:48 <tdammers> e.g., a pattern I use quite a bit is building multiple maps of configuration options, one map per source (e.g., environment, config file, arguments), and then merge them with mconcat
11:10:11 <idnar> merijn: https://hackage.haskell.org/package/appendmap
11:10:14 <merijn> tdammers: "s/mconcat/unions/" patched your code ;)
11:10:41 <tdammers> sure
11:11:04 <tdammers> oh, but yeah, I can see what the unionsWith (<>) implementation buys you when you start nesting maps
11:11:15 <merijn> idnar: That exports none of the API of containers
11:11:29 <merijn> idnar: So you can actually write anything useful without continuously wrapping/unwrapping
11:11:41 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
11:11:47 <idnar> merijn: yeah :/
11:12:24 <merijn> tdammers: For nested maps it's less bad, then the overhead of writing some wrappers disappears
11:13:20 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
11:13:21 × carlomagno1 quits (~cararell@148.87.23.8) (Remote host closed the connection)
11:13:48 <merijn> tdammers: Especially for the simple case of, like "foldMap (\k -> M.singleton k (Sum 1))" it's annoyting that it breaks and you have to awkwardly "M.fromListWith mappend . map (\k -> (k,Sum 1)) . F.toList"
11:13:57 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
11:14:44 × Tesseraction quits (~Tesseract@unaffiliated/tesseraction) (Read error: Connection reset by peer)
11:15:03 <tdammers> can't you just fmap succ?
11:15:14 Tesseraction joins (~Tesseract@unaffiliated/tesseraction)
11:15:24 × seanparsons quits (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net) (Quit: ZNC 1.8.1 - https://znc.in)
11:15:28 <merijn> ?
11:16:13 <idnar> AWizzArd: ormolu.el has ormolu-format-region, lsp has lsp-format-region
11:16:19 theorb joins (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net)
11:17:24 aoeusnth is now known as hydroxon1um
11:18:47 seanparsons joins (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net)
11:19:07 Franciman joins (~francesco@host-212-171-88-43.pool212171.interbusiness.it)
11:19:44 × xff0x quits (~fox@2001:1a81:5348:9f00:4aad:b7c8:6288:cb49) (Ping timeout: 240 seconds)
11:19:52 × funkatronixxx quits (~funkatron@2001:981:f73:1:b048:68d2:a9f5:c605) (Quit: Textual IRC Client: www.textualapp.com)
11:19:53 <AWizzArd> idnar: okay thanks, will have a look at this!
11:20:44 xff0x joins (~fox@port-92-195-73-58.dynamic.as20676.net)
11:20:56 × theorbtwo quits (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net) (Ping timeout: 272 seconds)
11:21:48 carlomagno joins (~cararell@148.87.23.6)
11:23:35 × son0p quits (~son0p@181.58.39.182) (Quit: leaving)
11:24:09 × Mathmoose quits (~mathias@31-208-78-204.cust.bredband2.com) (Ping timeout: 256 seconds)
11:24:37 a3f joins (~a3f@chimeria.ext.pengutronix.de)
11:25:16 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds)
11:25:18 × apoc quits (~apoc@bridge.mattzq.com) (Quit: WeeChat 2.8)
11:27:06 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
11:29:15 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 256 seconds)
11:33:37 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
11:34:08 jpds joins (~jpds@gateway/tor-sasl/jpds)
11:36:01 × Lonias quits (58c54083@88.197.64.131) (Remote host closed the connection)
11:36:19 × Franciman quits (~francesco@host-212-171-88-43.pool212171.interbusiness.it) (Quit: Leaving)
11:40:08 Franciman joins (~francesco@host-212-171-88-43.retail.telecomitalia.it)
11:42:06 alp joins (~alp@2a01:e0a:58b:4920:55c0:89ee:e596:d875)
11:42:36 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
11:43:35 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
11:43:52 Mathmoose joins (~mathias@31-208-78-204.cust.bredband2.com)
11:43:59 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
11:44:16 oab joins (~oab@214.92-220-221.customer.lyse.net)
11:45:24 × Franciman quits (~francesco@host-212-171-88-43.retail.telecomitalia.it) (Quit: Leaving)
11:46:25 × oab quits (~oab@214.92-220-221.customer.lyse.net) (Client Quit)
11:48:36 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
11:52:38 × xiinotulp quits (~q@ppp-27-55-79-72.revip3.asianet.co.th) (Quit: Leaving)
11:56:36 × Mathmoose quits (~mathias@31-208-78-204.cust.bredband2.com) (Ping timeout: 240 seconds)
11:56:48 pja joins (~phil@2a02:8010:6098:0:f2de:f1ff:fe2c:3d9)
11:58:22 Franciman joins (~francesco@host-212-171-88-43.retail.telecomitalia.it)
11:58:49 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
12:00:05 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
12:00:31 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:00:53 dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de)
12:03:16 × darjeeling_ quits (~darjeelin@115.215.41.204) (Ping timeout: 240 seconds)
12:04:35 joaoh82_ joins (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net)
12:05:29 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
12:06:44 hexfive joins (~hexfive@50-47-142-195.evrt.wa.frontiernet.net)
12:07:24 mounty joins (~mounty@210.1.196.133)
12:07:25 × joaoh82 quits (~joaoh82@157-131-134-210.dedicated.static.sonic.net) (Ping timeout: 240 seconds)
12:07:39 × plakband quits (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net) (Quit: WeeChat 2.9)
12:09:07 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
12:11:43 <tomsmeding> tdammers: intent was a histogram of a foldable, I think
12:15:38 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
12:16:27 Jonkimi727406120 joins (~Jonkimi@115.44.7.41)
12:16:36 × mounty quits (~mounty@210.1.196.133) (Ping timeout: 240 seconds)
12:16:52 LKoen joins (~LKoen@105.175.9.109.rev.sfr.net)
12:17:52 × inja quits (~inja@pd9f82e18.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
12:20:28 <tomsmeding> I'd have written that with M.fromListWith (+) . map (,1) . F.toList, but same
12:21:07 <merijn> tomsmeding: The monoid generalises better, though
12:21:34 darjeeling_ joins (~darjeelin@115.215.41.204)
12:21:52 ct2034 joins (uid362550@gateway/web/irccloud.com/x-gyohlvwnnexqaalu)
12:23:18 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:24:59 thevishy joins (~Nishant@103.210.43.249)
12:27:23 adm__ joins (~adm@117.208.22.42)
12:27:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
12:31:21 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 265 seconds)
12:31:36 × adm__ quits (~adm@117.208.22.42) (Ping timeout: 240 seconds)
12:32:03 × skiold quits (~skiold@gateway/tor-sasl/skiold) (Remote host closed the connection)
12:32:04 × tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection)
12:32:33 skiold joins (~skiold@gateway/tor-sasl/skiold)
12:33:37 × Franciman quits (~francesco@host-212-171-88-43.retail.telecomitalia.it) (Quit: Leaving)
12:34:03 skiold_ joins (~skiold@gateway/tor-sasl/skiold)
12:34:16 × skiold quits (~skiold@gateway/tor-sasl/skiold) (Remote host closed the connection)
12:34:44 tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64)
12:35:20 × LKoen quits (~LKoen@105.175.9.109.rev.sfr.net) (Read error: Connection reset by peer)
12:35:33 × shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:4c42:47db:3d8a:3c9a) (Ping timeout: 272 seconds)
12:35:50 LKoen joins (~LKoen@105.175.9.109.rev.sfr.net)
12:39:15 Franciman joins (~francesco@host-212-171-88-43.pool212171.interbusiness.it)
12:40:27 × JohninLex quits (~JohninLex@185.204.1.185) (Remote host closed the connection)
12:42:20 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:3da6:b84a:a587:6e3b)
12:44:13 kupi joins (uid212005@gateway/web/irccloud.com/x-dtrdarsxnfpkpogi)
12:44:26 × kori quits (~kori@arrowheads/kori) (Quit: WeeChat 2.8)
12:46:07 <lortabac> is there a function that flips the keys and the values of a Map?
12:47:57 × mbomba quits (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca) (Quit: WeeChat 3.0)
12:49:38 tensegrist joins (~swann@106.51.72.39)
12:49:47 <tensegrist> is there a way i can get hie to use -O0
12:49:51 <tensegrist> or, well, hls now
12:49:59 <merijn> tensegrist: Pretty sure it already does by default?
12:51:02 hseg joins (~gesh@IGLD-84-228-238-34.inter.net.il)
12:51:28 <tensegrist> merijn: i have a simple hie.yaml that just names the components of the project
12:51:40 <tensegrist> and it seems to be calling ghc with -O1
12:52:32 <tensegrist> https://i.imgur.com/adixDXb.png
12:52:35 <solonarv> does it also pass -fno-code? there's little reason to generate code at all in hie/hls, so it seems like that should be the default
12:52:44 <hseg> what are the restricted analogues of Functor/Applicative/Monad used for containers? e.g. am encoding multisets as Map k Int, these should really have all three instances except for an Ord k constraint
12:53:05 × dopplergange quits (~dop@195.158.249.53) (Ping timeout: 240 seconds)
12:53:07 × shangxiao quits (~davids@101.181.159.140) (Ping timeout: 256 seconds)
12:53:19 <tensegrist> i don't think it does?
12:53:32 <tensegrist> but is there a way to tell hie to pass -O0 explicitly
12:53:34 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
12:53:43 <tensegrist> this is a huge project by my standards and it would help a lot
12:53:45 <hseg> i ended up monomorphising, but it's annoying and general enough i suppose it's come up before
12:53:54 <merijn> hseg: eh, you can really sensibly traverse keys without basically serialising the Map into a list and going back
12:54:00 <tensegrist> idk if the direct cradle is the right idea
12:54:14 <hseg> you mean "can't"?
12:54:17 <merijn> tensegrist: It's weird that you notice, tbh
12:54:35 <merijn> tensegrist: I have a huge project that takes ages to build, but HIE is pretty snappy
12:55:03 <tensegrist> it's about the first run
12:55:19 <tensegrist> it's been running for ages and this is an 8-core machine with what seems like enough memory
12:55:40 <hseg> and yeah, this isn't a savings, but the semantics are better fit than quotienting [] by order
12:56:23 <hseg> (though it unnecessarily forces me to distinguish bw empty and fromList [(k,0)], but i can live with that)
12:58:27 <tensegrist> i don't think 50 kloc across 300ish files is that much either
12:58:48 <tensegrist> but since the way i test my code is always with -O0 this is taking a while
12:58:58 <tensegrist> finally got done building deps
12:59:56 shangxiao joins (~davids@101.181.159.140)
13:00:30 threadlock joins (~threadloc@195.140.213.38)
13:01:18 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
13:02:03 × benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-syalagemfhhmznuu) (Quit: Connection closed for inactivity)
13:03:16 <hseg> so am i to understand that rmonad, supermonad, free-functors, and the like are all theoretical solutions only at the moment?
13:04:54 urodna joins (~urodna@unaffiliated/urodna)
13:05:28 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 246 seconds)
13:07:01 texasmynsted joins (~texasmyns@212.102.44.36)
13:07:10 joaj joins (~joaj@2001:690:2100:110:cceb:227c:edbc:592c)
13:08:33 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
13:12:22 Mathmoose joins (~mathias@31-208-78-204.cust.bredband2.com)
13:12:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
13:13:22 × shangxiao quits (~davids@101.181.159.140) (Ping timeout: 256 seconds)
13:15:26 adm_ joins (~adm@117.208.22.42)
13:16:17 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
13:18:21 vg joins (~vg@139.59.59.230)
13:18:38 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:18:53 vg joins (~vg@139.59.59.230)
13:20:33 adm___ joins (~adm@117.208.22.42)
13:20:37 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
13:20:53 inja joins (~inja@pd9f82e18.dip0.t-ipconnect.de)
13:23:41 × hseg quits (~gesh@IGLD-84-228-238-34.inter.net.il) (Quit: WeeChat 2.9)
13:23:57 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection)
13:24:04 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 256 seconds)
13:24:29 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
13:25:22 shangxiao joins (~davids@101.181.52.104)
13:25:58 × Jonkimi727406120 quits (~Jonkimi@115.44.7.41) (Ping timeout: 260 seconds)
13:27:16 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.161.165) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:27:39 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
13:28:47 <__monty__> Hmm, running into this "TODO: add support for multiple packages in a directory" with ghcid. What's the easiest way around this?
13:28:52 × alp quits (~alp@2a01:e0a:58b:4920:55c0:89ee:e596:d875) (Ping timeout: 260 seconds)
13:29:05 × vg quits (~vg@139.59.59.230) (Quit: vg)
13:29:10 Sheilong joins (uid293653@gateway/web/irccloud.com/x-djudanwmexelqxja)
13:29:17 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
13:29:22 vg joins (~vg@139.59.59.230)
13:29:40 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:29:51 vg joins (~vg@139.59.59.230)
13:30:08 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:30:22 vg joins (~vg@139.59.59.230)
13:30:29 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:30:43 vg joins (~vg@139.59.59.230)
13:35:18 <tomsmeding> lortabac: `M.fromList . map (\(x,y) -> (y,x)) . M.toList` :p
13:36:04 <lortabac> tomsmeding: thanks
13:36:10 <tomsmeding> tensegrist: in my experience building the project first makes ghcide load the thing faster, but that's perhaps dependent on the project
13:36:25 <tomsmeding> lortabac: no library function AFAIK
13:36:46 <lortabac> tomsmeding: I was wondering if it was already defined somewhere, but in fact it's so simple it doesn't matter
13:37:11 <tomsmeding> mind that you probably want fromListWith with a suitable combination function
13:37:36 <lortabac> there was a bidirectional map library somewhere on Hackage, it's probably better in these cases
13:37:37 <tomsmeding> because this just throws away values if you have duplicates
13:41:03 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
13:41:22 <danza> tomsmeding, the function (a, b) -> (b, a) is Data.Tuple.swap
13:42:59 <tomsmeding> lortabac: ^; danza: right, I knew it was somewhere but was too lazy to try to recall where exactly. In this case, although "map swap" rhymes nicely, I'm not sure whether the import is worth it, but YMMV
13:43:28 × watt799 quits (~watt799@124.123.106.149) (Ping timeout: 260 seconds)
13:44:05 Alleria joins (~AllahuAkb@mskresolve-a.mskcc.org)
13:44:28 Alleria is now known as Guest81223
13:45:11 <danza> lortabac, tomsmeding this seems a bit ill-defined though. Values can be duplicated thus when turning them to key you might want to use Map.fromListWith
13:45:37 <tomsmeding> hence my remark about fromListWith above :p
13:45:51 <danza> sorry i lost it :)
13:46:04 × vg quits (~vg@139.59.59.230) (Quit: vg)
13:46:07 <tomsmeding> also "map swap" doesn't actually rhyme in english I realise, only with a bad Dutch accent in which both 'a's become the 'a' from "bar"
13:46:20 vg joins (~vg@139.59.59.230)
13:46:24 <danza> :D
13:46:34 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:46:48 <lortabac> haha don't worry it rhymes in my accent too :P
13:46:49 vg joins (~vg@139.59.59.230)
13:46:55 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:46:56 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
13:48:00 vg joins (~vg@139.59.59.230)
13:48:25 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:48:38 <tensegrist> tomsmeding: yeah like i said i build with -O0 but i've never used ghcide on it
13:48:39 vg joins (~vg@139.59.59.230)
13:49:01 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
13:49:02 <tensegrist> and i have no idea how to make ghcide use -O0 and not -O1
13:49:16 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
13:50:51 × LKoen quits (~LKoen@105.175.9.109.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”)
13:51:23 da39a3ee5e6b4b0d joins (~da39a3ee5@mx-ll-171.5.161-165.dynamic.3bb.co.th)
13:52:54 kawzeg joins (~kawzeg@li2046-66.members.linode.com)
13:53:38 alp joins (~alp@2a01:e0a:58b:4920:f89e:9d82:8ae1:cb84)
13:55:17 apoc joins (~apoc@bridge.mattzq.com)
13:56:44 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
13:58:08 × hydroxon1um quits (7458bdce@116.88.189.206) (Remote host closed the connection)
13:59:13 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
13:59:16 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit)
14:03:55 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds)
14:05:57 shangxia1 joins (~davids@1.143.59.92)
14:06:00 × shangxiao quits (~davids@101.181.52.104) (Ping timeout: 256 seconds)
14:07:46 × pfurla quits (~pfurla@216.151.180.165) (Ping timeout: 256 seconds)
14:09:46 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
14:10:12 knupfer joins (~Thunderbi@200116b82c870c00080eacfffe9e47cb.dip.versatel-1u1.de)
14:10:12 × knupfer quits (~Thunderbi@200116b82c870c00080eacfffe9e47cb.dip.versatel-1u1.de) (Client Quit)
14:10:26 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
14:10:29 knupfer joins (~Thunderbi@i59F7FFB7.versanet.de)
14:10:57 AlonzoC joins (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c)
14:14:04 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
14:15:49 <eedgit> Is there a good place to search for basic examples
14:16:12 <eedgit> I'm having trouble storing / passing data - so the ghci examples aren't much use
14:16:17 Stanley00 joins (~stanley00@unaffiliated/stanley00)
14:17:56 dhil joins (~dhil@195.213.192.34)
14:21:12 × AlonzoC quits (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c) (Remote host closed the connection)
14:21:26 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 272 seconds)
14:21:45 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
14:21:55 AlonzoC joins (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c)
14:24:43 sondr3 joins (~sondr3@cm-84.211.56.132.getinternet.no)
14:25:18 × AlonzoC quits (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c) (Remote host closed the connection)
14:25:34 <[exa]> eedgit: docs on hackage usually contain tiny microexamples, but just asking here is pretty useful too :]
14:25:45 <[exa]> (where do you store the data?)
14:26:27 <merijn> eedgit: Basic examples of what?
14:27:45 petersen joins (~petersen@redhat/juhp)
14:29:34 <eedgit> [exa] yeah that's the ghci example tho :(
14:29:38 shangxiao joins (~davids@101.181.45.166)
14:29:44 mlugg joins (c3c2162d@195.194.22.45)
14:30:01 <eedgit> merijn Just in general, at the moment I'm struggling with returning/printing IsInfixOf
14:30:10 × shangxia1 quits (~davids@1.143.59.92) (Ping timeout: 246 seconds)
14:30:49 <eedgit> https://dpaste.org/ui1o returning `Couldn't match type ‘[Char]’ with ‘Char’`
14:31:33 × ct2034 quits (uid362550@gateway/web/irccloud.com/x-gyohlvwnnexqaalu) (Quit: Connection closed for inactivity)
14:31:40 <eedgit> Also confused about the difference between isInfixOf and `isInfixOf` - which isn't the easiest thing to google :(
14:32:02 × mlugg quits (c3c2162d@195.194.22.45) (Remote host closed the connection)
14:32:39 <[exa]> eedgit: backticks` are used for making operators out of normal functions
14:32:52 <eedgit> ah, ty
14:32:54 <[exa]> eedgit: mod 5 1 is the same as 5 `mod` 1
14:33:06 <[exa]> reverse way: 5 + 1 is the same as (+) 5 1
14:33:40 × danza quits (~francesco@151.74.103.112) (Ping timeout: 246 seconds)
14:33:57 <eedgit> Ahhh right, yeh I did learn that actually. I thought it was something specific to isInfixOf
14:34:43 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
14:34:55 <[exa]> anyway your error might be that you are confusing letters (Char) with strings ([Char]) somewhere
14:35:18 Vulfe_ joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
14:39:04 × coot quits (~coot@37.30.53.191.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
14:40:13 × day quits (~Unknown@unaffiliated/day) (Ping timeout: 256 seconds)
14:40:22 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
14:40:25 drincruz joins (~adriancru@ool-44c748be.dyn.optonline.net)
14:41:12 × cheater quits (~user@unaffiliated/cheater) (Remote host closed the connection)
14:43:06 tungki joins (~tungki@subs31-116-206-15-6.three.co.id)
14:43:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
14:44:07 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
14:45:24 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
14:45:42 cheater joins (~user@unaffiliated/cheater)
14:46:07 <kuribas> `view` does a right based mappend, no?
14:46:37 <kuribas> isn't there a foldOf' which does left based mappend?
14:46:42 danza joins (~francesco@151.53.79.66)
14:46:56 × inja quits (~inja@pd9f82e18.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
14:48:03 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
14:49:23 × adm___ quits (~adm@117.208.22.42) (Ping timeout: 260 seconds)
14:50:59 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 256 seconds)
14:51:24 × kritzefitz quits (~kritzefit@2003:5b:203b:200::10:49) (Ping timeout: 240 seconds)
14:53:02 elfets_ joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:53:23 × motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Quit: quit)
14:53:23 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
14:53:40 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
14:54:01 motherfsck joins (~motherfsc@unaffiliated/motherfsck)
14:54:45 roesl__ joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:55:41 <kuribas> is there a Monoid newtype that turns a right fold into a left fold?
14:56:21 × falafel_ quits (~falafel@pool-71-182-130-97.pitbpa.fios.verizon.net) (Ping timeout: 265 seconds)
14:56:39 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
14:56:59 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:57:25 × stree_ quits (~stree@50-108-92-113.adr01.mskg.mi.frontiernet.net) (Ping timeout: 240 seconds)
14:58:21 × elfets_ quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
14:58:42 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-dgdxieqqfmttuoeu) (Quit: Connection closed for inactivity)
14:58:45 elfets_ joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:58:45 stree joins (~stree@50-108-78-9.adr01.mskg.mi.frontiernet.net)
14:58:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
14:59:06 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
14:59:29 × roesl__ quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
15:02:05 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
15:03:46 <kuribas> Endo maybe...
15:04:29 <kuribas> and why do we have foldMap', but not fold'?
15:04:32 <kuribas> :t foldMap'
15:04:34 <lambdabot> (Foldable t, Monoid m) => (a -> m) -> t a -> m
15:04:36 <kuribas> :t fold'
15:04:38 <lambdabot> error:
15:04:38 <lambdabot> • Variable not in scope: fold'
15:04:38 <lambdabot> • Perhaps you meant one of these:
15:06:45 <kuribas> :t foldOf
15:06:48 <lambdabot> Getting a s a -> s -> a
15:06:50 <kuribas> :t foldOf'
15:06:53 <lambdabot> error:
15:06:53 <lambdabot> • Variable not in scope: foldOf'
15:06:53 <lambdabot> • Perhaps you meant one of these:
15:07:21 AlonzoC joins (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c)
15:07:28 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 265 seconds)
15:08:21 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
15:08:38 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
15:08:43 <lyxia> kuribas: Data.Monoid.Dual ?
15:09:00 <Taneb> lyxia: I thought foldMap was strictness rather than symmetry
15:10:16 <kuribas> foldMap f == foldMap' f
15:10:25 <kuribas> for a lawful Monoid
15:11:36 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
15:13:45 × tensegrist quits (~swann@106.51.72.39) (Quit: WeeChat 2.9)
15:14:25 × AlonzoC quits (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c) (Remote host closed the connection)
15:15:28 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
15:19:13 coot joins (~coot@37.30.53.191.nat.umts.dynamic.t-mobile.pl)
15:19:14 × ubert quits (~Thunderbi@p200300ecdf1e533ee6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
15:20:26 vicfred joins (~vicfred@unaffiliated/vicfred)
15:22:10 × da39a3ee5e6b4b0d quits (~da39a3ee5@mx-ll-171.5.161-165.dynamic.3bb.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:22:17 × Moyst quits (~moyst@212-149-213-144.bb.dnainternet.fi) (Read error: Connection reset by peer)
15:24:07 <kuribas> maybe (Endo (<>))?
15:24:46 <kuribas> flip appEndo f $ foldMap (Endo (<>)) [a, b, c, d, e]
15:24:51 <kuribas> > flip appEndo f $ foldMap (Endo (<>)) [a, b, c, d, e]
15:24:54 <lambdabot> error:
15:24:54 <lambdabot> • Couldn't match expected type ‘Expr -> Endo c’
15:24:54 <lambdabot> with actual type ‘Endo (a0 -> a0)’
15:24:58 Moyst joins (~moyst@212-149-213-144.bb.dnainternet.fi)
15:25:09 <kuribas> > ($f) $ appEndo $ foldMap (Endo (<>)) [a, b, c, d, e]
15:25:12 <lambdabot> error:
15:25:12 <lambdabot> • Couldn't match expected type ‘Expr -> Endo b’
15:25:12 <lambdabot> with actual type ‘Endo (a0 -> a0)’
15:25:24 jamm_ joins (~jamm@unaffiliated/jamm)
15:26:34 × ystael quits (~ystael@209.6.50.55) (Quit: Lost terminal)
15:26:41 b`exarkun` is now known as exarkun
15:27:57 dirediresalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
15:28:00 <kuribas> flip appEndo z $ foldMap (Endo . flip (<>)) [a, b, c, d, e]
15:28:02 <kuribas> > flip appEndo z $ foldMap (Endo . flip (<>)) [a, b, c, d, e]
15:28:05 <lambdabot> ((((z <> e) <> d) <> c) <> b) <> a
15:28:18 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
15:28:57 × jollygood2 quits (~bc8165ab@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
15:29:00 ystael joins (~ystael@209.6.50.55)
15:30:36 <kuribas> > flip (appEndo . getDual) z $ foldMap (Dual . Endo . flip (<>)) [a, b, c, d, e]
15:30:39 <lambdabot> ((((z <> a) <> b) <> c) <> d) <> e
15:30:53 <kuribas> that's it :)
15:31:05 × elfets_ quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds)
15:32:35 kuribas parts (~user@ptr-25vy0i9ut9m296caj2d.18120a2.ip6.access.telenet.be) ("ERC (IRC client for Emacs 26.3)")
15:33:10 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
15:33:39 kuribas joins (~user@ptr-25vy0i9ut9m296caj2d.18120a2.ip6.access.telenet.be)
15:33:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
15:34:06 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
15:35:58 <Vulfe_> I can't not read 'appEndo' as 'appendo'
15:36:08 <Vulfe_> like it's some kind of incantation for putting lists together
15:37:29 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 260 seconds)
15:38:45 Tario joins (~Tario@201.192.165.173)
15:42:25 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
15:42:57 × toorevitimirp quits (~tooreviti@117.182.183.16) (Remote host closed the connection)
15:43:21 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
15:43:36 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
15:45:14 × petersen quits (~petersen@redhat/juhp) (Quit: petersen)
15:45:40 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
15:45:47 <merijn> Vulfe_: Same :p
15:48:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
15:49:02 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
15:49:48 <exarkun> is there a better maintained GitHub client library than https://github.com/phadej/github ? The docs are incomplete and most of the examples are broken.
15:50:19 × jchia__ quits (~jchia@58.32.37.146) (Quit: Leaving.)
15:51:26 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
15:53:20 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
15:53:21 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
15:53:35 lpy joins (~nyd@unaffiliated/elysian)
15:53:35 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
15:54:15 jamm_ joins (~jamm@unaffiliated/jamm)
15:58:13 flatmap joins (~flatmap@p5b05a978.dip0.t-ipconnect.de)
15:58:47 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
15:59:20 × ph88_ quits (~ph88@2a02:8109:9e00:7e5c:51c4:aed6:17c7:3978) (Ping timeout: 246 seconds)
16:00:15 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
16:03:23 ph88_ joins (~ph88@2a02:8109:9e00:7e5c:51c4:aed6:17c7:3978)
16:03:59 <Axman6> I'm genuinely surprised there is no function with this type in ByteString: fromFunction :: Int -> (Int -> Word8) -> ByteString. had to hack together some nonsense using unfoldrN
16:05:53 tlaxkit joins (~kvirc@185.228.155.198)
16:06:26 <merijn> Axman6: That seems awfully specific, though?
16:06:56 <kuribas> Axman6: Int is an index in the bytestring?
16:07:20 <Axman6> well unlike packing a list, the bytestring can be allocated immediately at the correct size
16:07:29 <merijn> Axman6: Also, isn't that simply "BS.pack (map f (take n [0..]))"
16:07:41 <Axman6> yes, but more efficient
16:07:59 <merijn> Axman6: Sure, but my point was more "that seems like a rather unusual usecase"
16:08:18 <merijn> Axman6: I can't really think of many cases where I'd want a bytestring with contents based on an index?
16:08:26 <merijn> (or really, any case)
16:08:29 <Axman6> it's exactly the same as generate in vector
16:09:03 <Axman6> I'm creating a bytestring from the contents of a vector of (notionally) Word16
16:09:50 conal_ joins (~conal@198.8.81.86)
16:09:53 <Axman6> where elem i of the bytestring is elem i/2 or elem i/1 >> 1 (roughly)
16:10:24 <Axman6> i/2*
16:10:25 adm_ joins (~adm@117.208.22.42)
16:11:10 <merijn> Axman6: If you care about efficiency, just rip the bytestring out of the vector directly?
16:11:19 <merijn> Axman6: That's much more efficient :p
16:11:44 <Axman6> well it's a unboxed Vector Int64 (representing a vector of Word16)
16:11:51 <merijn> Axman6: Make sure you've got a Storable vector and done :p
16:11:54 boxscape87 joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
16:11:58 × boxscape87 quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Client Quit)
16:12:29 <merijn> Axman6: Use vector's convert to convert to Storable vector, that's linear and copies data of fixed size once, and *then* rip the ByteString out :p
16:12:45 halbGefressen joins (~halbGefre@2a02:810d:f40:2a9c:40b2:2308:84bd:8b9b)
16:12:51 <merijn> Probably more efficient then your suggestion to begin with :p
16:13:14 <merijn> Axman6: I've even got the code figured out for you: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Utils/Vector.hs :p
16:13:35 <halbGefressen> Is there any way, without using other libraries, but with using language extensions, to evaluate Haskell Code from a String?
16:13:51 × alp quits (~alp@2a01:e0a:58b:4920:f89e:9d82:8ae1:cb84) (Remote host closed the connection)
16:13:52 <Axman6> everyone loves debugging endianess problems right? :)
16:14:06 <geekosaur> halbGefressen, no
16:14:11 alp joins (~alp@2a01:e0a:58b:4920:71b4:c750:be0a:d3b3)
16:14:13 <merijn> halbGefressen: Eh, yes, but I'm guessing "by writing an interpreter in Haskell" doesn't count :p
16:14:16 <geekosaur> haskell is like C, not like Python
16:14:20 <merijn> geekosaur: Pfft, that's a blatant lie ;)
16:14:34 <merijn> geekosaur: All you have to do is reimplement GHC using just base :)
16:14:36 × knupfer quits (~Thunderbi@i59F7FFB7.versanet.de) (Ping timeout: 240 seconds)
16:14:45 <halbGefressen> I found https://hackage.haskell.org/package/plugins-1.5.3.0/docs/System-Eval-Haskell.html
16:14:47 <Axman6> bs[0] = fromIntegral v[0]; bs[1] = fromIntegral (v[0] `unsafeShiftR` 8) etc.
16:15:03 <merijn> Axman6: Oh, I have an easy solution for that
16:15:30 <geekosaur> note also that, n matter what, you aren't able to access your current program, only a new unrelated evaluation context
16:15:32 <merijn> Axman6: It's called "everyone on a different architecture can go f themselves, because I don't get paid enough to deal with that" :D
16:15:33 <Axman6> where v :: Vector Int64, not Vector Word16
16:15:52 <Axman6> halbGefressen: call ghci? :)
16:16:24 <merijn> halbGefressen: More generally, it's impossible to give you a useful answer without knowing what you're trying to do
16:16:28 <Axman6> system "ghci" ["-e", myArbitraryHaskellCodeNothingCouldGoWrongHereRight]
16:16:43 <Axman6> probably ghc -e actualy
16:16:54 opFez joins (~opFez@31.7.59.226)
16:17:38 <halbGefressen> It will be fine if it is something like a macro that just expands my string to the haskell code and then compiles it
16:17:49 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
16:18:13 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:18:21 <merijn> halbGefressen: See, *that* sounds much more like you want Quasiquoters and/or Template Haskell :)
16:18:51 × tungki quits (~tungki@subs31-116-206-15-6.three.co.id) (Read error: Connection reset by peer)
16:18:53 <halbGefressen> My uni has a competition where we have to write some form of watered down XML parser and I wondered if I could just cheese my way through with having like 5 tokens
16:19:32 <merijn> halbGefressen: See here: https://www.schoolofhaskell.com/user/marcin/quasiquotation-101 (although note you probably need the preceding Template Haskell article to full get what's going on)
16:19:43 brown121407 joins (~brown1214@2001:19f0:6c01:2b9c:3c66:4201:22f3:3ebc)
16:19:43 × brown121407 quits (~brown1214@2001:19f0:6c01:2b9c:3c66:4201:22f3:3ebc) (Changing host)
16:19:43 brown121407 joins (~brown1214@fsf/member/brown121407)
16:19:51 <opFez> Is there any good resources for learning how to make parsers in Haskell?
16:20:07 tungki joins (~tungki@subs31-116-206-15-60.three.co.id)
16:20:30 <merijn> opFez: The Real World Haskell chapter is pretty good. The examples are somewhat bitrotted, but the high level approach shown applies to all the various parser combinator libraries
16:21:30 × tungki quits (~tungki@subs31-116-206-15-60.three.co.id) (Remote host closed the connection)
16:21:30 <merijn> opFez: https://github.com/tssm/up-to-date-real-world-haskell/blob/master/14-using-parsec.org
16:21:53 tungki joins (~tungki@subs31-116-206-15-60.three.co.id)
16:21:58 <merijn> I think megaparsec also had a semi in-depth tutorial?
16:22:11 <merijn> https://markkarpov.com/tutorial/megaparsec.html
16:22:11 <opFez> thanks! on book.realworldhaskell.org/read it's chapter 16, is your link a more up to date version?
16:22:13 × s00pcan quits (~chris@075-133-056-178.res.spectrum.com) (Ping timeout: 256 seconds)
16:22:15 nrdmn01 joins (~nrdmn@95.129.53.118)
16:22:45 <opFez> thanks, gtg
16:23:36 <merijn> opFez: The link is an updated version, but the original should be fine (as long as you don't assume the examples to compile as-is)
16:23:40 s00pcan joins (~chris@107.181.165.217)
16:23:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
16:24:06 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
16:24:21 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
16:28:24 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
16:28:38 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
16:31:57 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
16:32:09 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
16:32:21 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:32:53 chris8142 joins (~chris8142@srvnet-01-071.ikbnet.co.at)
16:33:03 bitmapper joins (uid464869@gateway/web/irccloud.com/x-azvgqwppafppryvm)
16:33:07 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
16:33:35 × Vulfe_ quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Read error: Connection reset by peer)
16:38:30 nados joins (~dan@69-165-210-185.cable.teksavvy.com)
16:39:01 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
16:39:20 thallada joins (~thallada@fsf/member/thallada)
16:39:49 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
16:39:52 chris8142 parts (~chris8142@srvnet-01-071.ikbnet.co.at) ("WeeChat 3.0")
16:40:35 chris8142 joins (~chris8142@srvnet-01-071.ikbnet.co.at)
16:41:19 × shangxiao quits (~davids@101.181.45.166) (Quit: WeeChat 3.0)
16:42:10 jmchael joins (~Chi1thang@87.112.60.168)
16:42:49 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 260 seconds)
16:42:53 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-lkwbhxlzvzytbqoi)
16:43:05 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
16:43:10 × Mathmoose quits (~mathias@31-208-78-204.cust.bredband2.com) (Remote host closed the connection)
16:43:20 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
16:46:19 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
16:49:10 × adm_ quits (~adm@117.208.22.42) (Remote host closed the connection)
16:49:18 ubert joins (~Thunderbi@p200300ecdf1e533ee6b318fffe838f33.dip0.t-ipconnect.de)
16:49:37 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:50:54 adm_ joins (~adm@117.208.22.42)
16:51:13 fendor_ joins (~fendor@178.115.131.244.wireless.dyn.drei.com)
16:53:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
16:54:02 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
16:54:13 × fendor quits (~fendor@178.165.131.152.wireless.dyn.drei.com) (Ping timeout: 264 seconds)
16:54:43 × tungki quits (~tungki@subs31-116-206-15-60.three.co.id) (Ping timeout: 246 seconds)
16:55:05 × s00pcan quits (~chris@107.181.165.217) (Ping timeout: 256 seconds)
16:55:39 ubert1 joins (~Thunderbi@p200300ecdf1e5330e6b318fffe838f33.dip0.t-ipconnect.de)
16:55:57 × ubert quits (~Thunderbi@p200300ecdf1e533ee6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
16:55:58 ubert1 is now known as ubert
16:56:49 s00pcan joins (~chris@075-133-056-178.res.spectrum.com)
16:57:12 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
16:58:20 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
16:58:35 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
17:01:25 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
17:01:42 Ariakenom joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
17:03:21 × ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Remote host closed the connection)
17:03:23 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
17:03:26 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Ping timeout (120 seconds))
17:03:46 ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex)
17:04:36 × arw_ quits (~arw@impulse.informatik.uni-erlangen.de) (Ping timeout: 240 seconds)
17:04:44 <ezzieyguywuf> I want to change my package name. I renamed the project directory, renamed the cabal file, and tried 'cabal build', but now it's failing
17:05:19 <dminuoso> ezzieyguywuf: Nuke your dist-newstyle/ directory for good measure
17:05:55 <tomsmeding> ezzieyguywuf: also changed the name _in_ the cabal file?
17:06:04 <ezzieyguywuf> dminuoso: I did, but this could be an unrelated issue actually, I recently moved my system off an hdd onto an ssd, including my home directory and all the ~/.cabal etc.
17:06:16 <ezzieyguywuf> is it enough to just copy it over, or is there anything else that I need to do?
17:06:26 <ezzieyguywuf> tomsmeding: yes changed in there as well
17:06:34 <tomsmeding> are the paths the same, just different disk?
17:06:40 <ezzieyguywuf> tomsmeding: yes
17:06:40 <tomsmeding> or is .cabal really in a different location
17:07:07 urek joins (~urek@2804:7f1:e10a:9644:7811:1b7:2d76:35f4)
17:07:13 <tomsmeding> if the paths are the same it should work, assuming that cabal isn't using hard links, which would be exceedingly strange
17:07:30 <tomsmeding> also you can delete (well, backup first) ~/.cabal if you want :p
17:07:53 × alp quits (~alp@2a01:e0a:58b:4920:71b4:c750:be0a:d3b3) (Ping timeout: 272 seconds)
17:07:55 <tomsmeding> also, "it's failing" -- what is failing?
17:08:24 <ezzieyguywuf> https://dpaste.com/CGTEBFYBE
17:09:21 <tomsmeding> your package's setup script somehow produces a constraint Cabal < 1.25, wtf
17:10:01 <ezzieyguywuf> here's my cabal file https://dpaste.com/E5374CYJL
17:10:33 <tomsmeding> is there a Setup.hs?
17:11:01 arw joins (~arw@impulse.informatik.uni-erlangen.de)
17:11:11 <ezzieyguywuf> https://dpaste.com/6SXEWMXNB
17:11:20 <ezzieyguywuf> setup.hs, autogenerated by cabal init i believe
17:11:27 <tomsmeding> I always remove that file :p
17:11:33 <tomsmeding> has never not worked yet
17:12:16 <tomsmeding> but yeah try 'mv ~/.cabal ~/.cabal-backup; rm -rf dist-newstyle/; cabal build' :p
17:13:57 <ezzieyguywuf> tomsmeding: I don't even know why it's there, I just assume cabal needs it
17:14:10 <tomsmeding> it doesn't
17:15:13 × st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Ping timeout: 260 seconds)
17:15:15 <ezzieyguywuf> dang, still fail after nuking ~/.cabal
17:15:16 <ezzieyguywuf> https://dpaste.com/BVCTVKH44
17:15:25 <ezzieyguywuf> I know the nuke worked b/c it asked me to "cabal update"
17:16:17 st8less joins (~st8less@2603:a060:11fd:0:3c0a:a808:d920:6dc7)
17:16:49 <tomsmeding> no dist/ folder or .ghc* file?
17:16:58 <tomsmeding> also in ~
17:17:06 <ezzieyguywuf> hmm, I'll check
17:17:18 <ezzieyguywuf> ~/.distcc, but that's different
17:17:24 <tomsmeding> also wtf, reproducing example please :p
17:17:29 <ezzieyguywuf> yes ~/.ghc
17:17:36 <tomsmeding> file?
17:17:47 <tomsmeding> I'm talking about a file like .ghc-environment-* or something
17:17:57 <tomsmeding> directory is fine
17:18:43 ni638629 joins (u749750@ppp046176251103.access.hol.gr)
17:18:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
17:19:02 ni638629 parts (u749750@ppp046176251103.access.hol.gr) ()
17:19:02 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
17:20:13 <ezzieyguywuf> tomsmeding: to reproduce, `git clone https://gitlab.com/ezzieyguywuf/csv_processor/ jali; cd jali; cabal build`
17:20:24 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
17:20:32 <ezzieyguywuf> tomsmeding: no I don't see any of those folders
17:20:44 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
17:20:59 <tomsmeding> hah I get the same error, so it's really something in the project, not in your configuration
17:21:50 <ezzieyguywuf> lol all I did was change the name, and add a licence and description and stuff
17:22:29 <tomsmeding> ezzieyguywuf: I think those are the problem
17:22:38 <sm[m]> something in the cabal file syntax that puts cabal into "old cabal" mode ?
17:23:05 <tomsmeding> if I remove the description: field, which overruns! (how does that even parse), then cabal starts complaining about the license (it doesn't understand MPL2.0 apparently)
17:23:11 <tomsmeding> sm[m]: probably the parse error then?
17:23:16 <merijn> sm[m]: That still makes no sense
17:23:20 <tomsmeding> if I remove also the license: field, then it makes a build plan
17:23:23 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
17:23:31 <merijn> sm[m]: Because that wouldn't incur a "Cabal < 1.25" constraint
17:23:33 × kupi quits (uid212005@gateway/web/irccloud.com/x-dtrdarsxnfpkpogi) (Quit: Connection closed for inactivity)
17:23:40 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
17:23:47 <merijn> sm[m]: Cabal is backwards compatible across all previous versions
17:23:55 <merijn> (modulo bug, obviously)
17:24:24 <sm[m]> just a direction to explore.. easy enough to test (does minimizing the cabal file changes change things)
17:24:28 × Moyst quits (~moyst@212-149-213-144.bb.dnainternet.fi) (Read error: Connection reset by peer)
17:24:32 <tomsmeding> https://tomsmeding.com/vang/Zt6i75 with this diff it builds ezzieyguywuf
17:24:48 <tomsmeding> or, well, it _start_ building; I didn't let it finish
17:24:50 <ezzieyguywuf> sm[m]: yea, like tomsmeding points out there's some syntax errors in my cabal file
17:25:01 <ezzieyguywuf> tomsmeding: I'll let you know if it finishes.
17:25:13 <ezzieyguywuf> but shouldn't cabal have told me "dude, parse error on description. and licence."
17:25:18 <sm[m]> There we go
17:25:33 howdoi joins (uid224@gateway/web/irccloud.com/x-lajkqzxuizaoleyn)
17:25:38 <merijn> ezzieyguywuf: oh
17:25:40 <tomsmeding> well license it does, but somehow because of those second and third line of the description, cabal goes haywire
17:25:46 <merijn> You have MPL2.0, not MPL-2.0
17:26:07 <merijn> (although even that is legacy, I think)
17:26:22 <merijn> https://cabal.readthedocs.io/en/latest/cabal-package.html#pkg-field-license
17:26:22 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
17:26:30 × texasmynsted quits (~texasmyns@212.102.44.36) ()
17:26:30 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
17:27:01 <tomsmeding> ah it seems cabal just stops reading the file on that description line
17:27:11 <tomsmeding> if you remove everything after the description: field, the same error occurs
17:27:40 <tomsmeding> this feels like it's the classic "forgot the 'eof' after my parsec parser", but it's probably not that simple
17:27:41 <merijn> oh
17:27:45 <merijn> No
17:27:51 <merijn> The description field is a syntax error
17:28:01 <merijn> Albeit poorly detected
17:28:04 <tomsmeding> yes but why does not not report that!
17:28:10 <tomsmeding> it just stops parsing and goes with what it has
17:28:17 <ezzieyguywuf> +1 tomsmeding
17:28:23 <ezzieyguywuf> also, merijn thank you for the link
17:28:30 <tomsmeding> ezzieyguywuf: name++ please, ircbrowse picks that up
17:28:31 <ezzieyguywuf> spdx, great another standard to know about :-P
17:28:33 <tomsmeding> for questionable benefit
17:28:38 <ezzieyguywuf> tomsmeding++
17:28:43 tomsmeding bows
17:28:43 <ezzieyguywuf> lol
17:28:52 <ezzieyguywuf> !karma tomsmeding
17:28:56 <merijn> it should be indented
17:28:57 <merijn> https://github.com/merijn/broadcast-chan/blob/master/broadcast-chan/broadcast-chan.cabal#L26-L71
17:28:58 <ezzieyguywuf> is that the thing? hrm *shrug*
17:29:08 <ezzieyguywuf> something something tomsmeding++
17:29:28 <ezzieyguywuf> oh, "it should be indented" meaning the description
17:29:36 <tomsmeding> now see? I already have a karma of 2 https://ircbrowse.tomsmeding.com/nick/tomsmeding
17:30:00 <geekosaur> doesn't lambdabot also track karma?
17:30:03 <ezzieyguywuf> tomsmeding: 🤣
17:30:14 <merijn> tomsmeding: Because the old cabal format wasn't very specified and tried to be forwards compatible
17:30:23 <merijn> ezzieyguywuf: Can you try something for me?
17:30:33 <ezzieyguywuf> merijn: sure, anything for you pal.
17:30:38 <geekosaur> @list karma
17:30:38 <lambdabot> karma provides: karma karma+ karma- karma-all
17:30:40 <merijn> ezzieyguywuf: Take the broken .cabal file, change "cabal-version" and set it to 2.0
17:30:51 <merijn> ezzieyguywuf: Do you get a similar bad non-error or a more useful one?
17:30:52 <ezzieyguywuf> merijn: ok just a sec.
17:31:23 <tomsmeding> @karma-all
17:31:24 <lambdabot> blah 31337
17:31:24 <lambdabot> egrep 31337
17:31:24 <lambdabot> zgrep 31337
17:31:24 <lambdabot> c/c 2171
17:31:24 <lambdabot> nobody 2000
17:31:26 <lambdabot> [6768 @more lines]
17:31:26 <merijn> At this point there's *really* no reason to write new cabal files with cabal-version prior to 2.0 (or even 3.0, really)
17:31:35 ski would prefer seeing `karma' removed
17:31:43 <tomsmeding> that 31337 looks suspicious
17:32:03 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
17:32:07 <ezzieyguywuf> merijn: seems the same https://cabal.readthedocs.io/en/latest/cabal-package.html#pkg-field-license
17:32:17 <ezzieyguywuf> merijn: although I did ">=2.0", should I try with plain "2.0"?
17:32:34 <merijn> ezzieyguywuf: >=2.0 is a syntax error
17:32:41 <merijn> Or should be, anyway :p
17:32:50 <merijn> Did it not complain about that?
17:32:54 <ezzieyguywuf> really? it said >=1.10 before
17:32:59 <ezzieyguywuf> no it did not, I pasted the output
17:33:01 <merijn> ezzieyguywuf: Yes, for legacy reasons
17:33:15 <sm[m]> Yes, see https://cabal.readthedocs.io/en/3.4/cabal-package.html#pkg-field-cabal-version
17:33:18 <ezzieyguywuf> changed to 2.0, same error
17:33:46 <merijn> hmm, unfortunate
17:33:49 LKoen joins (~LKoen@105.175.9.109.rev.sfr.net)
17:34:28 <merijn> oh, hah ">= 2.0" is the last that still allows that
17:34:43 <ezzieyguywuf> "it is strongly recommended to avoid the legacy syntax", and yet this is what cabal init produces...
17:35:08 Moyst joins (~moyst@212-149-213-144.bb.dnainternet.fi)
17:35:22 <tomsmeding> strongly recommended _with newer versions_ I'd assume
17:35:43 <merijn> ezzieyguywuf: Only old versions of cabal-install :p
17:35:46 <ezzieyguywuf> my cabal version is 3.2
17:35:49 <merijn> really?
17:35:56 <merijn> I'm pretty sure it defaults to 2.4 now
17:35:57 <ezzieyguywuf> yea I just checked
17:35:57 × urek quits (~urek@2804:7f1:e10a:9644:7811:1b7:2d76:35f4) (Quit: urek)
17:36:42 <ezzieyguywuf> just ran it again, it produced >=1.10
17:36:57 <merijn> ah, need --cabal-version to change that version, I think phadej recently fixed it to produce a more reasonable default
17:37:24 <ezzieyguywuf> lol, I came to cabal (from stack) b/c I was ttold it works!
17:37:55 <merijn> ezzieyguywuf: Well, it does work :p
17:38:04 <ezzieyguywuf> lol, yea yea, I'm just being facetious
17:38:09 <merijn> ezzieyguywuf: It's just defaulting to a stupid old default
17:38:16 <ezzieyguywuf> indeed.
17:38:36 × jmchael quits (~Chi1thang@87.112.60.168) (Ping timeout: 240 seconds)
17:38:42 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:38:44 <ezzieyguywuf> but the main issue here is the parsing issue, which remained regardless of the cabal-version number
17:38:47 <ezzieyguywuf> heck let me try 3.2
17:38:49 <sm[m]> stack is the one more likely to just work ezzieyguywuf, despite what you may hear in here
17:38:55 <merijn> I mean, 2.0 was released 3 years ago. There's really no reason to bother supporting cabal-install 1.10 :p
17:39:38 <merijn> sm[m]: That's disingenous. "Both stack and cabal-install may be more likely to work depending on an incredibly complex and nuanced set of circumstances that are nearly impossible to judge"
17:40:06 <merijn> There's plenty of workflows and things where stack sucks balls. And there's a bunch of place where cabal-install still has warts.
17:40:13 <merijn> This just in, no silver bullets for packaging
17:40:30 <sm[m]> "More likely"
17:41:11 × flatmap quits (~flatmap@p5b05a978.dip0.t-ipconnect.de) (Quit: Textual IRC Client: www.textualapp.com)
17:41:12 <sm[m]> it's just my observation over many years of supporting both. I know you won't agree, that's fine :)
17:41:19 <ezzieyguywuf> hrm, so 'cabal-version 3.0' actually builds
17:41:26 <ezzieyguywuf> it identifies the error, and just skips past it
17:41:39 <ezzieyguywuf> and produces a nice warning
17:41:42 <merijn> Progress \o/
17:42:15 <merijn> So when 3.4 releases and actually defaults to 3.0 (or 3.2 or 3.4, whatever) we'll be in business :p
17:42:32 <ezzieyguywuf> now, it does not re-display the warning when I rebuild, unless I `cabal clean` first, but I suppose that's ok?
17:42:59 <merijn> ezzieyguywuf: That's because it won't rebuild unless something changed :p
17:43:07 <ezzieyguywuf> key takeaway: I'll be using `cabal-version 3.0` from here on out.
17:43:18 <ezzieyguywuf> merijn: but it should still re-parse the cabal file shouldn't it?
17:43:37 <merijn> ezzieyguywuf: It only bothers reparsing if the cabal file changed since the last run
17:43:52 <ezzieyguywuf> I mean, I get it, "why re-parse if the file hasn't changed", but here we see a good reason to do so - to make sure the user still knows there's something to be warned about
17:43:57 <ezzieyguywuf> lol jynx
17:44:25 <merijn> ezzieyguywuf: You can always run "cabal check" :)
17:44:35 <ezzieyguywuf> merijn: woah didn't know that one
17:44:41 chris8142 parts (~chris8142@srvnet-01-071.ikbnet.co.at) ("WeeChat 3.0")
17:45:08 <merijn> Which is, effectively "cabal file linting/hackage requirement check" :p
17:45:09 × iteratee quits (~kyle@162.211.154.4) (Read error: Connection reset by peer)
17:45:31 <merijn> Pretty sure "cabal sdist" will also rewarn
17:45:42 iteratee joins (~kyle@162.211.154.4)
17:45:55 <ezzieyguywuf> what does sdist do?
17:46:28 <merijn> ezzieyguywuf: Creates a standalone .tar.gz of all sources and files for distribution s(ource)dist(tribution)
17:46:36 <ezzieyguywuf> oh neat
17:46:38 <merijn> for upload to, say, hackage or whatever
17:47:26 × ggole quits (~ggole@2001:8003:8119:7200:485d:ac18:c2cb:d77f) (Quit: Leaving)
17:47:40 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
17:49:11 <ezzieyguywuf> should I even use "cabal init"? or is there a newer/better way to set up a new project dir?
17:49:32 dopplergange joins (~dop@195.158.249.47)
17:49:49 <merijn> ezzieyguywuf: "cabal init --interactive --cabal-version=3.0" (those flags should be default in 3.4 iirc) is fine. Personally I just copy one of my existing ones and edit it :p
17:50:07 <koz_> I have a cookiecutter template.
17:50:15 <ezzieyguywuf> yum, cookies
17:50:16 <koz_> (which also sets up everything else)
17:50:50 <ezzieyguywuf> merijn: maybe I have something over-riding the defaults? where would I check?
17:51:17 <merijn> ezzieyguywuf: You don't have 3.4, because it's not released yet ;)
17:51:34 <merijn> It's in alpha until GHC 9.0 comes out
17:51:46 <ezzieyguywuf> lol ok
17:52:00 <ezzieyguywuf> I can edit my ~/.cabal/config it looks like
17:52:05 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
17:52:09 <maerwald> 3.4 works great though
17:52:13 <merijn> ezzieyguywuf: yeah
17:52:17 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 265 seconds)
17:52:24 <merijn> ezzieyguywuf: Also, wanna get your mind blown further wrt cabal? :p
17:52:51 <ezzieyguywuf> merijn: lol, sure shoot
17:52:51 <maerwald> merijn: that's easy... run `cabal build --help` -> mind blown :D
17:53:01 <ezzieyguywuf> maerwald: nice.
17:53:04 <merijn> ezzieyguywuf: Try "cabal user-config diff" and "cabal user-config update" for updating to the latest version while keeping your local edits to the default :p
17:53:50 <merijn> Pretty sure, like, 5 people are aware of "user-config diff" :p
17:54:10 × conal_ quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
17:54:15 <ezzieyguywuf> what did the diff even do?
17:54:31 <merijn> It just reports which settings you have set to something *other* than the default
17:54:41 <ezzieyguywuf> hrm interesting, so it pulled down from the cloud the latest defaults, but kept anything that I had hand-changed?
17:54:56 <ezzieyguywuf> merijn: it was blank, does that mean I just have defaults?
17:55:05 <ezzieyguywuf> b/c I totally like 2 seconds ago changed the init defaults, lol.
17:55:22 <merijn> Pretty much (except I think the config format is embedded in cabal executable)
17:55:23 <ezzieyguywuf> yea and now it changed it back
17:55:33 <ezzieyguywuf> mind blown: "Hey this didn't work"
17:55:34 <merijn> ezzieyguywuf: Which setting was that?
17:55:44 <ezzieyguywuf> merijn: -- interactive.....
17:55:45 <ezzieyguywuf> oh wait
17:55:48 <ezzieyguywuf> -- = comment
17:55:50 <merijn> :)
17:55:56 <ezzieyguywuf> I can't keep track of all these different config formats
17:55:57 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
17:56:55 <ezzieyguywuf> neat! where does it store the diff?
17:56:58 <ezzieyguywuf> somewhere in ~/.cabal?
17:57:04 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
17:57:37 <merijn> It just output the diff to stdout
17:58:10 <ezzieyguywuf> ah, so I don't really need to run diff
17:58:16 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
17:58:16 <ezzieyguywuf> I could just run update and it will "do its thing'
17:58:17 <monochrom> Hell, cabal-install has a whole lot of FOSS licenses embedded. :)
17:58:27 <ezzieyguywuf> monochrom: ?
17:58:37 <merijn> ezzieyguywuf: Correct, but usually you prefer not blindly crush your existing files ;)
17:58:43 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
17:58:52 Tario joins (~Tario@201.192.165.173)
17:59:39 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds)
17:59:54 × ubert quits (~Thunderbi@p200300ecdf1e5330e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
18:01:53 <monochrom> I think usually "cabal user-config update" is harmless.
18:02:34 <merijn> monochrom: Sure
18:02:53 <merijn> monochrom: Compiling with GHC is also usually harmless. Except when it deletes files with type errors ;)
18:03:17 <jle`> yours is only deleting the ones *with* type errors? :O
18:03:45 <merijn> Well, guys, wish me luck
18:04:05 <merijn> I'm diving into the hell that is "poorly documented YAML for CI configuration"
18:04:13 <Sonolin> is there a function of `(Monad m, k) => m (k a) -> k (m a)` ?
18:04:15 <jle`> thoughts and prayers
18:04:17 <merijn> Tell my family I loved them
18:04:21 ezzieyguywuf prays for merijn
18:04:28 <merijn> :t sequence -- Sonolin
18:04:29 <ezzieyguywuf> merijn: which CI?
18:04:30 <lambdabot> (Traversable t, Monad m) => t (m a) -> m (t a)
18:04:31 <jle`> Sonolin: i think that's a kind error?
18:04:45 <ezzieyguywuf> lol, as opposed to a mean error
18:04:55 <merijn> ezzieyguywuf: GitHub Actions
18:04:57 <jle`> errors can be rough
18:04:57 conal joins (~conal@198.8.81.86)
18:04:58 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Remote host closed the connection)
18:05:14 <jle`> is k a constraint?
18:05:16 <Sonolin> perfect thanks merijn
18:05:22 <Sonolin> jle` yea not exactly my type signature
18:05:32 <monochrom> Oh here is how harmless it is: "Renaming /home/trebla/.cabal/config to /home/trebla/.cabal/config.backup"
18:05:33 <Sonolin> but I was looking for something that spec. works for maybe
18:05:37 <ezzieyguywuf> dang, didn't know github had built-in ci, I thought everyone just used travis
18:05:41 <merijn> ezzieyguywuf: I ran out of Travis minutes for the months in like half a day. But GitHub Actions' YAML is equally poorly specified as Travis
18:05:53 <jle`> Sonolin: ah, so like m (Maybe a) -> Maybe (m a) ?
18:05:59 <monochrom> So you won't lose your old config file in case "update" isn't what you want.
18:06:11 <merijn> ezzieyguywuf: Travis has been going down the drain for ~2 years and now limits the free minutes to something unreasonably short
18:06:29 <Sonolin> jle` other way around but yea
18:06:42 <Sonolin> sequence works since maybe is traversable
18:06:47 <jle`> ah, Maybe (m a) -> m (Maybe a)
18:07:20 <Sonolin> yea I should really make a custom type/exceptions or something for this instead of maybe but it works for now
18:07:28 <merijn> Sonolin: Other people who looked at "sequence" were also interested in:
18:07:31 <merijn> :t traverse
18:07:31 opFez parts (~opFez@31.7.59.226) ()
18:07:32 <lambdabot> (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b)
18:07:44 <merijn> </Amazon recommendation"
18:07:50 <merijn> s/"/>/
18:07:59 <jle`> does that come with haskell prime?
18:08:00 <monochrom> Oh w00t there is an "init" section that has the defaults for "cabal init". If you hate the default "cabal-version: 1.10", you can change it there.
18:08:21 <merijn> monochrom: "iz fixd in head"
18:08:32 <ezzieyguywuf> if I have `n :: Int`, how can I produce a stringe of n spaces?
18:08:43 <jle`> > replicate 10 ' '
18:08:43 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
18:08:45 <lambdabot> " "
18:08:49 <ezzieyguywuf> jle`: dope thanks
18:08:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
18:08:58 <merijn> monochrom: https://lambdacats.github.io/fixed-in-head/
18:09:02 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
18:09:26 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
18:09:42 <monochrom> Oh hey I have been looking for lambdacats since the last lambdacats was gone!
18:12:10 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
18:12:52 × fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Client Quit)
18:13:01 <Sonolin> merijn that works even better! One less fmap, thanks :)
18:13:20 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
18:13:36 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
18:14:48 Tario joins (~Tario@201.192.165.173)
18:14:54 alp joins (~alp@2a01:e0a:58b:4920:71b4:c750:be0a:d3b3)
18:15:27 <merijn> monochrom: Fear not, I already updated my lambdacats.org forward to the right place :p
18:16:25 <monochrom> aliased lambdacats
18:16:47 × robotmay quits (~beepboop@2001:8b0:7af0:2580:888:72a9:4a8e:aea0) (Remote host closed the connection)
18:17:24 <merijn> lambdacats iz robust modulo teh alpha-renaming!
18:17:38 <monochrom> haha
18:17:39 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
18:18:05 robotmay joins (~beepboop@2001:8b0:7af0:2580:9de5:991:bf07:8253)
18:18:05 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
18:18:19 <merijn> And I just noticed all my domains were still registered to my mom's house, 3 addresses ago >.>
18:18:26 <xerox_> which version of ghc corresponds to base-4.9.0.0 ?
18:18:49 <koz_> 8.0 I think?
18:19:10 <monochrom> "ghcup list" reports 8.0.2 -> 4.9.1.0
18:19:15 <xerox_> appreciate it
18:19:17 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
18:19:20 <merijn> @where ghc-base
18:19:20 <lambdabot> I know nothing about ghc-base.
18:19:26 <merijn> @where+ ghc-base https://wiki.haskell.org/Base_package
18:19:26 <lambdabot> It is stored.
18:19:33 Tario joins (~Tario@201.192.165.173)
18:19:59 <merijn> Hot take: GHC 9.0 should switch to "base-9.0" so we can forget about this nonsense
18:20:00 <maerwald> merijn: there's a better page on gitlab
18:20:03 Buggys parts (buggy@charger.kire.net) ()
18:20:24 <koz_> merijn: That's a rather lukewarm take. Sensible even!
18:20:25 <maerwald> https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/libraries/version-history
18:20:25 <merijn> I mean, nobody else is using base right now and if someone wants to start using it a version bump is hardly going to kill that
18:20:27 <xerox_> nice even got a date, my buddy got a 2016 ghc from his distribution, yikes!
18:20:43 <koz_> xerox_: Use ghcup, not your distro.
18:20:46 <monochrom> Hotter take: stack LTS version numbers should be GHC version numbers too.
18:20:54 <xerox_> koz_: I'm steering him into that direction yes
18:20:54 <koz_> This counts double on Debian and Arch.
18:21:07 <koz_> monochrom: That's also tepid at best.
18:21:17 <koz_> It's not like consistency is a good thing or anything...
18:21:17 geekosaur joins (82659a09@host154-009.vpn.uakron.edu)
18:21:32 <koz_> It's only hot because Snoyman would want your head on a pike for daring to suggest such a sensible thing.
18:21:38 <maerwald> haha
18:22:48 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
18:23:08 <xerox_> how is this possible: https://www.stackage.org/haddock/lts-16.24/base-4.13.0.0/Prelude.html says (<>) was introduced in 4.9.0.0 and the Base_package page says "8.0.1 (May 2016) 4.9.0.0", buddy has got 8.0.2 and there is no (<>)
18:23:43 <jle`> maybe -XNoImplicitPrelude ?
18:23:59 <koz_> xerox_: Yeah, some context.
18:24:04 <jle`> er also (<>) was only "recently"-ish added into Prelude
18:24:08 <monochrom> Perhaps (<>) was not in Prelude back then?
18:24:29 <xerox_> then what does it mean when the Prelude haddock page there says it was introduced in that version
18:24:29 <geekosaur> right it used to be Data.Monoid
18:24:33 lambdaman joins (~lambdaman@d23-16-215-123.bchsia.telus.net)
18:24:41 <jle`> xerox_: that annotation is with the Semigroup typeclass
18:25:01 <monochrom> "in base" could mean "in Data.Monoid.Not.In.Prelude.Utilities.Hairsplit"
18:25:18 <jle`> but also that just says when the semigroup typeclass was defined at all, not necessarily where it was exported from
18:25:21 <xerox_> that's my favorite module
18:25:22 <jle`> it's actually a manual annotation
18:25:27 <jle`> which may be kind of un-ideal
18:25:49 <jle`> you can basically think of it as words someone manually added to the documentation of the SEmigroup typeclass, which was originally not in Prelude
18:26:02 <jle`> but once you export something from a module, it displays the documentation body as-is
18:26:20 <jle`> the "The class of semigroups ..." text, that is
18:26:23 <monochrom> Hottest take: Demolish the institution of modules.
18:26:57 <koz_> monochrom: Now we're getting warmer. :P
18:27:01 <jle`> though it looks special, it's basically text someone manually added to that body. so haddock doesn't know enough about it to realize that it actually means something
18:27:11 <merijn> monochrom: I like information hiding!
18:27:16 <merijn> monochrom: Except when I don't
18:27:30 <unclechu> hey. i’m trying to convert Nat to Symbol, defined this type family instance:
18:27:30 <unclechu> type instance TShow (x ∷ Nat) = If (CmpNat x 10 ≡ 'LT) (TShowNat x) (TShow (Div x 10) ⋄ TShowNat (Mod x 10))
18:27:36 <unclechu> for some reason recursive call of TShow gives an infinite recursion. i used separate type family to overcome this:
18:27:36 <unclechu> type family TShowNat' (α ∷ Nat) (β ∷ Ordering) ∷ Symbol
18:27:42 <merijn> unclechu: oof...
18:27:43 <unclechu> and just calling it like this: TShowNat' x (CmpNat x 10)
18:27:53 <merijn> RIP your sanity :p
18:27:55 <unclechu> does anyone know why is it happening?
18:28:23 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
18:28:31 <unclechu> merijn: did i do something wrong? is there any simpler way to convert Nat to Symbol?
18:28:48 <jle`> unclechu: what are you calling it with?
18:28:50 <unclechu> i just wrote TShowNat that has patterns from 0 to 9
18:28:54 <merijn> unclechu: Well, what you appear to be doing wrong is attempting to write Idris in Haskell :p
18:28:59 electricityZZZZ joins (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net)
18:29:19 <jle`> oh i just saw
18:29:27 <monochrom> I wanted to say that too, but I guess it is unwelcome.
18:29:48 <monochrom> The "helpfulness" police gives me trauma.
18:31:08 <merijn> monochrom: https://i.imgur.com/2VaBYJ1.png
18:31:32 <unclechu> merijn: about “writing Idris in Haskell”, may i tell you a secret that idris was originally written in haskell?
18:31:36 ba joins (znc@fsf/interns/bandali)
18:31:46 <merijn> unclechu: I am well aware of this
18:31:47 <monochrom> and Hugs, C
18:32:08 × Franciman quits (~francesco@host-212-171-88-43.pool212171.interbusiness.it) (Quit: Leaving)
18:32:11 <merijn> unclechu: But the Idris compiler was written in Haskell without Idris style type level programming
18:32:20 × bandali quits (znc@fsf/interns/bandali) (Ping timeout: 256 seconds)
18:32:26 whatisRT joins (~whatisRT@2002:5b41:6a33:0:7903:e9c9:42a2:c7c5)
18:32:26 <merijn> monochrom: Sometimes helpfulness is telling people to stop jamming a fork in their eye :)
18:32:52 <unclechu> merijn: okay then, buy is it illegal to have some fun?
18:33:01 <geekosaur> you call this fun?
18:33:09 <merijn> unclechu: Depends, are you having fun debugging this? :)
18:33:15 <monochrom> I know right? That's why I don't call them helpfulness police, I call them "helpfulness" police, they use the wrong definition.
18:33:16 <merijn> If yes, by all means go ahead
18:33:33 <merijn> But there's probably like 5 people who understand the behaviour of what you're doing :)
18:33:49 <unclechu> merijn: i just wrote another type family in a next minute i found out this “bug” and solved it for me
18:33:50 <merijn> So not many people can help you figure out why it's going wrong
18:34:00 <unclechu> just asking whether i’m missing something
18:34:23 × joaj quits (~joaj@2001:690:2100:110:cceb:227c:edbc:592c) (Ping timeout: 246 seconds)
18:34:32 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
18:34:39 × alp quits (~alp@2a01:e0a:58b:4920:71b4:c750:be0a:d3b3) (Ping timeout: 272 seconds)
18:34:39 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit)
18:34:49 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
18:34:56 × kuribas quits (~user@ptr-25vy0i9ut9m296caj2d.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
18:35:08 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
18:35:45 <monochrom> I just want to point out that "the Idris compiler was written in Haskell" is irrelevant.
18:36:04 <dolio> Lean is written in C++.
18:36:20 <monochrom> In principle an Idris compiler could have been written in Javascript.
18:36:21 <merijn> Haskell is written in Lazy ML!
18:36:22 <geekosaur> that's misparsing what merijn said
18:36:29 <merijn> Oh wait, it's no longer 1989
18:36:41 <unclechu> monochrom: it was a joke anyway, don’t take this argument serious
18:36:47 <monochrom> The type system of Javascript would have nothing to do with the type system of Idris, even when using this compiler.
18:36:57 <monochrom> Ah then sorry! Hahahaha
18:38:58 <monochrom> ObOnTopicButOffTopic I read that someone wrote a virtual machine in javascript and ran Windows 95 in a web browser.
18:39:25 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 240 seconds)
18:40:24 <Rembane> monochrom: How many times can you do that recursively before the computer grinds to a halt?
18:40:50 <merijn> monochrom: pfft, who cares about Windows 95 when C&C runs in the browser?
18:41:16 <monochrom> haha
18:41:52 kupi joins (uid212005@gateway/web/irccloud.com/x-uzfuhbaegjptzqnv)
18:42:36 <monochrom> I think more likely the first bottleneck is which web browser compatible with Windows 95 understands the version of javascript used in writing that virtual machine.
18:43:57 <kupi> if both a and b and c is >0 then a `div` (b * c) == a `div` b `div` c is always true?
18:44:09 × ph88_ quits (~ph88@2a02:8109:9e00:7e5c:51c4:aed6:17c7:3978) (Ping timeout: 272 seconds)
18:44:29 <monochrom> Perhaps you could ask Quickcheck to try?
18:44:37 adm__ joins (~adm@117.208.17.37)
18:45:24 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:7903:e9c9:42a2:c7c5) (Read error: Connection reset by peer)
18:46:03 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
18:46:32 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov)
18:46:48 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
18:48:07 × adm_ quits (~adm@117.208.22.42) (Ping timeout: 246 seconds)
18:49:17 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
18:49:56 × vicfred quits (~vicfred@unaffiliated/vicfred) (Ping timeout: 240 seconds)
18:50:25 × graf_blutwurst quits (~user@2001:171b:226e:adc0:5d47:81b7:1f45:39a6) (Remote host closed the connection)
18:51:03 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit)
18:51:05 × adm__ quits (~adm@117.208.17.37) (Remote host closed the connection)
18:51:14 Iceland_jack joins (~user@31.124.48.169)
18:51:20 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
18:51:58 takuan joins (~takuan@178-116-218-225.access.telenet.be)
18:52:28 <jle`> @check \x y z -> (a > 0 && b > 0 && c > 0) ==> (a `div` (b * c) == a `div` b `div` c)
18:52:30 <lambdabot> *** Failed! Falsifiable (after 1 test):
18:52:31 <lambdabot> () () ()
18:52:38 <jle`> heh
18:52:40 <jle`> wait what
18:52:43 <jle`> oh
18:52:52 <jle`> @check \a b c -> (a > 0 && b > 0 && c > 0) ==> (a `div` (b * c) == a `div` b `div` c)
18:52:55 <lambdabot> +++ OK, passed 100 tests.
18:53:02 <jle`> i say ship it
18:54:08 vicfred joins (~vicfred@unaffiliated/vicfred)
18:54:17 × shf quits (~sheaf@2a01:cb19:80cc:7e00:39e8:c690:7735:f5ef) (Read error: Connection reset by peer)
18:57:15 <monochrom> Now why would that be true?
18:57:22 htmnc joins (~James@2600:1700:4ca1:7640:58de:2da5:48ed:ebde)
18:57:49 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
18:58:11 joaj joins (~joaj@2001:818:e326:8200:5273:55b7:3a86:e6ca)
18:58:32 pavonia joins (~user@unaffiliated/siracusa)
18:59:10 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
19:01:04 × borne quits (~fritjof@200116b864cc28008cdf581d4c1cc02f.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
19:02:05 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
19:02:11 × lambdaman quits (~lambdaman@d23-16-215-123.bchsia.telus.net) (Remote host closed the connection)
19:02:44 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 246 seconds)
19:03:27 berberman joins (~berberman@unaffiliated/berberman)
19:03:51 × tlaxkit quits (~kvirc@185.228.155.198) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
19:04:19 AlonzoC joins (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c)
19:04:24 × AlonzoC quits (~user@2a00:23c4:9010:3d01:d94:1358:c8c9:fd4c) (Remote host closed the connection)
19:04:39 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Quit: Leaving.)
19:05:14 <monochrom> Ah I see now. "It is obvious."
19:05:36 <monochrom> If you're interested, let me know.
19:06:32 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov)
19:06:40 Tops2 joins (~Tobias@dyndsl-095-033-092-058.ewe-ip-backbone.de)
19:06:48 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
19:07:22 <idnar> monochrom: I'm interested
19:07:52 × Aquazi quits (uid312403@gateway/web/irccloud.com/x-zwjlkmtgfeptdpkc) (Quit: Connection closed for inactivity)
19:07:53 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
19:08:02 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
19:08:17 <kupi> me too
19:09:09 lambdaman joins (~lambdaman@d23-16-215-123.bchsia.telus.net)
19:09:28 <Vulfe> Is there a particularly idiomatic way of writing FromJSON instances for Aeson where you're just matching a handful of strings? this feels like a very common use case, so I suspect I'm missing something
19:10:01 <Vulfe> e.g. I write something like parseJSON = withText "MyType" $ \t -> case t of "a" -> pure A ...
19:10:01 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
19:10:11 xcmw joins (~textual@cpe-69-133-55-43.cinci.res.rr.com)
19:10:20 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
19:10:22 × sh9 quits (~sh9@softbank060116136158.bbtec.net) (Quit: WeeChat 2.8)
19:10:34 is_null joins (~jpic@pdpc/supporter/professional/is-null)
19:10:40 <idnar> > 5 `div` 2
19:10:43 <lambdabot> 2
19:10:45 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 260 seconds)
19:11:03 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit)
19:11:17 vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru)
19:11:17 × vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit)
19:11:36 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
19:12:11 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
19:13:12 shf joins (~sheaf@2a01:cb19:80cc:7e00:bd72:6c13:4bde:b40f)
19:15:51 × lpy quits (~nyd@unaffiliated/elysian) (Remote host closed the connection)
19:16:16 lpy joins (~nyd@unaffiliated/elysian)
19:16:44 <monochrom> idnar, kupi: https://paste.tomsmeding.com/YABx7oIp
19:17:31 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 246 seconds)
19:18:18 Varis joins (~Tadas@unaffiliated/varis)
19:19:16 ralu joins (~ralu@static.211.245.203.116.clients.your-server.de)
19:20:06 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection)
19:20:24 Ariakenom_ joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
19:20:44 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
19:21:46 × ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ...zzzZZZ)
19:21:59 ba is now known as bandali
19:22:18 <idnar> monochrom: aha!
19:22:43 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
19:22:59 <monochrom> It is not obvious. But it works out pleasantly.
19:22:59 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
19:23:07 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
19:23:20 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
19:23:21 <monochrom> The remainders fit together so nicely. Who would have thought of that.
19:23:58 × gawen quits (~gawen@movzbl.root.sx) (Remote host closed the connection)
19:25:01 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:25:15 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
19:25:25 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 264 seconds)
19:25:33 <Vulfe> didn't expect to learn something new about the Euclidean algorithm today, but here we are
19:26:03 gawen joins (~gawen@movzbl.root.sx)
19:26:07 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Remote host closed the connection)
19:26:13 × xcmw quits (~textual@cpe-69-133-55-43.cinci.res.rr.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:26:21 vicfred joins (~vicfred@unaffiliated/vicfred)
19:27:17 <kupi> thanks a lot
19:28:05 jneira joins (5127ade4@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.228)
19:28:17 × Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving)
19:30:44 <tomsmeding> alternative way to see the same thing: if 'a' is a mixed-base number in base [infty, b, c], then "clearly" the result holds
19:30:52 <tomsmeding> but that's dependent on knowing that mixed-base numbers work :p
19:32:13 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
19:32:46 <jle`> a/(b*c) = a * 1/b * 1/c = (a/b) * 1/c = (a/b)/c
19:33:15 xcmw joins (~textual@cpe-69-133-55-43.cinci.res.rr.com)
19:33:31 <jle`> my joke landed flat because i forgot to pseudo-justify a/(b*c) = a * 1/(b*c)
19:34:07 Lycurgus joins (~niemand@cpe-45-46-137-210.buffalo.res.rr.com)
19:35:04 Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net)
19:36:21 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
19:38:08 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
19:40:24 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Ping timeout: 240 seconds)
19:40:50 × benjamin-l quits (~benjamin@2601:1c0:8800:67e0:fa16:54ff:febc:2e60) (Ping timeout: 264 seconds)
19:42:23 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
19:43:15 alp joins (~alp@2a01:e0a:58b:4920:24d2:a57:d7c5:214c)
19:44:17 conal joins (~conal@198.8.81.86)
19:46:38 × Ariakenom quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Ping timeout: 256 seconds)
19:46:42 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Read error: Connection reset by peer)
19:46:56 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
19:47:03 × htmnc quits (~James@2600:1700:4ca1:7640:58de:2da5:48ed:ebde) (Quit: Leaving)
19:47:41 jmchael joins (~Chi1thang@87.112.60.168)
19:48:38 ircbrowse_tom joins (~ircbrowse@64.225.78.177)
19:48:38 Server sets mode +CLnt
19:50:26 mivael joins (c16e4caa@193.110.76.170)
19:51:35 adm_ joins (~adm@117.208.17.37)
19:52:31 × AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving)
19:54:38 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
19:56:01 × adm_ quits (~adm@117.208.17.37) (Ping timeout: 260 seconds)
19:56:31 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
19:56:56 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:00:16 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
20:01:33 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
20:01:52 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
20:02:26 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
20:02:48 ski . o O ( <https://haskell-channel-logs.blogspot.com/> )
20:03:29 <monochrom> haha IRC->blogosphere gateway
20:04:07 <monochrom> Will someone also attach a speech synthesizer and make a podcast? >:)
20:04:59 <monochrom> Hottest take: Twitch.
20:05:48 <koz_> 'some' is 'one or more' right?
20:05:54 <monochrom> yes
20:06:08 × darjeeling_ quits (~darjeelin@115.215.41.204) (Ping timeout: 260 seconds)
20:06:12 <dminuoso> I cant seem to remember every time.
20:06:17 <monochrom> many (char 'x') = x* , some (char 'x') = x+
20:06:20 <dminuoso> It's hoogle every time I want to use some/many.
20:06:22 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
20:06:41 juuandyy joins (~juuandyy@90.166.144.65)
20:06:53 <monochrom> Applicative is awesome, Alternative is manysome.
20:07:04 <dminuoso> I have an idea
20:07:08 <dminuoso> "some" sounds a bit like "one"
20:07:23 <monochrom> "for some x" is at least one x
20:07:31 <dminuoso> and "for many x"?
20:07:38 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
20:07:53 <monochrom> I don't have a nice story for many.
20:07:54 <jle`> many sounds like more than some
20:08:15 <xerox_> s/m//
20:08:23 <monochrom> Except that I rote-memorize "there are two of them, many and some, I know what some means, so the other possibility must be many"
20:08:23 <dminuoso> jle`: but that "more" is rather on the upper bound of things, right?
20:08:33 <jle`> yeah
20:08:45 <jle`> i was sort of making an argument about why the names don't fit for me :|
20:09:01 <koz_> Honestly, those names confuse me constantly.
20:09:13 <monochrom> If I had my say I would call it "Kleene star" or "star".
20:09:20 <dminuoso> I'll just try to remember "someone"
20:09:34 <xerox_> kleene 'x'
20:09:36 <monochrom> As usual, intuitive names are meaningless, mathematical terminology is meaningful.
20:09:42 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
20:10:10 <dminuoso> Is there a corresponding name for +?
20:10:13 × xcmw quits (~textual@cpe-69-133-55-43.cinci.res.rr.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:10:32 <koz_> dminuoso: kleene+
20:10:41 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:10:44 <jle`> xerox_: kleenex
20:10:50 <koz_> LOL
20:10:50 <monochrom> hahaha
20:10:54 <xerox_> exactly (:
20:10:58 <koz_> So much wordplay.
20:11:00 benjamin-l joins (~benjamin@2601:1c0:8800:67e0:fa16:54ff:febc:2e60)
20:11:01 <koz_> Very Edward.
20:11:03 <jle`> oh that was your joke
20:11:08 <jle`> nice heh heh
20:11:16 <monochrom> I haven't heard of a mathematical name. But "some" is a pretty good name in this case.
20:11:18 <dminuoso> koz_: I found it confusing.
20:11:19 × Lycurgus quits (~niemand@cpe-45-46-137-210.buffalo.res.rr.com) (Quit: Exeunt)
20:11:23 <dminuoso> :>
20:11:53 <monochrom> "plus" is not bad either.
20:11:53 <xerox_> ah right 'any' is taken, another way to go to get the meaning of 'many'
20:12:14 xcmw joins (~textual@cpe-69-133-55-43.cinci.res.rr.com)
20:12:23 <monochrom> And guess what, "any" means some.
20:12:25 <dminuoso> monochrom: plus 'a' `mplus` x
20:12:31 <jle`> kleenet = one or more kleenex
20:12:52 × lpy quits (~nyd@unaffiliated/elysian) (Quit: lpy)
20:13:03 <monochrom> To Hell with English.
20:13:09 <dminuoso> What about the common idiom of just suffixing with 1.. it's common enough in parser combinators
20:13:13 <dminuoso> with things like sepBy and sepBy1
20:13:38 <dminuoso> Could have some and some1, giving us a nice pun as well
20:13:41 <monochrom> +1
20:13:51 <mivael> hello all! Is there a web resource for pasting code/errors to #haskell which would not require registration? (please correct me if I'm wrong, it seems that gist.github.com mentioned in topic does require registration to create a new gist)
20:13:59 <dminuoso> @where paste -- mivael
20:13:59 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
20:14:01 chaosmasttter joins (~chaosmast@p200300c4a708ba01f588eef3670cf8ef.dip0.t-ipconnect.de)
20:14:16 <mivael> thans
20:14:26 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8) (Ping timeout: 264 seconds)
20:15:35 <dminuoso> I guess the only unreasonable thing about my proposition is that it would break code left and right. So `many` and `many1` would be more reasonable
20:15:46 <dminuoso> But that has no pun. :(
20:15:57 <dminuoso> any and any1 would have been nice
20:16:26 <dminuoso> In unrelated news, would you oppose to Data.Traversable re-exporting traverse_?
20:16:44 <dminuoso> I feel annoyed every time. :(
20:17:20 <jle`> but is it not a lie
20:17:30 <lortabac> honestly I think they are both common enough to deserve a place in Prelude
20:17:51 <dminuoso> jle`: Is it? Traversable is a superclass of Foldable, I dont mind it re-exporting it a few Foldable primitives.
20:17:52 × xcmw quits (~textual@cpe-69-133-55-43.cinci.res.rr.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:17:59 <dminuoso> Or. Subclass I guess.
20:18:02 benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-jvjqyyvaxiprykpx)
20:18:17 <monochrom> See also: <monochrom> Hottest take: Demolish the institution of modules.
20:18:29 <dminuoso> Put everything into Prelude?
20:19:02 Stanley00 joins (~stanley00@unaffiliated/stanley00)
20:19:37 <monochrom> More seriously and feasibly, I am OK with Data.Traversable re-exporting traverse_ and generally Foldable stuff.
20:19:55 <monochrom> But I use mapM_ anyway, which is in Prelude.
20:20:04 <koz_> jle`: Does your all-singing, all-dancing non-empty container library have some equivalent of '(findMin nes, deleteMin s)'?
20:20:25 <dminuoso> Oh wait. mapM_ is in prelude? Strange that traverse_ is not then
20:20:33 <merijn> dminuoso: Historical artifact
20:20:39 <koz_> dminuoso: Yeah, it's my biggest Data.Foldable import.
20:20:48 <monochrom> I support traverse_ going into Prelude too.
20:20:48 <merijn> koz_: You mean just containers?
20:21:09 × thevishy quits (~Nishant@103.210.43.249) (Quit: Leaving)
20:21:24 darjeeling_ joins (~darjeelin@115.215.41.204)
20:21:37 <koz_> merijn: I meant specifically jle's library for non-empty containers.
20:21:56 <jle`> i think it's the same as for containers
20:21:57 MrSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
20:22:14 <jle`> but it depends on what you want the relationship between nes and s to be
20:22:19 hidedagger joins (~nate@unaffiliated/hidedagger)
20:22:23 <koz_> jle`: Spelling.
20:22:27 <koz_> I meant something of type
20:22:35 <koz_> NESet a -> (a, Set a)
20:22:46 <jle`> deleteFindMin i think
20:22:54 <koz_> Oh, nice, thank you!
20:22:58 <koz_> That's perfect.
20:23:24 <jle`> np! yeah when i can i try to keep the same name as containers has
20:23:58 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 256 seconds)
20:24:08 × gremax quits (znc@torba.club) (Quit: Bye)
20:24:27 gremax joins (znc@torba.club)
20:24:32 <monochrom> The Haskell Library Committee is a bicarmeral, multiple-party, pertually minority-government governing body that takes hairsplitting to the next level. It will take another 30 years before it reaches a consensus to add traverse_ to Prelude. This is not strange. >:)
20:24:45 × dirediresalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Ping timeout: 240 seconds)
20:25:06 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
20:25:26 doct0rhu joins (~orctarorg@pool-72-88-158-154.nwrknj.fios.verizon.net)
20:25:41 <dminuoso> monochrom: So what you mean by that is, if the automotive industry has some vast interest in that happening, it will happen silently
20:25:53 <monochrom> haha
20:26:24 <maerwald> Add traverse_ to 26262
20:26:42 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
20:27:00 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
20:27:09 <maerwald> Only if the government forces them, it will eventually land in Prelude
20:27:52 × juuandyy quits (~juuandyy@90.166.144.65) (Quit: Konversation terminated!)
20:27:57 <pie_> are there possibly more obscure alternative designs to REST APIs that I should look at?
20:28:18 <maerwald> gRPC
20:28:21 <monochrom> CGI
20:28:26 <doct0rhu> Greetings, I asked about how to make docs of private items last night/(earlier this morning?)
20:28:27 <dminuoso> lol
20:28:48 <doct0rhu> I later found a solution to make this a bit easier
20:28:49 <doct0rhu> https://paste.tomsmeding.com/siEaStgC
20:29:34 <doct0rhu> I'm new to haskell and it's my first project. (configuring xmonad)
20:29:42 <dminuoso> pie_: You want more obscure, you could just go plain RPC.
20:30:19 <doct0rhu> I want to contribute to `xmoand-contrib` but sadly it doesn't work with my version of `haskell-language-server`.
20:31:53 <doct0rhu> It complained that `ghcide` was compiled with a different `ghc` version...
20:32:13 <koz_> pie_: Also XMPRPC is a thing.
20:32:19 <doct0rhu> > ghcide compiled against GHC 8.8.2 but currently using 8.8.4
20:32:19 <doct0rhu> This is unsupported, ghcide must be compiled with the same GHC version as the project.
20:32:22 <koz_> s/XMP/XML/
20:32:22 <lambdabot> error:
20:32:22 <lambdabot> Variable not in scope: ghcide :: t0 -> t1 -> t2 -> t3 -> b0 -> cerror: V...
20:32:22 <lambdabot> • Variable not in scope: against
20:32:23 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds)
20:32:48 <dminuoso> doct0rhu: Yes, you must use the same GHC version.
20:33:00 <doct0rhu> I actually have installed GHC 8.8.2
20:33:04 <pie_> dminuoso: not obscure is also fine :p
20:33:29 <dminuoso> pie_: It depends on what you do, really.
20:33:40 <dminuoso> You could write a wireprotocol directly ontop of TCP
20:34:11 <dminuoso> The main benefit of going through HTTP (say via JSON in HTTP or gRPC) is that session/authentication is mostly done for you already.
20:34:12 <pie_> that doest give me any design principles though
20:34:21 <dminuoso> At the cost of shoving your protocol through a different semantic protocol
20:34:28 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
20:34:30 <pie_> (well im not sure REST does eitherm, i just started looking around)
20:34:32 <mivael> Could anyone give me 'some' (not 'many') hints in troubleshooting this? https://paste.tomsmeding.com/KQAIlolF Why it fails with 'lines' but works with 'const'? (I'm not in control of the managing program, I submit this code to them, get my stderr and their replies to my output. I'm pretty sure that their inputs do not change from run to run.)
20:34:42 <doct0rhu> I probably didn't configure something right because when I run `haskell-language-server-8.8.2` I saw things like `> Build profile: -w ghc-8.8.4 -O1
20:34:43 <doct0rhu> `
20:35:54 × jneira quits (5127ade4@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.228) (Ping timeout: 260 seconds)
20:36:00 <dminuoso> pie_: design principles.. not sure what you are looking for example
20:36:06 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 256 seconds)
20:36:27 <dminuoso> But if you want cool and sleek ideas, check out typed-protocols.
20:36:48 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
20:36:50 <koz_> dminuoso: Link?
20:36:56 <koz_> mivael: Is this, perchance, homework?
20:36:56 <dminuoso> https://input-output-hk.github.io/ouroboros-network/typed-protocols/Network-TypedProtocol.html
20:38:04 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
20:38:41 <mivael> koz_: not a homework, just a hobby thing (thhis one, if you are interested: https://www.codingame.com/multiplayer/optimization/search-race)
20:38:46 jneira joins (5127ade4@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.228)
20:38:47 <doct0rhu> well you know what.. I solved this with `ghcup set 8.8.2`....
20:38:58 <koz_> mivael: OK, thanks. Had to ask.
20:39:09 jespada joins (~jespada@90.254.245.49)
20:39:47 <dminuoso> mivael: I cant quite decipher what the comments denote exactly.
20:40:37 britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch)
20:42:17 xcmw joins (~textual@cpe-69-133-55-43.cinci.res.rr.com)
20:42:51 <mivael> dminuoso: in short, my code works fine but it gets a timeout with f1... in f2 I just const-ed the input I get from the managing program
20:43:12 <mivael> * works fine with f2
20:44:42 <geekosaur> I'm going to guess the problem is buffering
20:44:52 <geekosaur> look up hSetBuffering
20:45:59 <mivael> geekosaur, thanks!
20:46:20 <pie_> dminuoso: a'ight
20:46:40 christo joins (~chris@81.96.113.213)
20:48:24 × jneira quits (5127ade4@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.228) (Ping timeout: 272 seconds)
20:49:20 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:51:36 jneira joins (5127ade4@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.228)
20:53:17 × aoei quits (aoei@2a01:7e01::f03c:92ff:fe4f:e85a) (Quit: ZNC 1.7.5 - https://znc.in)
20:55:46 <doct0rhu> well.. having "ghcup set 8.8.2" is not good enough for me. I tried to use `cabal.project.local` to set project ghc to 8.8.2 instead but haskell-language-server doesn't respect that setting
20:56:30 aoei joins (~aoei@li2174-104.members.linode.com)
20:56:38 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
20:57:29 × _xor quits (~xor@74.215.46.133) (Ping timeout: 260 seconds)
20:57:53 × dhil quits (~dhil@195.213.192.34) (Ping timeout: 265 seconds)
20:58:52 jollygood2 joins (~bc8165ab@217.29.117.252)
20:59:16 <monochrom> <Vent> Gosh, one bug report attempt leads to another, with non-tail recursion, no?
20:59:55 <monochrom> I found out that "ghcup install cabal" makes the cabal-install exe world-writable, so I want to report that.
21:00:14 <merijn> doct0rhu: haskell-langague-server is tied to a specific GHC it's compiled with
21:00:17 <monochrom> gitlab.haskell.org offers "sign in with github", so I try that.
21:00:27 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
21:00:38 <monochrom> It results in "500". So now I also have a bug report for gitlab.haskell.org...
21:00:46 <monochrom> </Vent>
21:00:57 × alp quits (~alp@2a01:e0a:58b:4920:24d2:a57:d7c5:214c) (Ping timeout: 272 seconds)
21:01:26 <doct0rhu> @merijn, thanks I know that. I installed hls via ghcup and it's supposed to install hls for various ghc versions
21:01:27 <lambdabot> Unknown command, try @list
21:01:56 <maerwald> monochrom: yeah, that's software...
21:02:12 <doct0rhu> merijn, thanks I know that. I installed hls via ghcup and it's supposed to install hls for various ghc versions
21:02:56 <maerwald> with cabal, hls fails to pick the correct ghc version. I haven't seen this problem with stack
21:03:26 <doct0rhu> but actually `xmonad-contrib` supports stack too
21:03:42 <monochrom> I guess I'll fall back to registering on gitlab.haskell.org independent of my github.com account. It makes more sense in the long term anyway. But after afternoon tea.
21:03:49 <maerwald> I use (if ever) hls via stack cradle and use cabal for my normal workflow
21:04:15 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
21:04:38 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
21:04:40 <doct0rhu> the .gitignore has cabal.project.local and cable.config so I think they are the only two files I can specify a ghc version
21:04:45 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection)
21:05:52 <maerwald> monochrom: what happens with oauth, when github locks your account?
21:05:53 <doct0rhu> and I've both of them specified ghc-8.8.2 but hls still cannot get the right ghc version..
21:05:53 <monochrom> Someone once asked me "why don't you install hls" like I committed a crime. I now know why I didn't install hls.
21:06:17 <doct0rhu> even after I use haskell-language-server-8.8.2 instead of haskell-language-server-wrapper
21:07:25 knupfer joins (~Thunderbi@200116b82c870c0040a81efffe6ee436.dip.versatel-1u1.de)
21:08:04 Deide joins (~Deide@217.155.19.23)
21:08:16 × knupfer quits (~Thunderbi@200116b82c870c0040a81efffe6ee436.dip.versatel-1u1.de) (Remote host closed the connection)
21:08:25 knupfer joins (~Thunderbi@200116b82c870c000d3c5f9e8cecb967.dip.versatel-1u1.de)
21:08:41 <maerwald> monochrom: and before you ask "why"... that's the reason ghcup is now on gitlab and not github
21:08:43 <maerwald> :D
21:09:06 <monochrom> Don't worry, I don't mind where it's hosted.
21:09:29 <monochrom> It's just one of those rare murphy-law days.
21:09:35 <maerwald> (they have a spam detection that sometimes triggers and will get your account locked and ALL your repos and comments hidden everywhere)
21:10:47 × orion quits (~orion@unaffiliated/orion) (Quit: "")
21:10:47 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
21:11:07 <monochrom> I hate humanity.
21:11:15 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
21:11:16 borne joins (~fritjof@200116b864cc28008cdf581d4c1cc02f.dip.versatel-1u1.de)
21:11:35 <monochrom> https://www.smbc-comics.com/comic/like-2
21:12:33 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 260 seconds)
21:12:34 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
21:12:57 × britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep)
21:13:12 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:13:21 conal joins (~conal@198.8.81.86)
21:13:44 × conal quits (~conal@198.8.81.86) (Client Quit)
21:15:12 conal joins (~conal@198.8.81.86)
21:15:19 × conal quits (~conal@198.8.81.86) (Client Quit)
21:18:02 alp joins (~alp@2a01:e0a:58b:4920:dc54:a0f8:3325:44d9)
21:22:02 cosimone_ joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
21:22:21 <tomsmeding> "it's obvious"
21:22:33 <hekkaidekapus> doct0rhu: Take a look at #haskell-ide-engine
21:22:46 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:22:54 _xor joins (~xor@74.215.46.133)
21:23:00 × cosimone_ quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Remote host closed the connection)
21:23:06 × coot quits (~coot@37.30.53.191.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
21:23:54 <doct0rhu> hekkaidekapus, thanks!!
21:24:10 <hekkaidekapus> np
21:25:29 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Ping timeout: 260 seconds)
21:25:35 <mivael> geekosaur, it works! Thanks again! As monochrom suggested yesterday, I was so concerned with laziness that missed the obvious buffering things... https://paste.tomsmeding.com/jaZxQWNb
21:25:47 × zebrag quits (~inkbottle@aaubervilliers-654-1-118-216.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!)
21:26:07 zebrag joins (~inkbottle@aaubervilliers-654-1-118-216.w86-198.abo.wanadoo.fr)
21:27:30 conal joins (~conal@198.8.81.86)
21:27:41 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
21:28:02 × xcmw quits (~textual@cpe-69-133-55-43.cinci.res.rr.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:28:15 texasmynsted joins (~texasmyns@212.102.44.36)
21:30:07 × knupfer quits (~Thunderbi@200116b82c870c000d3c5f9e8cecb967.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
21:31:06 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
21:31:58 xcmw joins (~textual@cpe-69-133-55-43.cinci.res.rr.com)
21:33:10 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Quit: leaving)
21:33:44 × xff0x quits (~fox@port-92-195-73-58.dynamic.as20676.net) (Ping timeout: 256 seconds)
21:33:59 is7s joins (d4a14e54@212.161.78.84)
21:34:14 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
21:34:59 cptwunderlich joins (d4ba391c@gateway/web/cgi-irc/kiwiirc.com/ip.212.186.57.28)
21:35:08 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
21:35:29 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
21:35:35 dhil joins (~dhil@195.213.192.34)
21:35:53 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
21:36:59 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Quit: Goodbye)
21:37:50 × Yumasi quits (~guillaume@2a01:e0a:5cb:4430:6448:a1be:2d68:fad7) (Ping timeout: 264 seconds)
21:37:59 <monochrom> I think you can safely use LineBuffering, which is a good middle ground between efficiency and responsiveness.
21:38:03 xff0x joins (~fox@2001:1a81:5348:9f00:a33e:b10d:3d9:e994)
21:39:31 <geekosaur> given use of lines/unlines, yes, I figured LineBuffering was appropriate
21:39:34 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
21:40:36 × geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection)
21:42:53 Codaraxis_ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net)
21:43:48 is7s parts (d4a14e54@212.161.78.84) ()
21:45:18 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
21:45:54 × Codaraxis quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Ping timeout: 260 seconds)
21:46:16 <monochrom> OK, registering on gitlab the manual way is a 500 too.
21:46:27 <monochrom> s/gitlab/gitlab.haskell.org/
21:46:32 <merijn> monochrom: Sign from the gods :p
21:46:41 <monochrom> Does #haskell-infrastructure exist?
21:47:02 <monochrom> Bah I'll just try.
21:47:35 Vulfe joins (~vulfe@2600:1702:31b0:34e0:a527:3d61:9b10:c6d8)
21:49:09 <zgrep> <tomsmeding> that 31337 looks suspicious <-- Yes, I am suspicious.
21:49:49 <monochrom> 31337 is a prime number.
21:50:53 Ariakenom joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
21:51:10 × Ariakenom_ quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Read error: Connection reset by peer)
21:51:26 <tomsmeding> aeson requiring more than 2GB to build wasn't a bug, right? no it wasn't
21:51:44 <monochrom> Not a bug.
21:53:45 × revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 240 seconds)
21:53:56 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Ping timeout: 240 seconds)
21:54:18 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
21:54:41 revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net)
21:55:54 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
21:57:51 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
22:00:22 Rudd0 joins (~Rudd0@185.189.115.103)
22:01:45 × mivael quits (c16e4caa@193.110.76.170) (Ping timeout: 245 seconds)
22:03:03 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:03:28 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
22:03:43 is7s joins (~is7s@212.161.78.84)
22:04:17 loller is now known as loller_
22:04:45 loller_ is now known as loller
22:06:13 llagi1234 joins (~llagi1234@200.78.173.253)
22:06:20 <llagi1234> Hi
22:06:33 Ariakenom_ joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se)
22:07:17 × llagi1234 quits (~llagi1234@200.78.173.253) (Quit: Quit)
22:07:35 llagi1234 joins (~llagi1234@200.78.173.253)
22:07:48 justsomeguy joins (~justsomeg@216.186.218.241)
22:07:48 × justsomeguy quits (~justsomeg@216.186.218.241) (Changing host)
22:07:48 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
22:08:17 × llagi1234 quits (~llagi1234@200.78.173.253) (Client Quit)
22:08:31 <cptwunderlich> Hi everyone! I'm in a bit of a pickle, maybe someone can help:
22:08:46 llagi1234 joins (~llagi1234@200.78.173.253)
22:09:01 <llagi1234> Bye
22:09:04 <cptwunderlich> I have a function `Something -> [Foo a]` that is used with other, similar functions. I would like to add a concrete element for a
22:09:13 × llagi1234 quits (~llagi1234@200.78.173.253) (Client Quit)
22:09:20 <cptwunderlich> e.g., [Foo Bar]
22:09:21 × Vq quits (~vq@90-227-195-41-no77.tbcn.telia.com) (Ping timeout: 272 seconds)
22:09:29 × Ariakenom quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Ping timeout: 260 seconds)
22:09:29 × Moyst quits (~moyst@212-149-213-144.bb.dnainternet.fi) (Ping timeout: 260 seconds)
22:09:43 <cptwunderlich> And I get an error bc. "rigit type variable" etc
22:09:52 mbomba joins (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca)
22:09:56 Vq joins (~vq@90-227-195-41-no77.tbcn.telia.com)
22:10:03 <c_wraith> that sounds like you're trying to make them concrete in a context where they are required to be polymorphic
22:10:08 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
22:10:08 <cptwunderlich> Does anyone know any way to remedy this? (shady is ok, it's for debugging)
22:10:09 <monochrom> Perhaps your function type should be Something -> [Foo Bar]
22:10:33 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:10:42 <cptwunderlich> It is a polymorphic function, a bunch of them, operating on a list. I Know the concrete type and I would like to inject a few elements for debugging only
22:10:57 Moyst joins (~moyst@212-149-213-144.bb.dnainternet.fi)
22:11:01 <cptwunderlich> so maybe something with "coerce" would do, but I have never touched that stuff
22:11:02 <ski> cptwunderlich : `foo :: Something -> [Foo a]' promises to the caller to work for all types `a'. not just `Bar'. so if caller picks `a' to be `Bool', then your `Foo Bar' elements doesn't have type `Foo Bool', doesn't work
22:11:22 mounty joins (~mounty@2001:8000:2f59:0:348e:496f:dd83:259f)
22:11:38 <cptwunderlich> Yes, I realized that.
22:11:46 <ski> perhaps you can pass in the debug element, or a list of them, as separate parameter(s) ?
22:11:48 <cptwunderlich> I'm asking for an emergency loop-hole ^^ For one time debugging only
22:11:51 <monochrom> I don't understand "debug by injecting elements" if the production version would never inject similar elements.
22:12:07 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
22:12:07 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
22:12:14 × mbomba quits (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca) (Client Quit)
22:12:21 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
22:12:22 <cptwunderlich> It's a code generator, that can emit code for different platforms - but I know It's x86_64 bc. that's what I'm using and working on
22:12:23 <c_wraith> cptwunderlich: unsafeCoerce is the only emergency loophole
22:12:35 <cptwunderlich> great, I will check it out. thanks
22:12:36 <monochrom> I can understand debugging messages. I don't understand fictional debugging data that has no chance of happening in reality.
22:12:49 conal joins (~conal@198.8.81.86)
22:12:50 <cptwunderlich> I want to emit ASM COMMENT instructions
22:12:55 <cptwunderlich> But they are platform specific
22:12:57 <c_wraith> cptwunderlich: it *will* break your program. you can be assured of that.
22:13:09 <monochrom> I am not telepathic.
22:13:10 <cptwunderlich> It will not be commitet or make it into production
22:13:13 <cptwunderlich> Promised ;)
22:13:31 elfets_ joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
22:13:45 <cptwunderlich> monochrom Didn't assume that, tried to ask a question with minimal context. You asked, I gave more details.
22:13:47 <c_wraith> It's the bad kind of unsafe, where things seem to work, right up until you get corrupted data at runtime in seemingly-unrelated places
22:13:54 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds)
22:13:58 <merijn> See, the problem is that there is no emergency "loophole"
22:14:37 <merijn> There's unsafeCoerce, but that's not so much "opening an emergency loophole" and more "opening an emergency wormhole the size of the galaxy and letting Lovecraftian eldritch horrors into your address space"
22:14:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
22:15:24 <monochrom> The type Something->[Foo a] is problematic in the first place. Unless Foo a has some data constructors that are independent of a.
22:15:32 <c_wraith> a crash is the *good* case when using unsafeCoerce
22:15:33 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 260 seconds)
22:16:46 <monochrom> For example if I promise "xxx :: [Maybe a]" then you can be pretty sure that here are the only non-trolling possibilities: [], [Nothing], [Nothing, Nothing], [Nothing, Nothing, Nothing], ..., [Nothing, Nothing, ... infinite list]
22:17:15 <monochrom> It cannot possibly be [Just 1]. It cannot possibly be [Just True].
22:17:52 × is7s quits (~is7s@212.161.78.84) ()
22:17:53 <monochrom> Since in production code it cannot be [Just 1], what good is "testing" with [Just 1]? What would you learn that would be relevant to reality?
22:17:59 <cptwunderlich> Thanks, it works (well compiles). I realize that this is a big no-no, that's why I have never touched the unsafe stuff so far, but in this case it's justified, promise ;)
22:18:26 <merijn> RIP your sanity
22:18:27 <c_wraith> unsafeCoerce tends to always compile. that's the problem with it. :)
22:18:53 <monochrom> And if you're open to trolling, here are some trolling possibilities: [Just undefined], [Just undefined, Just undefined], ...
22:19:14 gioyik joins (~gioyik@186.118.250.147)
22:19:45 <merijn> cptwunderlich: Well...at least the rest of your evening will be...interesting :)
22:20:09 <monochrom> This is why I'm against "Haskell needs more evangelism and adoption".
22:20:29 <cptwunderlich> merijn I've been trying to debug this for 3 days, so it can only get better ;)
22:20:40 <monochrom> No, I don't what the hacky-clutchy people to adopt Haskell. They would ruin everything.
22:20:58 <merijn> cptwunderlich: hah
22:21:01 <cptwunderlich> If I can have some COMMENT pseudo-instructions instead of staring at a see of assembly, that might clarify some things
22:21:01 <monochrom> I want people who respect parametric polymorphism to adopt Haskell.
22:21:08 <merijn> cptwunderlich: You're about to get a bad awakening I fear :)
22:21:35 × MrSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
22:21:40 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
22:21:58 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection)
22:22:00 MrSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
22:22:11 conal joins (~conal@198.8.81.86)
22:22:28 × conal quits (~conal@198.8.81.86) (Client Quit)
22:23:05 × lassulus quits (~lassulus@NixOS/user/lassulus) (Remote host closed the connection)
22:23:22 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Ping timeout: 246 seconds)
22:23:28 Unicorn_Princess joins (~Unicorn_P@89-212-115-169.static.t-2.net)
22:23:32 lassulus joins (~lassulus@NixOS/user/lassulus)
22:26:20 conal joins (~conal@198.8.81.86)
22:26:49 <Unicorn_Princess> are https://github.com/timbod7/haskell-chart/wiki and https://diagrams.github.io/ still the recommended ways to do basic graphics/plotting in haskell, or should i be using something else? and if you happen to know of something comparable for c++ or rust, i'd also be interested. no specific application in mind however.
22:28:14 <ski> cptwunderlich : perhaps your `Something' type actually involved `a' as well ..
22:28:29 <monochrom> or the Foo type should not.
22:28:38 × chaosmasttter quits (~chaosmast@p200300c4a708ba01f588eef3670cf8ef.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
22:28:46 <ski> (or perhaps `Foo a' involved `a' contravariantly, or perhaps involving a GADT where the index involved `a')
22:28:52 <monochrom> What is polymorphism doing here for code generation anyway.
22:28:54 <cptwunderlich> Well, something is not working bc. I can't see it in my output. Gah
22:29:01 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
22:29:15 <cptwunderlich> > What is polymorphism doing here for code generation anyway.
22:29:17 <lambdabot> <hint>:1:60: error:
22:29:18 <lambdabot> <hint>:1:60: error:
22:29:18 <lambdabot> parse error (possibly incorrect indentation or mismatched brackets)
22:29:23 <cptwunderlich> To reuse parts of the backend
22:29:45 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:29:49 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
22:30:02 <monochrom> That was a rhetorical quesiton.
22:31:42 × elfets_ quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 256 seconds)
22:32:22 <merijn> Unicorn_Princess: I wish I did
22:32:53 <merijn> Unicorn_Princess: I have two projects doing plotting, one calls gnuplot as external process, the other matplotlib >.>
22:36:34 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
22:38:59 <shapr> Has anyone used haskell LDAP libraries to talk to Red Hat IDM?
22:41:44 conal joins (~conal@198.8.81.86)
22:44:37 × joaoh82_ quits (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net) (Remote host closed the connection)
22:44:58 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
22:45:11 joaoh82 joins (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net)
22:47:00 × infinity0 quits (~infinity0@freenet/developer/infinity0) (Remote host closed the connection)
22:50:01 × joaoh82 quits (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net) (Ping timeout: 265 seconds)
22:50:04 × Ariakenom_ quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Quit: Leaving)
22:50:36 infinity0 joins (~infinity0@freenet/developer/infinity0)
22:50:47 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:53:53 × fendor_ quits (~fendor@178.115.131.244.wireless.dyn.drei.com) (Remote host closed the connection)
22:54:49 × sondr3 quits (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving)
22:55:07 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
22:55:11 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
22:58:51 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
23:03:53 × Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 246 seconds)
23:04:44 cptwunderlich parts (d4ba391c@gateway/web/cgi-irc/kiwiirc.com/ip.212.186.57.28) ()
23:06:11 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
23:07:53 conal joins (~conal@198.8.81.86)
23:08:05 aarvar joins (~foewfoiew@50.35.43.33)
23:11:58 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
23:12:47 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
23:13:14 × infinity0 quits (~infinity0@freenet/developer/infinity0) (Remote host closed the connection)
23:15:24 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Quit: leaving)
23:16:29 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 246 seconds)
23:17:43 × xcmw quits (~textual@cpe-69-133-55-43.cinci.res.rr.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:21:47 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
23:22:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
23:22:45 joaoh82 joins (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net)
23:22:53 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
23:23:34 <koz_> @hoogle cmp
23:23:34 <lambdabot> Data.Vector.Fusion.Bundle cmp :: Ord a => Bundle v a -> Bundle v a -> Ordering
23:23:34 <lambdabot> Data.Vector.Generic cmp :: (Vector v a, Ord a) => v a -> v a -> Ordering
23:23:34 <lambdabot> RIO.Vector cmp :: (Vector v a, Ord a) => v a -> v a -> Ordering
23:23:46 <koz_> I guess I want 'compare'.
23:23:48 <koz_> :t compare
23:23:49 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo)
23:23:49 <lambdabot> Ord a => a -> a -> Ordering
23:24:04 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
23:24:34 xcmw joins (~textual@2607:f388:1080:2::c2)
23:24:36 aarvar parts (~foewfoiew@50.35.43.33) ()
23:25:04 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Client Quit)
23:25:28 <koz_> > EQ <> EQ
23:25:30 <lambdabot> EQ
23:25:35 <koz_> > EQ <> LT
23:25:38 <lambdabot> LT
23:25:42 <koz_> > EQ <> GT
23:25:44 <lambdabot> GT
23:25:50 <koz_> Hmm, interesting.
23:26:20 <koz_> Is there a more concise way to spell something like (x `compare` x') <> (y `compare` y')?
23:27:50 <koz_> :t comparing
23:27:52 <lambdabot> Ord a => (b -> a) -> b -> b -> Ordering
23:28:20 × rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit)
23:28:35 rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com)
23:28:53 <ski> `EQ' is neutral element
23:29:14 <koz_> ski: So EQ <> anything == anything <> EQ == EQ ?
23:29:25 <ski> > sortBy (comparing length <> compare) (words "The quick brown fox jumps over the lazy dog")
23:29:27 <lambdabot> ["The","dog","fox","the","lazy","over","brown","jumps","quick"]
23:29:45 × nisstyre quits (~wes@python-zero/conduct-committee/nisstyre) (Quit: WeeChat 2.8)
23:29:52 <ski> (primarily sorts by length, then for words of the same length, sorts them normally/lexicographically)
23:29:52 jamm_ joins (~jamm@unaffiliated/jamm)
23:30:14 nisstyre joins (~wes@python-zero/conduct-committee/nisstyre)
23:30:42 <ski> @where monoids
23:30:42 <lambdabot> comment on "Monoids? In my programming language?" by Cale in 2008 (or 2009 ?) at <http://www.reddit.com/r/programming/comments/7cf4r/monoids_in_my_programming_language/c06adnx> about a use of `
23:30:42 <lambdabot> instance Monoid a => Monoid (rho -> a)'
23:32:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:33:29 × jlamothe quits (~jlamothe@198.251.55.207) (Ping timeout: 260 seconds)
23:33:42 <iqubic> How does that work?
23:33:48 <iqubic> :t comparing length
23:33:50 <lambdabot> Foldable t => t a -> t a -> Ordering
23:34:04 <iqubic> :t comparing length <> compare
23:34:06 <lambdabot> (Foldable t, Ord (t a)) => t a -> t a -> Ordering
23:34:18 <iqubic> I'm so confused by that.
23:34:23 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds)
23:34:25 × L29Ah quits (~L29Ah@unaffiliated/l29ah) (Ping timeout: 260 seconds)
23:34:38 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
23:34:45 × joaoh82 quits (~joaoh82@ip-213-127-88-241.ip.prioritytelecom.net) (Ping timeout: 240 seconds)
23:34:52 aplainze1akind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
23:35:02 <merijn> iqubic: "instance Monoid r => Monoid (a -> r) where mempty = \_ -> mempty; mappend f g = \x -> mappend (f x) (g x)"
23:35:15 aplainze1akind is now known as aplainzetakind
23:35:18 <merijn> iqubic: Except that instance applies recursively, so works for any number of arguments
23:35:34 <ski> @type comparing (length :: [a] -> Int) <> compare
23:35:36 <lambdabot> Ord a => [a] -> [a] -> Ordering
23:35:54 <merijn> :t comparing length
23:35:56 <lambdabot> Foldable t => t a -> t a -> Ordering
23:36:01 <merijn> :t compare
23:36:03 <lambdabot> Ord a => a -> a -> Ordering
23:36:07 <iqubic> mempty = const mempty and f <> g = \x -> (f x) <> (g x).
23:36:12 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
23:36:16 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Remote host closed the connection)
23:36:30 <ski> so, it's using the `Monoid Ordering' on the `Ordering' result of `comparing length' and `compare', combining them with a preferential merging. only if the first is `EQ', does it check the latter
23:37:10 <iqubic> Wait. Is "comparing length <> compare" the same as "comparing (length <> compare)"?
23:37:16 <merijn> iqubic: no
23:37:21 <merijn> the latter is a type error
23:37:29 <iqubic> :t comparing
23:37:30 <lambdabot> Ord a => (b -> a) -> b -> b -> Ordering
23:37:42 <iqubic> :t comparing length
23:37:44 <lambdabot> Foldable t => t a -> t a -> Ordering
23:38:35 <merijn> iqubic: "comparing f" simply applies 'f' to both sides and compares the result
23:38:39 <iqubic> I know.
23:38:51 infinity0 joins (~infinity0@freenet/developer/infinity0)
23:38:52 <koz_> Galaxy brain question: are all type errors equal?
23:39:03 × hackage quits (mniip@haskell/bot/hackage) (Remote host closed the connection)
23:39:05 × orcus- quits (~orcus@unaffiliated/orcus) (Quit: ZNC 1.7.5 - https://znc.in)
23:39:16 <merijn> koz_: Define "all", "type", "error", and "equal" :)
23:39:22 <koz_> merijn: Darn.
23:39:23 ishutin joins (~Ishutin@80-95-86-98.pool.digikabel.hu)
23:39:27 orcus joins (~orcus@unaffiliated/orcus)
23:39:35 <monochrom> Type Error Farm. "Some type errors are more equal than others."
23:39:39 hackage joins (mniip@haskell/bot/hackage)
23:39:45 <merijn> koz_: Especially equal is hard
23:40:08 <monochrom> Equal is easy if you use uni-valued univalence.
23:40:11 jlamothe joins (~jlamothe@198.251.55.207)
23:40:11 <koz_> merijn: I too have read Girard's book, wherein he opines on this point in a very French way in Chapter 1.
23:40:19 <merijn> Spend 5 minutes looking into dependent types and homotopy type theories and discover there's about infinitely many ways for things to be equal ;)
23:40:28 <ski> which book's that, koz_ ?
23:40:40 <ski> ("Proofs and Types" ?)
23:40:49 <koz_> ski: That one.
23:40:56 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
23:41:05 <ski> he's often interesting
23:41:10 <monochrom> Ah, the French have first-hand experience in this because "the King of France" is the prototypical example in the topic of referential transparency.
23:41:21 ski watched half of a talk of his .. in french
23:41:31 <ski> (only trouble is that i don't understand french)
23:41:50 <iqubic> Alright. I know understand how "sortBy (comparing length <> compare)" works.
23:42:14 <monochrom> If you understand "the King of France is bold" you understand referential transparency, equality, pure functional programming, and effect systems. >:)
23:42:53 <koz_> monochrom: Is that an example of reduction? :P
23:43:03 <monochrom> ha I don't know
23:43:09 × ishutin_ quits (~Ishutin@193-110-63-35.cable-modem.hdsnet.hu) (Ping timeout: 260 seconds)
23:43:37 <monochrom> I should have added "quantum-gravity unification" there for good measure.
23:43:49 × conal quits (~conal@198.8.81.86) (Quit: Computer has gone to sleep.)
23:44:52 <iqubic> :t comparing
23:44:54 <lambdabot> Ord a => (b -> a) -> b -> b -> Ordering
23:45:35 <ski> @hoogle Eq b => (a -> b) -> (a -> a -> Bool)
23:45:36 <lambdabot> Distribution.Simple.Utils equating :: Eq a => (b -> a) -> b -> b -> Bool
23:45:36 <lambdabot> Distribution.Utils.Generic equating :: Eq a => (b -> a) -> b -> b -> Bool
23:45:36 <lambdabot> CorePrelude equating :: Eq a => (b -> a) -> b -> b -> Bool
23:46:03 mbomba joins (~mbomba@bras-base-toroon2719w-grc-49-142-114-9-241.dsl.bell.ca)
23:46:38 <hekkaidekapus> monochrom: There is also: « L'État, c’est moi. » for full referential transparency. (”The state and I are uno.” :p)
23:46:55 <koz_> hekkaidekapus: I call a category error.
23:46:57 conal joins (~conal@198.8.81.86)
23:47:12 <iqubic> "comparing length <> compare" works like this: https://dpaste.com/H8X5SENPN
23:47:22 <hekkaidekapus> koz_: <<loop>>
23:47:26 × xcmw quits (~textual@2607:f388:1080:2::c2) (Ping timeout: 264 seconds)
23:47:26 × benjamin-l quits (~benjamin@2601:1c0:8800:67e0:fa16:54ff:febc:2e60) (Ping timeout: 264 seconds)
23:47:42 <ski> @quote change.the.state
23:47:42 <lambdabot> MonadState says: Do not try to change the state; that's impossible. Instead only try to realize the truth: There is no state.
23:48:01 <koz_> hekkaidekapus: Lol...
23:48:14 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
23:48:26 <hekkaidekapus> ski: But we just found the state…
23:48:42 <koz_> > False <> False
23:48:42 <hekkaidekapus> iqubic: Did you read the URL ski posted above?
23:48:44 <lambdabot> error:
23:48:44 <lambdabot> • No instance for (Semigroup Bool) arising from a use of ‘<>’
23:48:44 <lambdabot> • In the expression: False <> False
23:48:57 <koz_> Are there wrappers for Bool for this purpose?
23:49:07 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
23:49:12 <ski> > Any False <> Any True
23:49:12 <solonarv> sure, a bunch of them
23:49:13 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
23:49:14 <lambdabot> Any {getAny = True}
23:49:17 <ski> > All False <> All True
23:49:20 <lambdabot> All {getAll = False}
23:49:23 <koz_> Yay, thanks!
23:49:30 <iqubic> koz_: I have looked at the reddit post.
23:49:32 <solonarv> Min and Max also work, if you want to be cryptic
23:49:39 <solonarv> (Min = All, Max = Any)
23:49:50 <koz_> solonarv: Being cryptic is not my goal (today).
23:50:11 benjamin-l joins (~benjamin@2601:1c0:8800:67e0:fa16:54ff:febc:2e60)
23:50:21 <iqubic> koz_: Any == (Bool, Or, True), All == (Bool, And, False)
23:50:47 <monochrom> For boolean algebra, min and max are better analogies than * and +
23:50:54 <iqubic> First is the M, second is <>, third is Mempty
23:51:05 <monochrom> In fact, scratch analogies, min and max are the real deal.
23:51:40 <monochrom> a*a = a makes no sense, min a a = a does.
23:51:55 <monochrom> a*(a+b) = a makes no sense, min a (max a b) = a does.
23:51:57 <solonarv> a*a=a does make sense when the domain is {0,1}
23:52:07 <solonarv> it's 1+1=1 that makes no sense
23:52:12 <monochrom> OK right.
23:52:44 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
23:54:43 × hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
23:55:20 <ski> let the domain be ⌜{0,1,2,⋯ ,∞}⌝, ⌜0⌝ standing for "true", and ⌜∞⌝ for "false"
23:55:25 hackage kempe 0.1.0.0 - Kempe compiler https://hackage.haskell.org/package/kempe-0.1.0.0 (vmchale)
23:56:12 <ski> (more specifically, "forever true" and "forever false". ⌜1⌝ is "false now, but (forever) true, in one time step". ⌜2⌝ is "false now, and in the next instant, but (forever) true, in two time steps")
23:56:34 <ski> (what then is "and","or","not" ?)
23:57:14 × sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat)
23:58:21 sakirious joins (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net)
23:58:35 <pjb> ski: the domain is not closed for not Only not ⌜0⌝ = ⌜∞⌝ and not ⌜∞⌝ = ⌜0⌝ can be defined.
23:58:38 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
23:59:11 <pjb> ski: and ⌜a⌝ ⌜b⌝ = ⌜max a b⌝ or ⌜a⌝ ⌜b⌝ = ⌜min a b⌝

All times are in UTC on 2020-12-02.