Home freenode/#haskell: Logs Calendar

Logs on 2020-11-26 (freenode/#haskell)

00:01:20 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:02:12 <ezzieyguywuf> in megaparsec, how do I consume all the rest of the input and capture the values, rather than dumping them like eof does?
00:03:06 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
00:03:15 <koz_> ezzieyguywuf: takeRest?
00:03:55 <ezzieyguywuf> koz_: perfect thank you!
00:04:02 <koz_> ezzieyguywuf: No worries.
00:04:13 × gehmehgeh_ quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
00:04:42 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Ping timeout: 260 seconds)
00:04:57 <int-e> koz_: https://github.com/haskell/bytestring/commit/130906ef928f9761978dd7d13bd4b3082badd1b1
00:06:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:06:48 <int-e> (I thought I remembered that it was defined as a list originally... and now confirmed it.)
00:09:33 × frdg quits (~nick@pool-71-184-143-249.bstnma.fios.verizon.net) (Quit: Leaving.)
00:12:53 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 260 seconds)
00:13:25 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
00:13:37 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
00:14:08 <ezzieyguywuf> another megaparsec question (please be gentle y'all, I'm pretty new :-P) - how do I parse a single character, but ANY character, not a particular? I'm trying to parse exactly 16 characters, but `replicate 16 char` won't do it b/c char is `Token s -> m (Token s)`
00:14:42 <koz_> anyChar?
00:14:58 <ezzieyguywuf> koz_: hrm, I thought maybe printChar. Where do you see anyChar?
00:15:13 <koz_> One sec.
00:15:44 <koz_> anySingle
00:16:02 <koz_> (which is just a fancy way of saying 'satisfy (const True)')
00:16:16 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
00:16:44 <ezzieyguywuf> koz_: ah hah, yes this makes sense. thank you.
00:17:32 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
00:22:13 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
00:30:03 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
00:33:18 × sondr3 quits (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving)
00:35:12 × Entertainment quits (~entertain@104.246.132.210) (Ping timeout: 256 seconds)
00:35:35 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:bc9a:f509:3193:e14d)
00:39:13 × andos quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 264 seconds)
00:41:49 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:43:16 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-sigyjgyywexrisfj) (Quit: Connection closed for inactivity)
00:44:05 × Chi1thangoo quits (~Chi1thang@87.112.60.168) (Ping timeout: 240 seconds)
00:44:47 <ezzieyguywuf> hrm, I have a `parseEnd :: Parser Text` that parses some characters at the end of the input. I want everything leading up to this - it seems like `takeWhile` is the tool for the job, but I'm unsure how to combine this with `parseEnd`. I was thinking maybe `lookahead`, but this does not return a bool so can't be used as the predicate
00:45:30 × mikolaj quits (~mikon@duch.mimuw.edu.pl) (Quit: leaving)
00:46:27 <ezzieyguywuf> I'm trying to do the equivalent of the following in a regexp: ^(.*)SOMESTATICTEXT$
00:46:39 <koz_> That's ambiguous.
00:46:49 <ezzieyguywuf> koz_: how so?
00:46:57 × mikolaj_ quits (~mikolaj@purple.well-typed.com) (Quit: leaving)
00:47:10 <koz_> The first part could be anything, right?
00:47:15 <ezzieyguywuf> correct
00:47:18 <koz_> (including nothing at all)
00:47:25 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
00:47:49 <koz_> lookahead won't help here because you don't know how much you have to read.
00:47:52 <ezzieyguywuf> hrm, I guess really it's more like "^(.+)SOMESTATICTEXT$"
00:48:12 <koz_> Ah, so you know there'll be _something_ prior to SOMESTATICTEXT?
00:48:18 <ezzieyguywuf> I guess I can just read till the end of line then subtract the static text
00:48:22 <ezzieyguywuf> koz_: correct.
00:48:38 <koz_> Hmm.
00:49:05 <monochrom> I wonder if it's manyTill (string "SOMESTATICTEXT\n")
00:49:19 <ezzieyguywuf> monochrom: manyTill sounds promising, let me check that out
00:49:56 <ezzieyguywuf> hrm, is that from attoparsec?
00:49:59 <monochrom> But generally, most parser combinator libraries are designed for positively specified grammars, not negatively specified "anything except this".
00:50:01 <ezzieyguywuf> can I still use it in megaparsec?
00:50:31 <monochrom> I don't actually know megaparsec. I just assume if it's in parsec then it's in megaparsec.
00:50:35 <ezzieyguywuf> monochrom: hrm, if that's the case then option (b) should be fine, i.e. use the parsing library to get "everything else" and then I can post-process by taking off the static text at the end
00:50:58 <koz_> ezzieyguywuf: If you are parsing Text, stripSuffix might prove helpful.
00:51:10 <ezzieyguywuf> koz_: yea, I am doing it as Text
00:51:11 <monochrom> The exception (pun!) is those few parser combinator libraries that are built for nondeterminism and ambiguous grammars.
00:51:43 <ezzieyguywuf> this is non-deterministic, I'm parsing the "Description" field from my bank statements, lol.
00:52:01 × Ariakenom__ quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Read error: Connection reset by peer)
00:52:16 <monochrom> but parsec, megaparsec, and a lot of others are designed for determinism.
00:52:25 Ariakenom__ joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
00:52:42 comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
00:52:48 <ezzieyguywuf> hrm. well I seem to be doing ok so far....
00:52:53 <ezzieyguywuf> 🤷
00:52:58 zariuq joins (~zar@fw1.ciirc.cvut.cz)
00:53:10 <ezzieyguywuf> I was going to use regexp, then someone was like "I usually just use a parser"
00:53:10 <ezzieyguywuf> lol
00:53:17 × xsarnik0 quits (xsarnik@gateway/shell/fi.muni.cz/x-nywghooskhwzuxkn) (Quit: Ping timeout (120 seconds))
00:53:17 × Jajik quits (xchlup2@gateway/shell/fi.muni.cz/x-gntccaugnuwouyau) (Quit: Ping timeout (120 seconds))
00:53:36 × dequbed quits (~dequbed@yanduxian.paranoidlabs.org) (Ping timeout: 240 seconds)
00:54:06 dequbed joins (~dequbed@yanduxian.paranoidlabs.org)
00:54:25 <monochrom> Well, I guess things like manyTill can help.
00:54:44 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:55:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
00:55:18 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
00:55:41 <ski> @quote Japsu regex
00:55:41 <lambdabot> Japsu says: iä iä, regex fhtagn
00:55:45 <monochrom> regex makes it look easy because every regex engine goes out of its way to implement nondeterminism by heavy backtracking or heaving compiling NFA to DFA.
00:55:53 × zebrag quits (~inkbottle@alagny-551-1-20-27.w83-200.abo.wanadoo.fr) (Quit: Konversation terminated!)
00:55:55 <monochrom> s/heaving/heavy/
00:56:02 xsarnik0 joins (xsarnik@gateway/shell/fi.muni.cz/x-rkntrcrlbmfefbac)
00:56:56 × zargoertzel quits (~zar@fw1.ciirc.cvut.cz) (Ping timeout: 240 seconds)
00:57:31 <monochrom> What I want you to notice that CFG tools seldom make this easy. It is not just our community. yacc also makes you explicitly enumerate what you allow, not what you don't allow.
00:57:39 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
00:58:01 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:bc9a:f509:3193:e14d) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:58:12 <monochrom> Hell, yacc is strongly anti-nondeterminism.
00:59:16 zebrag joins (~inkbottle@alagny-551-1-20-27.w83-200.abo.wanadoo.fr)
00:59:23 erisco_ joins (~erisco@208.98.222.65)
00:59:24 <ski> having better support for intersection, difference, division/derivative could be interesting
00:59:34 <monochrom> Negative specification comes into this equation because in the regex .*ABC, the .* part no longer means "anything", it now means "anything except ABC"
00:59:36 jedws joins (~jedws@101.184.150.93)
01:01:12 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds)
01:01:12 × conal_ quits (~conal@64.71.133.70) (Read error: Connection reset by peer)
01:01:21 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
01:01:31 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
01:02:24 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 256 seconds)
01:02:32 <ski> (and i wonder how to best represent stuff like "maximal munch". to a large extent, i think i'd prefer it, if `p' parses `s' and `q' parses `t' implies that `p * q' parses `s ++ t')
01:02:33 × erisco quits (~erisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds)
01:03:37 <monochrom> Nondeterminism comes into the equation because it is a very good way of understanding any implementation strategy.
01:03:43 <sarahzrf> i like the earley library
01:04:28 <monochrom> CFG tools are mostly unsupportive of negative specification because set subtraction of two CFLs seldom give you a CFL.
01:04:55 <monochrom> Whereas RLs are closed under set subtraction, so regex tools are much happier with it.
01:05:43 <monochrom> and intersection too. CFLs not closed under intersection, RLs closed under intersection.
01:05:44 × erisco_ quits (~erisco@208.98.222.65) (Read error: Connection reset by peer)
01:05:51 erisco joins (~erisco@d24-57-249-233.home.cgocable.net)
01:06:25 conal joins (~conal@64.71.133.70)
01:06:49 × m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 264 seconds)
01:07:16 <monochrom> How to discover two CFLs that don't intersect to a CFL:
01:07:43 <monochrom> Always remember that the poster child non-CFL example is { a^n b^n c^n | n natural }
01:08:01 hackage network 3.1.2.1 - Low-level networking interface https://hackage.haskell.org/package/network-3.1.2.1 (KazuYamamoto)
01:08:05 <monochrom> So simply come up with two CFLs that intersect to that. This is within your reach. :)
01:10:50 <koz_> monochrom: Ah yes, that wonderful example that came up on my ToC assignment.
01:11:28 <ski> { aᵐ⋅bᵐ⋅cⁿ | m,n : ℕ } ∩ { aᵐ⋅bⁿ⋅cⁿ | m,n : ℕ }
01:11:29 <ski> ?
01:11:35 <monochrom> Yeah!
01:11:42 <ski> cool :)
01:11:53 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
01:12:13 <monochrom> Generally, if a language has to synchronize three things, you can bet it has a problem.
01:12:34 <koz_> And that's even before we get to the fact that nondeterminism actually adds power to CFGs (but not RLs).
01:12:43 <monochrom> Synchronizing just two things, we know how to CFG it, it's just another "matching parentheses".
01:13:03 × treotmnor quits (~treotmnor@218.73.97.199) (Quit: Leaving)
01:14:26 × xsarnik0 quits (xsarnik@gateway/shell/fi.muni.cz/x-rkntrcrlbmfefbac) (Quit: Ping timeout (120 seconds))
01:15:07 <koz_> sarahzrf: Earley parsers are quite cool, because their asymptotics are tied directly to matrix multiplication.
01:15:25 × comerijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
01:15:30 <shachaf> Hmm, is there some sort of dual-context-free that has intersection but not union?
01:15:57 <shachaf> Like there are NFAs and dual NFAs that make unions and intersections respectively easy.
01:16:16 × madog quits (~madog@163.ip-51-254-203.eu) (Ping timeout: 240 seconds)
01:16:39 <koz_> shachaf: You lose intersection closure _very_ quickly with most recognizers.
01:16:57 <koz_> (like, whichever way you increase expressive power tends to kill you)
01:17:27 <shachaf> Hmm, but maybe concatenation isn't supported either.
01:17:36 <shachaf> But I'm curious what this is like.
01:17:40 <koz_> So I doubt such a thing exists, or at least in any meaningful sense as a 'dual' to CFGs.
01:18:14 madog joins (~madog@163.ip-51-254-203.eu)
01:19:45 × Fractalis quits (~Fractalis@c-174-54-165-158.hsd1.pa.comcast.net) (Ping timeout: 240 seconds)
01:20:33 × Nahra quits (~Nahra@unaffiliated/nahra) (Ping timeout: 260 seconds)
01:22:03 × FreeBirdLjj quits (~freebirdl@101.228.42.108) (Remote host closed the connection)
01:22:10 Nahra joins (~Nahra@unaffiliated/nahra)
01:22:19 × jedws quits (~jedws@101.184.150.93) (Read error: Connection reset by peer)
01:23:38 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
01:23:42 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-kfwargodivspffqj)
01:24:16 jedws joins (~jedws@101.184.150.93)
01:25:48 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds)
01:26:48 christo joins (~chris@81.96.113.213)
01:28:25 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 264 seconds)
01:29:14 ski . o O ( <https://en.wikipedia.org/wiki/Categorial_grammar>,<https://en.wikipedia.org/wiki/Montague_grammar>,<https://en.wikipedia.org/wiki/Pregroup_gramm> )
01:30:04 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:31:18 × christo quits (~chris@81.96.113.213) (Ping timeout: 256 seconds)
01:31:25 × jedws quits (~jedws@101.184.150.93) (Ping timeout: 264 seconds)
01:31:39 <shachaf> Instead of "dual NFA" I should say "existential NFA" for the normal kind and "universal NFA" for the weird dual kind.
01:32:45 guest1126 joins (~user@49.5.6.87)
01:33:59 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Quit: WeeChat 2.9)
01:34:09 <ski> are there any adjunctions present, involving them ?
01:34:17 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
01:36:00 xsarnik0 joins (xsarnik@gateway/shell/fi.muni.cz/x-qqlqhiysrvqfxaju)
01:36:07 Deide joins (~Deide@217.155.19.23)
01:37:14 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds)
01:37:25 × Lord_of_Life_ quits (~Lord@46.217.220.129) (Ping timeout: 240 seconds)
01:37:27 Lord_of_Life joins (~Lord@46.217.221.184)
01:39:11 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
01:42:52 Jajik joins (xchlup2@gateway/shell/fi.muni.cz/x-nixiositsvhijnwj)
01:45:45 falafel_ joins (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4)
01:46:24 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:46:24 × thc202 quits (~thc202@unaffiliated/thc202) (Ping timeout: 240 seconds)
01:48:13 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
01:48:50 jedws joins (~jedws@101.184.180.34)
01:49:14 christo joins (~chris@81.96.113.213)
01:49:19 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
01:52:19 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:53:05 × jedws quits (~jedws@101.184.180.34) (Ping timeout: 240 seconds)
01:53:53 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
01:54:16 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
01:54:48 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds)
01:57:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
01:58:05 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Ping timeout: 256 seconds)
01:59:14 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 272 seconds)
02:01:54 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 256 seconds)
02:04:05 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
02:06:13 × Rudd0^ quits (~Rudd0@185.189.115.98) (Ping timeout: 264 seconds)
02:07:08 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
02:09:33 × Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.157) (Ping timeout: 260 seconds)
02:11:17 <koz_> shachaf: Do you have a formal definition of these NFAs?
02:15:13 <koz_> Suppose I wanted to write a package that adds http://hackage.haskell.org/package/optics-core-0.3.0.1/docs/Optics-At-Core.html#t:Ixed definitions for, say, massiv arrays. However, the only way I can see to provide these instances is orphans, or asking massiv to cart around optics as a dep by integrating optics. Am I missing some third way?
02:16:11 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:16:46 <monochrom> asking optics to card around massiv :)
02:16:52 jamm_ joins (~jamm@unaffiliated/jamm)
02:16:57 <koz_> monochrom: _Fourth_ way, you pedant. :P
02:17:12 <monochrom> My view is that this is one of those times orphaning is desirable.
02:17:44 <koz_> monochrom: Yeah, I can't think of a way to do this without orphaning or newtypes.
02:17:51 <koz_> And newtypes would kinda defeat the whole exercise.
02:17:55 ocamler joins (3263cbdb@50.99.203.219)
02:18:55 <ocamler> hello friends! I have a probably simple question, I have a function which is wraps the state monad: `solve :: [(Int, Int)] -> ST s [Int]` which is called from `main :: IO ()`, how can I get these types to match?
02:20:23 <koz_> ST s [Int] would need to be runST'd to get out the [Int].
02:20:46 <koz_> (and state monad /= ST)
02:21:10 <ocamler> oh oops right, wow I never knew there is a runST, is that still considered pure?
02:21:18 <monochrom> yes
02:21:36 <koz_> ocamler: It's the effect describing (locally) mutable state.
02:21:38 × jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 264 seconds)
02:21:47 <koz_> It's also the thing that powers IO.
02:21:56 <koz_> (read Lazy Functional State Threads if you want the details)
02:24:29 <ocamler> thanks! I'll check it out
02:25:48 <ezzieyguywuf> what does ghcid's --reload actually do? I can see that it does _something_, but it doesn't (for example), re-build a library that has chnaged
02:26:44 <ezzieyguywuf> hrm, I guess it re-runs --command
02:27:02 <ezzieyguywuf> but I'd expect `cabal repl` to rebuild something that's changed..
02:27:10 int-e would expect something similar to ghci's :reload
02:27:30 <ezzieyguywuf> but it doesn't!
02:27:33 <ezzieyguywuf> int-e: yea it is :reload
02:28:01 <int-e> so... it would only recompile the modules of the "local" package, but not look at any dependencies
02:28:05 <ezzieyguywuf> so if I do `cabal repl exe:MyExe`, and then make a change to lib:MyLib (which MyExe uses), and then :reload, ghcid does NOT rebuild MyLib
02:28:15 xff0x_ joins (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54)
02:28:24 <ezzieyguywuf> MyLib and MyExe are both local
02:28:35 <ezzieyguywuf> could it be I have something borked it my .cabal file?
02:28:36 <int-e> for this purpose they're not
02:28:41 <ezzieyguywuf> hrm
02:29:00 <int-e> lib:MyLib is built and registered as a package; ghci(d) would only see the executable's own modules
02:29:13 <ezzieyguywuf> ah, I see
02:29:23 <ezzieyguywuf> I don't think I need a lib - I think I just need modules for MyExe
02:29:30 <ezzieyguywuf> int-e: thanks for helping me think through that.
02:29:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:30:24 sillyotter joins (~sillyotte@2603-6011-ba0f-f7c5-4926-fd9c-a030-a135.res6.spectrum.com)
02:30:51 × reallymemorable quits (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
02:31:09 reallymemorable joins (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net)
02:31:10 × xff0x quits (~fox@port-92-193-220-65.dynamic.as20676.net) (Ping timeout: 246 seconds)
02:31:35 × sillyotter quits (~sillyotte@2603-6011-ba0f-f7c5-4926-fd9c-a030-a135.res6.spectrum.com) (Client Quit)
02:36:37 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection)
02:37:00 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
02:38:31 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4)
02:44:44 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
02:46:45 × star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood)
02:47:47 Stanley00 joins (~stanley00@unaffiliated/stanley00)
02:47:59 star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com)
02:51:02 × falafel_ quits (~falafel@2601:547:1303:b30:7811:313f:d0f3:f9f4) (Ping timeout: 264 seconds)
02:53:54 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
02:55:38 drbean joins (~drbean@TC210-63-209-63.static.apol.com.tw)
03:02:02 × kelsey quits (~keteskyl@2600:6c64:7b7f:fa42:880b:e2d1:945a:df75) (Ping timeout: 260 seconds)
03:02:44 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
03:03:09 urea joins (4d8bd2b9@77.139.210.185)
03:03:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
03:09:56 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 240 seconds)
03:10:13 sand_dull joins (~theuser@c-73-149-95-105.hsd1.ct.comcast.net)
03:10:52 <ocamler> lol why is [0..10] inclusive
03:11:03 <ocamler> i just spent like 15 minutes debugging that
03:12:06 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
03:12:18 <koz_> ocamler: ... because it is?
03:12:30 <koz_> That's just how Enum-based ranges like that work.
03:12:38 toorevitimirp joins (~tooreviti@117.182.183.18)
03:13:27 conal joins (~conal@64.71.133.70)
03:13:36 <ocamler> ohhh I see, its for Enums as well
03:13:52 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
03:14:12 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
03:14:13 <koz_> > [LT ..]
03:14:15 <lambdabot> [LT,EQ,GT]
03:15:09 × benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-lrpyjjkwyhqzgysi) (Quit: Connection closed for inactivity)
03:15:11 × conal quits (~conal@64.71.133.70) (Client Quit)
03:15:16 × sand_dull quits (~theuser@c-73-149-95-105.hsd1.ct.comcast.net) (Quit: leaving)
03:15:25 × reallymemorable quits (~quassel@pool-100-2-25-229.nycmny.fios.verizon.net) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
03:17:03 conal joins (~conal@64.71.133.70)
03:17:30 <ocamler> damn thats cool
03:18:10 <ocamler> pretty sure thats impossible in ocaml
03:19:14 × urea quits (4d8bd2b9@77.139.210.185) (Remote host closed the connection)
03:20:17 × ocamler quits (3263cbdb@50.99.203.219) (Remote host closed the connection)
03:21:08 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 260 seconds)
03:24:36 Saukk joins (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4)
03:33:24 plutoniix joins (~q@ppp-223-24-94-50.revip6.asianet.co.th)
03:35:10 × nek0 quits (~nek0@mail.nek0.eu) (Quit: The Lounge - https://thelounge.chat)
03:35:32 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:36:14 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
03:37:25 × alx741 quits (~alx741@181.196.68.166) (Ping timeout: 264 seconds)
03:38:02 alx741 joins (~alx741@181.196.68.166)
03:39:13 × Iceland_jack quits (~user@31.124.48.169) (Ping timeout: 264 seconds)
03:39:52 lagothrix is now known as Guest14131
03:39:52 × Guest14131 quits (~lagothrix@unaffiliated/lagothrix) (Killed (verne.freenode.net (Nickname regained by services)))
03:40:00 lagothrix joins (~lagothrix@unaffiliated/lagothrix)
03:41:08 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
03:41:55 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
03:42:21 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
03:44:37 × theDon quits (~td@94.134.91.236) (Ping timeout: 264 seconds)
03:46:11 theDon joins (~td@muedsl-82-207-238-209.citykom.de)
03:46:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
03:52:39 vg joins (~vg@139.59.59.230)
03:55:06 <ezzieyguywuf> how can I turn a [[String]] into a [[Text]]?
03:55:21 <ezzieyguywuf> fmap . fmap?
03:55:30 <dolio> (fmap . fmap) pack
03:57:03 <ezzieyguywuf> dolio: nice, thank you.
04:00:05 × DTZUZU quits (~DTZUZU@207.81.171.116) (Read error: Connection reset by peer)
04:00:44 Rudd0 joins (~Rudd0@185.189.115.108)
04:00:55 × SupaYoshii quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
04:01:52 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
04:02:14 DTZUZU joins (~DTZUZU@207.81.171.116)
04:02:17 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
04:02:50 conal joins (~conal@64.71.133.70)
04:05:18 × incertia quits (~incertia@d4-50-26-103.nap.wideopenwest.com) (Quit: ZNC 1.7.5 - https://znc.in)
04:05:31 × vg quits (~vg@139.59.59.230) (Quit: vg)
04:05:40 incertia joins (~incertia@d4-50-26-103.nap.wideopenwest.com)
04:05:47 vg joins (~vg@139.59.59.230)
04:05:59 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:06:09 <incertia> would there be any interest in a prism equivalent for data-has
04:06:13 vg joins (~vg@139.59.59.230)
04:07:15 <incertia> e.g. class MightHave a t where hasPrism :: Prism' t a
04:07:41 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:07:46 <incertia> and then you would be able to lift up errors into more general contexts with mtl
04:08:37 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 264 seconds)
04:08:41 <incertia> throwE :: (MightHave e err, MonadError e m) => e -> m ()
04:08:44 × DTZUZU quits (~DTZUZU@207.81.171.116) (Ping timeout: 260 seconds)
04:09:00 × slack1256 quits (~slack1256@190.162.160.23) (Remote host closed the connection)
04:09:06 <incertia> throwE = throwError . review hasPrism
04:10:36 agrif is now known as minaj
04:11:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:12:40 × drbean quits (~drbean@TC210-63-209-63.static.apol.com.tw) (Read error: Connection reset by peer)
04:13:36 arpl joins (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl)
04:14:46 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
04:16:17 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
04:17:42 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
04:18:29 adm_ joins (~adm@43.229.88.197)
04:20:40 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
04:20:42 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
04:20:52 drbean joins (~drbean@TC210-63-209-33.static.apol.com.tw)
04:21:13 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
04:21:34 <arpl> Is it useful to define a class for the sole purpose of creating a constraint (and the only 'proof' is having an instance)? So when you have a (higher order) function that takes a compression function, for instance, you can constrain it to only lossless compression.
04:21:45 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
04:21:46 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds)
04:23:22 adm_ joins (~adm@43.229.88.197)
04:25:28 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
04:25:36 × drbean quits (~drbean@TC210-63-209-33.static.apol.com.tw) (Ping timeout: 240 seconds)
04:29:32 × DataComputist quits (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Remote host closed the connection)
04:30:13 × plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Ping timeout: 264 seconds)
04:31:31 × vg quits (~vg@139.59.59.230) (Quit: vg)
04:31:46 vg joins (~vg@139.59.59.230)
04:32:00 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:32:13 vg joins (~vg@139.59.59.230)
04:32:44 plutoniix joins (~q@ppp-223-24-94-50.revip6.asianet.co.th)
04:32:44 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 240 seconds)
04:35:32 nek0 joins (~nek0@mail.nek0.eu)
04:36:10 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
04:36:28 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:37:53 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
04:41:31 conal joins (~conal@64.71.133.70)
04:41:56 SanchayanMaity joins (~Sanchayan@171.76.82.54)
04:41:59 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
04:41:59 Tario joins (~Tario@201.192.165.173)
04:42:38 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 272 seconds)
04:44:30 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
04:46:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
04:46:31 matta joins (~user@24-113-169-116.wavecable.com)
04:48:52 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 260 seconds)
04:50:16 <koz_> arpl: It can be sometimes.
04:50:46 <koz_> However, you almost always have some kind of behaviour to go with this constraint, so you may as well define that too.
04:51:12 <koz_> Because otherwise, it tells you something but you can't do anything with this value you just got.
04:53:11 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds)
04:54:31 <arpl> That is true and I understand that. It is certainly nice when there are laws associated with a class. But I was thinking about situations (and maybe my example wasn't quite right) where there are no laws associated and you just want the user of that function to 'acknowledge' a certain constraint by making an instance and 'promising' to obey (when
04:54:31 <arpl> enforcement is not possible).
04:54:49 × kupi quits (uid212005@gateway/web/irccloud.com/x-wpurhmmpfcznlitw) (Quit: Connection closed for inactivity)
04:54:54 <koz_> If your type class lacks laws, you should ask yourself _especially_ hard if that's really what you want.
04:55:06 <koz_> (in fact, certain folks would go so far as saying that all type classes should have them)
04:55:40 <koz_> Also, I didn't say anything about _laws_ - I merely said that type classes which only satisfy a constraint, without some associated behaviour, have quite limited usefulness.
04:55:53 <koz_> (although maybe I misunderstood and your type class _does_ have some methods?)
04:56:10 <arpl> Fair enough. I was only wondering.
04:57:20 <arpl> No, I was asking about a class with no methods, just to have some kind of constraint that should be acknowledged. I wasn't thinking about actually implementing something like that, just asking about the usefullness, if any.
04:57:31 × vg quits (~vg@139.59.59.230) (Quit: vg)
04:57:36 <koz_> Yeah, a type class with no methods has very limited utility.
04:57:47 vg joins (~vg@139.59.59.230)
04:57:53 <koz_> Mostly because 'some value satisfies a constraint' gives you very little you can actually _do_ with that value afterwards.
04:58:04 <koz_> Because as far as the function it got passed into is concerned, it could literally be anything.
04:58:05 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
04:58:12 Tario joins (~Tario@201.192.165.173)
04:58:20 vg joins (~vg@139.59.59.230)
04:59:25 <arpl> Understood too. Just like the exhaustiveness check, this would be some 'user defined compiler warning' like: Are you sure this compression function is indeed lossless?
05:00:09 <c_wraith>
05:00:14 <c_wraith> err, sorry
05:00:15 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
05:00:51 <koz_> Well, if a compression function is lossless, surely you want a type class with a 'compress' and 'decompress' method, with the law that 'compress . decompress == id'?
05:01:30 <koz_> (and probably an associated type for the compression result, although you could just use ByteString or something)
05:01:31 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
05:02:11 Tario joins (~Tario@201.192.165.173)
05:02:30 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:02:48 <arpl> To make clear: This is beginner's question. Just learning Haskell. Yes, I agree ... compression would have associated laws/invariants. Thank you for your time. Back to just pondering : )
05:03:47 × vg quits (~vg@139.59.59.230) (Quit: vg)
05:04:05 vg joins (~vg@139.59.59.230)
05:04:20 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
05:04:34 vg joins (~vg@139.59.59.230)
05:06:57 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
05:11:57 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
05:13:08 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 260 seconds)
05:13:09 adm joins (~adm@43.229.88.197)
05:14:09 × adm quits (~adm@43.229.88.197) (Remote host closed the connection)
05:14:15 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4)
05:15:15 × howdoi quits (uid224@gateway/web/irccloud.com/x-koaluaessvhmdatb) (Quit: Connection closed for inactivity)
05:16:39 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
05:17:27 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:18:47 Amras joins (~Amras@unaffiliated/amras)
05:19:01 hackage typson-core 0.1.0.0 - Type-safe PostgreSQL JSON Querying https://hackage.haskell.org/package/typson-core-0.1.0.0 (aaronallen8455)
05:19:50 adm_ joins (~adm@43.229.88.197)
05:20:03 jedws joins (~jedws@101.184.180.34)
05:20:25 × arpl quits (546babef@84-107-171-239.cable.dynamic.v4.ziggo.nl) (Quit: arpl)
05:20:55 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 246 seconds)
05:22:02 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
05:22:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
05:23:01 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
05:24:47 × vg quits (~vg@139.59.59.230) (Quit: vg)
05:24:56 × adm_ quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
05:25:00 vg joins (~vg@139.59.59.230)
05:25:23 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
05:25:24 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 240 seconds)
05:25:39 vg joins (~vg@139.59.59.230)
05:25:52 berberman joins (~berberman@unaffiliated/berberman)
05:26:35 <jle`> incertia: maybe not Has, but As :)
05:26:37 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds)
05:29:09 crestfallen joins (~jvw@192-184-135-144.fiber.dynamic.sonic.net)
05:31:34 supercoven joins (~Supercove@194.34.133.94)
05:31:35 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:31:49 supercoven joins (~Supercove@194.34.133.94)
05:31:50 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:32:04 supercoven joins (~Supercove@194.34.133.94)
05:32:05 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:32:19 supercoven joins (~Supercove@194.34.133.94)
05:32:20 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:32:30 <crestfallen> hello is there a beginners channel or should I go to #haskell-overflow ? there is something fundamental I don't understand between do notation and bind notation; in the "divvy" example at the bottom of this paste: http://ix.io/2Fvz
05:32:35 supercoven joins (~Supercove@194.34.133.94)
05:33:16 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
05:33:32 <incertia> i mocked up a sample library basically by inlining the lens definitions, is there anything i can simplify? https://gist.github.com/incertia/f1386a06b7c2a008f0bbbd6d1d74a0b9
05:33:57 adm_ joins (~adm@43.229.88.197)
05:34:27 <MarcelineVQ> divvy is missing a read compared to divv
05:35:14 <crestfallen> thanks MarcelineVQ I've been trying put a second read in for a very long time. what's the trick?
05:35:37 <MarcelineVQ> do the same thing you did for the first read
05:37:55 <MarcelineVQ> x <- read became read >>= \x -> ... so you just do that again
05:38:49 <crestfallen> o ne moment please
05:40:16 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 272 seconds)
05:41:07 <crestfallen> I think the return clause requires " \_ -> ...". also I thought return requires the State :: ((),s) of write
05:41:56 <crestfallen> I know it's a strange program, but I want the division by zero error when I use (-1)
05:42:04 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:42:19 supercoven joins (~Supercove@194.34.133.94)
05:42:20 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:42:34 supercoven joins (~Supercove@194.34.133.94)
05:42:35 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:42:49 supercoven joins (~Supercove@194.34.133.94)
05:42:50 <MarcelineVQ> monochrom made an IO tutorial that happens to cover how bind and do relate, by starting with bind only, http://www.vex.net/~trebla/haskell/IO.xhtml But any google search about do notation in haskell will cover it as well, googling "translating do notation" for instance
05:42:50 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:43:04 supercoven joins (~Supercove@194.34.133.94)
05:43:05 × supercoven quits (~Supercove@194.34.133.94) (Max SendQ exceeded)
05:43:36 <crestfallen> I've been using this: https://en.wikibooks.org/wiki/Haskell/do_notation
05:44:48 <crestfallen> I can see that there is a slight difference but I don't know how to insert the second read so that the "write (x+1) is maintained downstream
05:45:35 × guest1126 quits (~user@49.5.6.87) (Remote host closed the connection)
05:45:45 guest1126 joins (~user@49.5.6.87)
05:46:47 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
05:48:12 <MarcelineVQ> That one's fine. You've got all the tools you need there. Just do what they did.Your only difference is that you have 4 '
05:48:19 <MarcelineVQ> actions' instead of 3.
05:48:48 <crestfallen> i.e. this doesn't change the behavior to that of 'divv' divvy = read >>= \x -> write (x+1) >>= \_ -> read >>= \_ -> return (safeDiv (x*2) x)
05:49:11 <MarcelineVQ> no it wouldn't, because you don't bind x again
05:49:26 <MarcelineVQ> so you're using the old x instead of shadowing a new one like you did in divv
05:49:54 <crestfallen> yes, thanks I understand, but what is the notation?
05:50:01 conal joins (~conal@64.71.133.70)
05:50:37 <MarcelineVQ> :/ write x where you wrote _ in the same way you did it for the first read
05:51:03 × vg quits (~vg@139.59.59.230) (Quit: vg)
05:51:18 vg joins (~vg@139.59.59.230)
05:51:32 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
05:51:45 vg joins (~vg@139.59.59.230)
05:51:53 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
05:52:09 vg joins (~vg@139.59.59.230)
05:52:16 conal_ joins (~conal@64.71.133.70)
05:52:25 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
05:52:31 <crestfallen> geez, I swear MarcelineVQ I thought I had done that 20 times. yes it works thanks kindly.
05:52:35 <MarcelineVQ> Rather than not getting do notation what is happening here is that you're not getting >>= Otherwise you wouldn't need to ask what you're asking. the expression x >>= \y -> ... binds the result of computing/running/executing x, to the name y.
05:52:39 vg joins (~vg@139.59.59.230)
05:53:06 <MarcelineVQ> do notation let's use write this as y <- x but the meaning is the same, run x, call the result y.
05:53:26 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Ping timeout: 264 seconds)
05:54:13 <crestfallen> what is the rule where the lambda after the second >>= must have the wildcard ? MarcelineVQ
05:54:27 <crestfallen> I'm foggy on that
05:55:13 × conal quits (~conal@64.71.133.70) (Ping timeout: 246 seconds)
05:55:38 × adm_ quits (~adm@43.229.88.197) (Remote host closed the connection)
05:55:55 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:56:14 <jle`> incertia: looks solid to me :)
05:56:34 <jle`> at least as a parallel to Data.Has
05:56:41 adm_ joins (~adm@43.229.88.197)
05:56:54 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:57:02 <incertia> there should be no reason to pick a specific choice right
05:57:19 <MarcelineVQ> You write _ if you don't care to name the result of some action. If you're not using the result in other words. For instance if you wrote
05:57:20 <MarcelineVQ> do x
05:57:23 <MarcelineVQ> y
05:57:31 <jle`> incertia: what do you mean by specific choice?
05:57:40 Jonkimi727406120 joins (~Jonkimi@113.87.161.66)
05:57:50 <jle`> ah my 'at least...' was that i'm still not super comfortable with such polymorphic mptc's
05:57:58 <jle`> but it should be at least as usable as Data.Has
05:57:59 <MarcelineVQ> that would be x >>= \_ -> y We don't bind a name for the result of x
05:58:05 × plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Ping timeout: 240 seconds)
05:58:14 <incertia> e.g. in the profunctor construction of lenses we have p a (f b) but we choice p = (->)
05:58:22 DataComputist joins (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net)
05:58:29 <jle`> ah, Choice
05:58:29 <incertia> Prisms appear to apply to anything with Choice
05:58:51 <incertia> and in such a way we can remove the lens dependency
05:58:58 <incertia> er profunctors
05:59:17 <koz_> @hoogle Choice
05:59:17 <lambdabot> Control.Lens.Combinators class Profunctor p => Choice (p :: Type -> Type -> Type)
05:59:17 <lambdabot> Control.Lens.Prism class Profunctor p => Choice (p :: Type -> Type -> Type)
05:59:17 <lambdabot> Network.AWS.Lens class Profunctor p => Choice (p :: Type -> Type -> Type)
05:59:19 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
05:59:22 <jle`> yup, you should be ok with using Data.Profunctor.Choice, you don't need a lens dep
05:59:24 <koz_> Ah that thing.
05:59:31 <jle`> oh btw there is an instance of `As () a` btw
05:59:52 <crestfallen> thanks a lot MarcelineVQ happy thanksgiving if it matters to you.
05:59:57 <jle`> er wait sorry
05:59:59 <jle`> i mean As Void a
06:00:09 <jle`> it's the analogue of Has () a
06:00:17 × conal_ quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
06:00:28 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds)
06:00:31 <jle`> ah, but there is no such instance in Data.Has. probably because of overlapping instances
06:00:33 <jle`> nevermind :)
06:01:48 × adm_ quits (~adm@43.229.88.197) (Ping timeout: 272 seconds)
06:02:00 thatlinuxguy joins (~sand49@2001:8003:8431:d200:8d49:ec:3d23:9521)
06:03:22 sord937 joins (~sord937@gateway/tor-sasl/sord937)
06:04:20 christo joins (~chris@81.96.113.213)
06:07:03 <incertia> _Void also happens to be Prism s s a Void and we are restricted to Prism s s a a
06:07:03 <thatlinuxguy> Hi im having troble with generic typing. I'm trying to make a function that will return a flattened version of a given list. What I can't figure out is how to know when you've reached an element and not another list when recursing into the list, I know all elements of the base list will have the same depth because the list must be homogeneous but how do you determine what that is.
06:07:40 <thatlinuxguy> sorry if I interrupted
06:07:43 <crestfallen> MarcelineVQ: wondering. in both divv and divvy, we bind the result of read to x, but that is just the s (not the 'a' in (a,s) as well); i.e in \x it is just the single value of state: 's' .. correct?
06:08:30 <jle`> incertia: that unifies though, with a ~ Void
06:08:42 <jle`> so you can use _Void as a Prism s s a a
06:08:54 <jle`> oh ah, my explanation is wrong
06:09:09 × christo quits (~chris@81.96.113.213) (Ping timeout: 260 seconds)
06:09:37 christo joins (~chris@81.96.113.213)
06:10:16 <crestfallen> the second place of the tuple, (a,s) or (s,s)
06:10:24 <incertia> thatlinuxguy: if flatten :: [[a]] -> [a] your first pattern match will be on a list. e.g. flatten (a:as) = ... <-- here a is a list and you can further pattern match on that
06:11:01 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
06:11:29 <MarcelineVQ> It's the a, the first place of the tuple, because the a is what the Monad instance acts upon and >>= is from Monad. read just happens to put the same value into both sides of the tuple.
06:11:44 <incertia> so like flatten ((b:bs):as) = b : flatten (bs:as) and flatten ((b:[]):as) = b : flatten as
06:12:04 <thatlinuxguy> ok cool that makes sense incertia
06:12:13 conal joins (~conal@64.71.133.70)
06:12:36 <crestfallen> very helpful, thanks, I think that's why I was having trouble writing the read into it MarcelineVQ
06:12:51 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
06:13:01 × conal quits (~conal@64.71.133.70) (Client Quit)
06:13:20 alp joins (~alp@2a01:e0a:58b:4920:fde0:51bd:f252:73ea)
06:13:43 <jle`> incertia: yeah, _Void works for As Void a, it unifies as a Prism a a Void Void
06:14:54 <jle`> previewer = const Nothing; reviewer = absurd
06:15:00 <incertia> jle`: Prism a Void => previewer :: a -> Maybe Void seems kinda weird
06:15:06 <incertia> do we just have previewer = const Nothing?
06:15:11 <jle`> it's weird, but lawful :)
06:15:45 Guest10117 joins (~vollenwei@4e69b241.skybroadband.com)
06:16:03 <jle`> a Lens' S A means that there is some type x where S is equivalent to (A, x)
06:16:04 <incertia> i guess reviewer = absurd makes sense
06:16:11 <jle`> S is some product of A and some other type
06:16:18 <jle`> so you can "factor" S
06:16:29 <jle`> a Prism' S A means that there is some type x where S is equivalent to Either A x
06:16:40 <jle`> S is a sum of A and some other type, so you can "split" S, sum-wise
06:16:57 <incertia> splitting with void makes sense yeah
06:17:06 <jle`> in the case of united, Lens' s () is saying that any s is equivalent to ((), s)
06:17:22 <jle`> and in the case of _Void, Prism' s Void is saying that any s is equivalent to Either Void s
06:17:35 <jle`> maybe more of a theoretical nicety than a useful thing though
06:17:54 <incertia> the sum perspective makes much more sense
06:18:00 christo joins (~chris@81.96.113.213)
06:18:02 <jle`> that might be why there is no `Has () a` instance
06:18:11 <koz_> Maybe Void is actually () in disguise. :P
06:18:26 <incertia> no void is equivalent to empty set
06:18:31 <incertia> and () is a set with one element
06:20:05 adm_ joins (~adm@43.229.88.197)
06:20:16 × Guest10117 quits (~vollenwei@4e69b241.skybroadband.com) (Ping timeout: 240 seconds)
06:20:29 <incertia> Has () a does not cause any overlapping instance warning
06:20:40 <incertia> ghc just tells me it's orphaned
06:20:55 <incertia> but it doesn't seem to be very useful which is probably why it's not there
06:21:01 <jle`> yeah, i'm guessing that there must have been some reason why it was not included
06:21:23 <jle`> i wonder
06:21:34 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
06:22:05 × christo quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
06:24:51 × SanchayanMaity quits (~Sanchayan@171.76.82.54) (Remote host closed the connection)
06:25:05 × Saukk quits (~Saukk@2001:998:f9:2914:1c59:9bb5:b94c:4) (Remote host closed the connection)
06:25:39 SanchayanMaity joins (~Sanchayan@171.76.82.54)
06:26:47 <koz_> incertia: There were missing quotes in what I said. I meant to say
06:26:48 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
06:26:56 × adm_ quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
06:26:58 <koz_> 'Maybe Void' is actually '()' in disguise.
06:27:19 <incertia> ooooooo
06:27:21 <incertia> that makes sense
06:27:54 <koz_> Maybe a has cardinality 1 + the cardinality of a.
06:28:04 <koz_> And since Void has cardinality 0... yeah. :P
06:29:39 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
06:29:52 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:30:08 <jle`> ha ha
06:30:21 <jle`> maybe the real void was the friends we made along the way
06:30:39 <koz_> The Void is clearly staring into jle`
06:30:49 <incertia> the real friends were the voids we found along the way
06:30:52 <incertia> because i have no friends
06:30:53 <incertia> :)
06:31:06 <koz_> incertia: Void is unique. :P
06:31:11 <koz_> (thanks, axiom of extensionality)
06:31:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
06:32:34 × xff0x_ quits (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) (Quit: xff0x_)
06:35:40 adm_ joins (~adm@43.229.88.197)
06:36:10 × Nahra quits (~Nahra@unaffiliated/nahra) (Quit: leaving)
06:36:18 xff0x joins (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54)
06:41:05 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:44:36 × caecilius quits (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net) (Ping timeout: 256 seconds)
06:44:43 <crestfallen> :quit
06:44:55 <crestfallen> exit
06:44:58 <crestfallen> oops
06:45:14 × crestfallen quits (~jvw@192-184-135-144.fiber.dynamic.sonic.net) (Quit: leaving)
06:45:36 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
06:47:04 × jedws quits (~jedws@101.184.180.34) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:47:30 gproto23 joins (~gproto23@unaffiliated/gproto23)
06:47:49 × johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
06:49:42 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
06:51:05 × alp quits (~alp@2a01:e0a:58b:4920:fde0:51bd:f252:73ea) (Ping timeout: 272 seconds)
06:51:30 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 265 seconds)
06:51:31 hackage wai-extra 3.1.3 - Provides some basic WAI handlers and middleware. https://hackage.haskell.org/package/wai-extra-3.1.3 (MichaelSnoyman)
06:53:31 jespada joins (~jespada@90.254.245.49)
06:56:39 × thatlinuxguy quits (~sand49@2001:8003:8431:d200:8d49:ec:3d23:9521) (Quit: Leaving)
06:57:30 coot joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
06:59:24 <MarcelineVQ> place ur bets
07:00:10 plutoniix joins (~q@ppp-223-24-94-50.revip6.asianet.co.th)
07:00:30 hackage data-as 0.0.0.1 - Simple extensible sum https://hackage.haskell.org/package/data-as-0.0.0.1 (incertia)
07:01:31 hackage typson-beam 0.1.0.0 - Typson Beam Integration https://hackage.haskell.org/package/typson-beam-0.1.0.0 (aaronallen8455)
07:03:03 <jle`> woo hoo
07:03:08 <incertia> apparently haddock hates my life
07:06:10 × plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Quit: Leaving)
07:06:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:10:36 adm__ joins (~adm@43.229.89.234)
07:10:45 × adm_ quits (~adm@43.229.88.197) (Ping timeout: 240 seconds)
07:11:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
07:12:25 × texasmynsted quits (~texasmyns@212.102.45.112) (Ping timeout: 240 seconds)
07:12:32 mceier joins (~mceier@89-68-132-187.dynamic.chello.pl)
07:13:06 × vg quits (~vg@139.59.59.230) (Quit: vg)
07:13:22 vg joins (~vg@139.59.59.230)
07:13:48 × vg quits (~vg@139.59.59.230) (Client Quit)
07:14:07 vg joins (~vg@139.59.59.230)
07:14:37 × vg quits (~vg@139.59.59.230) (Client Quit)
07:15:01 vg joins (~vg@139.59.59.230)
07:15:17 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
07:15:30 vg joins (~vg@139.59.59.230)
07:15:52 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
07:17:34 <incertia> does hackage not build haddock automatically on upload?
07:17:43 <dminuoso> Correct
07:18:17 <incertia> ok maybe that is why no links are showing up
07:18:17 <dminuoso> 2Well
07:18:24 <dminuoso> Hackage *tries* to build the documentation
07:18:26 <dminuoso> But it can fail
07:18:40 <dminuoso> incertia: https://hackage.haskell.org/upload
07:19:23 solonarv joins (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr)
07:19:24 <incertia> nvm it generated i just had to give it like 15min
07:20:10 invaser joins (~Thunderbi@31.148.23.125)
07:21:53 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
07:22:08 hidedagger joins (~nate@unaffiliated/hidedagger)
07:22:45 × adm__ quits (~adm@43.229.89.234) (Remote host closed the connection)
07:30:24 coot_ joins (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl)
07:32:12 We joins (5fa448e7@95.164.72.231)
07:32:16 <We> cleanup
07:32:25 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds)
07:32:26 coot_ is now known as coot
07:32:37 We is now known as Guest77209
07:34:41 adm_ joins (~adm@43.229.89.234)
07:35:38 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
07:36:23 × MarcelineVQ quits (~anja@198.254.202.72) (Ping timeout: 256 seconds)
07:37:52 MarcelineVQ joins (~anja@198.254.202.72)
07:39:13 × adm_ quits (~adm@43.229.89.234) (Ping timeout: 260 seconds)
07:39:28 <dminuoso> What would you call an operation `Tree (Maybe a) -> Maybe (Tree a)`?
07:39:58 <jle`> could it be done for any Applicative instead of Maybe?
07:40:02 <jle`> if so, i'd call it sequence
07:40:21 <jle`> s/instead of/and not just
07:40:40 <jle`> sequence :: Applicative f => Tree (f a) -> f (Tree a)
07:40:47 × vg quits (~vg@139.59.59.230) (Quit: vg)
07:40:47 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
07:40:56 <dminuoso> Sure, I mean the actual types involved make it slightly more specialized, as I have
07:41:02 vg joins (~vg@139.59.59.230)
07:41:09 <dminuoso> Oh well, its the same.
07:41:12 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
07:41:16 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
07:41:23 <jle`> ah i meant, if you don't treat it in any way specific to Maybe that couldn't be done generically for all Applicative
07:41:29 vg joins (~vg@139.59.59.230)
07:41:37 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
07:41:51 vg joins (~vg@139.59.59.230)
07:41:53 <dminuoso> Right. Well I was just thinking of specifically calling that specialized function `hasLabel`
07:42:11 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
07:42:12 <dminuoso> I dont want to revisit later wondering about the uses of `sequence` here
07:42:25 <incertia> probably fine to give it a specific name if its use case in that location is specific
07:42:26 <jle`> the behavior of sequence would be more or less "allJust", maybe
07:42:26 vg joins (~vg@139.59.59.230)
07:42:33 <incertia> yeah
07:42:36 <jle`> i guess it depends on your use case too
07:42:43 <jle`> maybe 'validate'
07:43:11 <dminuoso> So I build up a patricia tree, and then I want to ensure it's also a valid regular labeled tree
07:43:28 <dminuoso> *patricia trie
07:43:52 <jle`> it sounds like you are describing a specific operation, then
07:44:04 <jle`> and not just "a thing of type Tree (Maybe a) -> Maybe (Tree a)"
07:44:15 <dminuoso> Well, internally it's very much just sequence..
07:44:23 <jle`> so i would give it a name to whatever describes what you are doing, semantically :)
07:44:28 <jle`> apart from just what the types tell you
07:44:36 <dminuoso> Right. Leading us back to my original question
07:44:38 <dminuoso> What would you call it :p
07:44:57 <jle`> toValidRegularLabeledTree ?
07:45:10 <dminuoso> heh
07:45:14 <incertia> i probably would just do let allJust = sequence in and go on from there
07:45:15 asheshambasta joins (~user@ptr-e1lysauiv50il654lwl.18120a2.ip6.access.telenet.be)
07:45:27 <incertia> but giving it a more apt name
07:45:41 <jle`> give a name based on the type = i'd say sequence, probably. but give it a name based on how you are using it, toValidRegularLabeledTree is something i'd use
07:45:46 <dminuoso> incertia: Yeah no, the reality is slightly more annoying. I have `Tree (ann, Maybe a) -> Maybe (Tree (ann, a))`
07:45:52 <MarcelineVQ> wwcd ::​Tree (Maybe a) -> Maybe (Tree a)
07:46:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:46:33 <dminuoso> So I need some double sequence/traverse
07:46:37 <dminuoso> With flip
07:46:46 <dminuoso> MarcelineVQ: wwc?
07:46:46 plutoniix joins (~q@ppp-223-24-94-50.revip6.asianet.co.th)
07:46:55 n0042 joins (d055ed89@208.85.237.137)
07:47:07 <MarcelineVQ> what would cale do
07:47:25 <asheshambasta> Anyone with more reflex experience than I can tell me why this traces: https://github.com/asheshambasta/flowerpower/blob/showcase/servant-reflex-dependency/fht-frontend/src/Frontend/Garden/Plant.hs#L93 while this doesn't: https://github.com/asheshambasta/flowerpower/blob/showcase/servant-reflex-dependency/fht-frontend/src/Frontend/Garden/Plant.hs#L103 (I couldn't provide a more minimal repro. of this)
07:47:59 <jle`> looks like `traverse sequence`
07:48:44 <dminuoso> traverse (sequence . swap)
07:48:50 <koz_> :t traverse sequence
07:48:51 <lambdabot> (Traversable t1, Traversable t2, Monad f) => t1 (t2 (f a)) -> f (t1 (t2 a))
07:48:54 <dminuoso> % :t traverse (sequence . swap
07:48:54 <yahb> dminuoso: ; <interactive>:1:26: error: parse error (possibly incorrect indentation or mismatched brackets)
07:48:56 <dminuoso> % :t traverse (sequence . swap)
07:48:56 <yahb> dminuoso: forall {t :: * -> *} {f :: * -> *} {a} {b}. (Traversable t, Monad f) => t (f a, b) -> f (t (b, a))
07:49:12 <dminuoso> Oh, no. Actually traverse sequence right
07:50:07 <jle`> traverse (sequence . swap . swap)
07:50:28 <dminuoso> :)
07:50:33 × gioyik quits (~gioyik@186.118.238.251) (Quit: WeeChat 3.0)
07:51:26 × robotmay quits (~beepboop@80.172.187.81.in-addr.arpa) (Remote host closed the connection)
07:51:40 <dminuoso> traverse (sequence . swap . flip const id . swap)
07:52:15 <dminuoso> Bet hlint cant figure that one out.
07:52:33 <koz_> :t flip const id
07:52:34 <lambdabot> c -> c
07:52:39 <koz_> Lol.
07:52:55 <jle`> :t const id ()
07:52:56 <lambdabot> a -> a
07:53:47 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
07:54:02 <incertia> i had to think about flip const id for a bit
07:54:22 <dminuoso> Well you can put something more interesting into `id`, that is better for tripping you up
07:54:25 <dminuoso> like `flip const fmap`
07:54:48 <jle`> :t const id id
07:54:49 <lambdabot> a -> a
07:54:58 robotmay joins (~beepboop@2001:8b0:7af0:2580:888:72a9:4a8e:aea0)
07:55:04 <dminuoso> % :t flip const fmap
07:55:05 <yahb> dminuoso: ; <interactive>:1:12: error:; * Ambiguous type variable `f0' arising from a use of `fmap'; prevents the constraint `(Functor f0)' from being solved.; Probable fix: use a type annotation to specify what `f0' should be.; These potential instances exist:; instance [safe] forall a. Functor (Q.Fun a) -- Defined in `Test.QuickCheck.Function'; instance [safe] Functor Q.Gen
07:55:12 <dminuoso> Oh. wait what?
07:55:20 <jle`> it doesn't know what Functor instance to compile there
07:55:31 <jle`> :t flip const map
07:55:33 <lambdabot> c -> c
07:55:46 <dminuoso> Oh I guess this would need impredicative types?
07:56:01 <incertia> asheshambasta: i would imagine it wouldn't get traced if dEitherPlant is Left
07:56:08 <dminuoso> yeah `flip const map` it is
07:56:15 sdx23 joins (~sdx23@unaffiliated/sdx23)
07:56:16 <incertia> could be wrong here
07:56:18 <jle`> flip const map itself only works because of defaulting i think
07:56:30 <dminuoso> Why defaulting?
07:56:33 <dminuoso> % :t flip const
07:56:34 <yahb> dminuoso: forall {b} {c}. b -> c -> c
07:56:43 <jle`> because it defaults to map :: (() -> ()) -> [()] -> [()]
07:56:44 raichoo joins (~raichoo@dslb-092-073-219-149.092.073.pools.vodafone-ip.de)
07:56:58 <jle`> otherwise it wouldn't know what to pick for a and b
07:56:59 <jle`> :t map
07:57:00 <dminuoso> Ah, I see. Otherwise that would have required impredicativity
07:57:01 <lambdabot> (a -> b) -> [a] -> [b]
07:57:26 <incertia> in particular if any of eName or eDayPlanted are Left it would cause fst <$> maints/snd <$> maints to not be evaluated and thus not trigger the traceEvent
07:57:28 <incertia> but im no guru
07:57:34 <jle`> there should be defaulting for * -> *'s
07:57:53 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
07:58:00 <dminuoso> You should open an issue on gitlab about that. Name `flip const fmap` as the motivating example.
07:58:12 dminuoso smiles
07:58:13 <jle`> bites me every day :)
07:58:24 <jle`> i wonder what the default should be
07:58:34 <jle`> maybe Identity first?
07:58:41 <jle`> or maybe Proxy
07:58:48 <jle`> ah yeah, Proxy first, then Identity
07:59:17 <jle`> this would be my dream haskell
07:59:54 <incertia> when i learned about Proxy my entire world changed
07:59:57 <koz_> :t flip const map
07:59:59 <lambdabot> c -> c
08:00:03 <koz_> LOL
08:00:18 cfricke joins (~cfricke@unaffiliated/cfricke)
08:00:26 <dminuoso> I think I should get three points for tripping koz_ up twice in a row.
08:00:40 <incertia> that and DataKinds
08:00:46 <incertia> it's so galaxy brained
08:00:59 <xerox_> % :t flip const unsafePerformIO
08:00:59 <yahb> xerox_: forall {c}. c -> c
08:01:07 <koz_> incertia: Type :: Type is the real galaxy brain idea.
08:01:19 <dminuoso> xerox_: Oh I have an idea.
08:01:24 <dminuoso> flip const unsafeCoerce
08:01:35 <koz_> :t flip const unsafeCoerce
08:01:37 <lambdabot> error: Variable not in scope: unsafeCoerce
08:01:46 × acowley quits (~acowley@c-68-83-22-43.hsd1.nj.comcast.net) (Read error: Connection reset by peer)
08:01:47 <dminuoso> % import Unsafe.Coerce
08:01:47 <yahb> dminuoso:
08:01:52 <dminuoso> % :t flip const unsafeCoerce
08:01:52 <yahb> dminuoso: forall {c}. c -> c
08:01:55 <dminuoso> This looks really dangerous.
08:02:17 Varis joins (~Tadas@unaffiliated/varis)
08:02:28 <jle`> `flip const unsafeCoerce` is pretty much the same as `unsafeCoerce`, ironically
08:02:33 <jle`> just with a more specialized type
08:02:42 <dminuoso> Okay enough of flip const. What other elaborate ways of doing.. nothing can you think of?
08:02:50 × vg quits (~vg@139.59.59.230) (Quit: vg)
08:03:01 <jle`> % map ($ 10) [unsafeCoerce, flip const unsafeCoerce]
08:03:01 <koz_> dminuoso: fmap id
08:03:01 <yahb> jle`: ; <interactive>:92:1: error:; Ambiguous occurrence `map'; It could refer to; either `Data.List.NonEmpty.map', imported from `Data.List.NonEmpty'; or `Prelude.map', imported from `Prelude' (and originally defined in `GHC.Base')
08:03:06 vg joins (~vg@139.59.59.230)
08:03:10 <jle`> D:
08:03:15 <koz_> dimap id id also works
08:03:16 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce]
08:03:17 <yahb> jle`: [10,10]
08:03:28 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
08:03:28 <dminuoso> koz_: well those are very obvious
08:03:28 <jle`> koz_: you mean dimap id id id
08:03:38 <koz_> jle`: Rofl.
08:03:38 <dminuoso> `dimap id id id` is slightly more running
08:03:43 <dminuoso> cunning.
08:03:44 vg joins (~vg@139.59.59.230)
08:03:47 <jle`> dimap id id wouldn't work i think
08:03:54 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id]
08:03:54 <yahb> jle`: [10,10,10]
08:04:08 × vg quits (~vg@139.59.59.230) (Client Quit)
08:04:20 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10]
08:04:20 <yahb> jle`: [10,10,10,10]
08:04:28 vg joins (~vg@139.59.59.230)
08:05:13 <incertia> const 10 the big brain id
08:05:30 <dminuoso> % :t fix ($)
08:05:31 <yahb> dminuoso: forall {a} {b}. a -> b
08:05:33 <dminuoso> Mmm.
08:05:42 acowley joins (~acowley@c-68-83-22-43.hsd1.nj.comcast.net)
08:05:54 × Guest77209 quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
08:06:10 <jle`> how to heat up a CPU
08:06:34 <dminuoso> Yeah. Who said pure code didn't have side effects.
08:07:00 <incertia> oh god you can't even C-c out of it
08:07:23 <incertia> that's so cursed
08:07:30 <koz_> LOL
08:07:47 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
08:07:58 <jle`> % fix($)fix
08:08:03 <yahb> jle`: [Timed out]
08:08:43 <dminuoso> :t fix (const fix)
08:08:44 <lambdabot> (a -> a) -> a
08:08:51 <dminuoso> Okay that looks like something now
08:09:49 <dminuoso> % fix (const fix) $ \t -> (1, fst t + 1)
08:09:49 <yahb> dminuoso: (1,2)
08:09:58 <dminuoso> Great. So we have a more elaborate way of doing fix
08:09:58 × vg quits (~vg@139.59.59.230) (Quit: vg)
08:10:11 vg joins (~vg@139.59.59.230)
08:10:40 <n0042> I'd like to take a moment to applaud whoever decided to name the Vector function `snoc`.
08:10:41 alp joins (~alp@2a01:e0a:58b:4920:9554:f534:a35:4872)
08:10:45 × vg quits (~vg@139.59.59.230) (Client Quit)
08:10:49 <n0042> That is pretty swell.
08:10:59 vg joins (~vg@139.59.59.230)
08:11:04 <dminuoso> n0042: snoc is just cons in reverse
08:11:09 <n0042> Exactly
08:11:12 <jle`> yeah, it's instantly understandable :)
08:11:12 <koz_> n0042: It's 100 IQ wordplay relative some of the stunts Edward pulls.
08:11:15 <koz_> :t confusing
08:11:16 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
08:11:17 <lambdabot> Applicative f => LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f)) s t a b -> LensLike f s t a b
08:11:32 vg joins (~vg@139.59.59.230)
08:11:35 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
08:11:38 <dminuoso> koz_: Haha, it took me a year to get why confusing was called confusing
08:11:43 <dminuoso> Then it hit me
08:12:00 <dminuoso> lens is filled with so many puns
08:12:10 <koz_> Or, alternatively, Joker and Clown.
08:12:17 <koz_> (that's actually a two-level reference)
08:12:56 <dminuoso> Well if you dont know Stealers Wheels
08:13:30 <dminuoso> The curious thing though is
08:13:34 <dminuoso> % :t const fix
08:13:34 <yahb> dminuoso: b -> (a -> a) -> a
08:13:36 <dminuoso> % :t fix
08:13:37 <yahb> dminuoso: (a -> a) -> a
08:13:44 × Lord_of_Life quits (~Lord@46.217.221.184) (Changing host)
08:13:44 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
08:13:52 <dminuoso> Ah I guess `b ~ (a -> a) -> a`
08:14:38 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
08:14:44 <jle`> fix (const x) = x
08:14:50 <jle`> % fix (const "hello")
08:14:50 <yahb> jle`: "hello"
08:15:11 <dminuoso> % :t fix . const
08:15:11 <yahb> dminuoso: c -> c
08:15:13 <dminuoso> There we go!
08:15:20 <jle`> neato
08:15:48 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10, fix . const]
08:15:48 <yahb> jle`: [10,10,10,10,10]
08:15:54 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
08:16:10 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
08:16:19 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
08:16:20 <koz_> Procrastination a la #haskell.
08:17:18 <aplainzetakind> I'm trying get a handle on conditional compilation with cabal flags by means of an over-architectured advent of code project: https://gist.github.com/aplainzetakind/ba5b0fa3af4ef7f3deec77c5e025b746 trying to build this, cabal tells me this module imports itself. Why does this happen? (Removing CPP and commenting out ifdefs works fine.)
08:17:39 <jle`> woo hoo, over-architected advent of code projects
08:18:18 <jophish> No semigroup instance for Product :(
08:18:24 <jophish> (Data.Functor.Product.Product)
08:18:29 <koz_> jle` is uniquely qualified to talk about this!
08:18:34 <koz_> jophish: I think you want a different Product.
08:18:45 <jophish> koz_: I do?
08:18:52 <jophish> thank you
08:19:07 <koz_> jophish: I _assume_ you're after the monoid (*, 1)?
08:19:28 <jophish> nope, in fact I'm quite sure that one has a semigroup instance!!!
08:19:41 <dminuoso> What would the implementation be?
08:19:45 <koz_> OK, well, I'm unsure what instance you're expecting this one to have.
08:19:52 <jophish> Pair a1 b1 <> Pair a2 b2 = Pair (a1 <> a2) (b1 <> b2)
08:20:03 <jle`> Pair x1 y1 <> Pair x2 y2 = Pair (x1 <> x2) (y1 <> y2)
08:20:09 <jle`> ah beat me to it
08:20:13 <koz_> Jinx!
08:20:15 <jophish> you typed it very fast!
08:20:44 <dminuoso> Probably forgotten then? Make a merge request .
08:20:49 <jle`> yeah, there should really be one
08:21:09 <dminuoso> (MonadZip f, MonadZip g) => MonadZip (Product f g)
08:21:32 <jle`> i think there is the approriate Alt instance
08:21:33 koz_ wishes it was ApplicativeZip
08:21:55 <dminuoso> Together with ApplicativeComprehensions?
08:22:31 <koz_> dminuoso: This.
08:22:40 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
08:23:10 <jle`> jophish: if it matches the specific behavior you want, you can try using Ap as a wrapper
08:23:36 <dminuoso> koz_: To be fair, I recently started longing for caseS
08:23:45 <dminuoso> Which I think fits in that hole
08:23:53 <koz_> caseS?
08:24:03 <dminuoso> selective case-of
08:24:13 <koz_> dminuoso: I don't follow, sorry.
08:24:28 <dminuoso> koz_: a selective functor equivalent for do-notation
08:25:28 <koz_> Wait, that's a thing?
08:25:32 <dminuoso> No
08:25:33 <dminuoso> branch :: Selective f => f (Either a b) -> f (a -> c) -> f (b -> c) -> f c
08:25:48 <dminuoso> So sort of cross between `branch` and `case-of`
08:26:29 <dminuoso> https://gist.github.com/dminuoso/7acab978112cc0f0a7f0288bd87d3378 you can write this currently
08:26:57 <koz_> Huh, interesting.
08:27:35 <dminuoso> But it only works for a+b and its hard to composable
08:27:44 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
08:28:20 <koz_> How would you generalize that beyond Either though?
08:28:23 michalz joins (~user@185.246.204.47)
08:28:25 <koz_> I don't think you can really.
08:28:45 × monochrom quits (trebla@216.138.220.146) (Ping timeout: 240 seconds)
08:29:20 <dminuoso> I think you could write a version of `branch` that works with generics
08:29:47 <dminuoso> over arbitrary sum types
08:30:20 <koz_> gbranch
08:30:32 borne joins (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de)
08:30:40 Fractalis joins (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7)
08:30:47 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
08:32:23 <jophish> jle`: you think I'm made of Applicative instances?!
08:33:18 × Fractalis quits (~Fractalis@2601:987:280:8d40:eda9:f9e1:2072:cea7) (Client Quit)
08:33:29 <n0042> =$
08:34:21 <koz_> jophish: I sure am.
08:37:06 <jophish> :D
08:38:52 chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de)
08:43:18 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 272 seconds)
08:44:01 hackage typson-esqueleto 0.1.0.0 - Typson Esqueleto Integration https://hackage.haskell.org/package/typson-esqueleto-0.1.0.0 (aaronallen8455)
08:46:09 gproto23 joins (~gproto23@unaffiliated/gproto23)
08:50:03 × centril quits (~centril@213-66-146-92-no250.tbcn.telia.com) (Ping timeout: 256 seconds)
08:50:58 kritzefitz joins (~kritzefit@fw-front.credativ.com)
08:54:20 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
08:55:50 Boomerang_ joins (~Boomerang@xd520f68c.cust.hiper.dk)
08:56:57 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
08:58:06 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
08:58:37 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
09:01:36 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-bojsghgzllzoprwv) (Quit: Connection closed for inactivity)
09:03:39 adm_ joins (~adm@43.229.89.234)
09:04:35 centril joins (~centril@213-66-146-92-no250.tbcn.telia.com)
09:07:35 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
09:07:43 × adm_ quits (~adm@43.229.89.234) (Ping timeout: 246 seconds)
09:10:17 wonko7 joins (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52)
09:10:29 bifunc2 joins (bifunc2@gateway/vpn/protonvpn/bifunc2)
09:11:07 <bifunc2> What are some popular ways to create fixed-length containers, where the length is fixed in the type?
09:11:10 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
09:12:07 <dminuoso> There really aren't any.
09:12:11 <[exa]> bifunc2: like this? https://hackage.haskell.org/package/fixed-vector
09:12:33 <dminuoso> (By that I mean they aren't very popular)
09:12:43 <[exa]> yeah that's very true
09:12:54 <bifunc2> why are they not popular?
09:13:13 <bifunc2> btw is this related to dependent types? i heard dependent types are not yet in haskell, at all
09:13:15 <[exa]> once you get the sizes into the typesystem, everyone starts to demand more "smart" operations from it, and you end up requiring dependent types
09:13:17 <dminuoso> This takes you straight into dependent typing
09:13:18 <[exa]> which is hard
09:14:28 <bifunc2> ok maybe it's best for now to assert equal lengths at runtime
09:15:33 <[exa]> bifunc2: making runtime fail as soon as possible on detected error usually gives a good assurance that the handling is right, esp. if you have at least a single automated integration test
09:16:21 dyeplexer joins (~lol@unaffiliated/terpin)
09:17:38 <[exa]> the other approach is to write the code so that the error is not representable, e.g. make a tiny layer that always handles the sizes right™ and build upon it
09:18:01 × st8less quits (~st8less@2603:a060:11fd:0:e465:6770:e76d:da2a) (Ping timeout: 272 seconds)
09:19:35 st8less joins (~st8less@inet-167-224-197-181.isp.ozarksgo.net)
09:27:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
09:28:35 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
09:28:43 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
09:30:02 thc202 joins (~thc202@unaffiliated/thc202)
09:33:08 × plutoniix quits (~q@ppp-223-24-94-50.revip6.asianet.co.th) (Quit: Leaving)
09:34:17 kuribas joins (~user@ptr-25vy0i7d0jyf2exvnea.18120a2.ip6.access.telenet.be)
09:37:02 fendor joins (~fendor@178.165.131.166.wireless.dyn.drei.com)
09:38:41 supercoven joins (~Supercove@196.244.192.54)
09:38:42 × supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded)
09:38:56 supercoven joins (~Supercove@196.244.192.54)
09:38:57 × supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded)
09:39:11 supercoven joins (~Supercove@196.244.192.54)
09:39:12 × supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded)
09:39:26 supercoven joins (~Supercove@196.244.192.54)
09:39:27 × supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded)
09:39:41 supercoven joins (~Supercove@196.244.192.54)
09:39:42 × supercoven quits (~Supercove@196.244.192.54) (Max SendQ exceeded)
09:43:34 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 265 seconds)
09:46:44 × Boomerang_ quits (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving)
09:46:55 × michalz quits (~user@185.246.204.47) (Read error: Connection reset by peer)
09:50:12 <merijn> dminuoso: Yes there are, sized Vector :)
09:50:30 <merijn> https://hackage.haskell.org/package/vector-sized is pretty great
09:52:52 <dminuoso> https://packdeps.haskellers.com/reverse/vector-sized
09:52:54 <dminuoso> yes, very popular.
09:52:55 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-kfwargodivspffqj) (Quit: Connection closed for inactivity)
09:52:55 michalz joins (~user@185.246.204.61)
09:55:21 × tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) ()
09:56:00 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
09:56:19 × michalz quits (~user@185.246.204.61) (Read error: Connection reset by peer)
09:57:52 <dminuoso> Also, vector-sized has a very defty dependency footprint
09:57:59 <dminuoso> Since it pulls in adjunctions
09:58:59 exlipse joins (~exlipse@4e69b241.skybroadband.com)
09:59:05 <dminuoso> And that gives you half the kmettiverse
09:59:28 <dminuoso> Anyway. They asked for "popular" not "great"
10:00:49 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 264 seconds)
10:01:25 <merijn> dminuoso: packdeps only lists stuff on hackage, though
10:01:34 <merijn> I use it in a bunch of code that's not on hackage
10:01:59 monochrom joins (trebla@216.138.220.146)
10:02:32 <dminuoso> Sure, but it's not like there's gonna be incredible widespread usage of a package everywhere except hackage
10:02:47 <dminuoso> Think it's a good indicator to answer "popularity"
10:03:21 Yumasi joins (~guillaume@2a01cb09b06b29ea391191835a81a7a2.ipv6.abo.wanadoo.fr)
10:03:49 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
10:06:06 perry69420 joins (6ee39737@110.227.151.55)
10:06:13 × ski quits (~ski@nc-2504-30.studat.chalmers.se) (Ping timeout: 264 seconds)
10:07:51 × nopf quits (~frosch@static.179.17.76.144.clients.your-server.de) (Remote host closed the connection)
10:08:44 × erisco quits (~erisco@d24-57-249-233.home.cgocable.net) (Remote host closed the connection)
10:09:05 ski joins (~ski@nc-2504-30.studat.chalmers.se)
10:10:12 invaser joins (~Thunderbi@31.148.23.125)
10:10:32 × guest1126 quits (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1))
10:15:06 ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233)
10:15:09 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
10:23:47 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
10:29:01 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 264 seconds)
10:30:21 michalz joins (~user@185.246.204.47)
10:34:02 Ariakenom_ joins (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se)
10:36:28 subttle joins (~anonymous@unaffiliated/subttle)
10:38:01 × Ariakenom__ quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 264 seconds)
10:39:30 hackage hspec-slow 0.2.0.1 - Find slow test cases https://hackage.haskell.org/package/hspec-slow-0.2.0.1 (Jappie)
10:43:12 adm_ joins (~adm@43.229.89.234)
10:44:08 Ariakenom__ joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
10:46:12 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
10:47:02 DavidEichmann joins (~david@62.110.198.146.dyn.plus.net)
10:47:16 × Ariakenom_ quits (~Ariakenom@h-158-174-186-195.NA.cust.bahnhof.se) (Ping timeout: 240 seconds)
10:50:42 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
10:54:22 × danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9)
11:00:01 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
11:01:14 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
11:01:33 BugzOOO is now known as Neuromancer
11:03:29 <boxscape> Hm, the `data X = forall a . MkX (Y a)` encoding is usually preferred for existentials over the `forall r . (forall a . Y a -> r) -> r` encoding, right? I'm asking because I just wrote something fairly simple where the first one seems more verbose, but I guess maybe it becomes easier to keep track of things with the first encoding as your what
11:03:30 <boxscape> you're doing gets more complex?
11:07:29 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
11:08:13 × alp quits (~alp@2a01:e0a:58b:4920:9554:f534:a35:4872) (Ping timeout: 272 seconds)
11:10:18 adm_ joins (~adm@43.229.89.234)
11:11:45 <merijn> boxscape: I usually prefer writing existentials as GADTs, because it looks cleaner
11:12:17 <boxscape> merijn so that would be effectively the same as the first encoding but with GADT syntax?
11:13:11 Alleria_ joins (~AllahuAkb@2604:2000:1484:26:f085:e9f5:38cf:432d)
11:14:58 × adm_ quits (~adm@43.229.89.234) (Ping timeout: 260 seconds)
11:15:28 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
11:16:27 × _Alleria quits (~AllahuAkb@2604:2000:1484:26:b060:c081:3394:137) (Ping timeout: 260 seconds)
11:17:18 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 260 seconds)
11:17:28 × fendor quits (~fendor@178.165.131.166.wireless.dyn.drei.com) (Read error: Connection reset by peer)
11:17:48 phaul joins (~phaul@ruby/staff/phaul)
11:18:31 hackage phonetic-languages-constraints 0.4.0.0 - Constraints to filter the needed permutations https://hackage.haskell.org/package/phonetic-languages-constraints-0.4.0.0 (OleksandrZhabenko)
11:19:31 hackage postgresql-binary 0.12.3.2 - Encoders and decoders for the PostgreSQL's binary format https://hackage.haskell.org/package/postgresql-binary-0.12.3.2 (NikitaVolkov)
11:20:22 <tomsmeding> boxscape: you can convert the existentials method to the CPS method, but not the other way round
11:20:48 × carlomagno1 quits (~cararell@148.87.23.6) (Remote host closed the connection)
11:20:50 <tomsmeding> that is to say: given a function that returns an existential with the X method, you can use it in a context that uses the Y method for existentials
11:21:01 hackage postgresql-binary 0.12.3.3 - Encoders and decoders for the PostgreSQL's binary format https://hackage.haskell.org/package/postgresql-binary-0.12.3.3 (NikitaVolkov)
11:21:12 <tomsmeding> but if you have a function in CPS form using Y, then you can't use it in a function that wants to return an X-style existential
11:21:19 <tomsmeding> at least, that's my experience :p
11:21:29 <tomsmeding> which makes me prefer X, despite its additional verbosity
11:21:43 <boxscape> hm, I see, interesting
11:21:53 <dminuoso> I guess CPS style fuses better?
11:22:39 <dminuoso> Also it's a little less annoying if you pass things around, since you dont need to constantly wrap/rewrap your thing
11:23:29 <boxscape> yeah, that makes sense
11:24:45 adm_ joins (~adm@43.229.89.234)
11:25:50 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
11:26:06 <dminuoso> 12:21:12 tomsmeding | but if you have a function in CPS form using Y, then you can't use it in a function that wants to return an X-style existential
11:26:09 <dminuoso> Can you elaborate?
11:26:23 jpds joins (~jpds@gateway/tor-sasl/jpds)
11:27:01 <tomsmeding> I haven't proven anything, just what I empirically found
11:27:05 <dminuoso> If you have `f :: forall r. (forall a . Y a -> r) -> r; then you can just do `f MkX` to get back into the X representation
11:27:07 <dminuoso> No?
11:27:14 <tomsmeding> wait
11:27:28 <tomsmeding> I'm dumb
11:27:29 <tomsmeding> yes
11:27:51 <tomsmeding> thank you
11:27:55 <boxscape> oh yeah that does work
11:28:49 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Read error: Connection reset by peer)
11:29:36 × adm_ quits (~adm@43.229.89.234) (Ping timeout: 240 seconds)
11:31:09 carlomagno joins (~cararell@148.87.23.11)
11:34:51 × domenkozar[m] quits (domenkozar@NixOS/user/domenkozar) (Quit: Bridge terminating on SIGTERM)
11:34:51 × dominicusin[m] quits (dominicusi@gateway/shell/matrix.org/x-qzmdyqsqeazfuaho) (Quit: Bridge terminating on SIGTERM)
11:34:51 × PotatoHatsue quits (berbermanp@gateway/shell/matrix.org/x-libkhcmbrdqpqido) (Quit: Bridge terminating on SIGTERM)
11:34:51 × CRTified[m] quits (schnecfkru@gateway/shell/matrix.org/x-eenugdcfqkikhazz) (Quit: Bridge terminating on SIGTERM)
11:34:51 × lnxw37d4 quits (lnxw37d4ma@gateway/shell/matrix.org/x-gyetbkvikjbbsrrd) (Quit: Bridge terminating on SIGTERM)
11:34:51 × boistordu quits (boistordum@gateway/shell/matrix.org/x-mdyiyodwbwwmjcwq) (Quit: Bridge terminating on SIGTERM)
11:34:51 × fgaz quits (fgazmatrix@gateway/shell/matrix.org/x-ckdeidekxaxmbkrv) (Quit: Bridge terminating on SIGTERM)
11:34:51 × tersetears[m] quits (tersetears@gateway/shell/matrix.org/x-yuvadosdugsnqrxf) (Quit: Bridge terminating on SIGTERM)
11:34:51 × psydruid quits (psydruidma@gateway/shell/matrix.org/x-mpmiqxkbrlzaygik) (Quit: Bridge terminating on SIGTERM)
11:34:51 × jtojnar quits (jtojnarmat@gateway/shell/matrix.org/x-ygesxqztjkwljyzz) (Quit: Bridge terminating on SIGTERM)
11:34:51 × sm[m] quits (simonmicma@gateway/shell/matrix.org/x-kwpeizyjcphohngd) (Quit: Bridge terminating on SIGTERM)
11:34:51 × SlackIntegration quits (slackbotma@gateway/shell/matrix.org/x-jwlsctxhtztxaioq) (Quit: Bridge terminating on SIGTERM)
11:34:51 × lambdaclan quits (lambdaclan@gateway/shell/matrix.org/x-cunxvrjdwttunvim) (Quit: Bridge terminating on SIGTERM)
11:34:51 × johnnyboy[m] quits (gifumatrix@gateway/shell/matrix.org/x-grtayloopdscsgus) (Quit: Bridge terminating on SIGTERM)
11:34:51 × unclechu quits (unclechuma@gateway/shell/matrix.org/x-fmibtulmvlcrrtyt) (Quit: Bridge terminating on SIGTERM)
11:34:51 × themsay[m] quits (themsaymat@gateway/shell/matrix.org/x-ijyhmdsdchceasci) (Quit: Bridge terminating on SIGTERM)
11:34:51 × hsiktas[m] quits (hsiktasmat@gateway/shell/matrix.org/x-diupvlqwumdpqenf) (Quit: Bridge terminating on SIGTERM)
11:34:51 × camlriot42 quits (camlriotma@gateway/shell/matrix.org/x-iykqiffyqrfswvid) (Quit: Bridge terminating on SIGTERM)
11:34:52 × chreekat[m] quits (chreekatma@gateway/shell/matrix.org/x-qrurbafjmusxfuce) (Quit: Bridge terminating on SIGTERM)
11:34:52 × psamim quits (samimpmatr@gateway/shell/matrix.org/x-tqcirtqddpnlomkh) (Quit: Bridge terminating on SIGTERM)
11:34:52 × ThaEwat quits (thaewraptm@gateway/shell/matrix.org/x-eowhntdvamvdarxm) (Quit: Bridge terminating on SIGTERM)
11:34:52 × ttc quits (tomtauma1@gateway/shell/matrix.org/x-lgjugwvkytxobgef) (Quit: Bridge terminating on SIGTERM)
11:34:53 × rab24ack[m] quits (rab24ackma@gateway/shell/matrix.org/x-djastgiuyzrwwale) (Quit: Bridge terminating on SIGTERM)
11:34:53 × loprakoa[m] quits (loprakoama@gateway/shell/matrix.org/x-jggrqgksdtnpxwbo) (Quit: Bridge terminating on SIGTERM)
11:34:53 × patier[m] quits (patiermatr@gateway/shell/matrix.org/x-yjfgmheqbsrvyvho) (Quit: Bridge terminating on SIGTERM)
11:34:53 × TekShifter[m] quits (tekshifter@gateway/shell/matrix.org/x-cfzrvymgkwpsjlwz) (Quit: Bridge terminating on SIGTERM)
11:34:55 × alephu5[m] quits (alephu5mat@gateway/shell/matrix.org/x-iqqwqpszzorkjviq) (Quit: Bridge terminating on SIGTERM)
11:34:55 × srid quits (sridmatrix@gateway/shell/matrix.org/x-ddfumpcsdmsgnklz) (Quit: Bridge terminating on SIGTERM)
11:34:59 × jlv quits (jlvjustinl@gateway/shell/matrix.org/x-pkbhavgbkzlvwwnm) (Quit: Bridge terminating on SIGTERM)
11:34:59 × berberman[T] quits (berberma4@gateway/shell/matrix.org/x-gbdkkegajrsrxxkg) (Quit: Bridge terminating on SIGTERM)
11:34:59 × jkaye[m] quits (jkayematri@gateway/shell/matrix.org/x-xgtxrdifoozwqxqt) (Quit: Bridge terminating on SIGTERM)
11:35:01 × rednaZ[m] quits (r3dnazmatr@gateway/shell/matrix.org/x-ozioktnmvrvopylv) (Quit: Bridge terminating on SIGTERM)
11:35:04 × aloiscochard[m] quits (aloiscocha@gateway/shell/matrix.org/x-lbvqcwwuqmskblks) (Quit: Bridge terminating on SIGTERM)
11:35:04 × kadoban quits (kadobanmat@gateway/shell/matrix.org/x-ufwuzjufmgpbpvll) (Quit: Bridge terminating on SIGTERM)
11:35:04 × jeffcasavant[m] quits (jeffcasava@gateway/shell/matrix.org/x-javvwevsrvfabsjm) (Quit: Bridge terminating on SIGTERM)
11:35:04 × pqwy[m] quits (pqwymatrix@gateway/shell/matrix.org/x-qkyseftxctvdhmhh) (Quit: Bridge terminating on SIGTERM)
11:35:04 × miseenplace[m] quits (miseenplac@gateway/shell/matrix.org/x-wnnpqyuemudervxu) (Quit: Bridge terminating on SIGTERM)
11:35:04 × jesser[m] quits (jessermatr@gateway/shell/matrix.org/x-qvghulfnrarmvzsf) (Quit: Bridge terminating on SIGTERM)
11:35:04 × zerstroyer[m] quits (zerstroyer@gateway/shell/matrix.org/x-gegiretuusxprcab) (Quit: Bridge terminating on SIGTERM)
11:35:04 × mikr[m] quits (mikrdavral@gateway/shell/matrix.org/x-wijhaydyfjgkrnqd) (Quit: Bridge terminating on SIGTERM)
11:35:05 × maralorn quits (maralornma@gateway/shell/matrix.org/x-opsadexttgzjqxrr) (Quit: Bridge terminating on SIGTERM)
11:35:06 × siraben quits (sirabenmat@gateway/shell/matrix.org/x-kbzgfwlklcotpjnz) (Quit: Bridge terminating on SIGTERM)
11:35:14 × theduke quits (thedukem1@gateway/shell/matrix.org/x-fkzkadqaqklwkoxx) (Quit: Bridge terminating on SIGTERM)
11:35:14 × ComaGrayce[m] quits (commagrays@gateway/shell/matrix.org/x-hgvgmfuatspyagpw) (Quit: Bridge terminating on SIGTERM)
11:35:14 × Noughtmare[m] quits (naughtmare@gateway/shell/matrix.org/x-qinronskgvjuesgd) (Quit: Bridge terminating on SIGTERM)
11:35:14 × iinuwa quits (iinuwamatr@gateway/shell/matrix.org/x-nirgmkkuiglbzdym) (Quit: Bridge terminating on SIGTERM)
11:35:14 × michaelpj quits (michaelpjm@gateway/shell/matrix.org/x-bpqwjlstbvbemkvx) (Quit: Bridge terminating on SIGTERM)
11:35:14 × Ericson2314 quits (ericson231@gateway/shell/matrix.org/x-tegudoxxgcuckrrp) (Quit: Bridge terminating on SIGTERM)
11:35:14 × Hanma[m] quits (hanmamatri@gateway/shell/matrix.org/x-fchldacgfrgiwucu) (Quit: Bridge terminating on SIGTERM)
11:35:15 × dyniec[m] quits (dyniecmatr@gateway/shell/matrix.org/x-rvvlgbaxbtmzugej) (Quit: Bridge terminating on SIGTERM)
11:35:16 × wi[m] quits (w1gzmatrix@gateway/shell/matrix.org/x-ywaugiascvhtlbjk) (Quit: Bridge terminating on SIGTERM)
11:35:16 × andreabedini[m] quits (andreabedi@gateway/shell/matrix.org/x-qitqfbtrbfnzbcmu) (Quit: Bridge terminating on SIGTERM)
11:35:16 × drozdziak1 quits (drozdziak1@gateway/shell/matrix.org/x-vthisqiohgxugfqd) (Quit: Bridge terminating on SIGTERM)
11:35:16 × alexfmpe quits (alexfmpema@gateway/shell/matrix.org/x-uqlbdbsmgeiylcyi) (Quit: Bridge terminating on SIGTERM)
11:35:16 × wanaks[m] quits (wanaksmatr@gateway/shell/matrix.org/x-evkorzdwtetbvvid) (Quit: Bridge terminating on SIGTERM)
11:35:17 × falling-edge[m] quits (falling-ed@gateway/shell/matrix.org/x-ingloazughuslvcy) (Quit: Bridge terminating on SIGTERM)
11:35:39 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
11:36:55 × lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection)
11:37:02 lambdabot joins (~lambdabot@silicon.int-e.eu)
11:37:02 × lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host)
11:37:02 lambdabot joins (~lambdabot@haskell/bot/lambdabot)
11:37:25 × nckx quits (~nckx@tobias.gr) (Ping timeout: 264 seconds)
11:38:02 nckx joins (~nckx@tobias.gr)
11:38:25 adm_ joins (~adm@43.229.89.234)
11:38:29 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
11:39:17 <bifunc2> [exa] vector-sized library seems to be working like magic
11:39:33 <bifunc2> so if all i need are fixed length vectors, this seems like the library to use
11:39:38 <bifunc2> seems quite popular too
11:40:03 <bifunc2> i no longer see a reason to use normal vector and do runtime asserts
11:40:38 <dminuoso> "quite popular" according to which metric?
11:40:48 <dminuoso> Anyway, popularity is not necessarily an indicator of quality
11:40:57 <dminuoso> An unpopular library can be of high quality, and popular libraries can be of low quality
11:41:03 <maerwald> 14k downloads
11:41:14 <dminuoso> That can easily mean it's a transitive dependency of some popular package
11:41:21 <maerwald> yes, that means the lib is popular
11:41:30 <dminuoso> Depends on how you look at it
11:41:51 kindaro joins (1f08e49d@h31-8-228-157.dyn.bashtel.ru)
11:41:58 <maerwald> it isn't all that complicated
11:42:01 <dminuoso> If a single popular package has vector-sized as a *transitive* dependency, is vector-sized popular?
11:42:04 <dminuoso> hard to say
11:42:13 jeffcasavant[m] joins (jeffcasava@gateway/shell/matrix.org/x-rmfoljfsgzwwaqzw)
11:42:25 <dminuoso> Id say popularity means a lot of people use your package as a direct dependency
11:42:27 <dminuoso> not transitive
11:42:46 <kindaro> Is there a file in `~/.cabal` that contains the list of all versions of all installed packages?
11:43:04 <dminuoso> Most people dont use ghc-prim, but everyone has it in their dependency tree. Is it a popular library?
11:43:05 <kindaro> Or, should I say, stored packages.
11:43:26 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
11:43:43 <maerwald> dminuoso: 14k downloads is a pretty good indicator of popularity. If you think it isn't, you should probably bring up proof :)
11:44:12 <dminuoso> maerwald: https://packdeps.haskellers.com/reverse/vector-sized
11:44:27 <maerwald> packdeps isn't exhaustive
11:44:28 <dminuoso> 14 packages on hackage depend on it
11:44:30 <dminuoso> out of tha
11:44:32 <dminuoso> I only recognize 1.
11:44:39 <dminuoso> On the entire of hackage, only one package I recognize depends on it.
11:44:49 <dminuoso> That in my book makes it a very unpopular library
11:45:06 plakband joins (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net)
11:45:06 <dminuoso> Of course its not exhaustive, its an indicator.
11:45:13 <dminuoso> But one that better represents popularity
11:46:02 <maerwald> servant-client just has 100 reverse deps, the other 10k it doesn't show :D
11:46:14 <maerwald> downloads are much more reliable metric
11:46:21 <dminuoso> Hard to say
11:46:26 <bifunc2> i don't have any great definition of this, my friend :) i just looked at https://hackage.haskell.org/package/vector-sized-1.4.2 and saw 100 d/ls in last 30 days. more than most libraries :P
11:46:33 <bifunc2> s/this/popular
11:46:41 <[exa]> bifunc2: that may be automated downloads :D
11:47:04 <[exa]> one of my R libs has 400 installs per month but I'm fairly sure it has precisely 10 users.
11:47:11 <maerwald> [exa]: that even out for all of hackage (automated downloads)
11:47:22 <maerwald> so it's not a particularly strong argument
11:47:23 <boxscape> hm looks like vector-sized uses CPS-style existentials
11:47:39 <dminuoso> 12:46:02 maerwald | servant-client just has 100 reverse deps, the other 10k it doesn't show :D
11:47:43 <kindaro> How can I list all packages and versions available in Cabal store?
11:47:51 <dminuoso> maerwald: I guess the difference is servant-client is very likley to have users who do not share their product on hackage
11:48:04 <maerwald> why is that a *difference*?
11:48:18 <dminuoso> a container library can be reasonably expected to be used by other liraries
11:48:37 <dminuoso> its not just executables that need vectors
11:48:51 <dminuoso> kindaro: find.
11:49:18 <[exa]> maerwald: yeah just wanted to point out that the number may be biased
11:49:18 <maerwald> dminuoso: servant-client is not an executable :D
11:49:28 <dminuoso> maerwald: No, but it likely is used by executables
11:49:40 <dminuoso> There's relatively little API wrappers on hackage
11:49:53 <maerwald> dminuoso: look at the reverse deps and you'll see lots of libraries :)
11:49:58 fendor joins (~fendor@178.165.131.166.wireless.dyn.drei.com)
11:50:15 <maerwald> so this seems more like an assumption rather than an observation
11:50:19 <dminuoso> You just switched your argument
11:50:26 <dminuoso> maerwald: Your point was "servant-client just has 100 reverse deps, the other 10k it doesn't show"
11:50:47 <maerwald> yes, I didn't make any assumptions of what the users are
11:51:10 dminuoso is too tired for this
11:52:02 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection)
11:52:13 kindaro parts (1f08e49d@h31-8-228-157.dyn.bashtel.ru) ()
11:52:30 <maerwald> (and I wrote a library that uses servant-client as a library)
11:54:23 iinuwa joins (iinuwamatr@gateway/shell/matrix.org/x-xphebgqwlqcseskv)
11:54:23 Ericson2314 joins (ericson231@gateway/shell/matrix.org/x-avnyxwuppgyurkaz)
11:54:24 maralorn joins (maralornma@gateway/shell/matrix.org/x-texxocacqxllhpup)
11:54:24 johnnyboy[m] joins (gifumatrix@gateway/shell/matrix.org/x-jjlcducyrjlzkhlt)
11:54:24 psamim joins (samimpmatr@gateway/shell/matrix.org/x-iwvzbluhzuztthuh)
11:54:24 unclechu joins (unclechuma@gateway/shell/matrix.org/x-asdoddomxjfoouxw)
11:54:24 theduke joins (thedukem1@gateway/shell/matrix.org/x-kbbklisittpzjvkk)
11:54:24 chreekat[m] joins (chreekatma@gateway/shell/matrix.org/x-ktxyajphiegdytww)
11:54:24 ThaEwat joins (thaewraptm@gateway/shell/matrix.org/x-rtowccvvmfqlygti)
11:54:24 SlackIntegration joins (slackbotma@gateway/shell/matrix.org/x-uxjtxhvnhsvwzafd)
11:54:24 sm[m] joins (simonmicma@gateway/shell/matrix.org/x-xomgnngasooluobu)
11:54:25 kadoban joins (kadobanmat@gateway/shell/matrix.org/x-ihijirqqlozywxkc)
11:54:25 CRTified[m] joins (schnecfkru@gateway/shell/matrix.org/x-ofgzvldlqelcywuc)
11:54:25 Noughtmare[m] joins (naughtmare@gateway/shell/matrix.org/x-euxykteztfgdzjor)
11:54:25 berberman[T] joins (berberma4@gateway/shell/matrix.org/x-bwsbvcnillhcvqdz)
11:54:25 zerstroyer[m] joins (zerstroyer@gateway/shell/matrix.org/x-pvagwcsgvifvhwvf)
11:54:25 pqwy[m] joins (pqwymatrix@gateway/shell/matrix.org/x-bcyejxklqcfnaxbi)
11:54:25 ttc joins (tomtauma1@gateway/shell/matrix.org/x-mshtvdkklhnazscc)
11:54:25 siraben joins (sirabenmat@gateway/shell/matrix.org/x-tkxpiikugikainiv)
11:54:25 themsay[m] joins (themsaymat@gateway/shell/matrix.org/x-ysvioopzcvcuuyvd)
11:54:25 rednaZ[m] joins (r3dnazmatr@gateway/shell/matrix.org/x-nvfucrymxqacpiao)
11:54:25 lnxw37d4 joins (lnxw37d4ma@gateway/shell/matrix.org/x-ukqcbfsgmccbpdxz)
11:54:25 camlriot42 joins (camlriotma@gateway/shell/matrix.org/x-dszwkgezlvpwptvk)
11:54:26 boistordu joins (boistordum@gateway/shell/matrix.org/x-octelcfxsnkvakgd)
11:54:26 tersetears[m] joins (tersetears@gateway/shell/matrix.org/x-lglnsokcfrmfsblz)
11:54:26 Hanma[m] joins (hanmamatri@gateway/shell/matrix.org/x-ihxxyuaewqpuhxbt)
11:54:26 hsiktas[m] joins (hsiktasmat@gateway/shell/matrix.org/x-wtpesvemtwcuuafs)
11:54:26 domenkozar[m] joins (domenkozar@NixOS/user/domenkozar)
11:54:26 lambdaclan joins (lambdaclan@gateway/shell/matrix.org/x-esnqerudyklmnsrh)
11:54:26 PotatoHatsue joins (berbermanp@gateway/shell/matrix.org/x-znkywhldbhzbhgen)
11:54:26 dominicusin[m] joins (dominicusi@gateway/shell/matrix.org/x-nryovwrdbgvjplzc)
11:54:26 srid joins (sridmatrix@gateway/shell/matrix.org/x-xkaemlggxitmvijh)
11:54:26 aloiscochard[m] joins (aloiscocha@gateway/shell/matrix.org/x-nmroubrbcectjnbg)
11:54:26 psydruid joins (psydruidma@gateway/shell/matrix.org/x-gdvihwcfiajbrbzn)
11:54:27 fgaz joins (fgazmatrix@gateway/shell/matrix.org/x-ypwwwiayrbbyifnk)
11:54:27 michaelpj joins (michaelpjm@gateway/shell/matrix.org/x-isbbleoraguftwpl)
11:54:27 drozdziak1 joins (drozdziak1@gateway/shell/matrix.org/x-zhcszongpwzqffkh)
11:54:27 jtojnar joins (jtojnarmat@gateway/shell/matrix.org/x-sxmbcbyagmdgfbky)
11:54:30 dyniec[m] joins (dyniecmatr@gateway/shell/matrix.org/x-bzyahcrtvmhlgeby)
11:54:30 falling-edge[m] joins (falling-ed@gateway/shell/matrix.org/x-ewgnzieoktvonuxq)
11:54:30 TekShifter[m] joins (tekshifter@gateway/shell/matrix.org/x-qkoxohtmvaxbhybf)
11:54:31 miseenplace[m] joins (miseenplac@gateway/shell/matrix.org/x-vdkkkdwfftjmtktj)
11:54:31 patier[m] joins (patiermatr@gateway/shell/matrix.org/x-fvcsayzftiumvnvp)
11:54:31 andreabedini[m] joins (andreabedi@gateway/shell/matrix.org/x-sjrrvynkcmmwxcjs)
11:54:31 loprakoa[m] joins (loprakoama@gateway/shell/matrix.org/x-zoiumweqktphvybc)
11:54:32 jkaye[m] joins (jkayematri@gateway/shell/matrix.org/x-ltlmepvlghffnhdw)
11:54:32 jlv joins (jlvjustinl@gateway/shell/matrix.org/x-vewvewaygwmdkitl)
11:54:32 wi[m] joins (w1gzmatrix@gateway/shell/matrix.org/x-ycgeajchfpkrzfcx)
11:54:32 jesser[m] joins (jessermatr@gateway/shell/matrix.org/x-jhkivoszgmdxgjkg)
11:54:32 rab24ack[m] joins (rab24ackma@gateway/shell/matrix.org/x-wbflzldjessbqugl)
11:54:34 alexfmpe joins (alexfmpema@gateway/shell/matrix.org/x-vumyyhvaurdbeexr)
11:54:35 mikr[m] joins (mikrdavral@gateway/shell/matrix.org/x-xnldjrbcvidcizev)
11:54:38 alephu5[m] joins (alephu5mat@gateway/shell/matrix.org/x-gipdmcyuqaltnaqr)
11:54:38 ComaGrayce[m] joins (commagrays@gateway/shell/matrix.org/x-wpvsucnvgmarcknv)
11:54:38 wanaks[m] joins (wanaksmatr@gateway/shell/matrix.org/x-ncjfiyoyfwrxhjmq)
11:57:24 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
12:00:00 AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl)
12:01:47 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 244 seconds)
12:05:06 m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de)
12:05:33 <hc> i can confirm that it is ;p
12:05:46 <hc> nvm, wrong channel
12:06:56 <Uniaika> :O
12:07:11 plutoniix joins (~q@ppp-27-55-91-168.revip3.asianet.co.th)
12:08:44 × olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 256 seconds)
12:09:22 <ski> boxscape : if you just want to pass it on to the caller, which is likely to unwrap, then the CPS encoding is probably better. if you want to store it in some data structure, then the "existential data constructor" encoding is probably better
12:10:15 <boxscape> I see
12:10:16 <boxscape> thanks
12:10:48 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
12:11:00 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
12:11:28 × berberman[T] quits (berberma4@gateway/shell/matrix.org/x-bwsbvcnillhcvqdz) (Quit: authenticating)
12:11:34 berberman[T] joins (berberma4@gateway/shell/matrix.org/x-zufgslvuiyldvexu)
12:12:44 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
12:13:41 × berberman[T] quits (berberma4@gateway/shell/matrix.org/x-zufgslvuiyldvexu) (Client Quit)
12:13:49 berberman[T] joins (berberma4@gateway/shell/matrix.org/x-bxfzueyqtnjjnhrt)
12:16:53 × supki quits (~mt@188.166.74.67) (Ping timeout: 256 seconds)
12:18:51 <dminuoso> And, given that you can convert freely between them, nothing stops you from just switching between the representations
12:19:35 <boxscape> right, that makes sense
12:20:09 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
12:22:46 <dminuoso> Question, does anyone else favor case-of over maybe? I find myself never favoring `maybe`
12:23:00 <dminuoso> (Or fromMaybe)
12:24:55 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
12:25:50 <boxscape> depends on how complex the expressions are; something simple like `maybe False (>0)` I wouldn't write with case-of, typically
12:27:10 <maerwald> dminuoso: I also prefer case of
12:27:25 <maerwald> maybe and friends are for cases where I know ahead of time what I'm gonna type
12:27:58 <dminuoso> What do you mean by "where I know ahead of time what I'm gonna type"?
12:28:34 <maerwald> Usually I don't know what I'm doing, is what I'm saying. So I pattern match on something and then switch stuff back and forth. That's more "linear" than doing complicated expressions
12:29:07 adm_ joins (~adm@43.229.89.234)
12:29:35 alp joins (~alp@2a01:e0a:58b:4920:612f:aa9c:8a4e:4f35)
12:29:44 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
12:30:03 <maerwald> that's also the reasons I prefer lambdas as argument to fmap etc instead of writing pointfree function arguments
12:30:56 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
12:31:01 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
12:31:13 <n0042> lambdas are nice
12:31:32 shah^ joins (shah@ip98-184-89-2.mc.at.cox.net)
12:31:56 <maerwald> n0042: I had a tech challenge where they told me they don't like it, because I'm not using pointfree style enough and that wouldn't be "senior haskell"
12:32:01 <maerwald> dodged a bullet :D
12:32:09 <boxscape> oh no
12:32:18 Entertainment joins (~entertain@104.246.132.210)
12:32:38 <opqdonut> :D
12:32:55 <boxscape> @pl \d ogde a bullet -> a bullet d odge d
12:32:55 <lambdabot> const . (flip =<< (flip .) . flip flip odge . (flip .) . flip flip)
12:33:26 <maerwald> right, run your code through that before handing in your tech challenge :D
12:33:37 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
12:34:38 <boxscape> In my company we only accept challenges written in umlambda
12:34:54 Sheilong joins (uid293653@gateway/web/irccloud.com/x-xzqgkxnkzvzsvgqp)
12:34:58 <opqdonut> boxscape: :D
12:34:58 <boxscape> erm
12:34:59 <boxscape> unlambda
12:37:09 × plakband quits (~plakband@113x43x242x146.ap113.ftth.arteria-hikari.net) (Quit: WeeChat 2.9)
12:38:17 <dminuoso> maerwald: Next time just introduce a random `fix . const` in the challenge.
12:38:30 <maerwald> omg, such senior
12:38:34 <dminuoso> ;)
12:39:20 adm_ joins (~adm@43.229.89.234)
12:39:41 <dminuoso> Obligatory https://aphyr.com/posts/342-typing-the-technical-interview
12:39:49 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 264 seconds)
12:39:52 <boxscape> was just thinking of that
12:40:03 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
12:40:31 × Jonkimi727406120 quits (~Jonkimi@113.87.161.66) (Ping timeout: 246 seconds)
12:40:36 <maerwald> that post made some ppl believe haskell is dynamically typed (I'm not joking)
12:41:01 <boxscape> oh no
12:41:54 phaul joins (~phaul@ruby/staff/phaul)
12:42:24 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:43:00 hackage deferred-folds 0.9.13 - Abstractions over deferred folds https://hackage.haskell.org/package/deferred-folds-0.9.13 (NikitaVolkov)
12:43:30 × plutoniix quits (~q@ppp-27-55-91-168.revip3.asianet.co.th) (Quit: Leaving)
12:44:18 <n0042> That is a pretty funny page lol
12:51:44 Stanley00 joins (~stanley00@unaffiliated/stanley00)
12:53:05 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 240 seconds)
12:54:33 sord937 joins (~sord937@gateway/tor-sasl/sord937)
12:55:56 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds)
12:56:21 × _ashbreeze_ quits (~mark@72-161-253-71.dyn.centurytel.net) (Read error: No route to host)
12:57:25 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Client Quit)
12:57:38 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 260 seconds)
12:57:44 × fendor quits (~fendor@178.165.131.166.wireless.dyn.drei.com) (Remote host closed the connection)
12:57:50 _ashbreeze_ joins (~mark@72-161-253-71.dyn.centurytel.net)
12:57:51 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
13:04:10 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
13:04:11 sord937 joins (~sord937@gateway/tor-sasl/sord937)
13:04:34 phaul joins (~phaul@ruby/staff/phaul)
13:06:03 Tario joins (~Tario@201.192.165.173)
13:07:00 <maerwald> is there an easy way to figure out if a given function *actually* makes use of constraints other than satisfying types?
13:07:07 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4)
13:07:20 <maerwald> (like: calling a class function)
13:07:43 <maerwald> (which then could warrant a redesign of the types/constraints)
13:08:09 bitmagie joins (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de)
13:09:25 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
13:09:49 × xff0x quits (~fox@2001:1a81:52e2:1100:66fc:dc44:c41d:a54) (Ping timeout: 272 seconds)
13:10:32 xff0x joins (~fox@2001:1a81:52e2:1100:6a57:53b7:993a:a9b)
13:12:53 phaul joins (~phaul@ruby/staff/phaul)
13:14:00 hackage headroom 0.3.2.0 - License Header Manager https://hackage.haskell.org/package/headroom-0.3.2.0 (xwinus)
13:14:10 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
13:19:05 lankatze joins (~Thomas@business-176-095-163-121.static.arcor-ip.net)
13:19:13 × lankatze quits (~Thomas@business-176-095-163-121.static.arcor-ip.net) (Client Quit)
13:20:41 Linoleum joins (~Linoleum@185.103.96.147)
13:20:47 lankatze joins (~Thomas@business-176-095-163-121.static.arcor-ip.net)
13:23:25 × lankatze quits (~Thomas@business-176-095-163-121.static.arcor-ip.net) (Client Quit)
13:24:58 × dexterlb quits (~dexterlb@2a01:9e40:2:2::2) (Quit: Boing)
13:26:14 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
13:26:42 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
13:26:46 × bitmagie quits (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) (Quit: bitmagie)
13:29:25 × perry69420 quits (6ee39737@110.227.151.55) (Remote host closed the connection)
13:29:37 adm_ joins (~adm@43.229.89.234)
13:29:42 caecilius joins (~caecilius@pool-108-46-151-95.nycmny.fios.verizon.net)
13:30:09 jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb)
13:31:18 f-a joins (~f-a@151.46.85.195)
13:36:20 × shah^ quits (shah@ip98-184-89-2.mc.at.cox.net) ()
13:38:24 dexterlb joins (~dexterlb@2a01:9e40:2:2::2)
13:41:02 benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-syalagemfhhmznuu)
13:43:28 Ariakenom_ joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
13:45:14 tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net)
13:47:09 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
13:47:20 × Ariakenom__ quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Ping timeout: 256 seconds)
13:47:34 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
13:48:30 jonatanb_ joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
13:49:58 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:50:02 fendor joins (~fendor@078132052150.public.t-mobile.at)
13:50:35 csaba_hruska joins (~csaba@188-167-252-60.dynamic.chello.sk)
13:51:09 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
13:51:16 × jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds)
13:53:54 da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4)
13:54:16 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
13:55:24 forgottenone joins (~forgotten@176.88.97.75)
13:55:45 × fendor quits (~fendor@078132052150.public.t-mobile.at) (Ping timeout: 240 seconds)
13:56:06 jk1006 joins (~jk1006@193.16.224.0)
13:59:25 × jk1006 quits (~jk1006@193.16.224.0) (Client Quit)
14:01:05 <dminuoso> maerwald: Mmm, it shoulds like a diagnostic that fits into GHC
14:01:07 <dminuoso> *sounds
14:01:15 × solonarv quits (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr) (Quit: Lost terminal)
14:01:21 <dminuoso> Some sort of warn-unused-constraints
14:01:56 <dminuoso> I dont know the implementation details of the type checker, it doesn't seem impossible in principle to track which constraints you used to discharge other obligations
14:02:28 f-a parts (~f-a@151.46.85.195) ()
14:02:44 Iceland_jack joins (~user@31.124.48.169)
14:03:50 solonarv joins (~solonarv@astrasbourg-653-1-191-240.w90-13.abo.wanadoo.fr)
14:06:41 bgamari_ joins (~bgamari@72.65.104.220)
14:07:22 × bgamari quits (~bgamari@2001:470:e438::1) (Ping timeout: 260 seconds)
14:10:30 hackage deferred-folds 0.9.14 - Abstractions over deferred folds https://hackage.haskell.org/package/deferred-folds-0.9.14 (NikitaVolkov)
14:13:00 hackage lsp 1.0.0.1 - Haskell library for the Microsoft Language Server Protocol https://hackage.haskell.org/package/lsp-1.0.0.1 (luke_)
14:13:53 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
14:14:40 sondr3 joins (~sondr3@cm-84.211.56.132.getinternet.no)
14:19:02 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Quit: hekkaidekapus_)
14:21:06 hekkaidekapus joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
14:21:44 <dminuoso> maerwald: Anyway, interesting. If I dont case-of, I usually have some `note` function instead.
14:22:25 <dminuoso> Or I move it into pattern matching on separate functions, where I might have `fooEither (Left ...) = ...; fooEither (Right ...) = ...'` and use that as a continuation
14:22:38 <dminuoso> But either/maybe seems just strange to me for some reason I cant explain
14:22:58 <boxscape> do you use foldr?
14:23:57 <dminuoso> sure
14:24:02 <boxscape> hm
14:24:44 <boxscape> So an aversion to Church encodings of non-recursive types but not to those of recursive types, to overly extrapolate
14:24:56 <dminuoso> Yes, very much.
14:26:51 × jonatanb_ quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection)
14:27:14 <dminuoso> The non-recursive types encode a choice, list does not
14:27:34 <dminuoso> Or I guess that depends on the perspective
14:28:10 <dminuoso> since a list could be `n + (n^2) + (n^3) + (n^4) + ....`
14:28:36 <dminuoso> Maybe it's just that to me it's not clear which side of `maybe` does what
14:28:51 <dminuoso> Perhaps I also just lack the intuition because I dont use it
14:28:58 <c_wraith> doesn't the type tell you?
14:29:08 <maerwald> dminuoso: if I convert a maybe to some other type (e.g. Either), I find maybe to be quite idiomatic... but I can't stand fromMaybe
14:29:11 <c_wraith> :t maybe
14:29:12 <lambdabot> b -> (a -> b) -> Maybe a -> b
14:29:31 <c_wraith> there's only one case either of those arguments can apply in.
14:29:49 <dminuoso> c_wraith: Sure, but when you look at `maybe foo bar h`, then it's just not obvious to me
14:29:57 <c_wraith> Now, I understand that complaint about bool....
14:30:05 <dminuoso> Mmm
14:30:25 <maerwald> I always mix up second and third parameter of foldr/foldl :p
14:30:30 <hpc> dminuoso: there's a way to remember it as a specific instance of a more general thing
14:30:38 <hpc> data Maybe a = Nothing | Just a
14:30:46 <hpc> the parameters for maybe go in the same order as the data definition
14:30:53 <dminuoso> hpc: Sure, the first constructor comes first. But that requires memorizing the data definition
14:30:54 <hpc> same for foldr, they go in the same order
14:31:11 <hpc> dminuoso: the smallest constructor is first
14:31:30 <hpc> (for deriving Ord and such)
14:31:32 <dminuoso> hpc: so what about These?
14:31:39 fendor joins (~fendor@77.119.130.234.wireless.dyn.drei.com)
14:31:40 <dminuoso> What type signature would `these` have?
14:32:10 × darjeeling_ quits (~darjeelin@122.245.217.23) (Ping timeout: 256 seconds)
14:32:17 <dminuoso> these :: (a -> d) -> (b -> d) -> (a -> b -> d) -> These a b -> d
14:32:18 <c_wraith> intuition says: (a -> c) -> (b -> c) -> (a -> b -> c) -> These a b -> c
14:32:21 <dminuoso> these :: (b -> d) -> (a -> d) -> (a -> b -> d) -> These a b -> d
14:32:41 <dminuoso> According to your definition, Id have to look up the definition of These, and I couldnt infer it from the size
14:32:42 <maerwald> easy: this, that, these
14:32:44 <maerwald> xD
14:33:24 <hpc> it derives Ord so you can check in ghci
14:33:44 <dminuoso> Well if I have to look it up, I might as well just check hoogle
14:33:46 <boxscape> % :i These
14:33:47 <yahb> boxscape: ; <interactive>:1:1: error: Not in scope: `These'
14:33:52 <boxscape> :/
14:34:00 <dminuoso> % import Data.Strict.These
14:34:00 <yahb> dminuoso: ; <no location info>: error:; Could not find module `Data.Strict.These'; It is not a module in the current program, or in any known package.
14:34:08 <dminuoso> % import Data.Functor.These
14:34:08 <yahb> dminuoso: ; <no location info>: error:; Could not find module `Data.Functor.These'; Perhaps you meant; Data.Functor.Base (from recursion-schemes-5.1.3); Data.Functor.Const (from base-4.14.0.0); Data.Functor.Plus (from semigroupoids-5.3.4)
14:34:42 <dminuoso> hpc: I get your point, Im not saying its not discoverable, Im just suggesting that from just staring at its usage, it might not be obvious
14:34:48 <hpc> sometimes
14:34:54 <dminuoso> But arguably the same could be said about `foldr`
14:35:01 <c_wraith> and every function
14:35:01 <hpc> but then for example, how would you write a fold over a tree?
14:35:08 <dminuoso> hpc: easy! foldMap!
14:35:12 <dminuoso> ;)
14:35:15 <hpc> heh
14:36:39 <hpc> but yeah, if you know the structure it's pretty easy, foldTree leaf branch Leaf = leaf; foldTree leaf branch (Branch value left right) = branch value (foldTree left) (foldTree right)
14:36:57 <hpc> or something similar depending on what type of tree you're dealing with
14:38:50 jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
14:38:51 <hpc> i wonder if there's anything that writes these functions automatically
14:38:54 bitmapper joins (uid464869@gateway/web/irccloud.com/x-ntgjmwmudxzzxssg)
14:40:11 <c_wraith> recursion-schemes?
14:40:26 <merijn> c_wraith: That's not automatic
14:40:32 <c_wraith> it has TH
14:40:34 <merijn> That's just "reusing handwritten ones"
14:41:06 <c_wraith> every library is reusing something someone wrote by hand...
14:42:19 <merijn> c_wraith: Right, but I meant as opposed to DeriveFunctor. I guess TH counts, but I didn't know recursion-schemes had that, because my brain doesn't like recursion schemes :p
14:42:43 × jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection)
14:42:55 <c_wraith> And I don't like using TH. :P
14:43:01 dminuoso likes TH
14:43:16 <c_wraith> I like *writing* it. But I don't like writing code that uses it.
14:43:24 <merijn> I like TH, but they fucked up the specification
14:43:31 <dminuoso> There is a specification?
14:43:34 <dminuoso> :>
14:43:40 <merijn> dminuoso: My point
14:44:03 <dminuoso> My main annoyance with TH is just one: staging restriction
14:44:06 <merijn> TH should've had a clear "target" and "host" distinction for everything
14:44:09 <hpc> hmm, that technically writes it but by way of free shennanigans
14:44:21 <dminuoso> Having to fiddle with extra modules just to satisfy the staging restriction is sometimes frustrating
14:44:36 <dminuoso> Especially because we cant have circular module references
14:44:38 <merijn> dminuoso: Staging is annoying, but you can workaround it
14:44:57 <hpc> like if i was using [] and had to pick between foldr and whatever recursion-schemes gives me, recursion-schemes would be harder to use
14:45:07 <merijn> dminuoso: In contrast to the lack of distinction between target/host which makes cross-compiled TH fundamentally impossible
14:45:18 <dminuoso> merijn: cross compiling is not something I care about
14:45:27 <merijn> (well, the Asterius guys seem to be attempting to fix/work around it via heroic amounts of work)
14:45:29 <hpc> i just want to write data Foo ..., makeFold 'Foo, and get foo :: whatever -> Foo ... -> ...
14:45:34 <merijn> dminuoso: Not *yet*
14:45:44 <dminuoso> Perhaps
14:45:53 <merijn> dminuoso: Compiling windows executables from linux/etc. would've been nice :p
14:45:58 <dminuoso> Is that some reference to the dominion of ARM processors?
14:46:00 <dminuoso> Oh
14:46:05 <merijn> dminuoso: ARM too
14:46:32 <merijn> dminuoso: Everything is just slightly more inconvenient without cross-compilation
14:47:04 <merijn> And proper cross-compilation support isn't even that hard. It's just a herculean task to retrofit cross-compilation support if you didn't engineer it in from the beginning
14:47:50 × alp quits (~alp@2a01:e0a:58b:4920:612f:aa9c:8a4e:4f35) (Ping timeout: 246 seconds)
14:48:25 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
14:49:20 darjeeling_ joins (~darjeelin@122.245.217.23)
14:56:24 × Yumasi quits (~guillaume@2a01cb09b06b29ea391191835a81a7a2.ipv6.abo.wanadoo.fr) (Ping timeout: 240 seconds)
14:56:36 × toorevitimirp quits (~tooreviti@117.182.183.18) (Remote host closed the connection)
14:56:45 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
14:57:58 urodna joins (~urodna@unaffiliated/urodna)
14:58:35 Yumasi joins (~guillaume@2a01:e0a:5cb:4430:5572:c108:3697:b06d)
15:01:28 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
15:02:43 × coot quits (~coot@37.30.49.253.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
15:03:00 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:04:00 hackage migrant-core 0.1.0.1 - Semi-automatic database schema migrations https://hackage.haskell.org/package/migrant-core-0.1.0.1 (TobiasDammers)
15:04:24 × eyenx quits (~eyenxeyen@unaffiliated/eye/x-1653358) (Quit: Bridge terminating on SIGTERM)
15:06:31 hackage migrant-core 0.1.0.2 - Semi-automatic database schema migrations https://hackage.haskell.org/package/migrant-core-0.1.0.2 (TobiasDammers)
15:07:00 eyenx joins (~eyenxeyen@unaffiliated/eye/x-1653358)
15:07:19 texasmynsted joins (~texasmyns@212.102.45.115)
15:07:31 hackage migrant-sqlite-simple 0.1.0.2, migrant-postgresql-simple 0.1.0.2, migrant-hdbc 0.1.0.2 (TobiasDammers)
15:07:36 × texasmynsted quits (~texasmyns@212.102.45.115) (Read error: Connection reset by peer)
15:07:39 avdb joins (~avdb@ip-81-11-215-86.dsl.scarlet.be)
15:07:41 <avdb> Does ghc-mod still work in 2020?
15:07:48 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
15:07:49 <avdb> I can't install it: https://dpaste.com/4D4N4GM7X
15:07:59 texasmynsted joins (~texasmyns@212.102.45.115)
15:09:29 <merijn> No
15:09:39 <merijn> Development stopped, like, 2+ years ago
15:09:47 <merijn> And the repo says it's deprecated as user tool
15:09:54 <merijn> You want ghcide/haskell-language-server
15:10:28 christo joins (~chris@81.96.113.213)
15:11:05 <avdb> Lol I found a 2020 blog post suggesting the usage of ghc-mod. Embarrassing.
15:13:44 <merijn> heh
15:13:45 <merijn> Where?
15:13:49 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
15:13:50 geekosaur joins (ae68c070@cpe-174-104-192-112.neo.res.rr.com)
15:14:31 <merijn> avdb: See the note here: https://github.com/DanielG/ghc-mod#legacy
15:14:32 bitmagie joins (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de)
15:15:12 <avdb> haskell-ide-engine has been archived as well -_-
15:15:19 <avdb> Industry moves too fast
15:15:20 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:15:29 <merijn> avdb: haskell-ide-engine merged with ghcide
15:15:35 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:7ef3:25b7:f5b5:a852:f5c4) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:15:43 <merijn> avdb: haskell-language-server is basically the continuation of hie
15:16:10 jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
15:16:17 × bitmagie quits (~Thunderbi@200116b8069e6000fcea7cbd95660e31.dip.versatel-1u1.de) (Client Quit)
15:16:17 × jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Remote host closed the connection)
15:16:27 <merijn> avdb: It's moving fast as of this year due to all the tooling projects finally converging on a single collaboration with actual people paid to work on it :p
15:16:58 <merijn> Instead of being 10 independent, unmaintained personal hacks :p
15:18:06 <avdb> True
15:18:36 <avdb> Would you recommend hlint or ale?
15:18:52 <avdb> Can't really choose, ale got a lot of forks is all I know
15:20:01 <merijn> How are hlint and ale alternatives?
15:20:17 <maerwald> ale *uses* hlint
15:20:45 <maerwald> https://github.com/dense-analysis/ale/blob/master/ale_linters/haskell/hlint.vim
15:21:04 <merijn> ALE is a plugin for asynchronously running linters/LSP servers, it doesn't actually "do" anything
15:21:09 andos joins (~dan@69-165-210-185.cable.teksavvy.com)
15:21:47 <avdb> Oh oops
15:21:56 <avdb> Do I still need the LSP if I use ale?
15:22:25 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 264 seconds)
15:22:29 <maerwald> good luck with LSP clients in vim
15:22:37 <maerwald> I tried all and then I disabled it
15:22:50 <maerwald> It makes my productivity worse
15:23:12 <maerwald> Maybe other editors have a better experience, I don't know
15:23:23 <merijn> maerwald: ALE *is* an LSP client
15:23:27 <maerwald> yes
15:23:35 <merijn> avdb: ALE is working fine for me, tbh
15:23:56 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
15:24:00 hackage phonetic-languages-simplified-properties-lists 0.1.2.0 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.2.0 (OleksandrZhabenko)
15:26:26 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
15:27:03 <dminuoso> Is there a newtype wrapper for reverse Ord?
15:27:40 <dminuoso> I just want to do something like `sortOn (Reverse . fst)`
15:27:52 <geekosaur> Down?
15:28:10 <dminuoso> geekosaur: Ah cheers!
15:30:35 Stanley00 joins (~stanley00@unaffiliated/stanley00)
15:32:23 louisac joins (4d64ab42@cpc82915-enfi22-2-0-cust65.20-2.cable.virginm.net)
15:32:48 × Linoleum quits (~Linoleum@185.103.96.147) ()
15:33:02 kelsey joins (~keteskyl@2600:6c64:7b7f:fa42:880b:e2d1:945a:df75)
15:34:07 plutoniix joins (~q@ppp-27-55-91-168.revip3.asianet.co.th)
15:35:16 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 240 seconds)
15:35:24 × filwisher quits (~filwisher@78.141.201.45) (Quit: ZNC 1.7.1 - https://znc.in)
15:35:42 filwisher joins (~filwisher@78.141.201.45)
15:36:12 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
15:39:07 <texasmynsted> Morning
15:40:56 matta joins (~user@24-113-169-116.wavecable.com)
15:41:18 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
15:41:45 adm_ joins (~adm@43.229.89.234)
15:44:20 × plutoniix quits (~q@ppp-27-55-91-168.revip3.asianet.co.th) (Remote host closed the connection)
15:47:15 gproto23 joins (~gproto23@unaffiliated/gproto23)
15:47:25 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds)
15:47:59 Tario joins (~Tario@200.119.184.39)
15:48:00 grabz0r joins (~grabz0r@90-145-165-196.bbserv.nl)
15:48:48 <n0042> Morning to you as well
15:48:53 <n0042> Happy thanksgiving!
15:50:05 larou joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145)
15:50:27 knupfer joins (~Thunderbi@200116b82c0c5800d512095bbf5d3f0d.dip.versatel-1u1.de)
15:52:56 <maerwald> :t Down
15:52:56 × SanchayanMaity quits (~Sanchayan@171.76.82.54) (Quit: SanchayanMaity)
15:52:58 <lambdabot> a -> Down a
15:53:18 <maerwald> :t Up
15:53:20 <lambdabot> error:
15:53:20 <lambdabot> • Data constructor not in scope: Up
15:53:20 <lambdabot> • Perhaps you meant one of these:
15:53:42 <maerwald> only going down, how depressing
15:53:59 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
15:54:13 keviv joins (~keviv@35.142.17.117)
15:55:06 <dminuoso> Would it help if Down was renamed to Depress?
15:55:08 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-xzqgkxnkzvzsvgqp) (Quit: Connection closed for inactivity)
15:55:29 <hc> lol
15:56:56 adm_ joins (~adm@43.229.89.234)
15:57:57 × adm_ quits (~adm@43.229.89.234) (Remote host closed the connection)
16:01:15 lfa33 joins (3eb2f497@62-178-244-151.cable.dynamic.surfer.at)
16:02:16 × lfa33 quits (3eb2f497@62-178-244-151.cable.dynamic.surfer.at) (Remote host closed the connection)
16:02:34 adm_ joins (~adm@43.229.89.234)
16:04:00 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
16:04:24 jpds joins (~jpds@gateway/tor-sasl/jpds)
16:05:18 × subttle quits (~anonymous@unaffiliated/subttle) (Quit: leaving)
16:06:30 × knupfer quits (~Thunderbi@200116b82c0c5800d512095bbf5d3f0d.dip.versatel-1u1.de) (Quit: knupfer)
16:06:39 knupfer joins (~Thunderbi@200116b82c0c5800c8e579458ff3eb4f.dip.versatel-1u1.de)
16:07:08 mpereira joins (~mpereira@2a02:810d:f40:d96:857:5d24:8b16:e48)
16:07:20 × adm_ quits (~adm@43.229.89.234) (Ping timeout: 265 seconds)
16:08:37 vicfred joins (~vicfred@unaffiliated/vicfred)
16:09:10 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
16:09:50 Chi1thangoo joins (~Chi1thang@87.112.60.168)
16:10:42 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
16:13:50 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
16:14:14 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:16:43 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
16:18:36 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
16:18:49 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
16:20:38 <zfnmxt> I'm having some trouble with type families and ambiguous variables during type inference: https://www.pastery.net/gfxvnp/
16:20:52 × Iceland_jack quits (~user@31.124.48.169) (Ping timeout: 265 seconds)
16:21:40 <zfnmxt> I don't know how to constraint things further so that b0 can be resolved.
16:21:55 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
16:22:00 hackage phonetic-languages-simplified-properties-lists 0.1.3.0 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.3.0 (OleksandrZhabenko)
16:22:02 <zfnmxt> s/constraint/constrain
16:25:09 <boxscape> zfnmxt have you tried supplying b to left with -XTypeApplications?
16:28:09 × andos quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: Leaving)
16:29:35 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
16:29:40 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
16:31:07 × Yumasi quits (~guillaume@2a01:e0a:5cb:4430:5572:c108:3697:b06d) (Ping timeout: 260 seconds)
16:33:44 santa_1 joins (~santa_@217.146.82.202)
16:37:58 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 256 seconds)
16:39:32 <zfnmxt> boxscape: Did you mean something like this? https://www.pastery.net/gfxvnp+sjqkje/#sjqkje
16:40:00 hackage reflex-dom-retractable 0.1.7.0 - Routing and retractable back button for reflex-dom https://hackage.haskell.org/package/reflex-dom-retractable-0.1.7.0 (NCrashed)
16:43:00 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
16:43:00 hackage reflex-localize 1.0.1.0 - Localization library for reflex https://hackage.haskell.org/package/reflex-localize-1.0.1.0 (NCrashed)
16:43:32 <boxscape> zfnmxt is Func a type family?
16:43:59 <boxscape> or a type?
16:45:16 × raichoo quits (~raichoo@dslb-092-073-219-149.092.073.pools.vodafone-ip.de) (Quit: Lost terminal)
16:45:35 <zfnmxt> boxscape: It's a GADT: https://github.com/aleatory-science/frechet-dsl/blob/c7185e3aa1894e2cf3f45be4ee7506b5ad695a7d/src/Frechet/Ast.hs#L15
16:46:07 <boxscape> zfnmxt is that a private repository? I'm getting a 404
16:46:08 × csaba_hruska quits (~csaba@188-167-252-60.dynamic.chello.sk) (Quit: leaving)
16:46:47 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
16:47:02 <zfnmxt> Ah, crap. Forgot about that. Here's the relevant line: https://www.pastery.net/gfxvnp+sjqkje+xwaqdc/#xwaqdc
16:48:48 × chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection)
16:49:01 hackage reflex-localize 1.0.2.0 - Localization library for reflex https://hackage.haskell.org/package/reflex-localize-1.0.2.0 (NCrashed)
16:50:56 × tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (Ping timeout: 240 seconds)
16:52:14 × avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Ping timeout: 272 seconds)
16:52:36 <boxscape> zfnmxt so I think the problem right now is that it doesn't know that n is 0, because of how you're matching on the fromSing call. Let me see if I can remember how to do that better...
16:52:40 coot joins (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl)
16:52:49 alp joins (~alp@2a01:e0a:58b:4920:2df3:524d:ce61:8fe1)
16:53:11 avdb joins (~avdb@ip-81-11-215-86.dsl.scarlet.be)
16:53:22 <zfnmxt> boxscape: I suspected that might be a problem (and I remain confused about `Nat` in general--why aren't there `SZero` and `SS` constructors to match on?)
16:53:26 × Feuermagier quits (~Feuermagi@213.178.26.41) (Remote host closed the connection)
16:53:42 <boxscape> zfnmxt yeah I tend to avoid the built-in Nats for that reason
16:54:01 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection)
16:54:06 <zfnmxt> Is there a reason the built-ins don't export (or...lack?) the constructors?
16:54:16 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
16:54:19 maroloccio joins (~marolocci@2a02:8084:221:ce00:164f:8aff:fed8:411d)
16:54:54 <boxscape> zfnmxt I believe they're built to be efficient, e.g., if you have 1000 :: Nat, you don't want to carry around 1000 constructors if you don't need them
16:55:18 <boxscape> zfnmxt it might be worth switching to a library that provides Z/S nats though for this, or rolling your own
16:55:24 × louisac quits (4d64ab42@cpc82915-enfi22-2-0-cust65.20-2.cable.virginm.net) (Remote host closed the connection)
16:55:56 <boxscape> with that I believe you could just do `case n of SZ -> left`
16:56:12 <zfnmxt> boxscape: I'll try!
16:57:04 <boxscape> (zfnmxt: this for example, which has singletons integration https://hackage.haskell.org/package/singleton-nats-0.4.5/docs/Data-Nat.html)
16:57:23 × coot quits (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 256 seconds)
16:58:14 coot joins (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl)
16:58:39 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
16:59:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
17:00:13 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
17:00:15 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
17:01:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:01:44 × larou quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed)
17:02:24 <zfnmxt> boxscape: That fixed it :)
17:02:29 <boxscape> nice
17:02:45 <zfnmxt> Thanks a lot for the help!
17:02:51 <boxscape> np
17:03:36 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
17:04:41 Sheilong joins (uid293653@gateway/web/irccloud.com/x-euqghorjjrswhrff)
17:05:09 christo joins (~chris@81.96.113.213)
17:08:31 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
17:09:04 jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
17:09:41 × christo quits (~chris@81.96.113.213) (Ping timeout: 265 seconds)
17:09:43 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
17:10:39 × bifunc2 quits (bifunc2@gateway/vpn/protonvpn/bifunc2) (Quit: -)
17:10:45 conal joins (~conal@64.71.133.70)
17:11:05 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
17:13:51 sord937 joins (~sord937@gateway/tor-sasl/sord937)
17:14:06 Lycurgus joins (~niemand@98.4.114.74)
17:18:50 × jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 272 seconds)
17:19:00 <zfnmxt> boxscape: Unfortunately, I spoke too soon. It only works for the `n = SS SZ` case (I changed it so that `nth` is 1-indexed) if you type `nth` as `nth :: forall n x xs. Sing n -> HList (x ': xs) -> Lookup (x ': xs) n` (and it doesn't work for any case with a larger n). So it seems like the explicit `x ': xs` type pattern is what enabled the inference.
17:19:12 <zfnmxt> https://www.pastery.net/gfxvnp+sjqkje+xwaqdc+rzupwz/#rzupwz
17:20:15 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
17:20:57 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
17:24:01 kritzefitz joins (~kritzefit@212.86.56.80)
17:24:49 christo joins (~chris@81.96.113.213)
17:25:20 <boxscape> zfnmxt try `left @_ @(S Z)`? probably won't fix it but might give you a better error message
17:26:52 × evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer)
17:28:10 <zfnmxt> boxscape: That doesn't type, does it?
17:28:27 <boxscape> zfnmxt hm, it's possible I confused something
17:28:49 evanjs joins (~evanjs@075-129-098-007.res.spectrum.com)
17:29:09 <boxscape> oh, yeah, I think I did
17:29:25 <zfnmxt> left only takes `a :: Type` and `b :: Type`
17:29:47 <boxscape> right, hm
17:29:55 <zfnmxt> (Maybe I should've said it doesn't kind :P)
17:30:10 <boxscape> same thing since ghc 8.0 :)
17:31:25 <zfnmxt> There's no way to have GHC print out the constraints it has generated so far during type inference or something, right?
17:31:39 <zfnmxt> I just want to see what's going on; it's all so opaque :(
17:31:39 <ski> i think you need to match on `xs'
17:32:18 <boxscape> zfnmxt if you use typed holes (i.e. replace left with _) it will show you the constraints it has in context at that point
17:32:48 <boxscape> not sure if that's quite what you're asking for but it might be
17:32:51 <ski> `Sing n' allows you to match on `n'. i think you also need something to match on `xs'
17:33:24 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 272 seconds)
17:33:28 <zfnmxt> ski: That worked!
17:34:18 <zfnmxt> boxscape: That's a nice trick too.
17:35:02 <ski> what worked ?
17:35:09 × knupfer quits (~Thunderbi@200116b82c0c5800c8e579458ff3eb4f.dip.versatel-1u1.de) (Read error: Connection reset by peer)
17:35:18 knupfer joins (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de)
17:35:24 <zfnmxt> ski: Matching on xs. At least for the `(SS SZ)` case.
17:35:37 <ski> how did you match on it ?
17:35:41 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
17:35:57 gioyik joins (~gioyik@186.118.238.251)
17:36:16 matta joins (~user@24-113-169-116.wavecable.com)
17:36:48 <zfnmxt> https://www.pastery.net/gfxvnp+sjqkje+xwaqdc+rzupwz+hwbecb/#hwbecb
17:36:52 <ezzieyguywuf> can I use something like runExceptT here to simplify this code, and/or avoid the nested case statements? https://dpaste.com/4WBWJH8WA
17:36:54 <ski> (also, where's `Sing' (and `fromSing') from / how's it defined ?)
17:37:07 <avdb> https://dpaste.com/9D4WFUTP5
17:37:10 <avdb> Help please?
17:37:31 <avdb> Can't install these programs with cabal.
17:37:33 <zfnmxt> ski: Data.Singletons; that's a whole bag of worms there though.
17:38:01 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
17:39:16 × knupfer quits (~Thunderbi@200116b82c0c580000cffb05d629f3fd.dip.versatel-1u1.de) (Client Quit)
17:39:17 knupfer1 joins (~Thunderbi@i59F7FFCD.versanet.de)
17:41:03 <merijn> ezzieyguywuf: "yes"
17:41:07 × borne quits (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
17:41:09 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Quit: Leaving)
17:41:29 <merijn> avdb: hdevtools has been dead since 2016
17:41:37 <merijn> Actually, longer
17:41:40 knupfer1 is now known as knupfer
17:41:44 borne joins (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de)
17:41:48 <merijn> But 2016 is about the last time my personal fork of it worked
17:41:50 <zfnmxt> ski: And again that only worked for the `(SS SZ)` case :'(
17:42:32 <ezzieyguywuf> merijn: even though the two "Left"s have different types?
17:42:42 <merijn> ezzieyguywuf: oh, I hadn't seen that
17:42:53 <ezzieyguywuf> merijn: so I guess in that case no?
17:43:05 <merijn> ezzieyguywuf: Easily solved by mapping them to the same type first ;)
17:43:43 × coot quits (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
17:43:51 <ezzieyguywuf> merijn: lol, fair enough.
17:44:00 coot joins (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl)
17:44:04 <merijn> :t Data.Bifunctor.first
17:44:05 <lambdabot> Bifunctor p => (a -> b) -> p a c -> p b c
17:44:34 <ezzieyguywuf> ?_?
17:44:44 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:44:57 <merijn> Either is a Bifunctor :p
17:45:12 <merijn> > :t first isDigit
17:45:16 <lambdabot> <hint>:1:1: error: <hint>:1:1: error: parse error on input ‘:’
17:45:21 <merijn> :t first isDigit
17:45:23 <lambdabot> (Char, d) -> (Bool, d)
17:45:30 <merijn> oh, wrong first
17:45:38 <merijn> :t Data.Bifunctor.first isDigit
17:45:39 <lambdabot> Bifunctor p => p Char c -> p Bool c
17:45:49 <merijn> :t Data.Bifunctor.first isDigit (Right True)
17:45:51 <lambdabot> Either Bool Bool
17:46:53 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: boxscape)
17:48:08 <avdb> merijn: Another outdated package
17:48:51 <geekosaur> stuff dependent on ghc internals goes stale quickly
17:49:11 × borne quits (~fritjof@200116b864b8bd00394a967dc8ef4e61.dip.versatel-1u1.de) (Quit: WeeChat 2.9)
17:49:49 <merijn> Like I said, the only editor tooling that's still relevant is ghcide and haskell-language-server
17:49:56 <merijn> You can assume everything else is dead
17:50:40 <ski> ezzieyguywuf : you'll likely need to unify the exception types. something like
17:51:11 <ski> runProgram (FileName fname) = (either TextIO.putStrLn return =<<) . runExcept $ do
17:51:37 <ski> csvLines <- ExceptT (either pack id <$> parseCSVFromFile (unpack fname))
17:52:30 <ski> csvData <- ExceptT (processRawCSV ((fmap . fmap) pack csvLines))
17:52:44 <ski> lift (processCSV csvData)
17:54:04 <ezzieyguywuf> ski: merijn: thanks to you both, this has been helpful
17:54:13 <gehmehgeh> I've read the docs and I've been googling a bit, so please bear with me if this question has been asked before: how do you pass ghc options to *just* your own code (not the installed libs) with cabal? I'd like to do some profiling, but when I pass those options with "--ghc-options" it affects _every_ package
17:54:39 <merijn> gehmehgeh: You can specify them in the cabal file?
17:54:45 <gehmehgeh> how? where?
17:54:52 <merijn> gehmehgeh: ghc-options field? ;)
17:54:53 <gehmehgeh> "ghc-options" it says isn't a recognized option
17:54:56 <gehmehgeh> no
17:55:28 <merijn> gehmehgeh: https://github.com/merijn/paramtree/blob/master/paramtree.cabal#L33
17:55:29 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
17:55:49 <merijn> (capitalisation there shouldn't matter, that's just a personal quirk)
17:56:09 <monochrom> gHc-optionS:
17:57:01 <gehmehgeh> cabal is still claiming "Build profile: -w ghc-8.10.2 -O1"
17:57:08 <gehmehgeh> when I put a "ghc-options" line there
17:57:09 <monochrom> When I was learning this back then, I spent an afternoon reading the relevant chapter in the cabal user's guide from top to bottom.
17:57:28 <merijn> gehmehgeh: So?
17:57:38 <gehmehgeh> Shouldn't it reflect my changes?
17:57:40 <merijn> gehmehgeh: build-profile isn't a specification of options
17:57:45 <gehmehgeh> Saying "-O2" instead of..
17:57:53 <gehmehgeh> Well, that is counterintuitive
17:58:07 <gehmehgeh> Because you can pass "-O2" directly to cabal and will reflect that
17:58:16 <merijn> Build profile is, presumably reflecting whether you set "optimisation: 2" in ~/.cabal/config
17:58:26 <ski> ezzieyguywuf : any luck ?
17:58:37 <gehmehgeh> I actually put -O2 in ~/.cabal/config :D
17:58:53 <monochrom> For -O2, with only a few exceptions, you shouldn't set in *.cabal at all.
17:58:57 <merijn> gehmehgeh: Doing that would involve parsing flags from ghc-options would involve cabal actually knowing all GHC options
17:59:18 <merijn> gehmehgeh: Also, setting -O2 on everything is great way too spend *a lot* of time waiting for compilation for very marginal gains
17:59:41 ski . o O ( `SuppressUnusedWarnings ((<=?@#@$$) a6989586621679473158 :: TyFun Nat Bool -> Type)' )
17:59:43 <merijn> -O2 isn't recommended unless you *know* -O2 is significantly better than -O1
17:59:53 <gehmehgeh> ij
17:59:56 <gehmehgeh> ok
18:00:40 <gehmehgeh> You know what's a bit eerie? I also tried putting "-Werror=incomplete-patterns" there with the result that some dependencies won't build anymore...
18:00:48 oish joins (~charlie@228.25.169.217.in-addr.arpa)
18:01:04 <merijn> Well, sure
18:02:05 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:02:08 <merijn> Turns out that not every random dependency on the internet has the same engineering standards :p
18:02:43 pokid joins (~pokid@unaffiliated/pokid)
18:02:43 <gehmehgeh> Still...
18:06:24 <gehmehgeh> monochrom, merijn: Thanks for the help :)
18:06:48 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds)
18:10:01 Ariakenom joins (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se)
18:10:18 electricityZZZZ joins (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net)
18:10:39 × alp quits (~alp@2a01:e0a:58b:4920:2df3:524d:ce61:8fe1) (Ping timeout: 272 seconds)
18:10:43 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
18:14:01 × Tario quits (~Tario@200.119.184.39) (Ping timeout: 264 seconds)
18:15:10 Tario joins (~Tario@201.192.165.173)
18:15:49 blah20 joins (45fbee6a@c-69-251-238-106.hsd1.md.comcast.net)
18:19:00 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
18:19:13 <avdb> Is there a Haskell function that does "f n [x] = [x,x,x, ... x]", basically returning a list of the original element multiplied with n?
18:19:19 <koz_> :t replicate
18:19:21 <lambdabot> Int -> a -> [a]
18:19:26 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
18:19:30 <koz_> > replicate 10 "foo"
18:19:32 <lambdabot> ["foo","foo","foo","foo","foo","foo","foo","foo","foo","foo"]
18:19:39 <avdb> Thanks!
18:19:50 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:f085:e9f5:38cf:432d) (Ping timeout: 264 seconds)
18:19:52 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:20:00 jneira joins (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192)
18:20:01 <avdb> Been stuck on this problem for longer than a month lol
18:20:14 <yushyin> lol
18:20:18 <xerox_> @hoogle Int -> a -> [a]
18:20:19 <lambdabot> Prelude replicate :: Int -> a -> [a]
18:20:19 <lambdabot> Data.List replicate :: Int -> a -> [a]
18:20:19 <lambdabot> GHC.List replicate :: Int -> a -> [a]
18:20:30 <xerox_> if you can give your idea a type sometimes you can find them like that
18:20:39 <avdb> I didn't bother to try Hoogle yet, I'm still too much of a noob :P
18:21:15 × knupfer quits (~Thunderbi@i59F7FFCD.versanet.de) (Ping timeout: 256 seconds)
18:21:24 <koz_> avdb: You can roll 'replicate' recursively without too much trouble.
18:22:10 × tumdedum quits (~tumdedum@unaffiliated/espiral) (Ping timeout: 272 seconds)
18:22:21 tumdedum joins (~tumdedum@unaffiliated/espiral)
18:24:30 blah20 parts (45fbee6a@c-69-251-238-106.hsd1.md.comcast.net) ()
18:24:43 <avdb> koz_: I know, I need to practice recursion a lot because I still suck at it!
18:24:48 Alleria_ joins (~AllahuAkb@2604:2000:1484:26:5d86:da4d:584b:848b)
18:25:00 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
18:25:23 timCF joins (~i.tkachuk@m91-129-105-245.cust.tele2.ee)
18:25:25 <koz_> avdb: Basically, the trick is to treat it like a proof by induction. First, what's the simplest case you could ever see? Then, assuming you have a smaller answer, how do you get a bigger answer?
18:26:30 <avdb> I do indeed always handle the base cases like x == 0 and x == 0, afterwards I start on the otherwise case
18:26:47 <koz_> So for 'replicate', what's your base case?
18:26:53 <avdb> Matching types is also a pain but that's where Haskell shines
18:27:01 <avdb> Wait I'll send you a paste of my program
18:28:17 <avdb> http://codepad.org/KHd73y9L
18:28:17 × timCF quits (~i.tkachuk@m91-129-105-245.cust.tele2.ee) (Client Quit)
18:28:35 timCF joins (~i.tkachuk@m91-129-105-245.cust.tele2.ee)
18:28:59 <avdb> koz_: Here you go, not sure if I should handle "arr == []" yet
18:29:00 × timCF quits (~i.tkachuk@m91-129-105-245.cust.tele2.ee) (Remote host closed the connection)
18:29:20 timCF joins (~i.tkachuk@m91-129-105-245.cust.tele2.ee)
18:29:47 <merijn> You should avoid using "== []" that won't work for lists that are missing an Eq instance
18:30:01 <koz_> Yeah, 'null' or pattern matching is what you want.
18:30:17 × asheshambasta quits (~user@ptr-e1lysauiv50il654lwl.18120a2.ip6.access.telenet.be) (Ping timeout: 272 seconds)
18:30:42 ishutin_ joins (~Ishutin@193-110-63-35.cable-modem.hdsnet.hu)
18:31:02 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 272 seconds)
18:31:08 <avdb> Ah lol that's why the last element doesn't print I suppose
18:31:30 <avdb> merijn: I did but forgot to change it in my paste, ALE suggested it :)
18:32:21 <timCF> Hi guys! Often I do operate with some value of monadic type, for example `Either a b` but inside some other monad `m` for example `IO`. To apply a function to internal `b` value I often write constructions like `(foo <$>) <$> x`. Is there other better/simpler way?
18:32:42 christo joins (~chris@81.96.113.213)
18:32:42 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
18:32:47 <koz_> timCF: So you have IO (Either a b) as the type you're trying to work with?
18:32:55 <timCF> Yes
18:32:57 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
18:33:27 tomsmeding would write `fmap foo <$> x`, but that's the same
18:33:44 <timCF> `(foo <$>) <$> x` works but looks ugly
18:33:56 × Lycurgus quits (~niemand@98.4.114.74) (Ping timeout: 240 seconds)
18:33:56 <merijn> eh
18:33:57 × ishutin quits (~Ishutin@77-234-92-253.pool.digikabel.hu) (Ping timeout: 260 seconds)
18:34:01 <merijn> "fmap foo <$> x"? :p
18:34:12 <timCF> well, it's the same)
18:34:17 <tomsmeding> looks nicer
18:34:25 <ski> timCF : maybe `ExceptT a', depending ?
18:34:36 <timCF> I was looking for something like magic `<$$>` if it exists haha
18:34:47 <tomsmeding> % let <$$> = fmap . fmap
18:34:48 <yahb> tomsmeding: ; <interactive>:27:5: error: parse error on input `<$$>'
18:34:49 <ski> (fmap . fmap) foo x
18:34:52 <tomsmeding> % let (<$$>) = fmap . fmap
18:34:52 <yahb> tomsmeding:
18:34:58 bruce_wayne joins (~prateekpr@94.129.87.184)
18:35:00 d068796 joins (~d068796@2a01:c23:8073:b800:8554:936:8b1f:acb4)
18:35:01 <tomsmeding> % :t (<$$>)
18:35:01 <yahb> tomsmeding: (Functor f1, Functor f2) => (a -> b) -> f1 (f2 a) -> f1 (f2 b)
18:35:35 <timCF> well, looks like it will work?
18:35:44 <tomsmeding> if it doesn't seem to exist, why not write it :)
18:36:10 <ski> timCF : are you often short-circuiting the `Left's ?
18:36:41 × forgottenone quits (~forgotten@176.88.97.75) (Quit: Konversation terminated!)
18:36:43 <timCF> what do you mean?
18:36:45 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
18:37:28 × christo quits (~chris@81.96.113.213) (Ping timeout: 256 seconds)
18:37:56 <ski> like `do x <- foo; case x of Left e -> return (Left e); Right v -> do y <- bar v; case y of Left e -> return (Left e); Right w -> ...'
18:40:48 <timCF> yeah, I recognize this pattern. Nowdays I'm trying to use `first` `second` and `bimap` to control flow, but often this external IO-like monad complicate things
18:41:34 <ski> if you find yourself doing that, then it sounds like `ExceptT' would be helpful
18:41:56 <ski> and then you could write `foo <$> ExceptT x'
18:42:17 × d068796 quits (~d068796@2a01:c23:8073:b800:8554:936:8b1f:acb4) (Quit: WeeChat 3.0)
18:42:58 × kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 260 seconds)
18:42:59 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:5d86:da4d:584b:848b) (Quit: Textual IRC Client: www.textualapp.com)
18:43:12 <timCF> Oh, monad transformers :) I'm already writing Haskell code for a while but still not fully understand them, hahah
18:43:35 d068796 joins (~d068796@x4db56550.dyn.telefonica.de)
18:43:38 <tomsmeding> someone on reddit noticed that ghc's unused variable warnings seem to have inconsistent behavour regarding transitive propagation of unusedness: https://www.reddit.com/r/haskell/comments/k1dggw/surprising_unused_variable_warnings/
18:43:43 <tomsmeding> is this a known thing?
18:43:53 phaul joins (~phaul@ruby/staff/phaul)
18:43:54 <timCF> But this particular case you desribed happens very often in real code, so maybe it will be easier to understand it for me) Thanks!
18:43:57 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
18:44:44 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
18:45:07 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
18:46:25 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 264 seconds)
18:46:36 Alleria_ joins (~AllahuAkb@2604:2000:1484:26:c82b:bd8e:1bb1:925d)
18:48:10 × d068796 quits (~d068796@x4db56550.dyn.telefonica.de) (Client Quit)
18:48:13 <ski> timCF : the related `MaybeT' is also useful in similar circumstances
18:48:52 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds)
18:49:23 × bruce_wayne quits (~prateekpr@94.129.87.184) (Ping timeout: 260 seconds)
18:50:37 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
18:51:29 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
18:52:15 bruce_wayne joins (~prateekpr@94.129.87.184)
18:52:25 × michalz quits (~user@185.246.204.47) (Ping timeout: 264 seconds)
18:53:28 phaul joins (~phaul@ruby/staff/phaul)
18:54:29 jk1006 joins (~textual@2a01:c23:8073:b800:8554:936:8b1f:acb4)
18:55:45 chaosmasttter joins (~chaosmast@p200300c4a7107e01f87538c6eac6d35f.dip0.t-ipconnect.de)
18:56:16 christo joins (~chris@81.96.113.213)
18:58:39 × matta quits (~user@24-113-169-116.wavecable.com) (Ping timeout: 256 seconds)
18:59:16 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
19:02:10 jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
19:02:40 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection)
19:02:49 invaser1 joins (~Thunderbi@31.148.23.125)
19:03:02 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds)
19:03:19 BRRR joins (5b8169f5@m91-129-105-245.cust.tele2.ee)
19:03:24 berberman joins (~berberman@unaffiliated/berberman)
19:03:36 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
19:04:06 kritzefitz joins (~kritzefit@212.86.56.80)
19:05:07 juuandyy joins (~juuandyy@90.166.144.65)
19:05:14 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 272 seconds)
19:05:14 invaser1 is now known as invaser
19:06:25 × jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 240 seconds)
19:06:29 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
19:06:30 hackage data-as 0.0.0.2 - Simple extensible sum https://hackage.haskell.org/package/data-as-0.0.0.2 (incertia)
19:07:57 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
19:08:20 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
19:08:29 phaul joins (~phaul@ruby/staff/phaul)
19:11:29 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 265 seconds)
19:11:49 <timCF> Thanks! I actually have one more noob question. I do often use phantom types to make source code stricter. For example `newtype MoneyAmount a = MoneyAmount Rational'. That's nice because now I can specify the kind of person who owns the money, for example `data Customer` and then `x :: MoneyAmount Customer'. Now I want to go futher and specify the kind of balance money represent `newtype MoneyAmount a b =
19:11:55 <timCF> MoneyAmount Rational' and then `data Debit; data Credit' and then `x :: MoneyAmount Customer Debit'. That's cool, but I can swap types and it still will be valid term `x :: MoneyAmount Debit Customer' and I even can use just some random types there like `x :: MoneyAmount Int Int' which does not make any sense. I'm not sure how do I call the thing I want, but I kinda want some sort of Class restrictions for
19:12:01 <timCF> types which can go to N-th position in phantom type. I do want something like this (pseudo code) `(OwnerType a, AccountType b) => newtype MoneyAmount a b = MoneyAmount Rational'. Is there the way to achieve something similar?
19:12:26 pokid parts (~pokid@unaffiliated/pokid) ()
19:12:36 pokid joins (~pokid@unaffiliated/pokid)
19:12:57 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
19:14:13 × jk1006 quits (~textual@2a01:c23:8073:b800:8554:936:8b1f:acb4) (Quit: Textual IRC Client: www.textualapp.com)
19:14:20 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:14:31 conal joins (~conal@64.71.133.70)
19:14:40 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
19:14:49 <hpc> data kinds, perhaps?
19:14:51 × conal quits (~conal@64.71.133.70) (Client Quit)
19:15:02 <monochrom> timCF: You can enable DataKinds, and maybe you also need KindSignatures. Then you can write: "data CD = Credit | Debit", "newtype M (a :: CD) = ...". Now "M Credit" and "M Debit" are legal, "M Bool" is not.
19:15:10 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
19:16:04 conal joins (~conal@64.71.133.70)
19:16:26 × conal quits (~conal@64.71.133.70) (Client Quit)
19:17:07 <timCF> @monochrom hmmm, that's interesting, especially the meaning of `data CD = Credit | Debit` it looks like a type with 2 constructors, but it's definitely not what I do want. I want 2 types of CD class with 0 constructors
19:17:07 <lambdabot> Unknown command, try @list
19:17:46 <monochrom> That's the magic of DataKinds. You now also have a kind called CD, and it has two types, Credit and Debit.
19:18:35 <monochrom> And the type called Credit has no possible value, not even bottom, because its kind is CD not *
19:18:57 <timCF> monochrom: hmm, interesting. But how I do define normal types with constructors in case this extension is enabled?
19:19:10 <monochrom> You get both
19:19:11 christo joins (~chris@81.96.113.213)
19:19:43 <timCF> monochrom: by default it creates both type CD and kind CD?
19:19:47 <monochrom> Yeah
19:20:05 × orion quits (~orion@unaffiliated/orion) (Ping timeout: 240 seconds)
19:20:11 <avdb> Is there a way to just return
19:20:21 <ski> just return what ?
19:20:24 <avdb> Didn't mean to send that, stupid tmux
19:20:25 <monochrom> I don't like this because sometimes you don't want one of them. Also too many name clashes for humans. (Oh the computer has no problem.)
19:20:40 × juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 265 seconds)
19:20:40 <monochrom> But it does the job. It just has side effects.
19:20:45 <avdb> It's hard when you confuse Ctrl+w for Vim with Ctrl+b for Tmux
19:20:50 <timCF> monochrom: so there is no way to have just kind?
19:20:55 <monochrom> No.
19:21:20 <monochrom> Just don't use the version you don't want. :)
19:21:43 <timCF> monochrom: ehhh.. But it's still much better that having blind phantom types `MoneyAmount a b`
19:22:00 <timCF> monochrom: thanks!
19:22:03 <monochrom> I think the GHC people did this to avoid creating an extra reserved word such as "kind".
19:22:14 <xerox_> what's the paper that explains this?
19:22:25 <tomsmeding> note that GHC wants you to write 'Credit and 'Debit on the type level, as opposed to Credit and Debit on the value level
19:22:30 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
19:22:43 <merijn> tomsmeding: Only when ambiguous
19:22:44 <monochrom> I don't know, but maybe the GHC user's guide has a citation.
19:22:53 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
19:23:21 <avdb> Is there a way to get the index of an element in a list comprehension?
19:23:37 × christo quits (~chris@81.96.113.213) (Ping timeout: 264 seconds)
19:23:39 <merijn> Zip it with an list of indices? :p
19:23:58 <avdb> I want [x | x <- lst] but without the odd indexes of lst
19:24:00 × phaul quits (~phaul@ruby/staff/phaul) (Remote host closed the connection)
19:24:11 <tomsmeding> merijn: also if not ambiguous: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/using-warnings.html#ghc-flag--Wunticked-promoted-constructors is enabled with -Wall
19:24:22 <merijn> tomsmeding: That's new
19:24:34 <merijn> Wonder when that got added
19:24:35 <tomsmeding> perhaps, but it's true now nevertheless :p
19:24:47 phaul joins (~phaul@ruby/staff/phaul)
19:24:50 <tomsmeding> I believe we two actually talked about this before in this very channel :p
19:25:00 <monochrom> [x | (x,i) <- zip lst (cycle [True,False]), i]
19:25:32 <avdb> You mean [(x,y) | x <- lst, y <- index, mod (snd y) 2 == 0] ?
19:25:41 <monochrom> No. I mean what I wrote.
19:25:49 <monochrom> What you wrote provably does something else.
19:26:05 <tomsmeding> merijn: https://ircbrowse.tomsmeding.com/day/haskell/2020/11/07?id=111296&timestamp=1604764844#t1604764844
19:26:07 <avdb> monochrom: Thanks. Doing exercises to learn new built-in functions is much more useful than reading books for me.
19:26:20 <monochrom> Let's see what's so wrong:
19:26:37 <avdb> That was my own function. I was planning on creating tuples with the index as the second element.
19:26:45 <avdb> And just filtering the odd ones.
19:27:17 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
19:27:24 <monochrom> With a moment of thought, you don't need full natural numbers, you just need cycle [True,False]
19:28:04 <monochrom> Gödel was damaging in teaching us to always work with natural numbers only.
19:28:15 <tomsmeding> did he?
19:28:16 <monochrom> Turing was damaging in teaching us to always work with strings only.
19:28:25 <ski> oh, there's an IRC Browse on the run again
19:28:42 × BRRR quits (5b8169f5@m91-129-105-245.cust.tele2.ee) (Remote host closed the connection)
19:28:50 <monochrom> Oh very strongly. Look up Gödel numbering. An XY problem in avoiding even strings.
19:28:57 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
19:29:05 <monochrom> or generally arrays.
19:29:18 <tomsmeding> he certainly did cool tricks with natural numbers, but did he teach us to work with natural numbers only? I don't think so :)
19:29:20 <opqdonut> there are also the folklore functions "evens (x:xs) = x:odds xs; odds (_:xs) = evens xs"
19:29:22 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:29:52 <opqdonut> which are useful if you only need every second element (and don't need to generalize to e.g. every third)
19:29:56 <xerox_> the GHC manual did have a citation http://dreixel.net/research/pdf/ghp.pdf
19:29:56 <monochrom> Scott Aaronson had great fun mocking Gödel numbering.
19:30:07 <merijn> ski: tomsmeding apparently wanted to do a bunch of work no one was feeling like, so we tricked him into running a copy now that Chris' is gone :p
19:30:29 <tomsmeding> it compiles on a recent ghc now too :)
19:31:24 <monochrom> Along the line of "I have a mathematician friend who is learning programming, he didn't learn arrays but he wanted to do arrays, so he thought up this great idea, represent [a,b,c] by 2^a 3^b 5^c. That's Gödel numbering."
19:32:00 <xerox_> zipWith (^) primes
19:32:04 <tomsmeding> obligatory mention of https://esolangs.org/wiki/Fractran
19:32:28 <opqdonut> gödel numbering predates pretty much all programming so we can forgive it for being a bit esoteric :P
19:32:42 <opqdonut> I think I've seen a version of gödel's proof that uses a more modern encoding
19:32:49 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
19:33:18 <xerox_> did they use capt'n'proto or protocol buffers
19:33:19 <monochrom> Well OK, you are right that maybe he didn't intend to teach us to use natural numbers only. But the empirical effect is he ended up achieving that.
19:33:51 <opqdonut> xerox_: json and unicode, obviously ;)
19:34:00 jollygood2 joins (~bc8165ab@217.29.117.252)
19:34:12 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
19:34:35 <jollygood2> @hoogle Random a => [a] -> IO a
19:34:36 <lambdabot> Rando pickOne :: [x] -> IO x
19:34:36 <lambdabot> System.Random.Pick pickOne :: [x] -> IO x
19:34:36 <lambdabot> Basement.Monad unsafePrimToIO :: PrimMonad prim => prim a -> IO a
19:34:40 × invaser quits (~Thunderbi@31.148.23.125) (Quit: invaser)
19:34:42 <monochrom> Namely, we all understand that Gödel numbering is completely non-essential and replaceable (by strings, even ASTs) for his proofs, but most people still teach the Gödel numbering versions of the proof exclusively.
19:34:46 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
19:34:46 <jollygood2> anything in base?
19:35:00 invaser joins (~Thunderbi@31.148.23.125)
19:35:10 <tomsmeding> jollygood2: the Random class itself isn't even in base :p
19:35:10 × fendor quits (~fendor@77.119.130.234.wireless.dyn.drei.com) (Remote host closed the connection)
19:35:28 <jollygood2> s/base/package that ships with ghc
19:35:53 <tomsmeding> unfortunately no, 'random' is the usual package, though there are others with more high-performance generators
19:36:15 <tomsmeding> also, 'Random' itself is not from a package that ships with ghc, so my point stands :p
19:36:22 <dolio> I'm not sure that's on Gödel. It's kind of the mathematician equivalent of programmers who want to write everything 'close to the machine.'
19:36:32 <jollygood2> Random doesn't ship with ghc?
19:36:38 <monochrom> My thesis supervisor's sentiment is in http://www.cs.toronto.edu/~hehner/God.pdf and I totally agree, today even the purest mathematicians have the tools to obsolete the Gödel encoding.
19:36:51 <tomsmeding> jollygood2: it's from the 'random' package :p
19:37:06 <jollygood2> that doesn't answer my question
19:37:31 <tomsmeding> ... which doesn't ship with ghc, no
19:38:08 <tomsmeding> because ghc ships only with the packages that ghc depends on, and ghc doesn't need to generate random numbers
19:38:19 <monochrom> OK yeah dolio, your take is right.
19:38:34 <monochrom> Oh well, so much for blaming it on celebrities.
19:38:58 × oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 260 seconds)
19:39:22 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
19:39:40 <monochrom> Oh, random-1.2 is fast and high-quality IMO, even when you use split heavily.
19:39:56 <jollygood2> I don't care about speed
19:39:59 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Remote host closed the connection)
19:40:11 <monochrom> Actually the high-quality part can be objectively quantified by the statistics tests they took, e.g. Die Hard 1.
19:40:12 <jollygood2> I just didn't want to depend on more packages than I need to
19:40:42 <monochrom> Its dependency is minimal too. Just splitmix (the actual generator)
19:40:43 <tomsmeding> the Random class is from the 'random' package, which ghc does not depend on, so you'll need that one at least -- and that ships with a RNG too, so it's all you need
19:40:45 <dolio> Similar phenomenon to everyone insisting on ZF(C) as a formal foundation, and getting really obstinate about not using one that lets you write down things similar to what mathematicians actually say in a more direct way. Despite having very little experience actually working formally. :)
19:41:00 <merijn> monochrom: As always the blame lies with "people being people"
19:41:07 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
19:41:31 <monochrom> IKR? I'm supposed to be cynical about all humanity.
19:41:32 <merijn> There's a super fast RNG in base if you don't care about quality :p
19:41:38 <merijn> "4"
19:42:44 <dolio> I actually saw someone on MathOverflow recently talking about how the nonsensical propositions in ZF enable 'clever hacks', and that's a good thing. Which makes even less sense than when programmers advocate for it. :)
19:42:58 <jollygood2> randomPick xs = (xs!!) <$> randomRIO (0, length xs)
19:43:06 <tomsmeding> I mean, if quality is not a great issue, you can write a 128-bit LCG without a large amount of effort or code, which will work fine :p
19:43:17 <int-e> merijn: with the xkcd stamp of approval?
19:43:28 <jollygood2> length xs - 1
19:43:49 <merijn> int-e: Exactly
19:45:43 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
19:48:56 orion joins (~orion@c-76-19-238-5.hsd1.nh.comcast.net)
19:48:56 × orion quits (~orion@c-76-19-238-5.hsd1.nh.comcast.net) (Changing host)
19:48:56 orion joins (~orion@unaffiliated/orion)
19:50:10 Finianb1 joins (~Finianb1@71-218-235-186.hlrn.qwest.net)
19:51:18 × n0042 quits (d055ed89@208.85.237.137) (Remote host closed the connection)
19:52:40 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
19:53:20 × Finianb1 quits (~Finianb1@71-218-235-186.hlrn.qwest.net) (Client Quit)
19:57:12 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
19:57:24 matta joins (~user@24-113-169-116.wavecable.com)
19:57:36 × orion quits (~orion@unaffiliated/orion) (Ping timeout: 240 seconds)
19:58:16 orion joins (~orion@c-76-19-238-5.hsd1.ma.comcast.net)
19:58:16 × orion quits (~orion@c-76-19-238-5.hsd1.ma.comcast.net) (Changing host)
19:58:16 orion joins (~orion@unaffiliated/orion)
19:58:43 luke joins (~luke@bitnomial/staff/luke)
19:59:53 iqubic joins (~user@2601:602:9500:4870:fa52:51be:1322:705e)
19:59:53 × iqubic quits (~user@2601:602:9500:4870:fa52:51be:1322:705e) (Remote host closed the connection)
20:01:10 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 246 seconds)
20:03:54 conal joins (~conal@64.71.133.70)
20:04:37 × wonko7 quits (~wonko7@2a01:e35:2ffb:7040:55f1:c3a3:cdbe:bf52) (Ping timeout: 260 seconds)
20:05:55 × mpereira quits (~mpereira@2a02:810d:f40:d96:857:5d24:8b16:e48) (Ping timeout: 272 seconds)
20:05:57 juuandyy joins (~juuandyy@90.166.144.65)
20:07:11 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
20:08:29 × kuribas quits (~user@ptr-25vy0i7d0jyf2exvnea.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
20:10:59 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds)
20:15:44 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
20:16:07 jpds joins (~jpds@gateway/tor-sasl/jpds)
20:16:27 alp joins (~alp@2a01:e0a:58b:4920:fc4d:b6b4:4592:5e81)
20:18:03 × orion quits (~orion@unaffiliated/orion) (Ping timeout: 260 seconds)
20:18:46 Fractalis joins (~Fractalis@2601:987:280:8d40:8819:4ab1:66e9:952a)
20:18:55 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
20:19:00 hackage ukrainian-phonetics-basic 0.3.1.1 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.1 (OleksandrZhabenko)
20:19:08 pokid parts (~pokid@unaffiliated/pokid) ()
20:19:20 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:19:27 × nf quits (~n@monade.li) (Read error: Connection reset by peer)
20:19:30 nf__ joins (~n@monade.li)
20:19:31 orion joins (~orion@c-76-19-238-5.hsd1.ma.comcast.net)
20:19:31 × orion quits (~orion@c-76-19-238-5.hsd1.ma.comcast.net) (Changing host)
20:19:31 orion joins (~orion@unaffiliated/orion)
20:19:49 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Quit: Leaving)
20:19:53 × Fractalis quits (~Fractalis@2601:987:280:8d40:8819:4ab1:66e9:952a) (Client Quit)
20:20:18 <sondr3> I want to read a directory and filter out files based on it's extension, I get all the contents fine with `listDirectory`, but as soon as I filter the list it becomes empty
20:20:35 <sondr3> I'm probably missing something to do with the IO monad
20:21:06 × nf__ quits (~n@monade.li) (Client Quit)
20:21:14 <monochrom> Show actual code?
20:21:18 <shapr> sondr3: can you pastebin your code?
20:21:18 wonko7 joins (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net)
20:21:19 <monochrom> @where paste
20:21:19 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
20:21:21 <geekosaur> @where paste
20:21:21 <lambdabot> Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com
20:21:29 nf joins (~n@monade.li)
20:22:58 <Uniaika> nf: nice reverse host
20:23:10 <nf> thanks :)
20:23:20 <sondr3> monochrom: geekosaur: https://paste.tomsmeding.com/dboZf8Up
20:23:45 <avdb> How do I create on liner if then else cases in Haskell like in C? If I'm not wrong it should be possible with something like "x == foo? Nothing : Maybe a"
20:24:07 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
20:24:14 <monochrom> > "aaaa" `isSuffixOf "a"
20:24:16 <lambdabot> <hint>:1:20: error: <hint>:1:20: error: parse error on input ‘"’
20:24:16 <geekosaur> sodr3, looks to me like you have your isSuffixOf reversed
20:24:26 <tomsmeding> `if x == foo then Nothing else Just a`? avdb
20:24:30 <shapr> > if 0 == 1 then "world broken" else "not equal"
20:24:33 <lambdabot> "not equal"
20:24:43 <geekosaur> it's looking for filenames which are suffixes of "hrx"
20:24:44 aarvar joins (~foewfoiew@50.35.43.33)
20:24:54 <sondr3> geekosaur: doh
20:25:13 aarvar parts (~foewfoiew@50.35.43.33) ()
20:25:22 <avdb> tomsmeding: There was a method with symbols if I'm not wrong, might've just dreamed about it though.
20:25:34 <avdb> If then else is already short enough but I don't like the verbosity
20:25:52 <sondr3> geekosaur: yep, that was it. Thanks :facepalm:
20:26:08 <shapr> avdb: pattern match? applicative?
20:26:13 <Uniaika> nf: and I realise just now that you already follow me on Twitter :P
20:26:32 <tomsmeding> avdb: `let cond ? (x, y) = if cond then x else y`
20:26:43 <shapr> :-D
20:26:43 <tomsmeding> but if-then-else is more readable :p
20:26:52 <nf> Uniaika: ;D
20:27:58 × elliott__ quits (~elliott@pool-108-51-141-12.washdc.fios.verizon.net) (Ping timeout: 260 seconds)
20:28:01 <int-e> :t bool
20:28:03 <lambdabot> a -> a -> Bool -> a
20:28:11 <shapr> whoa, I like mario lang's github profile pic
20:28:13 × juuandyy quits (~juuandyy@90.166.144.65) (Quit: Konversation terminated!)
20:29:16 <int-e> > bool "nay" "aye" (0 == 1)
20:29:18 <lambdabot> "nay"
20:30:09 <shapr> that's neat
20:30:49 <koz_> Yep, bool is handy sometimes.
20:30:51 <koz_> Related:
20:30:54 <koz_> :t maybe
20:30:56 <lambdabot> b -> (a -> b) -> Maybe a -> b
20:30:57 <koz_> :t either
20:30:58 <lambdabot> (a -> c) -> (b -> c) -> Either a b -> c
20:31:12 <int-e> :t foldr
20:31:13 <lambdabot> Foldable t => (a -> b -> b) -> b -> t a -> b
20:31:15 koz_ mumbles something about Boehm-Beraducci encodings.
20:31:51 <shapr> does anyone have a tutorial for doing advent of code with nix? I'm mostly a nix newbie.
20:32:28 <int-e> that question doesn't feel well-typed to me
20:32:33 tomsmeding thought nix was a language for package configuration description, not for general-purpose programming
20:32:43 <tomsmeding> not that you can't use it for that
20:32:56 <tomsmeding> I guess
20:32:58 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
20:33:03 <tomsmeding> may be slow
20:33:18 <tomsmeding> anyone up for doing AOC in dhall?
20:33:21 <koz_> tomsmeding: You can use it to set up a programming environment, along with your (non-Haskell) deps.
20:33:23 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:33:25 <shapr> tomsmeding: I have nixOS installed, but I'm still coming to grips with how to do development with it
20:33:29 <koz_> I _guess_ that's what's being asked.
20:33:58 <shapr> lucky for me, chessai got my most recent app working with nix: https://github.com/shapr/fermatslastmargin/blob/master/shell.nix
20:34:14 <shapr> but is that all I need to use any library from hackage?
20:34:29 <sm[m]> tomsmeding: definitely not :)
20:34:35 <shapr> I've read that some of nix+haskell means I'm limited to a single version of the libraries, is that true?
20:35:02 <sm[m]> but I think glguy should use dhall. Slow him down a bit.
20:35:05 × kish` quits (~oracle@unaffiliated/oracle) (Ping timeout: 240 seconds)
20:35:30 hackage ukrainian-phonetics-basic 0.3.1.2 - A library to work with the basic Ukrainian phonetics and syllable segmentation. https://hackage.haskell.org/package/ukrainian-phonetics-basic-0.3.1.2 (OleksandrZhabenko)
20:35:36 <shapr> sm[m]: haha!
20:36:23 <avdb> Can you mix list comprehensions with if statements in haskell?
20:36:45 <koz_> avdb: You mean, you want to have conditional logic _in_ the list comprehension?
20:36:46 <avdb> [x | x <- lst, if x == foo then succ x else x]
20:36:49 <avdb> Yes!
20:37:07 <shapr> you can also do pattern matches inside the list comp
20:37:17 <avdb> how?
20:37:56 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds)
20:37:56 <shapr> or for extra insanity, there's TransformListComp: https://github.com/shapr/tmuxmarta/blob/master/src/Lib.hs#L65
20:37:59 <ski> there are no `if' statements in Haskell
20:38:10 <shapr> but I think I'm the only person who's used TransformListComp in the past few years :-P
20:38:38 ski was just reading about them a bit, earlier today
20:38:50 <ski> (looking at some of ProfTeggy's papers)
20:38:50 <tomsmeding> there are 'if' expressions, though
20:38:51 <shapr> ski: I should try some monad comprehensions
20:38:58 <avdb> ski: if then else grrr
20:39:14 <avdb> I don't know how to use Monads, Functors or any of those exotic tools
20:39:16 × aidecoe quits (~aidecoe@unaffiliated/aidecoe) (Ping timeout: 240 seconds)
20:39:43 <ski> avdb : do you want to, conditionally, either collect `x' or `succ x', with `x' being drawn from `lst' ?
20:39:50 <shapr> avdb: oh functors are so cool!
20:39:52 <avdb> Yes
20:40:00 <shapr> avdb: it's like "apply this function inside this container"
20:40:08 <shapr> avdb: have you used map?
20:40:24 <ski> > [if x `mod` 3 == 0 then succ x else x | x <- [0 .. 9]]
20:40:27 <lambdabot> [1,1,2,4,4,5,7,7,8,10]
20:40:29 <shapr> > map (* (-1)) [1..9]
20:40:29 <avdb> Not yet ...
20:40:31 <lambdabot> [-1,-2,-3,-4,-5,-6,-7,-8,-9]
20:40:32 <avdb> Thanks
20:40:32 <ski> something like that ?
20:40:49 <shapr> > map (+1) [5..9]
20:40:50 aidecoe joins (~aidecoe@unaffiliated/aidecoe)
20:40:52 <lambdabot> [6,7,8,9,10]
20:40:57 <shapr> :t map
20:40:59 <lambdabot> (a -> b) -> [a] -> [b]
20:41:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
20:41:03 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
20:41:07 × nullheroes quits (~danielvu@168.235.66.22) (Quit: WeeChat 2.9)
20:41:14 <ski> > [y | x <- [0 .. 9],let y = if x `mod` 3 == 0 then succ x else x] -- another way to say the same thing
20:41:16 <shapr> avdb: map says "give me a function, and a list, and I'll apply the function to each element in the list, and give you the result"
20:41:17 <lambdabot> [1,1,2,4,4,5,7,7,8,10]
20:41:32 <avdb> I also intentionally ask my questions it in a totally different manner so that I have to edit the code and use my brains :P
20:41:34 tomsmeding is happy in this instance that the Haskell legacy hasn't made fmap and map the same thing -- sucks with explaining
20:42:12 × sondr3 quits (~sondr3@cm-84.211.56.132.getinternet.no) (Quit: Leaving)
20:42:22 <ski> > [y | x <- [0 .. 9],let y | x `mod` 3 == 0 = succ x | otherwise = x] -- yet another variation
20:42:23 <shapr> avdb: that's smart, using your brain is good but takes work
20:42:24 <lambdabot> [1,1,2,4,4,5,7,7,8,10]
20:42:43 <avdb> Oh wow ... you can play with the x on the left hand side? Learned something new today about haskell ...
20:42:54 <ski> tomsmeding : they were the same thing, in the past
20:43:05 <koz_> avdb: If you've seen set comprehensions, this will feel very familiar.
20:43:11 <ski> hm, on the left-hand side of what ?
20:43:20 <avdb> Of list comprehensions
20:43:31 <ski> do you mean, before the first `|' ?
20:43:43 <ski> you can put any expression there
20:43:43 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
20:43:47 Deide joins (~Deide@217.155.19.23)
20:43:51 <ski> including `if'-`then'-`else' expressions
20:43:52 <tomsmeding> ski: were they? I've only heard the complaints from people that wanted 'map' gone and have 'fmap' called 'map' for consistency, but maybe those were also not aware that this hasn't always been like that?
20:44:07 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
20:45:00 jonatanb joins (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl)
20:45:07 × avdb quits (~avdb@ip-81-11-215-86.dsl.scarlet.be) (Quit: avdb)
20:45:23 <shapr> ski has been writing Haskell longer than I have!
20:45:45 <ski> tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor>
20:46:02 <shapr> wow, that's old school
20:46:02 <ski> tomsmeding : also check out `MonadPlus', just below
20:46:14 <shapr> I didn't get into Haskell until .. ghc4? ghc5? something like that
20:46:32 <shapr> What was the hot new ghc in ~2000 ?
20:46:46 shapr checks
20:46:47 <tomsmeding> fascinating, (++) in MonadPlus
20:46:48 <shapr> ah, april 2001
20:47:10 <tomsmeding> makes sense though
20:47:23 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
20:47:23 <ski> oh and `sequence'&`accumulate' in place of `sequence_',`sequence'
20:48:01 nullheroes joins (~danielvu@168.235.66.22)
20:48:39 <ski> (i remember noting that in Winstanley's monad tutorial <http://www-users.mat.uni.torun.pl/~fly/materialy/fp/haskell-doc/Monads.html>)
20:49:25 × jonatanb quits (~jonatanb@83.24.220.252.ipv4.supernova.orange.pl) (Ping timeout: 264 seconds)
20:49:30 <dminuoso> 21:45:45 ski | tomsmeding : <http://www.ki.informatik.uni-frankfurt.de/doc/html/Haskell1.4/standard-prelude.html#$tFunctor>
20:49:49 <dminuoso> Academia is one of the few places that knows how to maintain long lived websites, which I think is both a blessing and a curse.
20:50:28 <ski> shapr : are you sure ?
20:50:38 ski can't recall
20:50:54 × AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving)
20:51:24 <monochrom> dminuoso, I think it's more like "is enabled to"
20:51:56 <ski> shapr : you said anniversary's in April ?
20:52:03 <shapr> yup
20:52:05 <int-e> dminuoso: don't worry, we're working on solutions for that anomaly: https://www.scottaaronson.com/blog/?p=5094
20:52:16 <shapr> April 30th
20:52:27 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
20:52:27 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:52:30 <int-e> also... it often happens that a bunch of stuff just disappears when a professor retires or moves to another university
20:52:36 <ski> yes
20:52:42 <shapr> int-e: that part makes me sad
20:52:45 × jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds)
20:52:54 <shapr> I still have an ancient smalltalk <-> haskell bridge
20:53:07 <ski> or when the department decide to do a "site revamp"
20:53:09 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
20:53:50 <tomsmeding> making the thing less usable in the process
20:53:58 <ski> shapr : that was when you came here ?
20:54:00 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Client Quit)
20:54:15 Lycurgus joins (~niemand@98.4.114.74)
20:54:15 × conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.)
20:54:27 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
20:54:44 conal joins (~conal@64.71.133.70)
20:55:23 × conal quits (~conal@64.71.133.70) (Client Quit)
20:55:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:56:07 <shapr> ski: I think a month later
20:56:11 knupfer joins (~Thunderbi@200116b82c0c5800b48acffffeb6f843.dip.versatel-1u1.de)
20:56:11 × knupfer quits (~Thunderbi@200116b82c0c5800b48acffffeb6f843.dip.versatel-1u1.de) (Client Quit)
20:56:18 jespada joins (~jespada@90.254.245.49)
20:56:26 knupfer joins (~Thunderbi@i59F7FFCD.versanet.de)
20:56:36 <shapr> someone else created the channel, but the channel was empty and nobody had joined for weeks, so I talked the freenode admins into letting me take ownership
20:56:52 conal joins (~conal@64.71.133.70)
20:56:55 <monochrom> Namely, a corporate knows too, and it actually knows all too well, precisely why they consciously kill old websites, because they deeply understand that keeping legacy websites is anti-bean-counting.
20:56:58 × conal quits (~conal@64.71.133.70) (Client Quit)
20:57:12 <ski> yea, i remember you've said that. but for some reason, i always figured it'd been around a bit longer than a month
20:57:19 <shapr> so I probably started writing Haskell in May or June of 2001
20:57:28 <shapr> ski: I don't remember :-(
20:58:09 × luke quits (~luke@bitnomial/staff/luke) (Quit: sleep)
20:58:26 <monochrom> A university is more enabled because it attracts fewer bean-counting people, and sometimes more people who think along the line "who dares to take down John Conway's website now!"
20:58:30 <ski> i remember i hadn't been on hawiki too long, before finding the `HaskellIRC' page, and came here. and i found the Wiki, because someone mentioned it on <news://comp.lang.functional>
20:59:07 × dftxbs3e quits (~dftxbs3e@unaffiliated/dftxbs3e) (Ping timeout: 272 seconds)
20:59:38 kish` joins (~oracle@unaffiliated/oracle)
21:00:24 <ski> (but i don't recall when i turned up here, in 2001)
21:00:50 conal joins (~conal@64.71.133.70)
21:00:57 × conal quits (~conal@64.71.133.70) (Client Quit)
21:01:16 × kish` quits (~oracle@unaffiliated/oracle) (Remote host closed the connection)
21:01:27 fendor joins (~fendor@77.119.130.234.wireless.dyn.drei.com)
21:01:28 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 256 seconds)
21:01:32 <shapr> ski: I don't think we had logs then either
21:01:42 tomsmeding is barely three years older than this channel then apparently
21:01:52 <ski> i remember it was on OpenProjects, then
21:01:52 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
21:01:55 <shapr> I do know that Igloo and Heffalump were early joins to this channel, so they might remember?
21:02:01 <shapr> tomsmeding: welcome?
21:02:01 <ski> dunno when clog showed up
21:02:06 <tomsmeding> :D
21:02:10 <shapr> :-D
21:02:58 <shapr> I'd actually gotten angry at Haskell and gave up and went to learn Scheme, but then my girlfriend at the time had spent time and money to buy me Haskell books for my birthday, so I tried to pick up Haskell again.
21:03:30 <ski> blackdog,arjanb, hmm .. if i think about it, i might be able to remember more names
21:03:50 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
21:04:17 <koz_> shapr: Thank her for me. :P
21:04:25 <shapr> haha
21:04:27 <koz_> (if you two are still on speaking terms)
21:04:28 <Rembane> shapr: So that you know Haskell is all because of her? :D
21:04:31 hackage typson-core 0.1.0.1 - Type-safe PostgreSQL JSON Querying https://hackage.haskell.org/package/typson-core-0.1.0.1 (aaronallen8455)
21:04:36 <shapr> Rembane: pretty much, yeah
21:04:47 <koz_> True story: I got into CompSci because I was ridiculously attracted to one of my TAs.
21:04:54 <koz_> (no seriously)
21:05:05 <Rembane> koz_: Seems legit. Did you ask them out on a date?
21:05:08 kish` joins (~oracle@unaffiliated/oracle)
21:05:11 <koz_> She wasn't interested.
21:05:15 <shapr> too bad
21:05:18 <koz_> Ehh.
21:05:22 <Rembane> Must've been a disappointment and saved lots of time.
21:05:33 <Rembane> shapr: Was it you who did the APL implementation in Haskell?
21:05:40 <koz_> I'm glad she wasn't, because our worldviews were about a million miles apart.
21:05:41 <shapr> not me, no
21:05:45 <koz_> And it would have ended in tears.
21:05:55 <shapr> though I would like to read that APL implementation
21:06:08 <Rembane> Then I'm mixing you up with someone
21:06:24 <Rembane> shapr: If I stumble upon it I promise to send it to you
21:06:28 <shapr> yay!
21:06:51 <shapr> I built ghcLiVE long years ago, and more recently Fermat's Last Margin
21:06:59 <shapr> and some smaller tools like sandwatch
21:07:32 ski eats a sandwich
21:07:36 <Igloo> shapr: Remember what?
21:07:49 <shapr> Igloo: when did you join #haskell the first time?
21:07:51 <koz_> ski: Ah yes, the product type of foods.
21:08:05 <shapr> Igloo: also, how's life treating you? Do you get paid to write Haskell?
21:08:31 <shapr> I'm tempted to rebuild ghcLiVE in a terminal with sixel http://okbob.blogspot.com/2020/08/gnome-terminal-with-sixel-support.html
21:08:50 <Igloo> I don't know exactly
21:08:58 Sgeo_ joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
21:08:59 <Igloo> I write a few bits here and there :-)
21:09:08 <shapr> Igloo: ski and I were trying to figure out when #haskell really got going
21:09:28 <shapr> I know I took over founder-ness some weeks / months after the channel was registered, but I don't remember exactly when.
21:09:41 <Rembane> When was this?
21:09:45 <shapr> sometime in 2001
21:09:46 <ski> 2001
21:09:48 <Rembane> Nice
21:09:51 <ski> fun times :)
21:09:58 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 256 seconds)
21:10:00 hackage typson-beam 0.1.0.1 - Typson Beam Integration https://hackage.haskell.org/package/typson-beam-0.1.0.1 (aaronallen8455)
21:10:08 <shapr> Fewer people here, but all sorts of adventures too
21:10:10 <Rembane> I joined nine years later IIRC
21:10:17 × bruce_wayne quits (~prateekpr@94.129.87.184) (Ping timeout: 260 seconds)
21:10:19 <Igloo> Chanserv says "Registered : Apr 30 22:22:56 2001 (19y 30w 4d ago)"
21:10:27 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:10:32 <shapr> Igloo: 20th anniversary party coming up!
21:10:45 <Rembane> Sweet!
21:10:48 bruce_wayne joins (~prateekpr@94.129.87.184)
21:10:54 <tomsmeding> missed the 22:22:22 opportunity there 19 years ago
21:10:56 <ski> iirc i'd ambush newbies, asking them about Haskell or so
21:11:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:11:31 <Igloo> But will we still have to party at home alone, shapr? :-)
21:11:38 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
21:11:44 <ski> shapr : my vague memory tells me ten to twenty regulars, around the start. does that sound reasonable ?
21:11:53 <shapr> yup
21:12:01 <ski> we're not alone, in #haskell !
21:12:12 × geekosaur quits (ae68c070@cpe-174-104-192-112.neo.res.rr.com) (Remote host closed the connection)
21:12:13 × Sgeo quits (~Sgeo@ool-18b982ad.dyn.optonline.net) (Ping timeout: 264 seconds)
21:13:11 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Quit: mputz)
21:13:47 <shapr> ski: oh hey, I wrote an email to the haskell .. cafe? so we can find that!
21:14:08 <shapr> That's how I got people to show up, I told 'em there were smart academics here having good conversation.
21:14:13 <shapr> and when they arrived, it was true!
21:14:30 <ski> hm, i don't recall seeing that
21:16:03 <shapr> Might have been the main haskell mailing list, I forget
21:16:31 hackage phonetic-languages-simplified-properties-lists 0.1.3.1 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-simplified-properties-lists-0.1.3.1 (OleksandrZhabenko)
21:19:06 <xerox_> I wonder where TheHunter ended up
21:19:25 <ski> yea ..
21:19:36 <ski> and mmorrow,vixey
21:19:46 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-yhbundavwcfojtvb)
21:19:52 <shapr> I know where blackdog works ...
21:20:13 <shapr> I tracked down TheHunter some years ago, he was still writing code, but I think not Haskell anymore.
21:20:39 francesco_ joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:20:43 <shapr> > 51 / 3
21:20:46 <lambdabot> 17.0
21:21:01 boxscape37 joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
21:21:04 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer)
21:21:28 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
21:21:30 × Lycurgus quits (~niemand@98.4.114.74) (Ping timeout: 265 seconds)
21:22:24 <ski> i remember at some point i used to obsessively read all the scrollback ..
21:23:01 hackage typson-esqueleto 0.1.0.1 - Typson Esqueleto Integration https://hackage.haskell.org/package/typson-esqueleto-0.1.0.1 (aaronallen8455)
21:23:02 <shapr> That was humanly possible in the early years.
21:23:14 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
21:23:37 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 264 seconds)
21:23:39 <shapr> I used to check the user list when I got on and welcome new people
21:24:03 <ski> yea, i remember that, too
21:24:11 <hpc> checking the user list used to be humanly possible too
21:24:16 boxscape37 is now known as boxscape
21:24:20 <ski> (remember me doing that, quite possibly after seeing you do it)
21:25:05 × andi- quits (~andi-@NixOS/user/andi-) (Ping timeout: 272 seconds)
21:25:30 hackage typson-selda 0.1.0.0 - Typson Selda Integration https://hackage.haskell.org/package/typson-selda-0.1.0.0 (aaronallen8455)
21:25:30 b7471 joins (~kvirc@139.30.76.203)
21:25:41 <b7471> Hello
21:25:50 <shapr> hi b7471
21:25:50 <ski> hello
21:26:05 <b7471> i have a small question
21:26:11 <shapr> ooh, I have a small answer!
21:26:17 <b7471> if a have a if else loop in haskell
21:26:26 ski was thinking about something similar .. :)
21:26:37 <shapr> hpc: yeah, it's been a few years since that was reasonable
21:26:39 <b7471> and i want to print three variables
21:26:42 <b7471> how do i do this
21:26:51 <Rembane> b7471: What's an if-else-loop?
21:26:54 <ski> perhaps you could show your current code ?
21:27:11 <b7471> orderTriple(x,y,z)= if x>y && z>y then x else y
21:27:17 <ski> loop x = if ..x.. then ... else loop (..x..) -- something like this ?
21:27:26 <b7471> orderTriple :: (Int,Int,Int) -> Int
21:27:41 <ski> hm, i see no loop in there
21:27:51 <b7471> i dont want to output just x , but all the three numbers
21:27:59 <ski> @index trace
21:28:00 <lambdabot> Debug.Trace
21:28:06 <ski> @type Debug.Trace.trace
21:28:07 <lambdabot> String -> a -> a
21:28:22 <b7471> the function should compare three numbers and "show" them in their orders
21:28:43 <b7471> three numbers for example 1,3,2 should show 1,2,3
21:29:08 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
21:29:13 <ski> orderTriple (x,y,z) = trace (concat ["x = ",show x,"\ny = ",show y,"\nz = ",show z,"\n"]) (if x>y && z>y then x else y)
21:29:24 <ski> try something like that, after importing `Debug.Trace'
21:29:32 <shapr> hpc: do you write Haskell for money?
21:29:43 DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
21:30:34 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
21:30:35 <ski> b7471 : but be sure to remove `trace' from the code, afterwards !
21:30:43 × francesco_ quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Remote host closed the connection)
21:31:00 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:31:13 <b7471> in the code i used cant i just type: then (x,y,z) else (z,x,y) ?
21:31:15 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:31:20 f-a joins (~f-a@151.34.157.206)
21:31:57 <hpc> shapr: yes, but unfortunately i have to write it in other languages instead ;)
21:32:08 kasper1 joins (~u0_a549@cpc153669-craw9-2-0-cust163.16-3.cable.virginm.net)
21:32:14 <ski> b7471 : oh, sure. you can change the result of the function from being a single `Int' to being a triple of `Int's, if you want to
21:32:25 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
21:32:27 <ski> (but you'll need to change the type signature, to reflect that, naturally)
21:32:49 <b7471> how do i print three variable instead of just one (then x else... )
21:33:28 <ski> what if you try what you just said ?
21:33:32 <ski> <b7471> in the code i used cant i just type: then (x,y,z) else (z,x,y) ?
21:33:45 × pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca) (Quit: ZNC 1.7.5 - https://znc.in)
21:34:06 Stanley00 joins (~stanley00@unaffiliated/stanley00)
21:36:28 <ski> shapr : fwiw, #haskell is still the channel i like most, i'd say
21:36:34 pieguy128 joins (~pieguy128@bras-base-mtrlpq5031w-grc-39-70-27-244-102.dsl.bell.ca)
21:36:47 francesco_ joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
21:37:03 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Read error: Connection reset by peer)
21:38:07 <shapr> ski: I'm glad, I spent a bunch of years working on the culture.
21:38:22 <shapr> not so much the past few though, I've reached the point of "time to write code instead of organize community"
21:38:33 <shapr> though I'm tempted to apply to the Haskell Foundation, see if I can help out
21:38:33 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
21:39:08 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 272 seconds)
21:39:12 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
21:39:46 × keviv quits (~keviv@35.142.17.117) (Read error: Connection reset by peer)
21:40:03 <b7471> well it is a bit of an improvement.
21:40:07 andi- joins (~andi-@NixOS/user/andi-)
21:40:14 <b7471> but i guess i will have to learn a bit more
21:40:22 keviv joins (~keviv@35.142.17.117)
21:40:26 <b7471> this haskell thing
21:40:49 Varis joins (~Tadas@unaffiliated/varis)
21:40:58 <shapr> b7471: it's fun
21:41:21 <ski> shapr : occasionally i may boast a little in other channels about how friendly and welcoming i found #haskell, when i started chatting (and still do), and how i've since attempted to bring some of the same spirit also to other channels in which i've chatted a bit more
21:41:30 × keviv quits (~keviv@35.142.17.117) (Read error: Connection reset by peer)
21:42:20 <ski> b7471 : got it to type-check, at least ?
21:42:48 <shapr> ski: Yeah, I attribute the root of that friendly culture to SPJ
21:43:25 <b7471> ski what_
21:43:33 <b7471> pardon?
21:43:48 <ski> it's quite possible. he's a very amiable fellow
21:44:12 <b7471> i dont understand english that well
21:44:16 <ski> b7471 : i mean your `orderTriple' function, after you changed it, according to your last suggestion
21:44:29 <b7471> well i tryed it
21:44:36 <ski> did you get an error ?
21:44:40 <b7471> and it says Error whatever...
21:44:41 f-a parts (~f-a@151.34.157.206) ()
21:44:42 <b7471> yes
21:44:48 <ski> what was the error ?
21:45:19 <b7471> just a second
21:45:20 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:45:24 dirediresalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt)
21:45:29 × DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection)
21:45:49 <ski> shapr : i think it's quite likely been an important factor for the success that Haskell's had
21:46:06 × bruce_wayne quits (~prateekpr@94.129.87.184) (Ping timeout: 272 seconds)
21:46:25 × francesco_ quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Ping timeout: 264 seconds)
21:46:41 <b7471> with actual type `(Int, Int, Int)' * In the expression: (x, y, y) In the expression: if x > y && z > y then (x, y, y) else y In an equation for `orderTriple': orderTriple (x, y, z) = if x > y && z > y then (x, y, y) else y | 46 | orderTriple(x,y,z)= if x>y && z>y then (x,y,y) else y | ^^^^^^^ Failed, no mod
21:46:54 <b7471> lol
21:46:55 DTZUZU joins (~DTZUZU@207.81.171.116)
21:47:10 keviv joins (~keviv@35.142.17.117)
21:47:37 <ski> b7471 : yes, you need to change both branches of the `if'-`then'-`else' (both the expression after the `then', and the expression after the `else'), to have the same type
21:47:56 <ski> you can't have one of them giving back a number, and the other three numbers
21:48:11 <b7471> https://pastebin.com/PnsM6Z7U
21:48:16 <ski> the caller of your function wouldn't know what to expect back
21:48:37 × chaosmasttter quits (~chaosmast@p200300c4a7107e01f87538c6eac6d35f.dip0.t-ipconnect.de) (Quit: WeeChat 2.9)
21:49:33 <b7471> hmm
21:50:07 <ski> what if the caller would try to do e.g. `1 + orderTriple (2,3,4)' .. if your code was allowed, it would add `1' to a number, in case the `else' branch was taken, but try to add a number to a triple (which doesn't work, what does that even mean ?), in case the `then' branch was taken
21:50:26 × keviv quits (~keviv@35.142.17.117) (Read error: Connection reset by peer)
21:50:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:50:53 oxfn joins (~dizzy_g@188.162.176.72)
21:51:01 <ski> could you repeat your type signature for `orederTriple', btw ?
21:51:05 bruce_wayne joins (~prateekpr@94.129.87.184)
21:52:01 hackage ipfs 1.1.5.1 - Access IPFS locally and remotely https://hackage.haskell.org/package/ipfs-1.1.5.1 (expede)
21:52:22 <b7471> haskell is not like these other languages
21:52:38 <b7471> maybe i not understanding it anyway
21:52:42 <b7471> its getting late
21:52:58 <b7471> and so i wish you guys a good night
21:53:06 <ski> it's a different programming paradigm
21:53:21 <ski> it always takes more time to learn a new paradigm, than to learn yet another language in one you already know
21:53:25 × knupfer quits (~Thunderbi@i59F7FFCD.versanet.de) (Ping timeout: 240 seconds)
21:53:27 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
21:53:34 <ski> learning a new one is a bit like learning to program from scratch all over
21:53:34 <shapr> b7471: it's worth learning!
21:53:47 <ski> good night, b7471. happy Haskell learning !
21:53:51 <b7471> well we shall see
21:53:56 <b7471> thanks guy
21:54:02 <b7471> goodbye
21:54:11 <b7471> thanks guys*
21:54:27 × b7471 quits (~kvirc@139.30.76.203) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/)
21:55:07 × maroloccio quits (~marolocci@2a02:8084:221:ce00:164f:8aff:fed8:411d) (Quit: WeeChat 2.3)
21:55:34 hidedagger joins (~nate@unaffiliated/hidedagger)
21:57:19 × hidedagger quits (~nate@unaffiliated/hidedagger) (Client Quit)
21:57:23 × justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds)
21:58:01 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
21:58:41 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Client Quit)
21:59:34 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
21:59:57 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:01:19 Rudd0 joins (~Rudd0@185.189.115.98)
22:01:57 kasper1 parts (~u0_a549@cpc153669-craw9-2-0-cust163.16-3.cable.virginm.net) ("WeeChat 3.0")
22:02:02 × gproto23 quits (~gproto23@unaffiliated/gproto23) (Ping timeout: 256 seconds)
22:04:48 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds)
22:06:49 × oxfn quits (~dizzy_g@188.162.176.72) (Ping timeout: 264 seconds)
22:06:52 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
22:07:50 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
22:08:29 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds)
22:09:37 × hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 246 seconds)
22:10:42 <incertia> is it possible to derive/write instances for type families?
22:11:22 <incertia> i have data Test = A | B and type family F (t :: Test) where F 'A = Int, F 'B = Double
22:11:46 <incertia> is it possible to get Eq (F t) and/or Show (F t)?
22:12:05 <hpc> data Test = A | B deriving (Eq, ...)
22:12:30 <hpc> oh wait, misread
22:12:56 Franciman joins (~francesco@host-82-54-193-143.retail.telecomitalia.it)
22:13:09 <hpc> F acts more like a type alias than a data type
22:13:22 <hpc> so you should already have Eq (F t), for a specific value of t
22:13:56 <incertia> right but when i stick it in a data type and try to derive ghc complains
22:14:11 × Franciman quits (~francesco@host-82-54-193-143.retail.telecomitalia.it) (Client Quit)
22:14:22 <incertia> data MyData t = MyData { yolo :: F t } deriving (Show, Eq)
22:14:47 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
22:14:59 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
22:17:02 <hpc> i think it can't figure out those are the only instances of F
22:18:46 <hpc> a brute-force way past this could be GADTs
22:19:20 <hpc> data MyData t where MyA :: F 'A -> MyData 'A; MyB :: etc etc
22:19:31 <hpc> deriving (Show, Eq)
22:19:59 <incertia> yeah problem here is there are more records in the actual case
22:20:04 <incertia> which need lenses
22:20:10 <ski> % data F a = F a a
22:20:10 <yahb> ski:
22:20:14 <ski> % data MyData t = Show (F t) => MyData { yolo :: F t }
22:20:14 <yahb> ski:
22:20:23 <ski> % deriving instance Show (MyData t)
22:20:23 <yahb> ski:
22:20:42 <hpc> oh right, that's a thing
22:20:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:21:08 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
22:22:47 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:23:08 Feuermagier joins (~Feuermagi@213.178.26.41)
22:23:16 <incertia> oh cool
22:25:25 × Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (Remote host closed the connection)
22:28:32 × Ariakenom quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving)
22:29:45 Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com)
22:32:01 × honigkuchen quits (~honigkuch@ip5b42981b.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
22:34:36 Lycurgus joins (~niemand@98.4.114.74)
22:39:14 <incertia> ok new problem is writing FromJSON
22:40:21 <incertia> to expand a bit we have some JSON from some web service and it includes some similar structure all over the place but the actual data is different
22:41:01 <incertia> namely you have this object "difficulties": {"easy": ..., "normal": ..., ...} and the values are different depending on context
22:41:15 <dminuoso> Is there some library that lets be dump a Forest/Tree from containers straight into a dot file, or some other handy visualization?
22:41:18 <koz_> incertia: Are they of (possibly) different types?
22:41:28 <dminuoso> My graph is just so wide that drawForest/drawTree dont help much
22:41:37 <incertia> one area tells you if the level is present or not and another tells you the actual level stats
22:41:43 CMCDragonkai1 joins (~Thunderbi@120.18.34.2)
22:41:59 <incertia> the types are the same within each grouping
22:42:12 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
22:42:26 <koz_> incertia: So what you're saying is that "easy": might be a JSON string sometimes, and a JSON object sometimes, etc?
22:42:28 shatriff joins (~vitaliish@176.52.219.10)
22:42:35 <koz_> Or is "easy" _always_ a JSON string, but might look different?
22:42:50 <koz_> (well, the thing associated with "easy"...)
22:42:56 <koz_> (gah natural language and my own laziness)
22:42:58 <incertia> it might be Bool
22:43:00 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
22:43:01 <incertia> it might be Object
22:43:14 <koz_> Easy hack: parse it the 'targets' into Value.
22:43:17 shatriff joins (~vitaliish@176.52.219.10)
22:43:20 <koz_> Then take them apart however you want.
22:43:27 <incertia> but you are guaranteed it's either all Bools or all Objects
22:43:45 <incertia> and i have a FromJSON for the object
22:43:49 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
22:43:55 <incertia> LevelData
22:44:06 shatriff joins (~vitaliish@176.52.219.10)
22:44:06 <koz_> What does LevelData look like?
22:44:27 <incertia> a bunch of records
22:44:32 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
22:44:34 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
22:44:35 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
22:44:39 <koz_> Is it a sum type?
22:44:43 <koz_> Or just a big record/product?
22:44:48 <incertia> data LevelData = LevelData { levelDuration :: Double, levelWhatever :: Integer, ... }
22:44:50 shatriff joins (~vitaliish@176.52.219.10)
22:44:52 <koz_> Ah, I see.
22:44:56 <incertia> so ez FromJSON here
22:44:58 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
22:45:10 <koz_> So it's 'difficulties' that causes issues?
22:45:21 <koz_> How do you represent (the equivalent info) in LevelData, or is this undecided?
22:45:23 × shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection)
22:45:43 <tdammers> so... data DifficultyData = DifficultyLevel LevelData | DifficultyBool Bool -- ?
22:45:59 <incertia> so now there is data LevelInfo t = LevelInfo { _infoEasy :: ObjectType t, _infoNormal :: ObjectType t }
22:46:02 <incertia> etc
22:46:02 <koz_> You could do a big sum like that, I guess.
22:46:10 <incertia> i want to represent this via type families
22:46:15 <incertia> because why not
22:46:41 <koz_> Yeah, you're going to have a fun time.
22:46:50 <koz_> Is the set of possible ts closed?
22:46:53 × Ariakenom_ quits (~Ariakenom@h-98-128-229-104.NA.cust.bahnhof.se) (Quit: Leaving)
22:46:56 <incertia> yes
22:47:03 <koz_> Then I would advise a different route.
22:47:34 <koz_> Write a separate `FromJSON` for LevelInfo t for each t you care about.
22:47:52 <incertia> i can do that?
22:47:53 <koz_> If you see common behaviours, abstract out into a function.
22:47:56 <koz_> Why not?
22:48:02 <koz_> 'instance FromJSON (LevelInfo Bool) where...`
22:48:04 <koz_> Then
22:48:12 <koz_> 'instance FromJSON (LevelInfo Text) where...'
22:48:13 <koz_> etc.
22:48:17 <koz_> If the set of types is closed, why not?
22:48:35 <incertia> holy shit you're right
22:48:46 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
22:48:48 <koz_> Zero tyfams needed.
22:48:59 <incertia> maybe something changed between what i was trying to do with Show/Eq and now
22:49:06 <incertia> probably ExistentialQuantification?
22:49:08 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
22:49:15 koz_ shrugs because he dunnos.
22:49:28 × LKoen quits (~LKoen@169.244.88.92.rev.sfr.net) (Remote host closed the connection)
22:49:55 <incertia> now i just have duplicated code lol
22:50:05 <koz_> Then refactor out common behaviour using a function.
22:50:17 <koz_> You are in a function language, HOFs exist, use them.
22:50:17 <incertia> but that's parseJSON
22:50:25 × CMCDragonkai1 quits (~Thunderbi@120.18.34.2) (Ping timeout: 240 seconds)
22:50:27 <koz_> Well, it's not 100% duplicated right?
22:50:33 <koz_> There has to be some variance.
22:50:45 <koz_> s/function/functional/ argh
22:51:37 <incertia> https://gist.github.com/incertia/3df23f63d1e4b17bfd5eaa6c16953fc0
22:52:10 <incertia> the issue is essentially collapsing both into instance FromJSON (LevelInfo t) causes ghc to complain
22:52:13 <koz_> In that case, 'instance (FromJSON a) => FromJSON (LevelInfo a) where...'.
22:52:32 <koz_> Since you're basically going 'parse it however, YOLO'.
22:52:38 Stanley00 joins (~stanley00@unaffiliated/stanley00)
22:53:01 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Ping timeout: 264 seconds)
22:53:23 <dminuoso> incertia: Unrelatedly, you might be interested in RecordWildCards for parseJSON, otherwise you risk subtle line shift bugs, especially if you extend the data types.
22:53:42 <koz_> Yeah, this is one time where RecordWildCards is actually useful.
22:54:16 <incertia> instance FromJSON (DiffType t) => FromJSON (LevelInfo t) suggests UndecidableInstances
22:54:20 <incertia> which is highly dubious
22:54:30 <koz_> It's not really.
22:54:38 × santa_1 quits (~santa_@217.146.82.202) (Remote host closed the connection)
22:54:53 <incertia> it doesn't seem so here but it would be nice to not have to turn this on
22:54:54 <koz_> The name is scary, but the reality is that the Paterson conditions are _very_ restrictive.
22:54:56 LKoen joins (~LKoen@169.244.88.92.rev.sfr.net)
22:55:01 <koz_> Your instance is terminating, so what's the problem?
22:55:08 <dminuoso> incertia: It requires UndecidableInstances because GHC is overly conservative. The worst that can happen if you toggle it on, that GHC might get stuck type checking
22:55:10 <dminuoso> That's all.
22:55:16 <koz_> Like, _very very_.
22:55:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
22:55:32 <koz_> Edward proposed a different algorithm to the Paterson conditions, but that didn't go anywhere, sadly.
22:56:52 <dminuoso> koz_: Do you have a reference for that?
22:57:02 <incertia> guess it makes sense to get rid of the ExistentialQuantification and just use UndecidableInstances then
22:57:13 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 246 seconds)
22:58:38 <koz_> dminuoso: https://github.com/ghc-proposals/ghc-proposals/pull/114
22:59:03 <koz_> (as an extension obv, because you know, Haskell2010 etc etc)
23:03:15 × Amras quits (~Amras@unaffiliated/amras) (Ping timeout: 272 seconds)
23:05:36 <hekkaidekapus> dminuoso: Is `Data.Tree` a hard or lax requirement?
23:05:36 × coot quits (~coot@37.30.48.178.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
23:10:25 × bruce_wayne quits (~prateekpr@94.129.87.184) (Ping timeout: 240 seconds)
23:10:59 frdg joins (~nick@pool-71-184-143-249.bstnma.fios.verizon.net)
23:11:17 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
23:11:18 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
23:11:41 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
23:11:43 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:12:25 <dminuoso> hekkaidekapus: Mmm, well my data is in Tree currently. What do you have in mind?
23:12:54 <hekkaidekapus> Suggesting an fgl export.
23:13:56 <hekkaidekapus> fgl is an almost zero-cost intermediate step because you already have all its deps.
23:14:12 <hekkaidekapus> Then have fun with graphviz.
23:14:39 honigkuchen joins (~honigkuch@ip5b42981b.dynamic.kabel-deutschland.de)
23:15:21 esandeen joins (~esandeen@84.39.117.57)
23:16:13 × invaser quits (~Thunderbi@31.148.23.125) (Quit: invaser)
23:16:23 ryantrinkle joins (~ryan@cpe-68-173-35-198.nyc.res.rr.com)
23:16:34 invaser joins (~Thunderbi@31.148.23.125)
23:16:50 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 256 seconds)
23:17:00 hackage phonetic-languages-common 0.1.2.0 - A generalization of the uniqueness-periods-vector-common package. https://hackage.haskell.org/package/phonetic-languages-common-0.1.2.0 (OleksandrZhabenko)
23:17:38 <dminuoso> Mmm, fgl always intimidated me, but Ill give it a try
23:19:01 <hekkaidekapus> You will touch its easiest parts: just building a graph, for instance going for `Data.Graph.Inductive.Graph`. Once you have the graph,
23:19:17 <hekkaidekapus> all is left is letting the other library do its part.
23:19:57 <hekkaidekapus> There you can also deal with just dumping a .dot, no need to draw cute diagrams at first.
23:20:00 <ryantrinkle> is there a way to get a type signature like `forall (a :: (k1, k2)). a` to unify with `'(t1, t2)`?
23:20:12 <ryantrinkle> i get Couldn't match type ‘a1’ with ‘'(aOut0, bOut0)’
23:21:05 <shapr> dminuoso: algebraic graphs?
23:21:24 <shapr> that's what weeder is using
23:21:27 <shapr> well, weeder 2.0
23:21:34 <hekkaidekapus> Does `alga` have a GraphViz interface?
23:21:42 <shapr> oh, don't know
23:21:50 <shapr> good point
23:22:25 <hekkaidekapus> Yeah, were not it for .dot files, I’d have gone with alga too.
23:23:57 <dminuoso> hekkaidekapus: Ah alright. I found some chunk of code I can just copy and paste from stackoverflow
23:24:16 <hekkaidekapus> Cheers!
23:24:25 <dminuoso> https://stackoverflow.com/questions/13355968/elegant-way-to-convert-a-tree-to-a-functional-graph-library-tree
23:24:47 × jneira quits (02896ac0@gateway/web/cgi-irc/kiwiirc.com/ip.2.137.106.192) (Quit: Ping timeout (120 seconds))
23:25:10 × jess quits (jess@freenode/staff/jess) (Quit: Leaving)
23:25:58 × aidecoe quits (~aidecoe@unaffiliated/aidecoe) (Ping timeout: 256 seconds)
23:26:01 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
23:26:39 aidecoe joins (~aidecoe@unaffiliated/aidecoe)
23:27:36 × invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 240 seconds)
23:27:53 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
23:28:06 Anthaas joins (~Anthaas@unaffiliated/anthaas)
23:28:09 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection)
23:30:06 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:33:19 hekkaidekapus notices that I kept in mind `alga` which is the repository’s name on GitHub. On Hackage, that’s another library; there I have to remember `algebraic-graphs`. ;)
23:33:21 <sm[m]> awkward
23:34:23 <hekkaidekapus> heh Now, that’s a timing, sm[m] :d
23:35:01 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 264 seconds)
23:35:35 justanotheruser joins (~justanoth@unaffiliated/justanotheruser)
23:35:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
23:35:50 <sm[m]> I just got rid of fgl since sp was giving a silly result. Probably I was holding it wrong but still, I didn't find fgl too friendly
23:36:21 × LKoen quits (~LKoen@169.244.88.92.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.”)
23:36:37 <hekkaidekapus> What’s sp?
23:36:39 <ryantrinkle> doing the same thing with closed type families Fst and Snd (defined the obvious way) works
23:36:48 <sm[m]> shortest path
23:37:32 <hekkaidekapus> Ah. fgl has a 2 decades old baggage.
23:37:55 <sm[m]> with an edge directly from 0 to 2 it was saying the shortest path was 0,1,2
23:38:43 × alp quits (~alp@2a01:e0a:58b:4920:fc4d:b6b4:4592:5e81) (Ping timeout: 272 seconds)
23:38:56 <hekkaidekapus> Weird. How was the graph built?
23:39:54 <sm[m]> uh, by me with mkGraph IIRC ? And I thought it was working fine for a few months. Sorry don't have code in front of me
23:40:25 <hekkaidekapus> <https://github.com/haskell/fgl/issues/67>
23:41:30 <sm[m]> I looked for issues and apparently more than one edge between nodes will confuse it (but it won't warn you) and maybe also it doesn't do directed edges.. not sure
23:42:41 <hekkaidekapus> The internal representation assumes single edges for all nodes. The fix is to brek old code and that’s not yet done.
23:43:01 pavonia joins (~user@unaffiliated/siracusa)
23:43:13 <sm[m]> yes that's the one. Let's assume that was my problem. I realized it was easier to write an sp tailored to my needs
23:43:21 <sm[m]> hekkaidekapus: do you work on fgl ?
23:44:02 <hekkaidekapus> Nope; had just noticed that a few months ago. Check out algebraic-graphs for the latest shiny (and sound) library for graphs.
23:44:10 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
23:44:55 <sm[m]> I feel like maybe it didn't have a shortest-path when I looked, but I might be wrong
23:45:11 boxscape joins (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55)
23:45:18 dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com)
23:45:18 × dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
23:45:18 dibblego joins (~dibblego@haskell/developer/dibblego)
23:45:55 hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
23:46:06 hekkaidekapus_ hmm… Sound is a bit exaggerated. fgl is also sounds; the code is just too clunky; type synonyms everywhere…
23:46:13 <koz_> algebraic-graphs is pretty nice.
23:47:43 <shapr> I could never get into fgl, I really tried
23:48:03 × hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds)
23:50:28 × mawk quits (mawk@serveur.io) (Quit: ZNC - https://znc.in)
23:51:49 <hekkaidekapus_> sm[m]: <https://hackage.haskell.org/package/algebraic-graphs-0.5/docs/Algebra-Graph-Label.html#t:ShortestPath>
23:54:00 hackage phonetic-languages-properties 0.3.0.1 - A generalization of the uniqueness-periods-vector-properties package. https://hackage.haskell.org/package/phonetic-languages-properties-0.3.0.1 (OleksandrZhabenko)
23:56:35 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
23:57:30 hackage phonetic-languages-general 0.3.0.1 - A generalization of the uniqueness-periods-vector-general functionality. https://hackage.haskell.org/package/phonetic-languages-general-0.3.0.1 (OleksandrZhabenko)

All times are in UTC on 2020-11-26.