2022/06/27

2022-06-27 00:00:12 +0200 <monochrom> Oh haha I forgot that :type has +d
2022-06-27 00:00:41 +0200ashln(~ashln@98.38.236.123) (Ping timeout: 256 seconds)
2022-06-27 00:01:18 +0200 <monochrom> Yeah I can stand behind "read and memorize the help messages and the user guide. the exam is tomorrow"
2022-06-27 00:01:33 +0200 <pavonia> What does +d do?
2022-06-27 00:01:33 +0200 <EvanR> the integers start at 1 today
2022-06-27 00:01:37 +0200 <kenaryn> I added `n = (/) 1 2` and `m = 1` in a file, loaded it and asked for the type with `:t n` and `:t m` but it still returns `Fractional` and `Num` respectively, instead of `Double` and `Integer`.
2022-06-27 00:01:39 +0200 <dolio> +d does defaulting.
2022-06-27 00:01:41 +0200 <EvanR> 1, 0, 2, 3, ...
2022-06-27 00:01:56 +0200 <monochrom> People don't read manuals often enough.
2022-06-27 00:02:06 +0200 <pavonia> @type +d 0.123
2022-06-27 00:02:07 +0200 <lambdabot> Double
2022-06-27 00:02:35 +0200_xor(~xor@74.215.182.83)
2022-06-27 00:02:58 +0200 <kenaryn> @type +d 1 % 3
2022-06-27 00:02:59 +0200 <EvanR> kenaryn, after you figure out how to make it show the defaulted type (+d above), you should take away that your unannotated numerals really do have that generalized Fractional type
2022-06-27 00:03:00 +0200 <lambdabot> Ratio Integer
2022-06-27 00:03:09 +0200 <dolio> I'm surprised lambdabot supports it, to be honest.
2022-06-27 00:03:20 +0200 <monochrom> me too
2022-06-27 00:03:22 +0200 <EvanR> :t (%)
2022-06-27 00:03:23 +0200 <lambdabot> Integral a => a -> a -> Ratio a
2022-06-27 00:03:33 +0200 <monochrom> Where is yahb?
2022-06-27 00:06:47 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 00:06:58 +0200 <geekosaur> it's yahb2 now
2022-06-27 00:07:05 +0200 <geekosaur> mniip and their bot disappeared
2022-06-27 00:07:36 +0200 <EvanR> yayahb
2022-06-27 00:07:39 +0200 <monochrom> But I can't find yahb2 either.
2022-06-27 00:07:39 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 00:08:05 +0200stackdroid18(14094@user/stackdroid) (Quit: hasta la vista... tchau!)
2022-06-27 00:09:08 +0200 <geekosaur> mm, where'd it go. tomsmeding?
2022-06-27 00:09:28 +0200 <geekosaur> [24 20:46:00] * yahb2 has quit (*.net *.split)
2022-06-27 00:10:01 +0200 <geekosaur> took the weekend off I guess
2022-06-27 00:10:08 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-27 00:10:34 +0200 <monochrom> 10 years from now we will lose everything and have to start over when tomsmeding finishes his PhD and gets a real job. :)
2022-06-27 00:12:46 +0200nate4(~nate@98.45.169.16) (Ping timeout: 272 seconds)
2022-06-27 00:14:47 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-27 00:14:59 +0200 <ski> @where PLFA
2022-06-27 00:14:59 +0200 <lambdabot> "Programming Language Foundations in Agda" (formal methods book) by Wen Kokke,Philip Wadler in 2018-(01-06) at <https://homepages.inf.ed.ac.uk/wadler/topics/agda.html>,<https://plfa.github.io/>
2022-06-27 00:17:29 +0200machinedgod(~machinedg@66.244.246.252) (Ping timeout: 248 seconds)
2022-06-27 00:18:15 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 256 seconds)
2022-06-27 00:19:36 +0200machinedgod(~machinedg@66.244.246.252)
2022-06-27 00:21:10 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds)
2022-06-27 00:22:02 +0200nate4(~nate@98.45.169.16)
2022-06-27 00:27:04 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-27 00:30:11 +0200nate4(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-27 00:34:22 +0200 <kenaryn> F* is a formal proof programming language from Microsoft/INRIA venture that tries to compete with Adga. It has of course less traction than Agda but it's more a language than an proof-assistant; it could be the real deal once it superseeds Coq.
2022-06-27 00:35:34 +0200michalz(~michalz@185.246.204.125) (Remote host closed the connection)
2022-06-27 00:36:12 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds)
2022-06-27 00:36:34 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 00:37:20 +0200ski. o O ( <https://fstar-lang.org>,<https://fstar-lang.org/tutorial/> )
2022-06-27 00:40:08 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2022-06-27 00:41:24 +0200kenaryn(~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving)
2022-06-27 00:41:44 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds)
2022-06-27 00:42:01 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 248 seconds)
2022-06-27 00:44:03 +0200xkuru(~xkuru@user/xkuru) (Read error: Connection reset by peer)
2022-06-27 00:49:21 +0200Tuplanolla(~Tuplanoll@91-159-69-97.elisa-laajakaista.fi) (Quit: Leaving.)
2022-06-27 00:49:26 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-06-27 00:49:32 +0200{-d0t-}(~q_q@user/-d0t-/x-7915216) (Ping timeout: 268 seconds)
2022-06-27 01:03:07 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 01:03:12 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Client Quit)
2022-06-27 01:05:17 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 01:15:57 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 01:22:04 +0200zeenk(~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) (Quit: Konversation terminated!)
2022-06-27 01:24:30 +0200shiraeeshi(~shiraeesh@109.166.58.140) (Ping timeout: 240 seconds)
2022-06-27 01:25:29 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds)
2022-06-27 01:26:20 +0200Lord_of_Life(~Lord@user/lord-of-life/x-2819915)
2022-06-27 01:32:08 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-06-27 01:32:08 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-06-27 01:32:08 +0200wroathe(~wroathe@user/wroathe)
2022-06-27 01:35:52 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-06-27 01:35:59 +0200jinsun__(~jinsun@user/jinsun)
2022-06-27 01:35:59 +0200jinsun__jinsun
2022-06-27 01:37:42 +0200Guest|92(~Guest|92@35.24.208.138)
2022-06-27 01:50:14 +0200shiraeeshi(~shiraeesh@109.166.58.140)
2022-06-27 01:50:35 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2022-06-27 01:50:58 +0200 <Axman6> o/
2022-06-27 01:57:10 +0200 <geekosaur[m]> o/
2022-06-27 01:57:30 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Ping timeout: 240 seconds)
2022-06-27 01:59:49 +0200pleo(~pleo@user/pleo) (Quit: quit)
2022-06-27 02:01:31 +0200 <EvanR> o/
2022-06-27 02:02:13 +0200 <hololeap> o\
2022-06-27 02:02:29 +0200shiraeeshi(~shiraeesh@109.166.58.140) (Ping timeout: 255 seconds)
2022-06-27 02:02:33 +0200 <hololeap> dammit
2022-06-27 02:03:23 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 02:05:44 +0200 <EvanR> you just confounded the nazis congrats
2022-06-27 02:05:46 +0200geekosaur(~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
2022-06-27 02:05:46 +0200allbery_b(~geekosaur@xmonad/geekosaur)
2022-06-27 02:05:49 +0200allbery_bgeekosaur
2022-06-27 02:08:11 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-06-27 02:16:53 +0200 <Axman6> \/o\
2022-06-27 02:17:24 +0200 <Axman6> damn, meant to be /o\ but forgot about /msg
2022-06-27 02:22:11 +0200sudden(~cat@user/sudden) (Ping timeout: 246 seconds)
2022-06-27 02:23:03 +0200sudden(~cat@user/sudden)
2022-06-27 02:23:18 +0200 <Axman6> \o/
2022-06-27 02:24:59 +0200Guest|92(~Guest|92@35.24.208.138) (Ping timeout: 255 seconds)
2022-06-27 02:33:12 +0200benin01(~benin@2401:4900:2324:7abf:724c:ce62:d5cf:9ec8)
2022-06-27 02:35:36 +0200benin0(~benin@183.82.24.201) (Ping timeout: 268 seconds)
2022-06-27 02:35:36 +0200benin01benin0
2022-06-27 02:39:29 +0200benin03(~benin@183.82.179.110)
2022-06-27 02:41:29 +0200benin0(~benin@2401:4900:2324:7abf:724c:ce62:d5cf:9ec8) (Ping timeout: 248 seconds)
2022-06-27 02:41:29 +0200benin03benin0
2022-06-27 02:44:06 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net)
2022-06-27 02:45:45 +0200Guest|92(~Guest|92@35.24.208.138)
2022-06-27 02:46:35 +0200alp(~alp@user/alp) (Ping timeout: 255 seconds)
2022-06-27 02:49:31 +0200lainon(~lainon@c-68-46-201-40.hsd1.al.comcast.net) (Quit: Textual IRC Client: www.textualapp.com)
2022-06-27 02:49:53 +0200lainon(~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d)
2022-06-27 02:51:03 +0200lainon(~lainon@2601:7c0:c500:4d20:2ca2:483a:8f15:302d) (Client Quit)
2022-06-27 02:57:11 +0200machinedgod(~machinedg@66.244.246.252) (Ping timeout: 246 seconds)
2022-06-27 02:57:42 +0200cyanide3dinner(~cyanide4d@106.201.249.151)
2022-06-27 03:01:10 +0200glguy(x@libera/staff/glguy) (Ping timeout: 600 seconds)
2022-06-27 03:02:32 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 03:09:13 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds)
2022-06-27 03:09:20 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf)
2022-06-27 03:10:06 +0200Guest|92(~Guest|92@35.24.208.138) (Ping timeout: 272 seconds)
2022-06-27 03:10:45 +0200xff0x(~xff0x@2405:6580:b080:900:a1f7:c498:d5bb:4b94) (Ping timeout: 268 seconds)
2022-06-27 03:11:05 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-27 03:13:32 +0200nate4(~nate@98.45.169.16)
2022-06-27 03:17:12 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-27 03:22:44 +0200nate4(~nate@98.45.169.16) (Ping timeout: 246 seconds)
2022-06-27 03:29:15 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net)
2022-06-27 03:32:03 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-06-27 03:33:33 +0200cyanide3dinner(~cyanide4d@106.201.249.151) (Remote host closed the connection)
2022-06-27 03:33:51 +0200 <maralorn> Soo, what’s exactly the reason that there is no FromJSON instance for bytestring?
2022-06-27 03:34:04 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-06-27 03:34:14 +0200jmcarthur(~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2022-06-27 03:34:47 +0200 <Axman6> which one should it be?
2022-06-27 03:34:56 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-27 03:35:34 +0200 <Axman6> encodeUtf8 <$> fromJSON t? fromBase64 =<< fromJSON t?
2022-06-27 03:36:30 +0200 <Axman6> what's the canonical way to store arbitrary bytes in JSON?
2022-06-27 03:43:23 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.5)
2022-06-27 03:44:24 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 03:45:30 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 03:47:02 +0200 <monochrom> I have the same thought but apparently a lot of people eagerly desire a pass-through bytestring instance for FromJSON and ToJSON.
2022-06-27 03:47:46 +0200 <monochrom> It seems that the lessons of SQL injection didn't stick.
2022-06-27 03:50:11 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds)
2022-06-27 03:54:40 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp)
2022-06-27 03:58:29 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de)
2022-06-27 04:00:46 +0200 <maralorn> k, makes sense.
2022-06-27 04:02:01 +0200 <maralorn> desire is a bit strong. What I have is a monomorphic parser which takes ByteStrings and sadly I need to apply that parser to a string in the JSON.
2022-06-27 04:02:33 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 04:02:38 +0200 <maralorn> Was wondering if I can save myself one copy, but apparently I can‘t.
2022-06-27 04:03:01 +0200 <jackdk> maralorn: more detail about this "monomorphic parser"?
2022-06-27 04:03:50 +0200 <maralorn> jackdk: I have an attoparsec parser which takes ByteString. I could rewrite it to use Text, but I need it mostly for ByteString and sometimes for Text.
2022-06-27 04:04:00 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-27 04:04:12 +0200 <maralorn> Is there a Trick to write an attoparsec Parser polymorphic?
2022-06-27 04:04:43 +0200 <jackdk> I don't know attoparsec well enough to say, and I haven't seen any banner ads to that effect
2022-06-27 04:04:47 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-06-27 04:07:10 +0200 <Axman6> https://hackage.haskell.org/package/attoparsec-0.14.4/docs/Data-Attoparsec-Internal-Types.html#t:P… is polymorphic ove the underlying type, and Data.Attoparsec and Data.Attoparsec.Text both use the same definition
2022-06-27 04:07:32 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-06-27 04:07:44 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 272 seconds)
2022-06-27 04:09:24 +0200 <Axman6> whether that means you can actually write a generic parser I'm not sure, you probably can't
2022-06-27 04:24:03 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de)
2022-06-27 04:24:26 +0200lemonsnicks(~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
2022-06-27 04:26:29 +0200 <EvanR> it's funny I guess json is intended to be transferred as unicode text and not bytes
2022-06-27 04:26:39 +0200 <EvanR> enjoy
2022-06-27 04:27:57 +0200 <EvanR> when will the matrix future happen and the native channel is just unicode text
2022-06-27 04:29:41 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex)
2022-06-27 04:30:12 +0200pseigo(~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net)
2022-06-27 04:30:17 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 248 seconds)
2022-06-27 04:31:09 +0200nate4(~nate@98.45.169.16)
2022-06-27 04:34:20 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-27 04:36:35 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
2022-06-27 04:36:37 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-27 04:38:55 +0200funsafe(~funsafe@76.105.238.154) (Quit: funsafe)
2022-06-27 04:42:17 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
2022-06-27 04:42:36 +0200yax__(~yax__@user/yax/x-9576643)
2022-06-27 04:42:57 +0200 <yax__> hihi what exactly does fix do?
2022-06-27 04:43:32 +0200 <ski> it fixes your program
2022-06-27 04:43:32 +0200terrorjack(~terrorjac@2a01:4f8:1c1e:509a::1)
2022-06-27 04:43:38 +0200 <ski> > fix error
2022-06-27 04:43:40 +0200 <lambdabot> "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex...
2022-06-27 04:43:46 +0200 <ski> > fix show
2022-06-27 04:43:47 +0200 <lambdabot> "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\...
2022-06-27 04:43:59 +0200 <yax__> fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5
2022-06-27 04:44:07 +0200 <yax__> this is the hackage example
2022-06-27 04:44:21 +0200 <yax__> > fix (\rec n -> if n <= 1 then 1 else n * rec (n-1)) 5
2022-06-27 04:44:22 +0200 <lambdabot> 120
2022-06-27 04:44:25 +0200 <yax__> huh
2022-06-27 04:44:28 +0200 <yax__> works
2022-06-27 04:45:06 +0200td_(~td@94.134.91.9) (Ping timeout: 268 seconds)
2022-06-27 04:45:06 +0200frost(~frost@user/frost)
2022-06-27 04:45:12 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-06-27 04:45:15 +0200 <ski> > fix (\fibs -> 0 : 1 : [m + n | m <- fibs | n <- tail fibs])
2022-06-27 04:45:17 +0200 <lambdabot> [0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,...
2022-06-27 04:45:46 +0200 <yax__> the implementation is rather confusing too
2022-06-27 04:45:47 +0200 <yax__> fix f = let x = f x in x
2022-06-27 04:45:49 +0200 <ski> `fix f' applies `f' to the result of that application, and gives you nack the result
2022-06-27 04:45:52 +0200 <ski> fix f = x
2022-06-27 04:45:54 +0200 <ski> where
2022-06-27 04:45:56 +0200 <ski> x = f x
2022-06-27 04:46:00 +0200 <ski> is how i'd write it
2022-06-27 04:46:21 +0200 <ski> the result of calling `f', namely `x', is passed as input to that call to `f'
2022-06-27 04:46:34 +0200td_(~td@muedsl-82-207-238-059.citykom.de)
2022-06-27 04:46:41 +0200 <yax__> yeah i mean i get that it gives you the value where f x == x
2022-06-27 04:46:46 +0200 <ski> so, `fix (1 :)' becomes `let x = 1 : x in x'
2022-06-27 04:47:13 +0200 <yax__> whaa
2022-06-27 04:47:21 +0200 <yax__> > fix (1 :)
2022-06-27 04:47:23 +0200 <lambdabot> [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
2022-06-27 04:47:26 +0200 <ski> and `fix (\rec n -> ..rec..n..)' becomes `let x = \n -> ..x..n.. in x'
2022-06-27 04:47:39 +0200 <yax__> i see
2022-06-27 04:48:16 +0200 <yax__> i like how the most mundane of functions have the most profound implications
2022-06-27 04:48:31 +0200 <ski> `fix' encapsulates (general) recursion
2022-06-27 04:48:37 +0200 <ski> @type fix
2022-06-27 04:48:39 +0200 <lambdabot> (a -> a) -> a
2022-06-27 04:49:19 +0200 <ski> logically speaking, its type expresses a paradox, "circular reasoning". assuming that from `a' follows `a', you can conclude that `a' is the cqase
2022-06-27 04:49:51 +0200 <ski> (practically, this manifests as `fix' can introduce non-termination. e.g. `fix id')
2022-06-27 04:50:32 +0200 <yax__> isn't (a -> a) -> a always true?
2022-06-27 04:50:57 +0200 <ski> anyway .. practical use of `fix' is mostly as a shorthand for tying cycles, when you'd prefer to avoid doing an explicit recursive binding
2022-06-27 04:51:37 +0200 <ski> nope. take `a' to be `False'. then `False -> False' is `True', so `(False -> False) -> False' is `True -> False', which is `False'
2022-06-27 04:51:46 +0200 <ski> @djinn (a -> a) -> a
2022-06-27 04:51:46 +0200 <lambdabot> -- f cannot be realized.
2022-06-27 04:52:45 +0200 <ski> @let ant --> succ = not ant || succ
2022-06-27 04:52:47 +0200 <lambdabot> Defined.
2022-06-27 04:52:50 +0200 <yax__> ski: hm makes sense
2022-06-27 04:52:55 +0200 <ski> > (False --> False) --> False
2022-06-27 04:52:57 +0200 <lambdabot> False
2022-06-27 04:53:46 +0200 <ski> @djinn (Either a b -> c) -> (a -> c,b -> c)
2022-06-27 04:53:46 +0200 <lambdabot> f a = (\ b -> a (Left b), \ c -> a (Right c))
2022-06-27 04:54:13 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 04:54:36 +0200zmt00(~zmt00@user/zmt00) (Quit: Leaving)
2022-06-27 04:54:48 +0200 <ski> (that's a proof that `((a || b) --> c) --> ((a --> c) && (b --> c)' is a tautology)
2022-06-27 04:56:15 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-27 04:56:24 +0200 <yax__> yeah im familiar with curry howard correspondence
2022-06-27 04:56:37 +0200 <ski> @help djinn
2022-06-27 04:56:37 +0200 <lambdabot> djinn <type>.
2022-06-27 04:56:37 +0200 <lambdabot> Generates Haskell code from a type.
2022-06-27 04:56:37 +0200 <lambdabot> https://github.com/augustss/djinn
2022-06-27 04:57:07 +0200zmt00(~zmt00@user/zmt00)
2022-06-27 04:57:32 +0200nate4(~nate@98.45.169.16) (Ping timeout: 255 seconds)
2022-06-27 04:58:15 +0200 <justsomeguy> What's a straight-forward definition of scanr for lists, using primitive recursion?
2022-06-27 04:58:22 +0200 <ski> .. occasonally, you want to instrument a recursion in some way. one way to do that is to reexpress it using `fix', and then replace `fix' with an instrumented version
2022-06-27 04:58:47 +0200 <yax__> whats wrong with just normal recursion
2022-06-27 04:59:01 +0200 <ski> @src scanr
2022-06-27 04:59:01 +0200 <lambdabot> scanr _ q0 [] = [q0]
2022-06-27 04:59:01 +0200 <lambdabot> scanr f q0 (x:xs) = f x q : qs
2022-06-27 04:59:01 +0200 <lambdabot> where qs@(q:_) = scanr f q0 xs
2022-06-27 04:59:22 +0200 <ski> justsomeguy : ^ seems to fit the bill, no ?
2022-06-27 05:00:59 +0200 <ski> (primitive recursion allows you do pattern-match one constructor deep at each step, and to refer both to the parts individually (including the recursive "children"), as well as to the recursive call(s) applied to the recursive part(s)
2022-06-27 05:01:18 +0200 <ski> .. but not to any other kind of recursive call)
2022-06-27 05:01:26 +0200 <yax__> i see
2022-06-27 05:02:01 +0200 <justsomeguy> Yes. I'm going to try and rewrite it without the as-pattern, though.
2022-06-27 05:02:24 +0200 <ski> try returning a pair, and use `fst'
2022-06-27 05:03:20 +0200 <ski> (and then wrap the whole thing so that the final pair is turned into a cons)
2022-06-27 05:03:57 +0200 <yax__> is haskell2020 still a thing or no?
2022-06-27 05:06:52 +0200yax__(~yax__@user/yax/x-9576643) ()
2022-06-27 05:07:30 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 05:10:12 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-06-27 05:11:48 +0200 <ski> "Haskell2020 Is Dead, but All Hope Is Not Lost" by isovector in 2019-11-01 at <https://reasonablypolymorphic.com/blog/haskell202x/> might be relevant
2022-06-27 05:18:41 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 255 seconds)
2022-06-27 05:20:51 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
2022-06-27 05:23:18 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection)
2022-06-27 05:25:00 +0200pseigo(~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) (Ping timeout: 272 seconds)
2022-06-27 05:25:51 +0200Lumia(~Lumia@c-73-219-104-153.hsd1.ma.comcast.net)
2022-06-27 05:27:20 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-06-27 05:47:37 +0200bilegeek(~bilegeek@2600:1008:b026:2e89:6877:94a7:35f5:1308)
2022-06-27 05:47:38 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds)
2022-06-27 05:55:24 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 272 seconds)
2022-06-27 05:56:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-06-27 05:56:35 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-06-27 05:56:35 +0200wroathe(~wroathe@user/wroathe)
2022-06-27 05:58:57 +0200glguy(x@libera/staff/glguy)
2022-06-27 05:58:57 +0200glguy(x@libera/staff/glguy) (Excess Flood)
2022-06-27 06:01:16 +0200glguy(x@libera/staff/glguy)
2022-06-27 06:01:16 +0200glguy(x@libera/staff/glguy) (Excess Flood)
2022-06-27 06:03:30 +0200glguy(x@libera/staff/glguy)
2022-06-27 06:05:32 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net)
2022-06-27 06:13:53 +0200Lumia(~Lumia@c-73-219-104-153.hsd1.ma.comcast.net) (Quit: ,-)
2022-06-27 06:16:29 +0200daylily(~Thunderbi@180.108.98.221)
2022-06-27 06:17:08 +0200daylily(~Thunderbi@180.108.98.221) ()
2022-06-27 06:18:12 +0200rekahsoft(~rekahsoft@bras-base-wdston4533w-grc-02-142-113-160-8.dsl.bell.ca) (Ping timeout: 272 seconds)
2022-06-27 06:19:10 +0200 <albet70> there will be another compiler?
2022-06-27 06:19:18 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 06:32:56 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 255 seconds)
2022-06-27 06:34:22 +0200catern(~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407)
2022-06-27 06:45:05 +0200arjun(~arjun@user/arjun)
2022-06-27 06:45:42 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
2022-06-27 06:45:45 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 06:53:48 +0200iteratee(~kyle@162.218.222.107)
2022-06-27 06:59:57 +0200img(~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
2022-06-27 07:00:13 +0200img(~img@user/img)
2022-06-27 07:02:50 +0200phma(~phma@2001:5b0:210d:23f8:ec0e:65c8:65bb:d30) (Read error: Connection reset by peer)
2022-06-27 07:03:34 +0200phma(~phma@host-67-44-208-140.hnremote.net)
2022-06-27 07:09:17 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-27 07:11:59 +0200leib(~leib@2405:201:900a:f088:20:d9ad:dec:577d)
2022-06-27 07:13:26 +0200califax(~califax@user/califx)
2022-06-27 07:14:20 +0200titibandit(~thibaut@xdsl-78-34-167-250.nc.de)
2022-06-27 07:16:28 +0200dcoutts_(~duncan@host86-150-18-54.range86-150.btcentralplus.com)
2022-06-27 07:18:20 +0200kimjetwav(~user@2607:fea8:2340:da00:2c1:c09d:7773:d7fc)
2022-06-27 07:18:59 +0200dcoutts(~duncan@host86-150-18-54.range86-150.btcentralplus.com) (Ping timeout: 246 seconds)
2022-06-27 07:19:41 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds)
2022-06-27 07:22:37 +0200shiraeeshi(~shiraeesh@46.34.207.224)
2022-06-27 07:30:02 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-27 07:31:21 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 07:43:08 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-06-27 07:43:19 +0200Guest25(~Guest25@158.181.17.231)
2022-06-27 07:45:09 +0200Guest25(~Guest25@158.181.17.231) (Client Quit)
2022-06-27 07:46:03 +0200liz_(~liz@host86-159-158-175.range86-159.btcentralplus.com) (Quit: Lost terminal)
2022-06-27 07:46:47 +0200caef^(~caef@50.237.44.186)
2022-06-27 07:47:39 +0200vysn(~vysn@user/vysn)
2022-06-27 07:48:23 +0200toluene(~toluene@user/toulene) (Ping timeout: 246 seconds)
2022-06-27 07:49:31 +0200coot(~coot@213.134.190.95)
2022-06-27 07:50:19 +0200coot(~coot@213.134.190.95) (Client Quit)
2022-06-27 07:50:43 +0200coot(~coot@213.134.190.95)
2022-06-27 07:50:55 +0200toluene(~toluene@user/toulene)
2022-06-27 07:51:16 +0200wroathe(~wroathe@user/wroathe) (Remote host closed the connection)
2022-06-27 07:51:23 +0200coot(~coot@213.134.190.95) (Read error: Connection reset by peer)
2022-06-27 07:51:29 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-06-27 07:51:29 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-06-27 07:51:29 +0200wroathe(~wroathe@user/wroathe)
2022-06-27 07:51:32 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-06-27 07:53:19 +0200shiraeeshi(~shiraeesh@46.34.207.224) (Read error: Connection reset by peer)
2022-06-27 07:54:57 +0200foul_owl(~kerry@23.82.194.107) (Ping timeout: 244 seconds)
2022-06-27 08:01:51 +0200Sgeo(~Sgeo@user/sgeo) (Read error: Connection reset by peer)
2022-06-27 08:05:48 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-06-27 08:06:09 +0200vysn(~vysn@user/vysn)
2022-06-27 08:06:09 +0200shiraeeshi[m](~shiraeesh@2001:470:69fc:105::1:77)
2022-06-27 08:09:11 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl)
2022-06-27 08:10:17 +0200foul_owl(~kerry@23.82.194.108)
2022-06-27 08:14:10 +0200michalz(~michalz@185.246.204.101)
2022-06-27 08:18:50 +0200 <tdammers> albet70: no, that's not what that says. more like, there *should* be another compiler.
2022-06-27 08:19:10 +0200 <tdammers> I mean, there are other Haskell compilers, they're just nowhere near "industry strength"
2022-06-27 08:21:37 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 256 seconds)
2022-06-27 08:27:03 +0200marinelli[m](~marinelli@2001:470:69fc:105::2d8)
2022-06-27 08:27:08 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-06-27 08:27:56 +0200bitdex(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-06-27 08:30:39 +0200mbuf(~Shakthi@223.178.68.221)
2022-06-27 08:33:49 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com)
2022-06-27 08:33:50 +0200wroathe(~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
2022-06-27 08:33:50 +0200wroathe(~wroathe@user/wroathe)
2022-06-27 08:35:11 +0200 <albet70> that would be great
2022-06-27 08:36:04 +0200 <energizer> what is good about another compiler?
2022-06-27 08:38:12 +0200 <albet70> get rid of the old history stuff and make something new?
2022-06-27 08:38:43 +0200 <albet70> I suggest replace :: to :
2022-06-27 08:39:08 +0200titibandit(~thibaut@xdsl-78-34-167-250.nc.de) (Remote host closed the connection)
2022-06-27 08:39:29 +0200 <energizer> you're talking about a new language, not a new compiler
2022-06-27 08:40:33 +0200 <albet70> racket, guile and chez are scheme?
2022-06-27 08:40:44 +0200 <Axman6> Daml makes many of those syntactic changes to Haskell
2022-06-27 08:41:00 +0200 <Axman6> the "with syntax" for records as quite nice too
2022-06-27 08:42:21 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 08:45:45 +0200bilegeek(~bilegeek@2600:1008:b026:2e89:6877:94a7:35f5:1308) (Quit: Leaving)
2022-06-27 08:45:57 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 08:46:49 +0200 <tdammers> the article itself says that the benefit of having another industry-strength Haskell compiler would be that it would spark "friendly competition", just like clang vs. gcc did
2022-06-27 08:47:39 +0200 <tdammers> but it's been almost 3 years since Sandy wrote that, and there's still no trace of a competing compiler in sight, so my humble guess is that nobody out there considers it important enough to put their money where their mouth is and make a competing compiler
2022-06-27 08:48:18 +0200 <tdammers> we're kind of stuck in a local optimum - GHC isn't awkward enough to make people go "enough is enough" and make their own compiler with blackjack and hookers
2022-06-27 08:48:39 +0200 <tdammers> so instead everyone hacks away at gradual improvement of the status quo
2022-06-27 08:48:41 +0200vysn(~vysn@user/vysn) (Ping timeout: 268 seconds)
2022-06-27 08:52:55 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 08:54:14 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 255 seconds)
2022-06-27 08:59:41 +0200mmhat(~mmh@p200300f1c7385dd6ee086bfffe095315.dip0.t-ipconnect.de)
2022-06-27 09:00:19 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-06-27 09:00:19 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 09:02:47 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
2022-06-27 09:07:12 +0200zeenk(~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3)
2022-06-27 09:10:56 +0200gmg(~user@user/gehmehgeh)
2022-06-27 09:12:08 +0200shriekingnoise(~shrieking@201.212.175.181) (Quit: Quit)
2022-06-27 09:12:45 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a397:2c8:2227:ff66)
2022-06-27 09:15:06 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 09:17:19 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-06-27 09:18:56 +0200 <tomsmeding> monochrom: ah sorry, yeah yahb2 got netsplit and apparently my systemd unit didn't register it for auto-restart
2022-06-27 09:19:10 +0200 <tomsmeding> also maybe I should make the yahb2 code itself more robust... nah
2022-06-27 09:20:39 +0200 <davean> tomsmeding: Hahaha, did clang vs. gcc spark competition? It just seemed GCC got shot like the old lame compiler it was.
2022-06-27 09:20:45 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds)
2022-06-27 09:21:04 +0200 <tomsmeding> davean: hm? I'm missing some context?
2022-06-27 09:21:16 +0200 <davean> er, sorry, I mixed you up with tdammers
2022-06-27 09:21:22 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:c51d:2109:9c76:c05f) (Remote host closed the connection)
2022-06-27 09:21:25 +0200 <tomsmeding> ah :)
2022-06-27 09:21:54 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 09:22:40 +0200 <tdammers> davean: that's another way of putting it. but it's not like gcc was useless trash at that point - it had just accumulated a lot of historical cruft, and there was little incentive for anyone to deal with it
2022-06-27 09:22:58 +0200 <davean> tdammers: I remember before GCC 3 was out - it was bad then
2022-06-27 09:23:04 +0200 <davean> It was just the option one reasonably had
2022-06-27 09:23:13 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2)
2022-06-27 09:23:17 +0200 <davean> (And man, it was nice to secretly have icc)
2022-06-27 09:23:40 +0200 <tomsmeding> % fix error
2022-06-27 09:23:40 +0200 <yahb2> <interactive>:4:1: error: Variable not in scope: fix :: ([Char] -> a0) -> t
2022-06-27 09:23:47 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net)
2022-06-27 09:23:58 +0200cfricke(~cfricke@user/cfricke)
2022-06-27 09:24:25 +0200 <tomsmeding> % import Data.Function
2022-06-27 09:24:25 +0200 <yahb2> <no output>
2022-06-27 09:24:27 +0200 <tomsmeding> % fix error
2022-06-27 09:24:27 +0200 <yahb2> *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: *** Exception: **...
2022-06-27 09:25:32 +0200 <davean> tdammers: I guess my point is it wasn't historical cruft that made GCC bad - it was bad when it was fairly young.
2022-06-27 09:26:06 +0200 <davean> Not mentioning that DISASTEROUS not quite 3 release RH did ...
2022-06-27 09:27:24 +0200alp(~alp@user/alp)
2022-06-27 09:28:53 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 09:30:02 +0200 <Axman6> yahb2!
2022-06-27 09:30:39 +0200 <Axman6> merijn: I saw you mention in another channel that AWS's docs are terrible - I always just resorted to using Amazonka's haddocks because they were far easier to follow
2022-06-27 09:31:37 +0200 <Axman6> jackdk: Just looked at your Amazonka PR - +805,925 −806,562 is hilarious XD
2022-06-27 09:32:10 +0200 <jackdk> Axman6: the power of code generation. I added some sorting so hopefully future gens have lower churn
2022-06-27 09:32:20 +0200 <Axman6> noice
2022-06-27 09:33:02 +0200 <tomsmeding> Axman6: https://git.tomsmeding.com/yahb2
2022-06-27 09:33:20 +0200 <Axman6> you know it's a good day when you get to delete a comment starting with "NOTE: The implementations in this file are ugly"
2022-06-27 09:33:47 +0200 <jackdk> Also, while we're talking about that: I intend to merge the current regeneration of everything some time this week. There are some changes to amazonka-sts and amazonka-sso which _should_ be safe (and look good in my test deployments, so far), but it would be good to have additional eyes if you're using sts:AssumeRole, sts:AssumeRoleWithWebIdentity, or SSO to get your AWS credentials.
2022-06-27 09:33:59 +0200 <Axman6> Thank you for your service tomsmeding
2022-06-27 09:34:12 +0200 <jackdk> (the next step after that is to bump amazonka's botocore pin and see if we can generate current services against latest bindings)
2022-06-27 09:34:22 +0200 <jackdk> s/bindings/definitions/
2022-06-27 09:34:24 +0200 <Axman6> Exciting :o
2022-06-27 09:34:48 +0200 <jackdk> And then at some point maybe start going after new services for which we do not yet have bindings at all
2022-06-27 09:35:05 +0200 <Axman6> Heh, github really failing with that PR: "The diff you're trying to view is too large. We only load the first 3000 changed files." and then it shows me three files before a "Something went wrong" message
2022-06-27 09:38:11 +0200 <jackdk> So yeah, if any of yooz are doing AWS stuff, particularly around auth, I'd love to get your input
2022-06-27 09:40:02 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-06-27 09:40:17 +0200 <Axman6> Sadly I am not
2022-06-27 09:41:13 +0200dschrempf(~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 248 seconds)
2022-06-27 09:41:15 +0200mixfix41(~sdenynine@user/mixfix41)
2022-06-27 09:41:42 +0200 <merijn> Axman6: I don't think "reimplemented this existing python code base for AWS in Haskell" is gonna be appreciated, not be a time safe :p
2022-06-27 09:42:02 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-27 09:42:12 +0200 <merijn> s/not/nor
2022-06-27 09:42:17 +0200 <Axman6> nah, it's just better docs in general, you don't need to care that it's haskell
2022-06-27 09:43:35 +0200coot(~coot@213.134.190.95)
2022-06-27 09:48:10 +0200MajorBiscuit(~MajorBisc@wlan-145-94-167-213.wlan.tudelft.nl)
2022-06-27 09:48:51 +0200leib(~leib@2405:201:900a:f088:20:d9ad:dec:577d) (Read error: Connection reset by peer)
2022-06-27 09:49:01 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 09:49:12 +0200leib(~leib@2405:201:900a:f088:20:d9ad:dec:577d)
2022-06-27 09:50:58 +0200machinedgod(~machinedg@66.244.246.252)
2022-06-27 09:52:17 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
2022-06-27 09:56:19 +0200 <Axman6> Huh, these "types" seem like they might be useful for writing maintainable programs, who knew! https://roman.pt/posts/dont-let-dicts-spoil-your-code/
2022-06-27 09:59:09 +0200eod|fserucas_(~eod|fseru@1.64.114.89.rev.vodafone.pt) (Quit: Leaving)
2022-06-27 09:59:09 +0200eod|fserucas(~eod|fseru@1.64.114.89.rev.vodafone.pt) (Quit: Leaving)
2022-06-27 09:59:25 +0200eod|fserucas(~eod|fseru@1.64.114.89.rev.vodafone.pt)
2022-06-27 09:59:26 +0200eod|fserucas(~eod|fseru@1.64.114.89.rev.vodafone.pt) (Client Quit)
2022-06-27 09:59:36 +0200 <jackdk> Also this "mutability" thing seems to cause a lot of grief... what if we didn't do that?
2022-06-27 09:59:44 +0200eod|fserucas(~eod|fseru@1.64.114.89.rev.vodafone.pt)
2022-06-27 09:59:50 +0200eod|fserucas(~eod|fseru@1.64.114.89.rev.vodafone.pt) (Client Quit)
2022-06-27 10:00:04 +0200fserucas(~fserucas@1.64.114.89.rev.vodafone.pt)
2022-06-27 10:00:56 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-06-27 10:01:17 +0200 <merijn> @quote cjs explain
2022-06-27 10:01:18 +0200 <lambdabot> cjs says: I have to explain this shit to people. I mean, I start out right, "Hey, you know how you always have these bugs because what you thought was in the variable is not there?" And I get all of
2022-06-27 10:01:18 +0200 <lambdabot> these nods of agreement. "Well, I've found a new language that solves that problem." Audience: "Ooooh! How?" Me: "There's no variables!" And then they all start moving away from me slowly....
2022-06-27 10:02:41 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds)
2022-06-27 10:04:23 +0200 <Axman6> :If only they knew...
2022-06-27 10:10:08 +0200mikoto-chan(~mikoto-ch@esm-84-240-99-143.netplaza.fi)
2022-06-27 10:10:10 +0200tzh(~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
2022-06-27 10:10:18 +0200PiDelport(uid25146@id-25146.lymington.irccloud.com)
2022-06-27 10:13:14 +0200daylily(~Thunderbi@180.108.98.221)
2022-06-27 10:13:52 +0200caef^(~caef@50.237.44.186) (Remote host closed the connection)
2022-06-27 10:17:22 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it) (Remote host closed the connection)
2022-06-27 10:19:56 +0200benin08(~benin@183.82.26.15)
2022-06-27 10:20:32 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-27 10:20:37 +0200benin0(~benin@183.82.179.110) (Ping timeout: 256 seconds)
2022-06-27 10:20:37 +0200benin08benin0
2022-06-27 10:22:25 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net) (Ping timeout: 268 seconds)
2022-06-27 10:22:31 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 10:26:07 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-27 10:27:01 +0200mc47(~mc47@xmonad/TheMC47) (Read error: Connection reset by peer)
2022-06-27 10:27:21 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1) (Ping timeout: 268 seconds)
2022-06-27 10:28:26 +0200frost(~frost@user/frost) (Quit: Client closed)
2022-06-27 10:31:31 +0200frost(~frost@user/frost)
2022-06-27 10:31:40 +0200foul_owl(~kerry@23.82.194.108) (Ping timeout: 268 seconds)
2022-06-27 10:36:21 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-27 10:37:50 +0200ubert(~Thunderbi@p200300ecdf0da505f930c23effc470f7.dip0.t-ipconnect.de)
2022-06-27 10:39:41 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 10:41:30 +0200dschrempf(~dominik@17-12-190.cgnat.fonira.net)
2022-06-27 10:44:55 +0200Tuplanolla(~Tuplanoll@91-159-69-97.elisa-laajakaista.fi)
2022-06-27 10:47:26 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Remote host closed the connection)
2022-06-27 10:47:34 +0200foul_owl(~kerry@23.82.194.108)
2022-06-27 10:48:17 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81)
2022-06-27 10:49:14 +0200sympt9(~sympt@user/sympt)
2022-06-27 10:50:12 +0200Haskelytic(~Haskelyti@118.179.211.17) (Ping timeout: 252 seconds)
2022-06-27 10:50:39 +0200sympt(~sympt@user/sympt) (Ping timeout: 256 seconds)
2022-06-27 10:50:40 +0200sympt9sympt
2022-06-27 10:54:30 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-06-27 10:56:59 +0200leeb(~leeb@KD106154142041.au-net.ne.jp)
2022-06-27 10:57:03 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 10:57:27 +0200noteness(~noteness@user/noteness)
2022-06-27 11:00:06 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-27 11:00:39 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 268 seconds)
2022-06-27 11:03:50 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-06-27 11:06:12 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-27 11:13:58 +0200inversed(~inversed@97e3d74e.skybroadband.com) (Ping timeout: 240 seconds)
2022-06-27 11:22:37 +0200arjun(~arjun@user/arjun) (Remote host closed the connection)
2022-06-27 11:24:42 +0200ubert(~Thunderbi@p200300ecdf0da505f930c23effc470f7.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2022-06-27 11:27:53 +0200daylily(~Thunderbi@180.108.98.221) (Ping timeout: 248 seconds)
2022-06-27 11:28:36 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-06-27 11:30:09 +0200inversed(~inversed@05412f44.skybroadband.com)
2022-06-27 11:33:21 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-06-27 11:33:23 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr)
2022-06-27 11:35:16 +0200 <kenaryn> Hello functional people. I have an existential question: please what purpose does `instance Ord Bool` serve? i.e. why would I want to test if True is greater than False?
2022-06-27 11:35:49 +0200noteness(~noteness@user/noteness)
2022-06-27 11:41:34 +0200 <[Leary]> kenaryn: You generally wouldn't. However, Ord has broad usage in e.g. efficient container types, and crucially: instances are compositional.
2022-06-27 11:42:45 +0200 <[Leary]> To put something in a Set or make it the key to a Map, it needs Ord, and it's simple to derive Ord when all the components (some of which may be Bool) have Ord.
2022-06-27 11:44:02 +0200 <[exa]> kenaryn: similarly you might notice that there's `instance Ord ()`
2022-06-27 11:44:32 +0200 <[exa]> it just removes a heap of various corner&special cases from the code that needs orderings
2022-06-27 11:47:32 +0200mikoto-chan(~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Ping timeout: 272 seconds)
2022-06-27 11:49:13 +0200 <PiDelport> Ordering by Bool is also directly useful; for example, sorting a list by one or more Boolean properties.
2022-06-27 11:49:23 +0200noteness(~noteness@user/noteness) (Ping timeout: 268 seconds)
2022-06-27 11:51:46 +0200noteness(~noteness@user/noteness)
2022-06-27 11:52:05 +0200vysn(~vysn@user/vysn)
2022-06-27 11:52:57 +0200vglfr(~vglfr@coupling.penchant.volia.net)
2022-06-27 11:54:55 +0200jmdaemon(~jmdaemon@user/jmdaemon) (Ping timeout: 268 seconds)
2022-06-27 11:56:23 +0200ezzieyguywuf(~Unknown@user/ezzieyguywuf) (Ping timeout: 256 seconds)
2022-06-27 11:56:43 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-27 11:58:07 +0200kmein(~weechat@user/kmein) (Quit: ciao kakao)
2022-06-27 11:59:10 +0200cyanide3dinner(~cyanide4d@106.201.249.151)
2022-06-27 12:00:08 +0200kmein(~weechat@user/kmein)
2022-06-27 12:00:37 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-06-27 12:01:09 +0200vysn(~vysn@user/vysn)
2022-06-27 12:01:31 +0200vysn(~vysn@user/vysn) (Client Quit)
2022-06-27 12:03:26 +0200 <merijn> kenaryn: You can also reverse the question: If an unambigous, lawful, correct instance exists, why would you not implement it?
2022-06-27 12:03:38 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 12:03:43 +0200 <merijn> If you never need it, no harm done. But who knows when it turns out to be useful at some point
2022-06-27 12:04:10 +0200 <merijn> And indeed, Ord is also used for things like sorting
2022-06-27 12:06:47 +0200vysn(~vysn@user/vysn)
2022-06-27 12:13:30 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 272 seconds)
2022-06-27 12:13:35 +0200leib(~leib@2405:201:900a:f088:20:d9ad:dec:577d) (Read error: Connection reset by peer)
2022-06-27 12:14:13 +0200econo(uid147250@user/econo) (Quit: Connection closed for inactivity)
2022-06-27 12:15:15 +0200califax(~califax@user/califx) (Remote host closed the connection)
2022-06-27 12:15:56 +0200sayola(~vekto@dslb-088-078-152-210.088.078.pools.vodafone-ip.de)
2022-06-27 12:16:25 +0200califax(~califax@user/califx)
2022-06-27 12:17:35 +0200kuribas(~user@ptr-17d51epftauu6rr1j35.18120a2.ip6.access.telenet.be)
2022-06-27 12:18:56 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
2022-06-27 12:20:29 +0200jinsunGuest2055
2022-06-27 12:20:30 +0200jinsun__(~jinsun@user/jinsun)
2022-06-27 12:20:30 +0200Guest2055(~jinsun@user/jinsun) (Killed (strontium.libera.chat (Nickname regained by services)))
2022-06-27 12:20:30 +0200jinsun__jinsun
2022-06-27 12:23:42 +0200dcoutts_(~duncan@host86-150-18-54.range86-150.btcentralplus.com) (Quit: Leaving)
2022-06-27 12:24:00 +0200dcoutts(~duncan@host86-150-18-54.range86-150.btcentralplus.com)
2022-06-27 12:24:47 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-06-27 12:29:27 +0200xff0x(~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds)
2022-06-27 12:31:54 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-27 12:39:02 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 12:45:10 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2022-06-27 12:49:02 +0200mastarija(~mastarija@2a05:4f46:e02:8c00:8170:a7cd:202a:e54a)
2022-06-27 12:50:01 +0200 <mastarija> Can't recall if aeson has a utility function where it tries to cast Value of type String into one of more specific types like Bool, Null, or Number
2022-06-27 12:54:21 +0200ec(~ec@gateway/tor-sasl/ec)
2022-06-27 12:54:26 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-27 12:56:50 +0200vglfr(~vglfr@coupling.penchant.volia.net) (Ping timeout: 240 seconds)
2022-06-27 12:57:47 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-27 12:59:05 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-06-27 13:01:11 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de)
2022-06-27 13:04:14 +0200 <tdammers> why would it ever do that?
2022-06-27 13:05:40 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 13:07:37 +0200yax__(~yax__@user/yax/x-9576643)
2022-06-27 13:09:51 +0200 <kuribas> that's called parsing?
2022-06-27 13:10:09 +0200mastarija(~mastarija@2a05:4f46:e02:8c00:8170:a7cd:202a:e54a) (Ping timeout: 268 seconds)
2022-06-27 13:10:14 +0200 <kuribas> and I disagree that Bool, Null or Number is more specific.
2022-06-27 13:10:46 +0200cosimone(~user@2001:b07:ae5:db26:57c7:21a5:6e1c:6b81) (Ping timeout: 268 seconds)
2022-06-27 13:11:34 +0200 <jackdk> @tell mastarjia `withText`, `withArray`, `withObject` etc. are what you're looking for
2022-06-27 13:11:34 +0200 <lambdabot> Consider it noted.
2022-06-27 13:13:29 +0200 <kuribas> those don't cast a String.
2022-06-27 13:14:06 +0200 <kuribas> they parse a Aeson.Value.
2022-06-27 13:16:41 +0200wroathe(~wroathe@user/wroathe) (Ping timeout: 246 seconds)
2022-06-27 13:17:54 +0200yax__(~yax__@user/yax/x-9576643) ()
2022-06-27 13:19:03 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 13:22:37 +0200vysn(~vysn@user/vysn)
2022-06-27 13:23:37 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 248 seconds)
2022-06-27 13:24:02 +0200xff0x(~xff0x@2405:6580:b080:900:1209:1cd2:2f7d:b06b)
2022-06-27 13:24:34 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 13:25:15 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 13:28:57 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1) (Ping timeout: 248 seconds)
2022-06-27 13:39:09 +0200Surobaki(~surobaki@137.44.222.80)
2022-06-27 13:42:36 +0200vglfr(~vglfr@46.96.142.249)
2022-06-27 13:47:51 +0200noteness(~noteness@user/noteness) (Remote host closed the connection)
2022-06-27 13:48:37 +0200noteness(~noteness@user/noteness)
2022-06-27 13:51:28 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 268 seconds)
2022-06-27 13:51:55 +0200chomwitt(~chomwitt@2a02:587:dc1c:800:5b3a:daea:252e:ac17)
2022-06-27 13:55:10 +0200daylily(~Thunderbi@180.108.98.221)
2022-06-27 13:56:31 +0200fweht(uid404746@id-404746.lymington.irccloud.com)
2022-06-27 13:56:31 +0200daylily(~Thunderbi@180.108.98.221) (Read error: Connection reset by peer)
2022-06-27 14:00:40 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 14:02:39 +0200pavonia(~user@user/siracusa) (Quit: Bye!)
2022-06-27 14:03:13 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-27 14:03:35 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-27 14:03:52 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-27 14:08:57 +0200vysn(~vysn@user/vysn) (Quit: WeeChat 3.5)
2022-06-27 14:09:15 +0200vysn(~vysn@user/vysn)
2022-06-27 14:14:50 +0200vglfr(~vglfr@46.96.142.249) (Ping timeout: 240 seconds)
2022-06-27 14:15:22 +0200frost(~frost@user/frost) (Quit: Client closed)
2022-06-27 14:20:48 +0200 <kenaryn> Allright, thank you [Leary] [exa] merijn
2022-06-27 14:21:21 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 14:23:31 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-06-27 14:25:23 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds)
2022-06-27 14:27:10 +0200CiaoSen(~Jura@p549cb4d1.dip0.t-ipconnect.de)
2022-06-27 14:28:36 +0200oniko
2022-06-27 14:33:36 +0200frost(~frost@user/frost)
2022-06-27 14:35:21 +0200bitmapper(uid464869@id-464869.lymington.irccloud.com)
2022-06-27 14:37:27 +0200cyanide3dinner(~cyanide4d@106.201.249.151) (Remote host closed the connection)
2022-06-27 14:39:24 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving)
2022-06-27 14:40:34 +0200ubert(~Thunderbi@p200300ecdf0da505658f203d39a613fe.dip0.t-ipconnect.de)
2022-06-27 14:40:42 +0200zaquest(~notzaques@5.130.79.72) (Remote host closed the connection)
2022-06-27 14:44:30 +0200CiaoSen(~Jura@p549cb4d1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2022-06-27 14:46:30 +0200pleo(~pleo@user/pleo)
2022-06-27 14:51:12 +0200gmg(~user@user/gehmehgeh) (Remote host closed the connection)
2022-06-27 14:51:12 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
2022-06-27 14:51:12 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
2022-06-27 14:52:12 +0200zeenk(~zeenk@2a02:2f04:a301:3d00:39df:1c4b:8a55:48d3) (Quit: Konversation terminated!)
2022-06-27 14:52:16 +0200zaquest(~notzaques@5.130.79.72)
2022-06-27 14:52:16 +0200FinnElija(~finn_elij@user/finn-elija/x-0085643)
2022-06-27 14:52:28 +0200gmg(~user@user/gehmehgeh)
2022-06-27 14:52:49 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-06-27 14:53:15 +0200vglfr(~vglfr@46.96.142.249)
2022-06-27 14:53:27 +0200ec(~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
2022-06-27 14:57:50 +0200vglfr(~vglfr@46.96.142.249) (Ping timeout: 255 seconds)
2022-06-27 15:00:42 +0200Surobaki(~surobaki@137.44.222.80) (Remote host closed the connection)
2022-06-27 15:00:56 +0200Surobaki(~surobaki@137.44.222.80)
2022-06-27 15:02:30 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat)
2022-06-27 15:03:01 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net)
2022-06-27 15:04:00 +0200z0k(~z0k@206.84.143.59)
2022-06-27 15:04:48 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Client Quit)
2022-06-27 15:05:22 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net)
2022-06-27 15:07:15 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Client Quit)
2022-06-27 15:08:28 +0200Katarushisu(~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net)
2022-06-27 15:08:50 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-06-27 15:10:41 +0200szkl(uid110435@id-110435.uxbridge.irccloud.com)
2022-06-27 15:11:15 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 15:11:39 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Ping timeout: 268 seconds)
2022-06-27 15:14:20 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-27 15:16:31 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 15:19:49 +0200acidjnk(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 256 seconds)
2022-06-27 15:20:58 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 15:25:41 +0200vglfr(~vglfr@46.96.142.249)
2022-06-27 15:25:49 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
2022-06-27 15:26:18 +0200frost(~frost@user/frost) (Ping timeout: 252 seconds)
2022-06-27 15:32:41 +0200jao(~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
2022-06-27 15:38:46 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:f847:6b9c:c1af:408a)
2022-06-27 15:40:26 +0200[_](~itchyjunk@user/itchyjunk/x-7353470)
2022-06-27 15:41:39 +0200cosimone(~user@93-44-186-171.ip98.fastwebnet.it)
2022-06-27 15:42:49 +0200[itchyjunk](~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 248 seconds)
2022-06-27 15:44:33 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 15:44:39 +0200Sgeo(~Sgeo@user/sgeo)
2022-06-27 15:46:21 +0200[_][itchyjunk]
2022-06-27 15:47:30 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2022-06-27 15:48:00 +0200zer0bitz_(~zer0bitz@2001:2003:f748:2000:79ea:c89f:ccc9:65e)
2022-06-27 15:48:32 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr)
2022-06-27 15:48:32 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-27 15:49:56 +0200 <kenaryn> Can someone give an example of `showList` usage? The compiler always returns a 'No instance for (Show ShowS) arising from a use of 'print' error.
2022-06-27 15:50:06 +0200zer0bitz(~zer0bitz@2001:2003:f748:2000:f847:6b9c:c1af:408a) (Ping timeout: 272 seconds)
2022-06-27 15:50:16 +0200 <merijn> :t showList
2022-06-27 15:50:18 +0200 <lambdabot> Show a => [a] -> ShowS
2022-06-27 15:50:38 +0200 <merijn> kenaryn: Note that the return value of ShowList is ShowS, aka "String -> String"
2022-06-27 15:50:47 +0200 <merijn> :t showList [1,2,3]
2022-06-27 15:50:47 +0200 <geekosaur> a ShowS is String -> String and just does concatenation. look up difference lists
2022-06-27 15:50:48 +0200 <lambdabot> ShowS
2022-06-27 15:50:50 +0200 <kenaryn> I tried numerous arguments of list type but to no avail.
2022-06-27 15:50:54 +0200 <merijn> > showList [1,2,3] ""
2022-06-27 15:50:56 +0200 <lambdabot> "[1,2,3]"
2022-06-27 15:51:01 +0200 <merijn> > showList [1,2,3] "foo"
2022-06-27 15:51:03 +0200 <lambdabot> "[1,2,3]foo"
2022-06-27 15:51:26 +0200 <kenaryn> That's a list of list, it is NOT in the type signature! :/
2022-06-27 15:51:38 +0200 <kenaryn> How should have I known...
2022-06-27 15:51:38 +0200 <geekosaur> you don't normally use showList directly; it's used by default when Show-ing lists, and things are set up so that the Show instance for Char uses a different thing for showList instead
2022-06-27 15:51:39 +0200 <merijn> kenaryn: The type signature is ShowS
2022-06-27 15:51:48 +0200 <geekosaur> so strings display as strings instead of as lists of Char
2022-06-27 15:51:49 +0200 <merijn> "type ShowS = String -> String"
2022-06-27 15:57:14 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 255 seconds)
2022-06-27 15:57:49 +0200 <kenaryn> how can I See the type signature of ShowS?
2022-06-27 15:57:54 +0200 <shapr> :t ShowS
2022-06-27 15:57:55 +0200 <lambdabot> error: Data constructor not in scope: ShowS
2022-06-27 15:57:57 +0200 <shapr> aw
2022-06-27 15:58:01 +0200 <shapr> @hoogle ShowS
2022-06-27 15:58:02 +0200 <lambdabot> Prelude type ShowS = String -> String
2022-06-27 15:58:02 +0200 <lambdabot> Text.Show type ShowS = String -> String
2022-06-27 15:58:02 +0200 <lambdabot> GHC.Show type ShowS = String -> String
2022-06-27 15:58:10 +0200ec(~ec@gateway/tor-sasl/ec)
2022-06-27 16:00:09 +0200 <[Leary]> % () :: ShowS
2022-06-27 16:00:10 +0200 <yahb2> <interactive>:12:1: error: • Couldn't match type ‘()’ with ‘String -> String’ Expected type: ShowS Actual type: () • In the expression: () :: ShowS In an equation for ‘i...
2022-06-27 16:00:29 +0200 <[Leary]> tbh, without actual docs, that might be the best way.
2022-06-27 16:01:00 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de)
2022-06-27 16:02:24 +0200 <[Leary]> % :i ShowS
2022-06-27 16:02:25 +0200 <yahb2> type ShowS :: * type ShowS = String -> String -- Defined in ‘GHC.Show’
2022-06-27 16:02:32 +0200 <[Leary]> Knew I was forgetting something...
2022-06-27 16:03:41 +0200Unicorn_Princess(~Unicorn_P@93-103-228-248.dynamic.t-2.net)
2022-06-27 16:04:00 +0200acidjnk_new3(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 246 seconds)
2022-06-27 16:07:34 +0200arjun(~arjun@user/arjun)
2022-06-27 16:09:29 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 16:10:16 +0200lyle(~lyle@104.246.145.85)
2022-06-27 16:10:59 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 246 seconds)
2022-06-27 16:11:04 +0200acidjnk_new3(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de)
2022-06-27 16:14:48 +0200acidjnk_new(~acidjnk@dynamic-046-114-170-212.46.114.pool.telefonica.de) (Ping timeout: 272 seconds)
2022-06-27 16:21:20 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-06-27 16:23:38 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-06-27 16:29:38 +0200alp(~alp@user/alp) (Ping timeout: 255 seconds)
2022-06-27 16:30:15 +0200shriekingnoise(~shrieking@201.212.175.181)
2022-06-27 16:30:30 +0200pleo(~pleo@user/pleo) (Ping timeout: 240 seconds)
2022-06-27 16:30:54 +0200alexhandy(~trace@user/trace) (Read error: Connection reset by peer)
2022-06-27 16:31:07 +0200alexhandy(~trace@user/trace)
2022-06-27 16:31:57 +0200 <kenaryn> Does indexmain@main mean something or are they typographic errors in Allen Chris' book?
2022-06-27 16:33:23 +0200 <merijn> kenaryn: @ in a pattern is an alias
2022-06-27 16:33:32 +0200 <merijn> kenaryn: Although that specific one seems useless
2022-06-27 16:33:43 +0200 <geekosaur> can you show a little more context?
2022-06-27 16:33:58 +0200 <merijn> > case [1,2,3] of xs@(_:_:y:_) -> (y, xs)
2022-06-27 16:34:00 +0200 <lambdabot> (3,[1,2,3])
2022-06-27 16:35:14 +0200alp(~alp@user/alp)
2022-06-27 16:37:57 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds)
2022-06-27 16:38:39 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com)
2022-06-27 16:39:13 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 268 seconds)
2022-06-27 16:40:07 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 16:41:26 +0200bitdex_(~bitdex@gateway/tor-sasl/bitdex)
2022-06-27 16:48:57 +0200Vajb(~Vajb@85-76-45-197-nat.elisa-mobile.fi) (Read error: Connection reset by peer)
2022-06-27 16:49:10 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 240 seconds)
2022-06-27 16:49:14 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-27 16:50:28 +0200pleo(~pleo@user/pleo)
2022-06-27 16:50:44 +0200 <Surobaki> Hi, I´m trying to do some pattern matching to transform an AST and I think that I´m not doing it the Haskell way. My code is here, it´s basically a simple substitution engine currently but it doesn´t compile due to errors on lines 51-53 (same errors in principle). This is because my imperative mind is trying to type cast what are two ´identical´ things (an instance of some term vs a restricted term). Could I ask for some help with figuring
2022-06-27 16:50:44 +0200 <Surobaki> out a way so I maintain ¨castability¨ while converting a ¨free¨ AST without restrictions into a restricted one? https://paste.tomsmeding.com/d61R24ip
2022-06-27 16:51:28 +0200 <merijn> Surobaki: The error would help ;)
2022-06-27 16:51:30 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 16:51:45 +0200 <Surobaki> Sorry! Let me re-pastebin it with an error
2022-06-27 16:52:30 +0200 <merijn> Surobaki: Actually, looking at it, you seem to be missing a "Term -> RTerm" function, you can't really do that automatically
2022-06-27 16:53:03 +0200 <merijn> You'd just have to write an explicit conversion function for that
2022-06-27 16:53:26 +0200 <Surobaki> That´s sort of the problem. I´m not sure how to tell Haskell that the two types of Term and RTerm *can* be equal and freely castable
2022-06-27 16:53:42 +0200 <merijn> Surobaki: Which actually catches an error case too, because how would you convert VarY to an RTerm?
2022-06-27 16:53:45 +0200 <merijn> Surobaki: You don't
2022-06-27 16:53:46 +0200 <dminuoso> What does "freely castable" mean to you?
2022-06-27 16:53:50 +0200 <merijn> Surobaki: And they aren't
2022-06-27 16:54:47 +0200 <merijn> Surobaki: If they were actually directly convertible you could use generics to create the conversion (but that seems more work than hand writing it)
2022-06-27 16:54:53 +0200 <Surobaki> I´ve repasted it with the error: https://paste.tomsmeding.com/7q97TChj
2022-06-27 16:55:03 +0200 <merijn> But that's ignoring the fact that RTerm is missing a case that Term has (i.e. VarY)
2022-06-27 16:55:12 +0200 <merijn> So you actually can't convert between them freely
2022-06-27 16:55:38 +0200 <Surobaki> Yes, my ¨substitute¨ function is there to remove instances of VarY for the purpose of safely converting to an RTerm
2022-06-27 16:56:03 +0200 <Surobaki> ¨Freely castable¨ here means GHC won´t shout at me when I try to do a conversion like you can see on ln 51-53
2022-06-27 16:56:15 +0200 <merijn> Surobaki: Then you need to recursively call substitute on 'x'
2022-06-27 16:56:30 +0200 <merijn> Surobaki: How do you expect GHC to "
2022-06-27 16:56:42 +0200 <merijn> "magically" convert a Term into an RTerm? It can't
2022-06-27 16:57:07 +0200 <merijn> The most sensible thing you *probably* want is to recursively invoke substitute on 'x'
2022-06-27 16:57:10 +0200 <dminuoso> Surobaki: To you `Sum :: Term -> Term -> Term` and `RSum :: RTerm -> RTerm -> RTerm` look similar, but they are completely different from GHCs perspective
2022-06-27 16:58:07 +0200 <Surobaki> merijn: Thank you, I think that´s the answer I was looking for (?) I think I´m just being a little silly and forgetting to program the logic of how to convert between Term and RTerm.
2022-06-27 16:58:18 +0200dschrempf(~dominik@17-12-190.cgnat.fonira.net) (Quit: WeeChat 3.5)
2022-06-27 16:58:30 +0200arjun(~arjun@user/arjun) (Ping timeout: 272 seconds)
2022-06-27 16:58:31 +0200ARJ0019(~arj0019@162.218.254.7)
2022-06-27 16:58:40 +0200 <Surobaki> Thank you all, this is what I needed
2022-06-27 17:01:15 +0200 <ARJ0019> Does anyone know of an established method for multivariate regression analysis in Haskell
2022-06-27 17:04:41 +0200 <ARJ0019> it looks like `Statistics.Regresion' will operate on an arbitrary amount of dimensions with the `ols' function
2022-06-27 17:11:46 +0200 <Surobaki> Is there a nice name for 0-ary parameter type constructors when creating your own datatypes?
2022-06-27 17:12:12 +0200 <ARJ0019> what do you mean by 0-ary
2022-06-27 17:12:30 +0200 <[exa]> Surobaki: usually constants
2022-06-27 17:12:32 +0200 <Surobaki> Ones that have zero parameters, i.e. data Foo = Bar
2022-06-27 17:12:45 +0200 <[exa]> Foo there is a "type constant"
2022-06-27 17:12:46 +0200 <Surobaki> Instead of data Foo = Bar Int Int Int
2022-06-27 17:12:51 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 17:13:19 +0200 <Surobaki> I see, great
2022-06-27 17:13:20 +0200 <Surobaki> Thanks!
2022-06-27 17:13:23 +0200 <[exa]> ah you mean the "Bar" I guess? (that's a data constructor)
2022-06-27 17:13:26 +0200 <k``> Surobaki: Do you mean a 0-ary constructor for a data type, like `Nothing` ? Ideally you'd name that its meaning.
2022-06-27 17:13:31 +0200 <[exa]> but I'd say it makes a constant too
2022-06-27 17:13:36 +0200 <ARJ0019> Sounds like type synonym would work for you as well
2022-06-27 17:13:52 +0200 <Surobaki> Yes, I mean the ¨Bar¨
2022-06-27 17:14:06 +0200 <Surobaki> Specifically when ¨Bar¨ has nothing coming after it
2022-06-27 17:14:08 +0200 <[exa]> Surobaki: that's like True or False then. I think these are good constants.
2022-06-27 17:14:09 +0200benin0(~benin@183.82.26.15) (Quit: The Lounge - https://thelounge.chat)
2022-06-27 17:15:29 +0200 <Surobaki> Awesome, and I assume type constants don´t have any sort of values, right? As in, they´re totally abstract and can´t have a concrete representation since they´re not programmed to be constructed from something else
2022-06-27 17:15:41 +0200 <[exa]> ARJ0019: re the linear models, how much machinery you need there? Not sure if there's something for e.g. generalized linear models, but reimplementing it from the available linear algebra should be pretty straightforward, as in ~10 lines of code
2022-06-27 17:16:28 +0200 <[Leary]> Surobaki: Re your paste, you might want to try unifying the ASTs with `data Term x = Var x | Sum (Term x) (Term x) | ...` etc, then you'd have `substitute :: Term x -> (x -> Term y) -> Term y` ... oh my, oh my, what a familiar and loveable type signature!
2022-06-27 17:16:46 +0200 <k``> Surobaki: So you're talking about empty types like Data.Void's `Void`? `data Void` or `newtype Void = Void Void` ?
2022-06-27 17:17:03 +0200 <k``> Where the only inhabitants are bottoms?
2022-06-27 17:17:07 +0200 <[exa]> Surobaki: well. depends on how subtle view of the whole situation you want to use. But in the simple reasonable view of haskell, the type constants and variables belong into a completely different language that never materializes into the real world, except as dictionary functions for typeclasses
2022-06-27 17:17:25 +0200 <ARJ0019> exa : I am trying to avoid a linear model. It is not really applicable for my goals. I know the data will be non-linear.
2022-06-27 17:17:47 +0200 <Surobaki> Leary: that´s definitely something I´m trying to accomplish but first I´d like to get a more naive and simple understanding of the interactions between type constants
2022-06-27 17:18:29 +0200 <[exa]> ARJ0019: ok well, honestly, not sure if something will be available right away.
2022-06-27 17:18:32 +0200acidjnk_new3(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de) (Ping timeout: 246 seconds)
2022-06-27 17:18:44 +0200 <[exa]> ARJ0019: but hey, there are cool neurotic network libraries :]
2022-06-27 17:19:19 +0200 <Surobaki> k``: I´ve never used Data.Void unfortunately but maybe? I think the simplest example I can give is literally writing data Foo = Bar, I´m talking about instances where Foo has only been created by an empty constructor of Bar (if that is possible?)
2022-06-27 17:19:28 +0200 <ARJ0019> exa: yea, I just figured I would ask. i'll have to find a method that I can implement.
2022-06-27 17:19:43 +0200 <geekosaur> it's entirely possible, just not very useful except as a tag
2022-06-27 17:19:53 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 248 seconds)
2022-06-27 17:20:03 +0200 <geekosaur> which gets us into type level programming
2022-06-27 17:20:43 +0200 <[exa]> ARJ0019: well tbh, if you don't know the method, you might want to ask R people, haskellers do not generally intersect with stats folks
2022-06-27 17:20:59 +0200 <[exa]> ARJ0019: what's the data? (just curious)
2022-06-27 17:21:14 +0200 <Surobaki> exa: The reason I´m asking this question comes back to my substitution function. My idea is that RVarX and VarX is equivalent and because they´re so abstract (both are type constant constructors), so writing a pattern sub :: Term -> RTerm could freely convert VarX to RVarX because (in my mind) they´re basically the same
2022-06-27 17:22:10 +0200 <ARJ0019> exa: heat exchanger performance characteristics
2022-06-27 17:22:28 +0200 <[exa]> Surobaki: the fact that objects lack representation doesn't allow you to circumvent the equality rules :]
2022-06-27 17:22:54 +0200 <[exa]> ARJ0019: oh my. A GLM with exponentials might be handy though.
2022-06-27 17:23:01 +0200 <geekosaur> I think we'd say they're concrete, not abstract, and that's why you can't simply map one directly to the other. (there is a way to do it, but it's `unsafeCoerce`)
2022-06-27 17:23:32 +0200 <[exa]> ARJ0019: honestly, try to throw R glm() to the problem and see what one works best, then finetune in haskell
2022-06-27 17:23:34 +0200 <Surobaki> I see, thanks a lot. I don´t want to deal with unsafe stuff so I´m mainly looking at understanding the basic underpinnings of Haskell´s type system
2022-06-27 17:23:36 +0200vglfr(~vglfr@46.96.142.249) (Ping timeout: 268 seconds)
2022-06-27 17:23:54 +0200 <geekosaur> they're concrete because there's nothing to tweak that could turn one into the other
2022-06-27 17:24:11 +0200 <[exa]> ARJ0019: don't get me wrong, not trying to tell you not to use haskell, but R will get you through tons of troubles in 5 minutes :D
2022-06-27 17:24:42 +0200 <geekosaur> the fact that they look similar doesn't mean anything; the whole point of types is to keep you from shooting yourself in the foot by using something that looks similar but isn't
2022-06-27 17:24:52 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1) (Remote host closed the connection)
2022-06-27 17:24:52 +0200 <Surobaki> I´ll go with what Leary said in that case and unify my restricted and free term types into one
2022-06-27 17:24:55 +0200Vajb(~Vajb@2001:999:40:4c50:1b24:879c:6df3:1d06)
2022-06-27 17:25:06 +0200 <Surobaki> geekosaur: That´s a nice way of putting it
2022-06-27 17:25:06 +0200Vajb(~Vajb@2001:999:40:4c50:1b24:879c:6df3:1d06) (Read error: Connection reset by peer)
2022-06-27 17:25:19 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-27 17:27:36 +0200 <geekosaur> this might in fact be a good place to use a tag: data Restricted = RVar; data Open = OVar; data VarX r = VarX ... — and r there is either RVar or OVar to indicate if it's restricted or not. this is type level tagging
2022-06-27 17:28:27 +0200 <Surobaki> Very interesting, I´ve never heard about tags so I will go and do some reading
2022-06-27 17:28:57 +0200 <geekosaur> they're also called phantom types
2022-06-27 17:29:27 +0200 <geekosaur> since they aren't used in the value, only at type level
2022-06-27 17:30:03 +0200lortabac(~lortabac@2a01:e0a:541:b8f0:a397:2c8:2227:ff66) (Quit: WeeChat 2.8)
2022-06-27 17:31:10 +0200 <geekosaur> someone mentioned data Tagged earlier, that's the same thing
2022-06-27 17:31:20 +0200 <ski> Surobaki : yes, i'd second [Leary]'s suggestion
2022-06-27 17:32:33 +0200 <ski> Surobaki : "I assume type constants don´t have any sort of values" -- i think here you actually meant what we call "(nullary) data constructors", not "type constants". and they do have values (namely themselves). but still, you could say "they´re totally abstract and can´t have a concrete representation since they´re not programmed to be constructed from something else" is basically right
2022-06-27 17:33:01 +0200BusConscious(~martin@ip5f5bdf0d.dynamic.kabel-deutschland.de)
2022-06-27 17:33:36 +0200 <ARJ0019> exa: yea, I could get this done quickly in python. The idea is that I want to learn more haskell so that I can use it more often. I have been fighting OOP in my projects.
2022-06-27 17:33:52 +0200tzh(~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
2022-06-27 17:34:00 +0200 <Surobaki> I see, thanks!
2022-06-27 17:34:19 +0200 <ski> Surobaki : basically, we'd call `Term',`RTerm' "(data) types" (or "type constants", perhaps sometimes); while we'd call `VarX',`VarY' "(nullary) (data) constructors" (or "constant constructors")
2022-06-27 17:34:42 +0200 <ski> (am i correct in that you had the terminology here confused ?)
2022-06-27 17:35:55 +0200 <Surobaki> Nullary constructors, got it. Yeah I mixed it up, what is the value of a data type that has been constructed with a nullary data constructor?
2022-06-27 17:36:32 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 17:36:40 +0200 <BusConscious> say I have two monads m1 and m2 of types m a and m b respectively and a function f :: a -> b -> m c
2022-06-27 17:37:17 +0200 <BusConscious> Now I want to do something like do{ val1 <- m1; val2 <- m2; f val1 val2;} but in applicative syntax
2022-06-27 17:37:33 +0200coot(~coot@213.134.190.95)
2022-06-27 17:38:40 +0200 <k``> `liftA2` ? `f <$> m1 <*> m2` ?
2022-06-27 17:39:18 +0200 <BusConscious> you are not sure or why the question?
2022-06-27 17:39:38 +0200 <k``> Not sure what you mean by "applicative syntax".
2022-06-27 17:40:36 +0200 <k``> Your result is going to be an m (m c); otherwise you have to use Monad syntax.
2022-06-27 17:40:47 +0200 <ski> Surobaki : consider `data Bool = False | True'. the value of `True' is `True', itself
2022-06-27 17:40:51 +0200 <k``> That's what it means for it to be a Monad.
2022-06-27 17:41:01 +0200 <ski> Surobaki : it's not further reducible
2022-06-27 17:41:18 +0200 <Surobaki> ski: I see, so it´s just the name of the nullary data constructor
2022-06-27 17:41:22 +0200 <BusConscious> k``: yeah that's precisely what I don't want :D
2022-06-27 17:41:22 +0200 <k``> Maybe you want `join $ f <$> m1 <*> m2`?
2022-06-27 17:41:29 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds)
2022-06-27 17:41:38 +0200 <BusConscious> I want it to be of type of type m c
2022-06-27 17:41:45 +0200 <ski> BusConscious : `m1' and `m2' are not monads, they're monadic actions. `m' (in the types `m a',`m b',`a -> b -> m c') is (presumably) the monad
2022-06-27 17:41:58 +0200 <BusConscious> as in do{ val1 <- m1; val2 <- m2; f val1 val2;}
2022-06-27 17:42:01 +0200 <Surobaki> ski: Or well, to be more specific it´s a representation of the nullary data constructor since the concept of ¨name¨ there might be accidental technical usage
2022-06-27 17:42:07 +0200 <ski> monads are type-level things. you don't pass around monads at run-time
2022-06-27 17:42:21 +0200 <geekosaur> :t ?fn <$> ?m1 <*> ?m2
2022-06-27 17:42:23 +0200 <lambdabot> (Applicative f, ?fn::a1 -> a2 -> b, ?m1::f a1, ?m2::f a2) => f b
2022-06-27 17:42:36 +0200 <k``> Yeah, if you want to write it in an Applicative style, `join $ f <$> m1 <*> m2` or `join $ liftA2 f m1 m2`.
2022-06-27 17:42:43 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
2022-06-27 17:43:35 +0200 <ski> @let infixl 4 <*>>; (<*>>) :: Monad m => m (a -> m b) -> (m a -> m b); mamb <*>> ma = join (mamb <*> ma)
2022-06-27 17:43:37 +0200 <lambdabot> Defined.
2022-06-27 17:44:21 +0200 <ski> BusConscious : i'd write your expression as `f <$> m1 <*>> m2'. in general `f <$> m1 <*> m2 <*> ... <*>> mn', with `<*>>' on the last one
2022-06-27 17:44:28 +0200causal(~user@50.35.83.177) (Quit: WeeChat 3.5)
2022-06-27 17:44:52 +0200 <ski> (Surobaki : "0-ary" is also fine, of course)
2022-06-27 17:45:09 +0200 <k``> Too bad that =<< has the wrong fixity.
2022-06-27 17:46:11 +0200 <ski> Surobaki : to continue on the line that [exa] and k`` began (although i think they misinterpreted your "type constants" as now referring to the "type level" (after the correction that you meant `Bar' rather than `Foo' in `data Foo = Bar', when you said "0-ary parameter type constructors"), rather than the "value level") ..
2022-06-27 17:46:19 +0200 <BusConscious> ski: Where does <*>> live? I cant fnd it in hoogle
2022-06-27 17:46:22 +0200misterfish(~misterfis@ip214-130-173-82.adsl2.static.versatel.nl)
2022-06-27 17:46:34 +0200 <k``> ski literally just made it up.
2022-06-27 17:46:38 +0200 <BusConscious> live in "what module is it defined in"
2022-06-27 17:46:40 +0200 <ski> BusConscious : nowhere (afaik). it's just something i've come up with here on IRC, many years ago
2022-06-27 17:46:46 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 17:47:05 +0200 <ski> k`` : yea, but i didn't make it up now. this thing has come up again and again, over the years ;)
2022-06-27 17:47:06 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-27 17:47:39 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-27 17:47:47 +0200 <ski> (i probably first made it up, because i wanted it myself)
2022-06-27 17:47:48 +0200Haskelytic(~Haskelyti@118.179.211.17)
2022-06-27 17:48:06 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-06-27 17:48:11 +0200jinsun__(~jinsun@user/jinsun)
2022-06-27 17:48:11 +0200jinsun__jinsun
2022-06-27 17:49:30 +0200 <k``> It's a neat trick for isolating a monadic action in an applicative chain.
2022-06-27 17:49:54 +0200 <ski> Surobaki : .. there is a "value level", where values like `1',`"abc"',`False' lives, but also (value) expressions like `1 + 2',`3 <= x && x <= 9', including functions like `not',`digitToInt',.. -- this "value level" is where computations happen, at run-time
2022-06-27 17:51:01 +0200 <Surobaki> ski: That´s good to know! Hopefully that´ll help with demystifying it
2022-06-27 17:51:40 +0200vysn(~vysn@user/vysn) (Read error: Connection reset by peer)
2022-06-27 17:51:57 +0200jinsun(~jinsun@user/jinsun) (Read error: Connection reset by peer)
2022-06-27 17:52:12 +0200jinsun(~jinsun@user/jinsun)
2022-06-27 17:52:12 +0200 <k``> > 0.0/0 > 0/0
2022-06-27 17:52:14 +0200 <lambdabot> False
2022-06-27 17:52:30 +0200 <k``> compare (0.0/0) (0/0)
2022-06-27 17:52:49 +0200 <ski> Surobaki : then there's a "type level". each value (and value expression) is "classified" by a type. imaginatively, you could picture the types as "living" on a level (of their own), "above" the values. so here we have things like `Bool',`Int', but also type expressions like `Maybe Int',`ReadS Bool' (which is a type synonym for `String -> [(Bool,String)]', iow "evaluates" to the latter)
2022-06-27 17:53:02 +0200 <k``> > compare (0.0/0) (0/0)
2022-06-27 17:53:04 +0200 <lambdabot> GT
2022-06-27 17:53:13 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-27 17:53:19 +0200abiss27(~abiss27@user/abiss)
2022-06-27 17:55:07 +0200 <ski> Surobaki : now `Maybe' itself (and `ReadS') is a type function. given a type, it forms another type. in the case of `Maybe', it "doesn't do anything" (except express a more complicated type). but in case of `ReadS', it does compute/simplify. in any case, if `F' is a type function, then you can't say `x :: F', for `x' being a value or (value) expression. `F' is "incomplete". you can only ascribe "complete",
2022-06-27 17:55:13 +0200 <ski> or "concrete" types to value (and value expressions). e.g. you can't say `xs :: []' (`[]' being the "list of" type constructor). you must say *what* it's a list *of*
2022-06-27 17:56:06 +0200 <Surobaki> I´ve reworked it slightly, here it is https://paste.tomsmeding.com/IUyGWEAO . Because I seem to have extracted `i` from my `Term` that got constructed like `ConstInt i` I have stuck myself into a position where I´m trying to do `Mul Term Int`. Is there any way to pattern match only for a `Term` that was constructed with `ConstInt` while evading the error?
2022-06-27 17:56:07 +0200vysn(~vysn@user/vysn)
2022-06-27 17:57:29 +0200 <ski> Surobaki : to distinguish which types (which type expressions) can be placed to the right of a type signature `::', we make another "sort level" above types, called "kinds". just as we can write `False :: Bool', we now write `Bool :: *', which we can read "`Bool' is a concrete type". but also `Maybe :: * -> *' (`Maybe' is a type function from concrete types to concrete types). (`*' is also spelled `Type')
2022-06-27 17:57:41 +0200 <ski> @kind Either
2022-06-27 17:57:42 +0200 <lambdabot> * -> * -> *
2022-06-27 17:57:44 +0200 <ski> @kind Either Int
2022-06-27 17:57:46 +0200 <lambdabot> * -> *
2022-06-27 17:57:46 +0200 <ski> @kind Either Int String
2022-06-27 17:57:48 +0200 <lambdabot> *
2022-06-27 17:58:16 +0200 <ski> (in the interactor, it's `:kind' or `:k', similarly to how you use `:type' or `:t' to ask for the type)
2022-06-27 17:58:36 +0200 <ski> k`` : NaNs cause problems, yes
2022-06-27 18:00:12 +0200 <BusConscious> 19:46 < BusConscious> ski: Where does <*>> live? I cant fnd it in hoogle
2022-06-27 18:00:16 +0200 <BusConscious> oops
2022-06-27 18:00:17 +0200 <ski> Surobaki : `x' and `y' in your defining question for `substitute' are not the same as `VarX',`VarY'
2022-06-27 18:00:25 +0200 <BusConscious> infixl 4 <*>>; fm <*>> b = b >>= (\b -> fm >>= (\f2 -> f2 b) )
2022-06-27 18:00:44 +0200 <ski> yes, that also works
2022-06-27 18:00:47 +0200 <BusConscious> I just derived <*>> myself, but without join just do get a feeling for the types
2022-06-27 18:01:05 +0200 <BusConscious> the brute force way
2022-06-27 18:01:15 +0200 <k``> ski: I assume the `compare` definition is so that `sort` always putsNaNs at the end of the list. Still seems very unfortunate.
2022-06-27 18:01:30 +0200 <ski> (btw, the brackets there are redundant. you can just say `b >>= \b -> fm >>= \f2 -> f2 b')
2022-06-27 18:02:07 +0200 <Surobaki> ski: Not sure if my understanding is correct here but is ¨kinds¨ related to the restrictions of type classes like Num, Ord, Eq?
2022-06-27 18:02:15 +0200 <ski> k`` : it would possibly be nice if one could get the system to use signalling NaNs
2022-06-27 18:02:25 +0200 <ski> Surobaki : .. not quite
2022-06-27 18:02:28 +0200justsomeguy(~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds)
2022-06-27 18:02:35 +0200 <ski> @kind Num
2022-06-27 18:02:37 +0200 <lambdabot> * -> Constraint
2022-06-27 18:02:37 +0200 <BusConscious> ski: yes and you told me that 2 days ago. my brain is a mesh
2022-06-27 18:02:39 +0200 <BusConscious> :D
2022-06-27 18:03:44 +0200 <ski> `Num' (and type classes in general) also live on the type level, and also have kinds (just like other types do). the difference is that their "result" is not a concrete type (of kind `*'), but is a (class) constraint (of kind `Constraint')
2022-06-27 18:04:20 +0200justsomeguy(~justsomeg@user/justsomeguy)
2022-06-27 18:04:38 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-27 18:05:15 +0200 <ski> Surobaki : anyway, if you don't want to, you probably don't need to concern yourself much with kinds, yet. my main point was to try to set some terminology straight, and to give you somewhat of an impression that there's another "level" here to learn
2022-06-27 18:05:35 +0200 <ski> BusConscious : hm, i guess i did. i forgot
2022-06-27 18:05:41 +0200 <Surobaki> ski: One more try at understanding it. Type functions interact with the type level and their parameter requirements can be indicated by `kinds´?
2022-06-27 18:05:57 +0200 <ski> yes
2022-06-27 18:06:05 +0200 <Surobaki> ski: I do want to, I really appreciate it and I want to get good at Haskell and functional programming in general.
2022-06-27 18:06:30 +0200 <ski> types are used to classify values. e.g. for passing the correct number of parameter to a function, and even for passing parameters of the correct type
2022-06-27 18:07:11 +0200 <Surobaki> ski: Thank you, I think I´m starting to get it in that case.
2022-06-27 18:07:51 +0200 <ski> kinds are used to classify types. e.g. for passing the correct number of type parameters to a type function (like `Maybe',`Either',`ReadS'), and even for passing type parameters of the correct kind (although you'll run into problems with this to a lesser degree, since non-concrete type parameters aren't as common, although still important when you get to them)
2022-06-27 18:08:35 +0200 <ski> simplified view : kinds are for making sure you're not using an "incomplete type" when you should have a "complete type" (and vice versa)
2022-06-27 18:09:00 +0200 <Surobaki> ski: On the note of the AST substitution program I´m working on. I understand that `x´ and `y´ are not the same as the type constructors VarX and VarY, but I´m just not fully sure how could I manipulate the two instances of Term that I put in as parameters so I can merge them.
2022-06-27 18:09:02 +0200 <ski> e.g. `x :: Maybe' makes no sense, and neither does `y :: Either Int Maybe'
2022-06-27 18:09:46 +0200 <[Leary]> Surobaki: The first argument is what you want to replace VarY with, right? Seems like you don't actually have any reason to examine it.
2022-06-27 18:11:01 +0200 <ski> Surobaki : your specific type error in your last paste was because `i' in `Mul x i' is not of type `Term', but rather of type `Int'. presumably you intended to use `ConstInt i' in place of `i' there ?
2022-06-27 18:11:02 +0200 <Surobaki> [Leary]: You are correct that I don´t need to examine it, however, my specific condition for pattern matching is that I only want the parameter to be accepted by the function if it´s a Term constructed from `ConstInt Int`
2022-06-27 18:11:33 +0200 <ski> Surobaki : but as i said, i already suspect you confused `x' and `y' with `VarX' and `VarY'
2022-06-27 18:12:21 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-27 18:12:55 +0200 <Surobaki> ski: Maybe I´m not sure where the confusion is then. When I write the parameter as (Mul x y) I assume `x´ and `y´ are the two individual `Term´s that constitute my `Mul´-constructed `Term.´
2022-06-27 18:13:11 +0200 <ski> yes
2022-06-27 18:13:39 +0200 <ski> but you stated earlier that you want to substitute terms for "Y variables", which presumably means `VarY'
2022-06-27 18:13:58 +0200 <ski> and your `substitute' does nothing towards that, so far
2022-06-27 18:14:08 +0200 <ski> (specifically, it goes against that)
2022-06-27 18:14:43 +0200 <ski> if you correct the defining equation you had (in order to make it type-check) into
2022-06-27 18:14:54 +0200 <ski> substitute (ConstInt i) (Mul x y) = Mul x (ConstInt i)
2022-06-27 18:15:03 +0200 <Surobaki> I´m not sure if this will confirm or deny my thinking but maybe it will clear my intentions up: I want to transform `Mul VarX VarY´ into `Mul VarX ConstInt Int´
2022-06-27 18:15:43 +0200 <ski> then, if you evaluate `substitute (ConstInt 3 (Mul VarX VarX))', you'll get back `Mul VarX (ConstInt 3)' .. but presumably you wanted `Mul VarX VarX', in this case
2022-06-27 18:15:47 +0200 <Surobaki> Ohh I can re-type it with (ConstInt i) again, thank you! I will try that.
2022-06-27 18:16:21 +0200 <ski> er, `substitute (ConstInt 3) (Mul VarX VarX)', sorry
2022-06-27 18:16:57 +0200 <Surobaki> I ended up with `substitute (ConstInt i) (Mul x y) = Mul x (ConstInt i)´ which *seems* to be in line with what I want to do and the compiler is not whining
2022-06-27 18:17:18 +0200 <ski> Surobaki> substitute (ConstInt 3) (Mul VarX VarX)
2022-06-27 18:17:25 +0200 <ski> try that evaluation ^
2022-06-27 18:18:01 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-06-27 18:18:06 +0200 <maerwald> how do you name a function that encodes String to Y, while including Y in the name? 'encodeY' seems wrong. 'encodeToY'?
2022-06-27 18:18:25 +0200 <ski> "Into" ?
2022-06-27 18:18:50 +0200 <ski> (i guess it may depend on what sort of thing "Y" is meant to be)
2022-06-27 18:20:09 +0200 <maerwald> 'encodedY'?
2022-06-27 18:20:32 +0200 <k``> `toY`?
2022-06-27 18:20:39 +0200 <ski> what is "Y" ?
2022-06-27 18:21:36 +0200 <k``> `toUtf16` seems more clar than `encodeUtf16` and less noisy than `oncodeToUtf16`.
2022-06-27 18:21:36 +0200ARJ0019(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:21:38 +0200DGMrKong(~arj0019@162.218.254.7)
2022-06-27 18:22:27 +0200 <ski> Surobaki : btw, you should probably also fix your comments to say `VarX' and `VarY' instead of `X' and `Y' (at least when you're intending to write down actual Haskell expressions, rather than an informal (or other kind of formal) expression of what you want to express)
2022-06-27 18:22:43 +0200 <maerwald> k``: Y denotes the type, not the encoding
2022-06-27 18:23:01 +0200 <ski> (that's why i asked about what sort of thing "Y" was)
2022-06-27 18:23:08 +0200 <maerwald> bytes
2022-06-27 18:23:10 +0200 <Surobaki> ski: Got you, thanks. Writing a quick Show instancing so I actually evaluate what you sent
2022-06-27 18:23:21 +0200alp(~alp@user/alp) (Ping timeout: 248 seconds)
2022-06-27 18:23:25 +0200cfricke(~cfricke@user/cfricke) (Ping timeout: 256 seconds)
2022-06-27 18:23:35 +0200 <ski> Surobaki : add `deriving Show' to the end of the `data Term = ...' declaration
2022-06-27 18:23:36 +0200 <k``> `serialize`
2022-06-27 18:24:09 +0200 <ski> (Surobaki : also, note that defining `show' (rather than `showsPrec') in a `Show' instance is, usually, incorrect)
2022-06-27 18:24:13 +0200 <Surobaki> ski: Will Haskell be able to derive Show for nullary constructed `Term´s?
2022-06-27 18:24:17 +0200 <ski> sure
2022-06-27 18:25:01 +0200 <k``> :i Void
2022-06-27 18:25:05 +0200 <ski> @let data Term = VarX | VarY | Sum Term Term | Mul Term Term | Sub Term Term | ConstInt Int deriving Show
2022-06-27 18:25:06 +0200 <lambdabot> Defined.
2022-06-27 18:25:12 +0200DGMrKong(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:25:16 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 18:25:24 +0200DGMrKong(~arj0019@162.218.254.7)
2022-06-27 18:25:26 +0200 <ski> > show (Mul VarX VarX)
2022-06-27 18:25:27 +0200 <lambdabot> "Mul VarX VarX"
2022-06-27 18:25:41 +0200 <ski> @hoogle Void
2022-06-27 18:25:42 +0200 <lambdabot> module Data.Void
2022-06-27 18:25:42 +0200 <lambdabot> Data.Void data Void
2022-06-27 18:25:42 +0200 <lambdabot> System.Directory.Internal.Prelude data Void
2022-06-27 18:26:18 +0200 <k``> Just wondering whether Void has a Show instance. It does:
2022-06-27 18:26:22 +0200 <k``> > :i Void
2022-06-27 18:26:24 +0200 <lambdabot> <hint>:1:1: error: parse error on input ‘:’
2022-06-27 18:26:31 +0200 <ski> % :i Void
2022-06-27 18:26:31 +0200 <yahb2> <interactive>:1:1: error: Not in scope: ‘Void’
2022-06-27 18:26:37 +0200 <k``> But I can't remember how to use GHCi here.
2022-06-27 18:26:40 +0200 <ski> % :m + Data.Void
2022-06-27 18:26:40 +0200 <yahb2> <no output>
2022-06-27 18:26:42 +0200 <ski> % :i Void
2022-06-27 18:26:42 +0200 <yahb2> type Void :: * data Void -- Defined in ‘Data.Void’ instance [safe] Eq Void -- Defined in ‘Data.Void’ instance [safe] Ord Void -- Defined in ‘Data.Void’ instance [safe] Semigroup Void -- Defined ...
2022-06-27 18:27:05 +0200 <kenaryn> Is yahb2 a second bot?
2022-06-27 18:27:19 +0200 <ski> % :t show (undefined :: Void)
2022-06-27 18:27:19 +0200 <yahb2> show (undefined :: Void) :: String
2022-06-27 18:27:24 +0200 <ski> % :t show (undefined :: IO ())
2022-06-27 18:27:24 +0200 <yahb2> <interactive>:1:1: error: • No instance for (Show (IO ())) arising from a use of ‘show’ • In the expression: show (undefined :: IO ())
2022-06-27 18:27:56 +0200 <ski> yes. yahb2 (formerly yahb) is the interactor (GHCi). lambdabot is not
2022-06-27 18:28:24 +0200 <[Leary]> yahb = yet another haskell bot
2022-06-27 18:28:33 +0200 <ski> (not sure if it's meant to be renamed back to `yahb', or if this is a more permanent change)
2022-06-27 18:29:05 +0200 <kenaryn> Lol funny acronym. Henceforth, lambdabot emulates compilation time if I understand correctly.
2022-06-27 18:29:21 +0200 <ski> lambdabot has various different plugins (like an association database). yahb2 is just the plain interactor, afaik
2022-06-27 18:29:31 +0200DGMrKong(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:29:41 +0200 <kenaryn> Allright.
2022-06-27 18:29:44 +0200DGMrKong(~arj0019@162.218.254.7)
2022-06-27 18:29:47 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1) (Ping timeout: 255 seconds)
2022-06-27 18:30:14 +0200 <geekosaur> still waiting to see if mniip will show up again, I think
2022-06-27 18:30:19 +0200 <ski> @where PIH
2022-06-27 18:30:19 +0200 <lambdabot> "Programming in Haskell" by Graham Hutton in 2007-01-15,2016-09-01 at <http://www.cs.nott.ac.uk/~pszgmh/pih.html>
2022-06-27 18:31:04 +0200 <geekosaur> @tell tomsmeding while I'm thinking about it, yahb used to insert semicolons for newlines, while yahb2 doesn't and the output is occasionally confusing
2022-06-27 18:31:04 +0200 <lambdabot> Consider it noted.
2022-06-27 18:32:15 +0200 <ski> k`` : anyway, it makes sense for `Void' to have a `Show' instance, so i guess that's why it's there
2022-06-27 18:32:58 +0200 <k``> ski: Agree. Same for its `Read`, `Show`, `Eq`, &c.
2022-06-27 18:33:21 +0200 <Surobaki> ski: I see, I finally got that expression to run. I see that it replaces the right side of the `Mul´ constructor, which is good. Is there any way to enforce replacement only of `Term´s that are generated by the `VarY´ nullary constructor?
2022-06-27 18:33:26 +0200 <ski> ("makes sense" (a) in the sense that it can be defined in an appropriate/correct way; and (b) that it's actually helpful for stuff like `Either Void T' or `Tree T Void', `Expr Void')
2022-06-27 18:34:16 +0200 <ski> Surobaki : yes : use `VarY' in the pattern, instead of `y'
2022-06-27 18:34:18 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-27 18:34:35 +0200 <ski> substitute (ConstInt i) (Mul x VarY) = Mul x (ConstInt i)
2022-06-27 18:36:22 +0200 <ski> Surobaki : you can "nest" patterns. a pattern doesn't have to consist of a data constructor (like `Mul',`ConstInt',`VarY'), followed by the appropriate number of variables (like `x',`y';`i';). the "subpatterns" after the dataconstructor doesn't have to be variables ! `Mul (Add t VarX) (Mul VarY u)' is a perfectly fine pattern, e.g.
2022-06-27 18:36:22 +0200DGMrKong(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:36:23 +0200 <Surobaki> ski: Great! Thank you!
2022-06-27 18:36:25 +0200johnsoar(~arj0019@162.218.254.7)
2022-06-27 18:36:59 +0200 <ski> Surobaki : now, make sure that `substitute (ConstInt 3) VarY' produces a useful result ..
2022-06-27 18:37:44 +0200 <Surobaki> ski: That´s really cool about the subpattern flexibility.
2022-06-27 18:37:56 +0200 <Surobaki> Making it produce useful things is the easiest part
2022-06-27 18:38:58 +0200 <ski> often, when doing a structural recursion, you only want to "go one data constructor deep (at a time)" (no need to needlessly complicate the definition, repeating yourself (duplicate code/functionality), by going deeper) .. but sometimes you do, and then it's very handy to be able to
2022-06-27 18:39:27 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 268 seconds)
2022-06-27 18:39:40 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 18:40:10 +0200 <ski> one simple example of when you want to go deeper : checking whether a list is sorted (you need to compare adjacent elements, which requires you to go deeper than one element at a time)
2022-06-27 18:40:20 +0200 <Surobaki> One more quick question, is there a ¨neat¨ way to generalise argument positionality? That is, my current substitution function´s pattern takes `Mul x VarY´, so it requires `VarY´ on the right side. Do I need to write out a version that repeats it but for a `VarY´ on the left side or is there a Haskell trick to this?
2022-06-27 18:40:49 +0200 <ski> another example is tree restructurings (rotations and the like), when doing balanced trees (red-black trees, AVL trees, ..)
2022-06-27 18:41:45 +0200 <Cale> Surobaki: I'd just use a lambda probably?
2022-06-27 18:41:55 +0200 <ski> Surobaki : the "trick" (not really) is to go back to basics : instead of considering `Mul x y' for different shapes of `x' and `y' (where one or more might be, or contain, `VarY'), go back to just considering `VarY'
2022-06-27 18:42:00 +0200 <Cale> Surobaki: Or define the function to take a record
2022-06-27 18:42:04 +0200 <ski> iow, define :
2022-06-27 18:42:15 +0200 <ski> substitute (ConstInt i) VarY = ...
2022-06-27 18:42:18 +0200 <ski> (fill in the "..." part)
2022-06-27 18:42:25 +0200 <Cale> Oh, perhaps I misunderstood that type
2022-06-27 18:42:30 +0200 <Cale> yeah
2022-06-27 18:43:17 +0200 <Surobaki> ski: I feel a little stupid for not seeing that, seems obvious now. Thank you!
2022-06-27 18:43:52 +0200 <ski> Surobaki : if you do this, and then, when you handle the `Mul t u' case, you look for `VarY's everywhere inside `t' and `u', you'll handle all cases (obviously you also need cases for `Sum',`Sub' for completeness. also, what should happen to `VarX's ?)
2022-06-27 18:44:29 +0200 <ski> (also, you really should be able to substitute not only constants (`ConstInt i') for `VarY')
2022-06-27 18:44:42 +0200johnsoar(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:44:51 +0200johnsoar(~arj0019@162.218.254.7)
2022-06-27 18:45:02 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 18:46:23 +0200 <ski> (Surobaki : i'd suggest you not use the variable names `x' and `y' in `Mul x y', since it's easy to confuse those with `VarX' and `VarY' (as you've already done, above, i think). `t' and `u' would be appropriate (and conventional) since "t" is the first letter in "term")
2022-06-27 18:46:35 +0200johnsoar(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:46:46 +0200johnsoar(~arj0019@162.218.254.7)
2022-06-27 18:47:20 +0200leeb(~leeb@KD106154142041.au-net.ne.jp) (Ping timeout: 255 seconds)
2022-06-27 18:47:24 +0200 <BusConscious> when I do pattern matching in a function definition like runWhileLoop (WhileLoop cond body) = .. , is there a way to refer to the whole argument without having to type (WhileLoop cond body) again?
2022-06-27 18:47:31 +0200 <Surobaki> ski: The `X´ parts are unchanged, the thing I´m trying to accomplissh is skolemization. I´m swapping out every instance of a variable that´s considered an ¨output¨ by my logic (here I´ve explicitly said that I´ll have one output, that is `Y´) into a term that is free of outputs and only calculates things based on the inputs. This is getting more into first order logic so I´m not sure how simple / complicated my explanation is.
2022-06-27 18:47:50 +0200 <geekosaur> runWhileLoop loop@(WhileLoop cond body) = ...
2022-06-27 18:47:54 +0200 <ski> runWhileLoop command@(WhileLoop cond body) = ..command..cond..body.. -- BusConscious
2022-06-27 18:48:15 +0200cyanide3dinner(~cyanide4d@106.201.249.151)
2022-06-27 18:48:18 +0200 <BusConscious> ah thanks guys
2022-06-27 18:48:18 +0200 <Surobaki> ski: I´ll take that suggestion, thank you
2022-06-27 18:49:04 +0200 <ski> Surobaki : "The `X´ parts are unchanged" -- you have not showed code (for `substitute') which effects this
2022-06-27 18:49:58 +0200 <Surobaki> ski: Ahah yes it´s because I have not written it, I was struggling with the concepts of implementation for my tiny example of one pattern match for substitution.
2022-06-27 18:50:00 +0200 <ski> Surobaki : so far, i've only seen you talk about substitution, not skolemization per se. but sure, the former is a step on the way to the latter
2022-06-27 18:50:43 +0200 <ski> Surobaki : yes, you're making progress. one step at a time
2022-06-27 18:51:51 +0200DGMrKong(~arj0019@162.218.254.7)
2022-06-27 18:51:51 +0200johnsoar(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:52:54 +0200DGMrKong(~arj0019@162.218.254.7) (Read error: Connection reset by peer)
2022-06-27 18:53:02 +0200 <ski> BusConscious : btw, i'd probably pass `cond' and `body' as separate arguments to `runWhileLoop' (unless you really intend for `runWhileLoop' to handle all cases of a command, not just `WhileLoop' .. which sounds implausible, given your naming)
2022-06-27 18:53:25 +0200 <ski> iow, instead of
2022-06-27 18:53:32 +0200ARJ0019(~arj0019@162.218.254.7)
2022-06-27 18:53:42 +0200 <ski> runWhileLoop command@(WhileLoop cond body) = ..cond..body..(runWhileLoop command)..
2022-06-27 18:53:45 +0200 <ski> i'd go for
2022-06-27 18:54:02 +0200 <ski> runWhileLoop cond body = ..cond..body..(runWhileLoop cond body)..
2022-06-27 18:54:17 +0200DGMrKong(~arj0019@162.218.254.7)
2022-06-27 18:56:03 +0200 <ski> (the gain is you avoid having a partial `runWhileLoop' (or else having some weird, probably useless, catch-all case or something) .. and, i guess, the code is slightly shorter)
2022-06-27 18:57:17 +0200carbolymer(~carbolyme@dropacid.net) (Remote host closed the connection)
2022-06-27 18:58:27 +0200ARJ0019(~arj0019@162.218.254.7) (Ping timeout: 276 seconds)
2022-06-27 19:05:09 +0200unit73e(~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
2022-06-27 19:05:16 +0200coot(~coot@213.134.190.95)
2022-06-27 19:05:39 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 19:07:34 +0200mastarija(~mastarija@2a05:4f46:e02:8c00:18c1:ccb:3a22:c211)
2022-06-27 19:08:20 +0200econo(uid147250@user/econo)
2022-06-27 19:10:19 +0200mc47(~mc47@xmonad/TheMC47)
2022-06-27 19:10:45 +0200kimjetwav(~user@2607:fea8:2340:da00:2c1:c09d:7773:d7fc) (Remote host closed the connection)
2022-06-27 19:10:53 +0200ec(~ec@gateway/tor-sasl/ec) (Quit: ec)
2022-06-27 19:13:01 +0200mbuf(~Shakthi@223.178.68.221) (Quit: Leaving)
2022-06-27 19:14:13 +0200jakalx(~jakalx@base.jakalx.net) ()
2022-06-27 19:16:06 +0200 <Surobaki> ski: I´m gonna head off from work, thank you for all the help today. It´s immensely useful
2022-06-27 19:16:07 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
2022-06-27 19:16:19 +0200Surobaki(~surobaki@137.44.222.80) (Read error: Connection reset by peer)
2022-06-27 19:16:34 +0200notzmv(~zmv@user/notzmv) (Ping timeout: 272 seconds)
2022-06-27 19:16:58 +0200Midjak(~Midjak@82.66.147.146)
2022-06-27 19:19:09 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de)
2022-06-27 19:19:18 +0200kuribas(~user@ptr-17d51epftauu6rr1j35.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
2022-06-27 19:20:51 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 19:22:03 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-27 19:22:14 +0200albet70(~xxx@2400:8902::f03c:92ff:fe60:98d8)
2022-06-27 19:24:12 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-27 19:24:13 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 19:25:53 +0200arjun(~arjun@user/arjun)
2022-06-27 19:26:17 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds)
2022-06-27 19:28:38 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
2022-06-27 19:33:45 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de) (Ping timeout: 248 seconds)
2022-06-27 19:38:52 +0200 <kenaryn> I tried to follow the Chris book but I stomp upon an `not visible method in class` error. Please what can I do about it to circumvent it? Here is the snippet: https://0x0.st/oStv.png
2022-06-27 19:40:18 +0200 <geekosaur> lines 4 and 5 aren't indented, so they're outside the where clause
2022-06-27 19:41:55 +0200azimut(~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
2022-06-27 19:42:06 +0200 <geekosaur> that's also why youget the "lacks an accompanying binding" in the other pane
2022-06-27 19:42:33 +0200 <kenaryn> Lol how did you know.
2022-06-27 19:42:39 +0200 <kenaryn> You're good, thank you.
2022-06-27 19:42:44 +0200azimut(~azimut@gateway/tor-sasl/azimut)
2022-06-27 19:42:47 +0200 <geekosaur> because I know how layout (indentation) works
2022-06-27 19:43:10 +0200mmhat(~mmh@p200300f1c7385dd6ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2022-06-27 19:43:57 +0200 <kenaryn> I admit I knew not there was indentation for types in a class because that's the first time I define one.
2022-06-27 19:45:51 +0200 <geekosaur> you'll want to learn more about layout. basically, any time you have a "where" you want to indent the stuff that goes inside it (exception: module headers also have a "where" but indentation there is just annoying and not needed)
2022-06-27 19:46:21 +0200 <geekosaur> same for "let", "case", "do" which also use layout
2022-06-27 19:46:40 +0200 <geekosaur> you can also use braces instead of layout but this isn't idiomatic
2022-06-27 19:46:46 +0200coot(~coot@213.134.190.95)
2022-06-27 19:47:26 +0200telser_telser
2022-06-27 19:48:00 +0200 <geekosaur> one way to do this is to write it with the braces, and you'll probably indent what's inside of them… that indentation also works without the braces
2022-06-27 19:48:33 +0200lisbeths(uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity)
2022-06-27 19:49:29 +0200 <kenaryn> Allright, I'll stick with the idiomatic way :)
2022-06-27 19:49:56 +0200sympt5(~sympt@user/sympt)
2022-06-27 19:50:17 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de)
2022-06-27 19:51:10 +0200sympt(~sympt@user/sympt) (Ping timeout: 240 seconds)
2022-06-27 19:51:10 +0200sympt5sympt
2022-06-27 19:51:38 +0200justsomeguy(~justsomeg@user/justsomeguy) (Quit: WeeChat 3.5)
2022-06-27 19:52:54 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 19:54:24 +0200raym(~raym@user/raym) (Remote host closed the connection)
2022-06-27 19:54:24 +0200pleo(~pleo@user/pleo) (Quit: quit)
2022-06-27 19:56:34 +0200mmhat(~mmh@p200300f1c7385d3bee086bfffe095315.dip0.t-ipconnect.de)
2022-06-27 19:56:36 +0200carbolymer(~carbolyme@dropacid.net)
2022-06-27 19:57:13 +0200AkechiShiro(~licht@user/akechishiro) (Ping timeout: 248 seconds)
2022-06-27 19:57:26 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1) (Remote host closed the connection)
2022-06-27 19:58:18 +0200AkechiShiro(~licht@user/akechishiro)
2022-06-27 19:58:46 +0200 <sm> maerwald: one vote for OSFilePath :)
2022-06-27 20:00:41 +0200k8yun(~k8yun@user/k8yun)
2022-06-27 20:00:42 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 264 seconds)
2022-06-27 20:03:05 +0200mastarija(~mastarija@2a05:4f46:e02:8c00:18c1:ccb:3a22:c211) (Quit: Leaving)
2022-06-27 20:03:16 +0200arjun(~arjun@user/arjun) (Remote host closed the connection)
2022-06-27 20:05:12 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 20:05:54 +0200coot(~coot@213.134.190.95)
2022-06-27 20:06:43 +0200raym(~raym@user/raym)
2022-06-27 20:11:56 +0200cfricke(~cfricke@user/cfricke)
2022-06-27 20:12:01 +0200cyanide3dinner(~cyanide4d@106.201.249.151) (Remote host closed the connection)
2022-06-27 20:12:47 +0200Raito_Bezarius(~Raito@wireguard/tunneler/raito-bezarius)
2022-06-27 20:13:33 +0200_xor(~xor@74.215.182.83) (Quit: bbiab)
2022-06-27 20:13:45 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds)
2022-06-27 20:20:32 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net) (Ping timeout: 272 seconds)
2022-06-27 20:21:17 +0200eggplantade(~Eggplanta@2600:1700:bef1:5e10:385b:a633:1677:81b1)
2022-06-27 20:22:44 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Ping timeout: 255 seconds)
2022-06-27 20:23:43 +0200 <BusConscious> sm: here we go again?
2022-06-27 20:24:22 +0200 <BusConscious> I was wondering if I could use some external library to make handling paths easier, when i get to cd builtins and pattern matching in my shell
2022-06-27 20:24:38 +0200 <BusConscious> https://github.com/commercialhaskell/path is this a good pick?
2022-06-27 20:25:19 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2022-06-27 20:25:24 +0200 <maerwald[m]> sm: it's going to be OsPath
2022-06-27 20:26:50 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-06-27 20:27:48 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 20:30:25 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 20:33:25 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 244 seconds)
2022-06-27 20:36:42 +0200dyeplexer(~dyeplexer@user/dyeplexer)
2022-06-27 20:38:43 +0200moet(~moet@lib-02-subnet-194.rdns.cenic.net)
2022-06-27 20:38:45 +0200alp(~alp@user/alp)
2022-06-27 20:39:10 +0200 <moet> If anybody cares, I fixed the issue I was having with hoogle running in a VM last week by passing the option "foldr_xStep :: n:Nat -> Xsized r {n} -> [(OPsized r {n}, PIDsized {n})] -> Xsized r {n} @-}
2022-06-27 20:39:14 +0200 <moet> foldr_xStep :: Int -> Execution r -> [(Op r, PID)] -> Execution r
2022-06-27 20:39:17 +0200 <moet> foldr_xStep n x = foldr (uncurry (xStep n)) x
2022-06-27 20:39:51 +0200 <moet> ... sorry, wrong thing.. by passing the option: "-n --no-security-headers Don't send CSP security headers"
2022-06-27 20:40:21 +0200dyeplexer(~dyeplexer@user/dyeplexer) (Remote host closed the connection)
2022-06-27 20:40:37 +0200 <moet> okay, bye!
2022-06-27 20:40:38 +0200moet(~moet@lib-02-subnet-194.rdns.cenic.net) (Client Quit)
2022-06-27 20:43:16 +0200 <maerwald> BusConscious: imo no
2022-06-27 20:43:38 +0200 <BusConscious> maerwald: Yeah it doesn't look too active
2022-06-27 20:43:54 +0200 <BusConscious> So I should go with lower level filepath?
2022-06-27 20:44:19 +0200 <maerwald> I don't know... I didn't mean because it's not active, but because of its design decisions
2022-06-27 20:44:32 +0200 <maerwald> there's also hpath, paths and strong-path
2022-06-27 20:45:58 +0200 <BusConscious> maerwald: What do you take issue with specifically?
2022-06-27 20:46:17 +0200 <maerwald> Path puts information of File vs Dir on type-level, which makes no sense imo, because a path can point to a file in one second and a directory in the next second. The authors objected that it signals "intention", but that's not true either: https://hackage.haskell.org/package/path-io-1.7.0/docs/Path-IO.html#v:listDir
2022-06-27 20:47:09 +0200 <maerwald> so they've successfully conflated "system call thinks this is a directory (some time ago)" with "someone thinks this should be a directory"
2022-06-27 20:47:31 +0200cyanide3dinner(~cyanide4d@106.201.249.151)
2022-06-27 20:47:32 +0200 <maerwald> it gives you no guarantees whatsoever in the end, except that some functions will prematurely fail
2022-06-27 20:48:24 +0200 <monochrom> In my Unix and C course, I too remind students that the word "file" sometimes includes directories too.
2022-06-27 20:48:36 +0200jakalx(~jakalx@base.jakalx.net) (Error from remote client)
2022-06-27 20:48:38 +0200pleo(~pleo@user/pleo)
2022-06-27 20:49:13 +0200_ht(~quassel@231-169-21-31.ftth.glasoperator.nl) (Remote host closed the connection)
2022-06-27 20:49:17 +0200 <monochrom> Plus, what of symlinks? Some symlinks link to directories, some not.
2022-06-27 20:50:14 +0200 <maerwald> BusConscious: and there's some unsolved bugs on windows (not sure who to blame there though... prolly windows): https://github.com/commercialhaskell/path/pull/163#issuecomment-786559758
2022-06-27 20:50:56 +0200MajorBiscuit(~MajorBisc@wlan-145-94-167-213.wlan.tudelft.nl) (Ping timeout: 272 seconds)
2022-06-27 20:51:32 +0200 <BusConscious> monochrom: I was just about t ask that: If a dir is not just a file in unix
2022-06-27 20:51:51 +0200 <BusConscious> ok you convinced me
2022-06-27 20:52:02 +0200 <maerwald> yeah, on windows you also have junction points
2022-06-27 20:52:28 +0200 <monochrom> It depends on the context.
2022-06-27 20:52:37 +0200 <maerwald> abstracting over windows and unix is insane
2022-06-27 20:52:55 +0200 <BusConscious> but I don't really want to parse filepaths or handle their encoding, despite the fact that I could obviously
2022-06-27 20:53:01 +0200 <monochrom> But a scenerio is the accepted sentence "the file type is directory".
2022-06-27 20:53:20 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net)
2022-06-27 20:53:49 +0200 <BusConscious> mhm you listed some alternatives, but none are super active
2022-06-27 20:54:05 +0200jakalx(~jakalx@base.jakalx.net)
2022-06-27 20:54:05 +0200Luj(~Luj@2a01:e0a:5f9:9681:29a1:f7d3:71e5:d5df) (Quit: Ping timeout (120 seconds))
2022-06-27 20:54:11 +0200 <monochrom> Unix nomenclature has specifically "regular files" (and "special files", "named pipe", etc.) when you want to emphasize non-directory files.
2022-06-27 20:54:22 +0200Luj(~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb)
2022-06-27 20:54:33 +0200 <maerwald> BusConscious: why would they be active?
2022-06-27 20:54:48 +0200 <maerwald> it's just filepaths, not a compiler
2022-06-27 20:55:02 +0200 <geekosaur[m]> Why would they need to be active? It's not like things change regularly
2022-06-27 20:55:36 +0200 <maerwald> BusConscious: I wrote hpath btw. But it doesn't support windows just yet. That will take some more time.
2022-06-27 20:56:15 +0200 <BusConscious> ok I don't care about windows lol it's a unix shell
2022-06-27 20:56:28 +0200 <monochrom> Yeah please make multiple failed attempts at support windows, just so the commit history looks "active". >:)
2022-06-27 20:57:02 +0200 <maerwald> good, then hpath might work better... it's less constrained than path and has a pretty elaborate IO module (because it was written to be used by a filemanager)
2022-06-27 20:58:30 +0200Haskelytic(~Haskelyti@118.179.211.17) (Ping timeout: 252 seconds)
2022-06-27 20:58:52 +0200 <monochrom> Sometimes I pay attention to "active" too, when I have no other information whatsoever.
2022-06-27 20:59:28 +0200 <monochrom> But if maerwald says "try hpath" then that's better information than "active".
2022-06-27 21:00:33 +0200 <BusConscious> yeah that's a good argument
2022-06-27 21:00:47 +0200redmp(~redmp@lib-02-subnet-194.rdns.cenic.net)
2022-06-27 21:03:06 +0200 <DGMrKong> Anyone want to roast me on my implementation of average in Haskell: https://paste.tomsmeding.com/QIsHGiG9 ?
2022-06-27 21:03:12 +0200waleee(~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340)
2022-06-27 21:04:22 +0200 <BusConscious> I just don't want to rely on a package someone wrote years ago and will never look back to, which then inevitably breaks, so I have to pick up the pieces, but if it's someone on here I don't have that concern.
2022-06-27 21:07:11 +0200 <maerwald> BusConscious: and I consider the IO stuff more safe than 'directory' package. With directory I never know if a function follows symbolic links or not, what exceptions it throws, etc.
2022-06-27 21:09:23 +0200 <maerwald> like... for file copying, I really don't want the default to be "resolve symbolic links"
2022-06-27 21:09:32 +0200z0k(~z0k@206.84.143.59) (Ping timeout: 255 seconds)
2022-06-27 21:10:22 +0200 <BusConscious> DGMrKong: simpleAverage = (/) <$> sum <*> fromIntegral . length
2022-06-27 21:10:30 +0200 <BusConscious> But maybe I'm cutting corners?
2022-06-27 21:10:40 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba)
2022-06-27 21:11:06 +0200 <geekosaur> you're missing a key point
2022-06-27 21:11:52 +0200 <zzz> DGMrKong: (\y acc -> y + acc) is just (+)
2022-06-27 21:11:55 +0200 <geekosaur> your version will work but hold the whole list in memory, which is bad if it's a long list. the fold, if written correctly, will consume items immediatekt
2022-06-27 21:12:03 +0200 <geekosaur> *immediately
2022-06-27 21:12:09 +0200 <zzz> @pl (\y acc -> y + acc)
2022-06-27 21:12:09 +0200 <lambdabot> (+)
2022-06-27 21:13:01 +0200fizbin(~fizbin@c-76-116-163-70.hsd1.nj.comcast.net)
2022-06-27 21:13:18 +0200 <redmp> https://hackage.haskell.org/package/foldl-1.4.12/doc/Control-Foldl.html `average = (/) <$> L.sum <*> L.genericLength`
2022-06-27 21:14:18 +0200 <fizbin> Is there any formal rule or informal best practice statement that says that empty (from Alternative) should equal mempty when both are defined? If not, does anyone have a good example where they aren't the same?
2022-06-27 21:15:38 +0200 <DGMrKong> geekosaur: are you saying my solution is inefficient, or the one posted by BusConscious?
2022-06-27 21:15:54 +0200 <BusConscious> mine is inefficient
2022-06-27 21:16:06 +0200 <BusConscious> short /= effecient
2022-06-27 21:16:08 +0200 <geekosaur> BusConscious's. yours does a fold, so it can consume each list item as it's received, so the entire list can fuse away
2022-06-27 21:16:19 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
2022-06-27 21:16:45 +0200 <geekosaur> the Applicative solution has to hold the whole list in memory for both actions to apply to it, so it's short but wastes memory
2022-06-27 21:17:33 +0200 <DGMrKong> is there a way to keep my solution, but kill off my complex version of `+'
2022-06-27 21:17:42 +0200raym(~raym@user/raym) (Quit: leaving)
2022-06-27 21:17:46 +0200 <BusConscious> on the other side depending on how the list is internally represented, it could also mean less heap operations
2022-06-27 21:18:08 +0200 <geekosaur> fizbin, Alternative is defined as a monoid on applicative functors, so I would very much expect empty to be a "lifted" mempty
2022-06-27 21:18:41 +0200 <monochrom> geekosaur: Fortunately, the querent has an "n = length xs" so it suffers the same problem :)
2022-06-27 21:18:58 +0200 <geekosaur> that would be why I said "if written correctly" earlier
2022-06-27 21:19:07 +0200 <monochrom> Ah
2022-06-27 21:19:20 +0200 <BusConscious> but I have no idea how haskell internally works or how to anticipate performance of my code
2022-06-27 21:19:26 +0200 <geekosaur> ideally you build the length at the same time as the sum, so you can completely consume list items as you go
2022-06-27 21:19:35 +0200 <BusConscious> I know about lazy evaluation but it makes head hurt
2022-06-27 21:19:42 +0200 <geekosaur> BusConscious, a list is a singly linked list. fast but wasteful
2022-06-27 21:19:50 +0200 <geekosaur> on the other hand it's a loop encoded as data
2022-06-27 21:20:06 +0200 <geekosaur> and when you use it as such it compiles down to very tight, fast code
2022-06-27 21:20:13 +0200 <fizbin> geekosaur: Unfortunately, it's not clear to me what the documentation means when it says "A monoid on applicative functors." in the Alternative definition.
2022-06-27 21:20:35 +0200 <geekosaur> do you know what monoids are?
2022-06-27 21:20:51 +0200 <fizbin> Does it mean "Alternative is an alternate monoid you can implement for your type"?
2022-06-27 21:20:53 +0200 <zzz> semigroups with an identity, right?
2022-06-27 21:21:16 +0200 <ski> fizbin : do you have a case where you'd like them to differ ?
2022-06-27 21:21:30 +0200 <ski> fizbin : no
2022-06-27 21:22:06 +0200 <BusConscious> geekosaur: Ah well if it frees the lists it has to free every single element still, so no less heap operations. if it was more like a ArrayList things could be different.
2022-06-27 21:22:23 +0200 <monochrom> I put "data CA = MkCA Int a --- make this a monoid" on a past exam for this. :)
2022-06-27 21:22:25 +0200raym(~raym@user/raym)
2022-06-27 21:22:34 +0200 <monochrom> err I guess "data CA a"
2022-06-27 21:22:45 +0200 <geekosaur> BusConscious, if it can completely consume the list item and completely generate the list item then the list may never be on the heap
2022-06-27 21:23:07 +0200 <ski> monochrom : no inhabitants ?
2022-06-27 21:23:12 +0200 <monochrom> Now of course, I didn't teach "MkCA !Int !a", so it suffers just as much space inefficiency as before
2022-06-27 21:23:29 +0200 <geekosaur> this is kinda the ideal of list fusion, making a list fuse away completely
2022-06-27 21:23:48 +0200 <geekosaur> and it produces code that beats C compilers when you can pull it off
2022-06-27 21:23:49 +0200 <BusConscious> so how would you write that fold? and why does "length xs" destroy it? Because it has to be somehow immutable?
2022-06-27 21:24:07 +0200 <geekosaur> `length xs` means xs (the list) has to be kept around
2022-06-27 21:24:51 +0200 <geekosaur> if the fold both increments a counter to compute the length and adds the value for the sum in a single "action", then the list can be consumed instead of kept around
2022-06-27 21:24:57 +0200notzmv(~zmv@user/notzmv)
2022-06-27 21:25:22 +0200coot(~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot)
2022-06-27 21:25:46 +0200 <geekosaur> and in the best case the list doesn't even get created, because its consumption can be fused with its creation to create a tight loop and no visible list
2022-06-27 21:25:58 +0200 <geekosaur> just parameter passing
2022-06-27 21:26:52 +0200 <ski> (element passing, the list being virtual)
2022-06-27 21:26:53 +0200 <fizbin> I guess then that I don't know what it could mean to say "A monoid on applicative functors", because my inclination would be "what? Alternative is completely the wrong kind for that!" It can't be an anything of "applicative functors" in general, since it isn't like <|> takes two type constructors and gives you a new type constructor.
2022-06-27 21:27:24 +0200 <BusConscious> ah makes sense so you fold to a tupel one of which contains the number of elements summed and one of which contains the sum. That makes total sense and is not only more memory efficient, but also just faster
2022-06-27 21:27:40 +0200 <geekosaur> it's lifted. the applicative functor is f, a value within it is f a. mempty would be for a, empty is for f a
2022-06-27 21:28:00 +0200 <BusConscious> and it doesn't need the xs later so it destructs it in the fold
2022-06-27 21:28:02 +0200 <ski> fizbin : at least, it should mean that if `Alternative i', then for any `a', `i a' is a monoid (could be made an instance of `Monoid', perhaps hidden behind a `newtype')
2022-06-27 21:28:21 +0200 <geekosaur> this *could* involve a different monoid than the one chosen for the Monoid instance, but usually isn't
2022-06-27 21:28:40 +0200 <geekosaur> (there are lots of monoids, but we can only "bless" one unless we use a newtype wrapper)
2022-06-27 21:29:05 +0200 <k``> Rather than just a monoid, you should generally make it a left-annihilative monoid.
2022-06-27 21:29:18 +0200 <k``> Sorry, not being clear here.
2022-06-27 21:29:22 +0200 <ski> one monoid would be given by `pure empty' and `liftA2 (<>)'
2022-06-27 21:29:56 +0200 <ski> er, `pure mempty'
2022-06-27 21:29:56 +0200 <k``> empty should be left annihilative, not with <|> but with the Applicative.
2022-06-27 21:30:12 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net)
2022-06-27 21:30:14 +0200k8yun(~k8yun@user/k8yun) (Quit: Leaving)
2022-06-27 21:30:20 +0200kenaryn(~aurele@89-88-44-27.abo.bbox.fr) (Quit: leaving)
2022-06-27 21:30:25 +0200 <ski> which would probably be distinct from the `mempty' and `(<|>)' one, in general
2022-06-27 21:30:53 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net) (Ping timeout: 268 seconds)
2022-06-27 21:31:29 +0200 <fizbin> ski: When you say "for any a", are you restricting yourself to a types that are Monoids?
2022-06-27 21:31:40 +0200 <ski> fizbin : no
2022-06-27 21:31:56 +0200 <fizbin> ski: Because if not, I don't understand "pure mempty"
2022-06-27 21:32:16 +0200 <ski> well, *that* specific case was about when we had `Monoid a', sure
2022-06-27 21:32:29 +0200 <ski> (but `Alternative i' doesn't require that, in general)
2022-06-27 21:32:40 +0200 <geekosaur> keep in mind that the monoid is f a, not a
2022-06-27 21:32:41 +0200pseigo(~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net)
2022-06-27 21:32:47 +0200 <k``> So, take the semigroup formed by (*>). You definitely want `empty *> x` to be `empty`.
2022-06-27 21:33:03 +0200 <geekosaur> in particular, if f is Maybe and a is a semigroup, a has no mempty but Maybe a does
2022-06-27 21:33:42 +0200 <geekosaur> (or f can be [] or several other things)
2022-06-27 21:34:09 +0200pseigo(~pseigo@node-1w7jr9ye7hx4fkp40wi692pl2.ipv6.telus.net) (Client Quit)
2022-06-27 21:34:20 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net)
2022-06-27 21:34:31 +0200 <fizbin> Right, fine. I still don't see how this is an interpretation of "Alternative is a monoid on applicative functors".
2022-06-27 21:34:54 +0200 <geekosaur> because the monoid is dependent on the applicative functor
2022-06-27 21:34:57 +0200 <fizbin> I can agree that (empty, <|>) form a lowercase-m monoid.
2022-06-27 21:34:57 +0200yauhsien(~yauhsien@61-231-38-201.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
2022-06-27 21:35:33 +0200 <fizbin> (over T a, where T has an Alternative implementation and a is any type)
2022-06-27 21:35:54 +0200 <k``> You're saying that the type class constructor `Alternative :: (* -> > *) -> Constraint` isn't a monoid?
2022-06-27 21:36:56 +0200 <fizbin> Yes, though more I'm saying "I don't understand what the first sentence in the documentation for Alternative is saying".
2022-06-27 21:37:46 +0200mc47(~mc47@xmonad/TheMC47) (Remote host closed the connection)
2022-06-27 21:38:05 +0200 <fizbin> If it's merely saying that (empty, <|>) form a monoid over T a, then ... okay, though that sentence doesn't really say that.
2022-06-27 21:38:56 +0200 <geekosaur> depends on how you read it, I think. English is a lousy language for discussing mathematical concepts
2022-06-27 21:39:14 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de) (Ping timeout: 255 seconds)
2022-06-27 21:39:16 +0200 <geekosaur> (if we're being hinest, it's not so much better for enything else…)
2022-06-27 21:39:17 +0200 <k``> I think you're right that it doesn't say what it means to say. But It's more than just a monoid for `m a` ; it's `forall a. monoid (m a)` .
2022-06-27 21:40:49 +0200 <fizbin> Though back to my original question, there doesn't seem to be any good reason for empty and mempty to be the same if the lowercase-m monoids formed by (empty, <|>) and (mempty, <>) over T a are different monoids.
2022-06-27 21:42:32 +0200 <geekosaur> I said that about 10 minutes ago 🙂
2022-06-27 21:43:25 +0200 <k``> That's true, but at the same time if there's not enough argument for the Monoid instance to be one thing and not another, perhaps there should not be a Monoid instance.
2022-06-27 21:45:15 +0200 <fizbin> I got to this by seeing people's solutions for a Monoid instance of ZipList a that's apparently discussed in "Haskell Programming from First Principles" chapter 17.
2022-06-27 21:45:20 +0200 <geekosaur> that would be why we have Sum, Product, and Endo, for example
2022-06-27 21:45:30 +0200pseigo(~pseigo@d108-173-20-33.abhsia.telus.net) (Quit: left)
2022-06-27 21:45:33 +0200pseigo_(~pseigo@node-1w7jr9ye7hx4fsjarlsl1lkjw.ipv6.telus.net)
2022-06-27 21:45:54 +0200 <fizbin> The discussion there apparently leads to an instance of Monoid that has mempty /= empty
2022-06-27 21:45:56 +0200 <k``> For example, just about the only Alternative I can define for `Either c` with base is `instance (Monoid c)=> Alternative (Either c) where empty = Left empty ; Left x <|> Left y = Left (x <> y); Right x <|> _ = Right x; _ <|> Right y = Right y`
2022-06-27 21:46:59 +0200 <k``> But should I define the Monoid instance to mimic that? or be liftA2 (<>)? or to use a Monoid instance for each parameter and prefer one?
2022-06-27 21:47:14 +0200 <k``> Better to have no Monoid instance.
2022-06-27 21:47:16 +0200 <fizbin> This (mempty /= empty) struck me as odd and something I'd never seen before, so must be an obvious mistake, right? Only, maybe not.
2022-06-27 21:48:01 +0200 <geekosaur> ZipList violates a number of expectations. it's also one of the few Applicatives that isn't also a Monad
2022-06-27 21:48:28 +0200 <geekosaur> not saying it's related, but it does suggest to me to watch out for other differences
2022-06-27 21:48:54 +0200 <fizbin> Right. It's the canonical example of "multiple reasonable Applicative instances exist, only one of which can also be a Monad"
2022-06-27 21:52:33 +0200 <tomsmeding> <ski> (not sure if it's meant to be renamed back to `yahb', or if this is a more permanent change)
2022-06-27 21:52:43 +0200 <tomsmeding> ski: this is a fresh implementation https://git.tomsmeding.com/yahb2
2022-06-27 21:53:35 +0200 <ski> ic, ty fyi
2022-06-27 21:53:53 +0200 <geekosaur> oh, so I can pr instead of bugging you? I should do that then 🙂
2022-06-27 21:54:10 +0200 <tomsmeding> geekosaur: currently implementing, but it seems to have broken magically without me doing anything, debugging now
2022-06-27 21:54:21 +0200 <ski> @where yahb2
2022-06-27 21:54:21 +0200 <lambdabot> I know nothing about yahb2.
2022-06-27 21:54:30 +0200 <ski> @where+ yahb2 https://git.tomsmeding.com/yahb2
2022-06-27 21:54:30 +0200 <lambdabot> I will remember.
2022-06-27 21:54:36 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de)
2022-06-27 21:55:09 +0200Guest27(~Guest27@2601:281:d47f:1590::2df)
2022-06-27 21:57:40 +0200 <tomsmeding> ah PEBCAK
2022-06-27 21:58:22 +0200pretty_dumm_guy(trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5)
2022-06-27 21:59:15 +0200 <monochrom> "mempty" was perhaps poorly named.
2022-06-27 21:59:51 +0200 <monochrom> But this is what happens when math nomenclature is rejected and people go for "intuitive" "daily" "explain English" choices such as "Mappable".
2022-06-27 22:00:00 +0200 <Guest27> midentity?
2022-06-27 22:00:12 +0200 <[exa]> emptyoid
2022-06-27 22:00:12 +0200 <tomsmeding> mzero :p
2022-06-27 22:00:24 +0200 <ski> neutral
2022-06-27 22:00:31 +0200 <Guest27> [exa] lol
2022-06-27 22:00:34 +0200 <k``> mzero, mone, munit, midentity can all be misleading depending on context.
2022-06-27 22:00:55 +0200 <fizbin> I know, it's the identity for monoids, so let's call it "mid"...
2022-06-27 22:01:10 +0200 <fizbin> No chance of anyone confusing that, no...
2022-06-27 22:01:35 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
2022-06-27 22:01:48 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2)
2022-06-27 22:02:20 +0200 <[exa]> ski: if you name it like that, next year ICFP shall feature a functional pearl with monoids a la alignment chart, with chaotic evil monoids
2022-06-27 22:02:50 +0200pleo(~pleo@user/pleo) (Ping timeout: 240 seconds)
2022-06-27 22:02:54 +0200lyle(~lyle@104.246.145.85) (Quit: WeeChat 3.5)
2022-06-27 22:03:52 +0200 <k``> mzero is the perfect name for MonadPlus or Alternative, because it's anihilative for Functor multiplication and identity for addition.
2022-06-27 22:04:06 +0200 <[exa]> or maybe we should have {-# LANGUAGE OverloadedEmpty #-}
2022-06-27 22:04:28 +0200 <Guest27> XD
2022-06-27 22:04:52 +0200pseigo_(~pseigo@node-1w7jr9ye7hx4fsjarlsl1lkjw.ipv6.telus.net) (Ping timeout: 244 seconds)
2022-06-27 22:05:08 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2) (Remote host closed the connection)
2022-06-27 22:05:21 +0200yahb2(~yahb2@2a01:4f8:c0c:5c7b::2)
2022-06-27 22:05:39 +0200yax__(~yax__@user/yax/x-9576643)
2022-06-27 22:05:58 +0200fserucas(~fserucas@1.64.114.89.rev.vodafone.pt) (Quit: Leaving)
2022-06-27 22:06:00 +0200 <tomsmeding> % putStrLn "abc\ndef" -- geekosaur
2022-06-27 22:06:00 +0200 <yahb2> abc ; def
2022-06-27 22:06:23 +0200 <tomsmeding> https://git.tomsmeding.com/yahb2/commit/?id=cdc4a45d21353ebf9306bd8df83ec287ace7c0e4 :)
2022-06-27 22:07:30 +0200 <geekosaur[m]> 👍
2022-06-27 22:08:28 +0200 <monochrom> % purStrLn "abc ; def"
2022-06-27 22:08:28 +0200 <yahb2> <interactive>:10:1: error: ; • Variable not in scope: purStrLn :: [Char] -> t ; • Perhaps you meant ‘putStrLn’ (imported from Prelude)
2022-06-27 22:08:44 +0200 <monochrom> purr!
2022-06-27 22:08:48 +0200 <monochrom> % putStrLn "abc ; def"
2022-06-27 22:08:49 +0200 <yahb2> abc ; def
2022-06-27 22:10:29 +0200 <tomsmeding> % purStrLn = putStrLn . concatMap (\x -> if x == 't' then "rr" else [x])
2022-06-27 22:10:29 +0200 <yahb2> <no output>
2022-06-27 22:10:53 +0200coot(~coot@213.134.190.95)
2022-06-27 22:11:20 +0200 <Guest27> % purStrLn "tttttt"
2022-06-27 22:11:21 +0200 <yahb2> rrrrrrrrrrrr
2022-06-27 22:11:49 +0200 <tomsmeding> % purStrLn "the cat puts the sweets on the table"
2022-06-27 22:11:49 +0200 <yahb2> rrhe carr purrs rrhe sweerrs on rrhe rrable
2022-06-27 22:13:06 +0200 <Guest27> Add some run-length encoding to t = n*'r' and you have a compression scheme for pirate-speak
2022-06-27 22:13:39 +0200pseigo_(~pseigo@d108-173-20-33.abhsia.telus.net)
2022-06-27 22:14:17 +0200jgeerds(~jgeerds@55d45f48.access.ecotel.net)
2022-06-27 22:14:27 +0200pseigo_(~pseigo@d108-173-20-33.abhsia.telus.net) (Client Quit)
2022-06-27 22:14:40 +0200pseigo_(~pseigo@node-1w7jr9ye7hx4fsjarlsl1lkjw.ipv6.telus.net)
2022-06-27 22:15:24 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de) (Ping timeout: 276 seconds)
2022-06-27 22:17:49 +0200k``(~user@152.1.137.158) (Remote host closed the connection)
2022-06-27 22:18:04 +0200 <fizbin> % (\y x -> when (y>0) $ putStrLn (x ++ show (y-1) ++ " " ++ show x)) 3 "% (\\y x -> when (y>0) $ putStrLn (x ++ show (y-1) ++ \" \" ++ show x)) "
2022-06-27 22:18:04 +0200 <yahb2> <interactive>:20:10: error: ; Variable not in scope: when :: Bool -> IO () -> t
2022-06-27 22:19:00 +0200 <tomsmeding> % import Control.Monad
2022-06-27 22:19:00 +0200 <yahb2> <no output>
2022-06-27 22:19:42 +0200 <fizbin> % (\y x -> if (y<=0) then pure () else putStrLn (x ++ show (y-1) ++ " " ++ show x)) 5 "% (\\y x -> if (y<=0) then pure () else putStrLn (x ++ show (y-1) ++ \" \" ++ show x)) "
2022-06-27 22:19:43 +0200 <yahb2> % (\y x -> if (y<=0) then pure () else putStrLn (x ++ show (y-1) ++ " " ++ show x)) 4 "% (\\y x -> if (y<=0) then pure () else putStrLn (x ++ show (y-1) ++ \" \" ++ show x)) "
2022-06-27 22:20:00 +0200 <fizbin> Good bot, not listening to yourself.
2022-06-27 22:20:52 +0200 <tomsmeding> heh
2022-06-27 22:20:58 +0200 <tomsmeding> % let s = "putStrLn (\"let s = \" ++ show s ++ \" in \" ++ s)" in putStrLn ("let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:20:59 +0200 <yahb2> let s = "putStrLn (\"let s = \" ++ show s ++ \" in \" ++ s)" in putStrLn ("let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:21:01 +0200 <tomsmeding> shorter quine
2022-06-27 22:21:20 +0200 <fizbin> Not quite - you forgot the initial %
2022-06-27 22:21:38 +0200 <tomsmeding> % let s = "% putStrLn (\"let s = \" ++ show s ++ \" in \" ++ s)" in putStrLn ("let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:21:38 +0200 <yahb2> let s = "% putStrLn (\"let s = \" ++ show s ++ \" in \" ++ s)" in % putStrLn ("let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:21:52 +0200 <tomsmeding> % let s = "putStrLn (\"% let s = \" ++ show s ++ \" in \" ++ s)" in putStrLn ("% let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:21:53 +0200 <yahb2> % let s = "putStrLn (\"% let s = \" ++ show s ++ \" in \" ++ s)" in putStrLn ("% let s = " ++ show s ++ " in " ++ s)
2022-06-27 22:21:55 +0200 <tomsmeding> there we go
2022-06-27 22:22:13 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-27 22:22:26 +0200 <tomsmeding> almost boring in haskell if you know the pattern :p
2022-06-27 22:22:33 +0200kimjetwav(~user@2607:fea8:2340:da00:8a74:9ba2:1f9a:771d)
2022-06-27 22:22:56 +0200 <fizbin> % putStrLn $ ap (++) show $ "% putStrLn $ ap (++) show $ "
2022-06-27 22:22:56 +0200 <yahb2> % putStrLn $ ap (++) show $ "% putStrLn $ ap (++) show $ "
2022-06-27 22:22:56 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
2022-06-27 22:24:07 +0200 <fizbin> It's really "show" that makes quines easy in haskell.
2022-06-27 22:24:30 +0200Guest27(~Guest27@2601:281:d47f:1590::2df) (Quit: Client closed)
2022-06-27 22:29:13 +0200vysn(~vysn@user/vysn) (Ping timeout: 248 seconds)
2022-06-27 22:30:37 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl)
2022-06-27 22:30:59 +0200redmp(~redmp@lib-02-subnet-194.rdns.cenic.net) (Ping timeout: 255 seconds)
2022-06-27 22:32:09 +0200 <mrianbloom> It's not possible to parameterize a function with a closed type family? so for example the type is something like f :: a -> g a where g is some unknown closed type family with kind * -> *
2022-06-27 22:32:23 +0200 <ski> [exa] : hehe :)
2022-06-27 22:33:16 +0200pleo(~pleo@user/pleo)
2022-06-27 22:33:29 +0200 <ski> `fix show' generates a quine, right ?
2022-06-27 22:34:25 +0200 <mrianbloom> Seems easy to do it with an open family, but open families don't allow for the in order selection of rules.
2022-06-27 22:34:50 +0200merijn(~merijn@c-001-001-027.client.esciencecenter.eduvpn.nl) (Ping timeout: 240 seconds)
2022-06-27 22:35:20 +0200 <ski> > let quine = fix show in quine == read quine -- you don't say "no" ..
2022-06-27 22:35:26 +0200 <lambdabot> mueval-core: Time limit exceeded
2022-06-27 22:35:58 +0200 <fizbin> I believe "fix show" is an infinite list of backslashes.
2022-06-27 22:36:19 +0200 <ski> > all (== '\\') (fix show)
2022-06-27 22:36:21 +0200 <lambdabot> False
2022-06-27 22:36:27 +0200 <fizbin> Huh.
2022-06-27 22:37:01 +0200 <fizbin> % putStrLn $ take 100 (fix show)
2022-06-27 22:37:02 +0200 <yahb2> <interactive>:34:22: error: ; Variable not in scope: fix :: (a0 -> String) -> [Char]
2022-06-27 22:37:09 +0200 <ski> > fix show
2022-06-27 22:37:11 +0200 <lambdabot> "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\...
2022-06-27 22:37:34 +0200 <ski> so, it begins with a non-backslash
2022-06-27 22:37:53 +0200 <ski> > map (== '\\') (fix show)
2022-06-27 22:37:54 +0200 <lambdabot> [False,True,False,True,True,True,False,True,True,True,True,True,True,True,Fa...
2022-06-27 22:37:55 +0200 <fizbin> Right.
2022-06-27 22:39:43 +0200 <ski> @let infixr 5 /\/; (/\/) :: [a] -> [a] -> [a]; [] /\/ ys = ys; (x:xs) /\/ ys = x : (ys /\/ xs)
2022-06-27 22:39:45 +0200 <lambdabot> Defined.
2022-06-27 22:40:01 +0200abiss27(~abiss27@user/abiss) ()
2022-06-27 22:40:14 +0200mmhat(~mmh@p200300f1c7385d3bee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.5)
2022-06-27 22:40:43 +0200 <ski> > let quine = '\"' : repeat '\\' /\/ quine in quine == fix show
2022-06-27 22:40:49 +0200 <lambdabot> mueval-core: Time limit exceeded
2022-06-27 22:41:44 +0200cheater(~Username@user/cheater) (Read error: Connection reset by peer)
2022-06-27 22:41:49 +0200 <fizbin> > let quine = '\"' : repeat '\\' /\/ quine in take 1000 quine == take 1000 (fix show)
2022-06-27 22:41:51 +0200 <lambdabot> True
2022-06-27 22:41:59 +0200 <fizbin> > let quine = '\"' : repeat '\\' /\/ quine in take 10000 quine == take 10000 (fix show)
2022-06-27 22:42:02 +0200 <lambdabot> True
2022-06-27 22:42:02 +0200 <EvanR> I got a quine for you:
2022-06-27 22:42:09 +0200 <ski> > let abacaba = repeat 0 /\/ map succ abacaba in abacaba
2022-06-27 22:42:11 +0200 <lambdabot> [0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1...
2022-06-27 22:42:11 +0200 <EvanR> (no program at all outputs no program at all)
2022-06-27 22:42:42 +0200 <ski> (that's the number of `1' bits in the binary representations of `[1 ..]'. aka the number of times they're divisible by `2')
2022-06-27 22:42:49 +0200gurkenglas(~gurkengla@dslb-002-203-144-112.002.203.pools.vodafone-ip.de)
2022-06-27 22:43:58 +0200 <ski> > let bits = 0 : tail (bits /\/ map succ bits) in bits -- er, rather, this is that number of bits
2022-06-27 22:44:00 +0200 <lambdabot> [0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3...
2022-06-27 22:44:08 +0200 <fizbin> > putStrLn "% putStrLn $ show (5*5)"
2022-06-27 22:44:09 +0200 <ski> (the former was the number of trailing `0's)
2022-06-27 22:44:10 +0200 <lambdabot> <IO ()>
2022-06-27 22:44:31 +0200 <ski> @help run
2022-06-27 22:44:32 +0200 <lambdabot> run <expr>. You have Haskell, 3 seconds and no IO. Go nuts!
2022-06-27 22:44:50 +0200 <fizbin> run putStrLn "% putStrLn $ show (5*5)"
2022-06-27 22:45:11 +0200 <geekosaur> "@run"
2022-06-27 22:45:11 +0200cheater(~Username@user/cheater)
2022-06-27 22:45:15 +0200 <fizbin> @run putStrLn "% putStrLn $ show (5*5)"
2022-06-27 22:45:18 +0200 <lambdabot> <IO ()>
2022-06-27 22:45:29 +0200 <geekosaur> or "?run" if you're dmwit 🙂
2022-06-27 22:46:11 +0200 <geekosaur> there's a cheat code but I'm pretty sure it guards against this
2022-06-27 22:46:31 +0200 <geekosaur> > text "% putstrln $ show (5*5)"
2022-06-27 22:46:33 +0200 <lambdabot> % putstrln $ show (5*5)
2022-06-27 22:46:41 +0200 <fizbin> % putStrLn $ "> " ++ show (5*5)
2022-06-27 22:46:41 +0200 <yahb2> > 25
2022-06-27 22:46:43 +0200 <lambdabot> 25
2022-06-27 22:46:50 +0200 <geekosaur> and I got case wrong anyway
2022-06-27 22:47:01 +0200 <fizbin> So it goes in one direction, but not the other.
2022-06-27 22:47:27 +0200Vajb(~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
2022-06-27 22:48:00 +0200 <geekosaur> lame way exists to block that but I don't think I'm an admin
2022-06-27 22:48:21 +0200 <geekosaur> @ignore + yahb2
2022-06-27 22:48:21 +0200 <lambdabot> Not enough privileges
2022-06-27 22:49:24 +0200 <zzz> this is the reason Telegram makes bots invisible to eachother
2022-06-27 22:54:19 +0200mikoto-chan(~mikoto-ch@esm-84-240-99-143.netplaza.fi)
2022-06-27 22:56:38 +0200raehik(~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds)
2022-06-27 23:04:29 +0200cfricke(~cfricke@user/cfricke) (Quit: WeeChat 3.5)
2022-06-27 23:05:24 +0200 <fizbin> % (\s -> putStrLn ("> text $ ap (++) show " ++ show s)) "% (\\s -> putStrLn (\"> text $ ap (++) show \" ++ show s)) "
2022-06-27 23:05:24 +0200 <yahb2> > text $ ap (++) show "% (\\s -> putStrLn (\"> text $ ap (++) show \" ++ show s)) "
2022-06-27 23:05:27 +0200 <lambdabot> % (\s -> putStrLn ("> text $ ap (++) show " ++ show s)) "% (\\s -> putStrLn ...
2022-06-27 23:06:16 +0200 <fizbin> Were it not for line length, that would be a double-bot quine.
2022-06-27 23:07:07 +0200jmdaemon(~jmdaemon@user/jmdaemon)
2022-06-27 23:12:33 +0200yax__(~yax__@user/yax/x-9576643) (Quit: leaving)
2022-06-27 23:18:16 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-06-27 23:20:56 +0200 <ski> lambdabot also adds an initial space, to avoid that kind of loop
2022-06-27 23:21:48 +0200 <ski> (people used to try to break the bots in this way here, many years ago, when lambdabot was young)
2022-06-27 23:22:24 +0200 <fizbin> I don't see it. Is my IRC client omitting the additional space?
2022-06-27 23:22:54 +0200elkcl(~elkcl@broadband-37-110-156-162.ip.moscow.rt.ru) (Ping timeout: 246 seconds)
2022-06-27 23:23:32 +0200 <geekosaur> if you're using a proportional font, the space will be very thin
2022-06-27 23:25:54 +0200 <fizbin> Not using a proportional font, but can't see it.
2022-06-27 23:26:21 +0200 <fizbin> Also though, I didn't see the space at the start of that message, so my client must be trimming them.
2022-06-27 23:27:18 +0200fizbin(~fizbin@c-76-116-163-70.hsd1.nj.comcast.net) ()
2022-06-27 23:32:20 +0200moonsheep(~user@user/moonsheep)
2022-06-27 23:32:27 +0200 <moonsheep> How can I serialize a TypeRep?
2022-06-27 23:32:33 +0200 <moonsheep> Should I just show it?
2022-06-27 23:32:41 +0200 <moonsheep> Or is there some nicer way?
2022-06-27 23:33:08 +0200coot(~coot@213.134.190.95) (Quit: coot)
2022-06-27 23:33:26 +0200 <geekosaur> show is about as close as you'll get. the internal representation includes a fingerprint which is not stable across compiles, much less compiler versions
2022-06-27 23:33:26 +0200 <juri_> toJson?
2022-06-27 23:34:10 +0200acidjnk_new(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de)
2022-06-27 23:34:35 +0200takuan(~takuan@178-116-218-225.access.telenet.be)
2022-06-27 23:35:03 +0200takuan(~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
2022-06-27 23:35:48 +0200 <moonsheep> geekosaur: ah, what a pity
2022-06-27 23:35:54 +0200 <moonsheep> Thanks
2022-06-27 23:36:24 +0200 <moonsheep> juri_: TypeRep is not an instance of ToJSON
2022-06-27 23:36:30 +0200acidjnk(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de) (Ping timeout: 240 seconds)
2022-06-27 23:37:15 +0200 <BusConscious> Q: can I have exitcode-stdio run a shell script instead of it running a main-is haskell program?
2022-06-27 23:40:05 +0200 <BusConscious> haskel program meaning a haskell source under main-is that is compiled to be the executable whose exit code determines success of the test
2022-06-27 23:40:14 +0200 <BusConscious> to me that's just boilerplate
2022-06-27 23:41:04 +0200moonsheep(~user@user/moonsheep) (Quit: ERC 5.4 (IRC client for GNU Emacs 28.1))
2022-06-27 23:43:05 +0200 <BusConscious> ah I found something .. or not
2022-06-27 23:43:13 +0200 <BusConscious> https://stackoverflow.com/questions/31213883/how-to-use-cabal-with-bash-tests
2022-06-27 23:43:28 +0200 <BusConscious> not quite what I want but ok
2022-06-27 23:43:30 +0200moonsheep(~user@user/moonsheep)
2022-06-27 23:43:48 +0200mon_aaraj(~MonAaraj@user/mon-aaraj/x-4416475)
2022-06-27 23:43:49 +0200 <moonsheep> Actually I have just realized that SomeTypeRep doesn't instance Read, so there's not much use in Showing it.
2022-06-27 23:43:52 +0200 <geekosaur> moonsheep, https://github.com/xmonad/xmonad-contrib/issues/94#issuecomment-490064171 re serializing TypeRep halfway sensibly
2022-06-27 23:44:03 +0200 <geekosaur> ah
2022-06-27 23:44:12 +0200 <moonsheep> Oh thank
2022-06-27 23:44:14 +0200 <moonsheep> s
2022-06-27 23:44:25 +0200 <moonsheep> Does that go both ways?
2022-06-27 23:47:47 +0200acidjnk_new(~acidjnk@dynamic-046-114-169-223.46.114.pool.telefonica.de) (Ping timeout: 268 seconds)
2022-06-27 23:48:58 +0200 <geekosaur> liskin's PR linked in that issue should go both ways, I think
2022-06-27 23:49:29 +0200 <geekosaur> SomeTypeRep involves an existential iirc so it wouldn't have a Read instance, but TypeRep might
2022-06-27 23:51:29 +0200alp(~alp@user/alp) (Ping timeout: 268 seconds)
2022-06-27 23:52:20 +0200mstksg(~jle`@cpe-23-240-75-236.socal.res.rr.com) (Ping timeout: 244 seconds)
2022-06-27 23:53:31 +0200quarkyalice(~alice@172.77.16.153)
2022-06-27 23:53:31 +0200quarkyalice(~alice@172.77.16.153) (Changing host)
2022-06-27 23:53:31 +0200quarkyalice(~alice@user/quarkyalice)
2022-06-27 23:54:30 +0200mstksg(~jle`@cpe-23-240-75-236.socal.res.rr.com)
2022-06-27 23:55:34 +0200gnyeki(~gnyeki@user/gnyeki) (Quit: leaving)
2022-06-27 23:57:34 +0200zer0bitz_(~zer0bitz@2001:2003:f748:2000:79ea:c89f:ccc9:65e) (Read error: Connection reset by peer)
2022-06-27 23:59:51 +0200ubert(~Thunderbi@p200300ecdf0da505658f203d39a613fe.dip0.t-ipconnect.de) (Remote host closed the connection)