Home liberachat/#haskell: Logs Calendar

Logs on 2021-09-22 (liberachat/#haskell)

00:00:03 brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d)
00:00:28 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
00:00:43 favonia joins (~favonia@user/favonia)
00:02:32 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
00:02:45 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
00:04:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Quit: Lost terminal)
00:04:53 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
00:06:24 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
00:09:58 andreabedini[m] joins (~andreabed@2001:470:69fc:105::c821)
00:10:29 × jespada quits (~jespada@2803:9800:9842:7a62:4d47:2975:7b31:a447) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:11:47 × remexre quits (~nathan@user/remexre) (Read error: Connection reset by peer)
00:13:21 ec joins (~ec@gateway/tor-sasl/ec)
00:21:42 <lbseale> I see that `sum` is dangerous because it has a lazy accumulator, what should I use instead?
00:22:35 <geekosaur> write it yourself using foldl', I think
00:23:16 <geekosaur> (also iirc there's already a proposal to change that)
00:23:44 <Axman6> foldl' (+) 0
00:24:12 <lbseale> ok
00:25:36 <Axman6> I think generally GHC is good enough at inlining and doing strictness analysis on sum though
00:25:40 <dsal> You can also just use sum.
00:27:50 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
00:28:10 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
00:36:57 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
00:43:36 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Read error: Connection reset by peer)
00:44:17 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
00:44:36 × brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Quit: Leaving)
00:48:20 <dsal> The problem with "X being dangerous" is that it's easier to fix things than to have people forget that the easy obvious thing is no longer dangerous. I've seen a lot of dumb bad bugs in code because people tried to do a workaround for something "bad" that got fixed and they got the workaround wrong.
00:50:43 brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d)
00:52:32 jacks joins (~bc8165b6@217.29.117.252)
00:53:00 <jacks> lbseale, I think ghc is smart enough to optimize that away, at least with -O2 (and maybe even without)
00:53:51 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
00:58:21 × matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.1 - https://znc.in)
00:58:47 matijja joins (~matijja@193.77.181.201)
00:59:41 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
01:02:14 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
01:03:45 fef joins (~thedawn@user/thedawn)
01:04:14 ec joins (~ec@gateway/tor-sasl/ec)
01:10:17 × xff0x quits (~xff0x@2001:1a81:53a2:cb00:fe64:bcbc:d8a9:c1f9) (Ping timeout: 264 seconds)
01:11:52 xff0x joins (~xff0x@2001:1a81:53e4:c100:5359:f89f:44a7:385e)
01:17:10 remexre joins (~nathan@user/remexre)
01:25:42 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
01:25:45 neurocyte0136 joins (~neurocyte@185.238.252.138)
01:25:45 × neurocyte0136 quits (~neurocyte@185.238.252.138) (Changing host)
01:25:45 neurocyte0136 joins (~neurocyte@user/neurocyte)
01:26:18 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
01:27:35 andreabedini[m] parts (~andreabed@2001:470:69fc:105::c821) ()
01:27:40 × neurocyte013 quits (~neurocyte@user/neurocyte) (Ping timeout: 252 seconds)
01:27:40 neurocyte0136 is now known as neurocyte013
01:30:44 × matijja quits (~matijja@193.77.181.201) (Quit: ZNC 1.8.1 - https://znc.in)
01:31:48 andreabedini joins (~andreabed@8s8kj6nmjrp47ztpwbd7.ip6.superloop.com)
01:32:35 ec joins (~ec@gateway/tor-sasl/ec)
01:32:59 matijja joins (~matijja@193.77.181.201)
01:35:09 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
01:36:08 lavaman joins (~lavaman@98.38.249.169)
01:41:00 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
01:44:33 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
01:50:20 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
01:53:53 iqubic joins (~user@2601:602:9502:c70:f7dd:50c9:a1b6:901a)
01:55:47 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Remote host closed the connection)
01:56:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
01:59:28 a6a45081-2b83 joins (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507)
01:59:29 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 264 seconds)
01:59:52 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
02:00:10 <a6a45081-2b83> so I'm trying to debug a big program, I add trace statements like `traceShowM ("foo", foo, "bar", bar...)` and then compile it and run it to check what variable values are
02:00:19 <a6a45081-2b83> is there an easier way like adding breakpoints and stuff?
02:00:42 <a6a45081-2b83> and also compiling everytime and running in itself takes most of the time
02:02:23 × yinghua quits (~yinghua@2800:2121:1400:1db:705e:acf0:71e7:8a79) (Quit: Leaving)
02:03:40 ec joins (~ec@gateway/tor-sasl/ec)
02:09:37 × Melvar quits (~melvar@dslb-178-001-195-022.178.001.pools.vodafone-ip.de) (Quit: WeeChat 3.2)
02:10:20 <dsal> Make small programs and verify they work correctly, and then combine them into larger programs.
02:11:05 <Axman6> also using GHCi means you don't need to wait as long to compile. GHCi has a debugger built in too
02:11:45 <a6a45081-2b83> yeah, I'm trying to use `stack ghci` but idk why it is giving me an error which `stack build` is not ... hmm ..
02:12:33 tommd joins (~tommd@75-164-130-101.ptld.qwest.net)
02:12:49 × dolio quits (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in)
02:13:58 <Axman6> well, we have no idea either if you don't share the error...
02:15:05 × td_ quits (~td@muedsl-82-207-238-060.citykom.de) (Ping timeout: 252 seconds)
02:16:57 <a6a45081-2b83> this -> https://hastebin.com/kugixifonu.properties
02:17:02 td_ joins (~td@94.134.91.222)
02:17:10 × tommd quits (~tommd@75-164-130-101.ptld.qwest.net) (Ping timeout: 252 seconds)
02:18:13 <dsal> The type of extend is being inferred incorrectly. You'll need to specify the type you mean it to have.
02:18:21 <Axman6> any reason you're using foldrM when you don't use the monad at all?
02:18:56 <dsal> (I can't even tell what's meant from this context)
02:19:29 <a6a45081-2b83> idk why it is not treating extend as a polymorphic function and binding it's first argument to [Mode] instead of [as]
02:19:46 dolio joins (~dolio@130.44.130.54)
02:20:20 <dsal> Well, if you want it to have a particular type, you can say that. It'll make reading easier as well.
02:20:28 <a6a45081-2b83> i remember it works fine when I add the type definition for extend
02:20:47 <a6a45081-2b83> I wonder why stack build doesn't complain about this ... hmm ...
02:20:58 <awpr> https://wiki.haskell.org/Monomorphism_restriction
02:21:13 <awpr> could be some extension that implies NoMonomorphismRestriction is enabled in one or the other
02:21:27 <a6a45081-2b83> yeah very likely
02:23:53 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 252 seconds)
02:24:01 <a6a45081-2b83> found something: https://gitlab.haskell.org/ghc/ghc/-/issues/3202
02:25:18 <awpr> I don't /think/ that should affect .hs files being loaded by ghci
02:25:19 × andreabedini quits (~andreabed@8s8kj6nmjrp47ztpwbd7.ip6.superloop.com) (Quit: WeeChat 3.0.1)
02:25:30 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
02:27:27 <a6a45081-2b83> yeah adding an explicit type seems to have fixed it and is easier, seems like stack ghci is not picking up flags from my .cabal file ...
02:28:51 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
02:29:08 <awpr> hmm, I think it should respect those. how are you using stack ghci?
02:29:26 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 246 seconds)
02:31:35 <a6a45081-2b83> this is the stack.yaml file: https://github.com/iu-parfunc/gibbon/blob/master/gibbon-compiler/stack.yaml
02:32:14 <a6a45081-2b83> but I guess it's not in sync with <project_name>.cabal: https://github.com/iu-parfunc/gibbon/blob/master/gibbon-compiler/gibbon.cabal
02:32:37 ec joins (~ec@gateway/tor-sasl/ec)
02:33:57 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
02:34:48 <awpr> my hunch is if you're specifying the filename on the command line, Stack might not understand it's part of the package, and just try to load it as a standalone Haskell file
02:43:07 hololeap joins (~hololeap@user/hololeap)
02:44:29 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 264 seconds)
02:46:16 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
02:48:06 andreabedini joins (~andreabed@8s8kj6nmjrp47ztpwbd7.ip6.superloop.com)
02:51:56 × andreabedini quits (~andreabed@8s8kj6nmjrp47ztpwbd7.ip6.superloop.com) (Client Quit)
02:52:03 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 265 seconds)
02:53:40 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
02:56:42 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
02:59:40 nfd joins (~nfd@user/nfd)
02:59:57 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
03:03:22 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
03:06:33 × hpc quits (~juzz@ip98-169-35-13.dc.dc.cox.net) (Ping timeout: 265 seconds)
03:06:55 ec joins (~ec@gateway/tor-sasl/ec)
03:07:50 × hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:08:13 hpc joins (~juzz@ip98-169-35-13.dc.dc.cox.net)
03:12:50 × doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 252 seconds)
03:17:02 × zebrag quits (~chris@user/zebrag) (Remote host closed the connection)
03:18:14 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
03:22:13 zebrag joins (~chris@user/zebrag)
03:25:25 justsomeguy joins (~justsomeg@user/justsomeguy)
03:27:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
03:31:10 neo1 joins (~neo3@cpe-292712.ip.primehome.com)
03:31:19 hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com)
03:35:08 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
03:38:28 ec joins (~ec@gateway/tor-sasl/ec)
03:38:29 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
03:38:58 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Remote host closed the connection)
03:39:34 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
03:40:15 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Ping timeout: 276 seconds)
03:40:50 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
03:46:36 thyriaen joins (~thyriaen@dynamic-078-054-003-131.78.54.pool.telefonica.de)
03:55:19 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:55:20 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
03:55:20 wroathe joins (~wroathe@user/wroathe)
03:59:45 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
04:00:12 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
04:00:50 yauhsien_ joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
04:01:02 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Read error: Connection reset by peer)
04:01:14 × nfd quits (~nfd@user/nfd) (Ping timeout: 252 seconds)
04:05:23 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
04:06:54 img joins (~img@user/img)
04:10:08 ec joins (~ec@gateway/tor-sasl/ec)
04:10:52 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
04:11:17 ec joins (~ec@gateway/tor-sasl/ec)
04:12:25 kid-icarus joins (~kid-icaru@c-24-5-41-43.hsd1.ca.comcast.net)
04:13:48 × zebrag quits (~chris@user/zebrag) (Remote host closed the connection)
04:15:46 × yauhsien_ quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Remote host closed the connection)
04:16:23 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
04:21:05 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
04:28:22 Izem joins (~Izem@bras-base-london1483w-grc-31-74-12-158-179.dsl.bell.ca)
04:35:40 × kid-icarus quits (~kid-icaru@c-24-5-41-43.hsd1.ca.comcast.net) (Quit: Client closed)
04:41:17 <jle`> haskell is pretty neat
04:45:07 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
04:45:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
04:47:27 × thyriaen quits (~thyriaen@dynamic-078-054-003-131.78.54.pool.telefonica.de) (Quit: Leaving)
04:48:41 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:48:41 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
04:48:41 wroathe joins (~wroathe@user/wroathe)
04:50:42 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
04:52:45 gioyik joins (~gioyik@gateway/tor-sasl/gioyik)
04:54:21 × a6a45081-2b83 quits (~aditya@2601:249:4300:1296:88ec:cc73:84d4:1507) (Remote host closed the connection)
04:56:07 ec joins (~ec@gateway/tor-sasl/ec)
04:58:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
05:02:42 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
05:07:17 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
05:10:42 × statusbot1 quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection)
05:10:57 statusbot joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com)
05:11:21 lbseale_ joins (~lbseale@user/ep1ctetus)
05:11:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
05:13:32 ec joins (~ec@gateway/tor-sasl/ec)
05:14:23 × lbseale quits (~lbseale@user/ep1ctetus) (Ping timeout: 252 seconds)
05:14:23 × Nahra` quits (~user@static.161.95.99.88.clients.your-server.de) (Ping timeout: 252 seconds)
05:14:37 Nahra`` joins (~user@static.161.95.99.88.clients.your-server.de)
05:14:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:14:52 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
05:14:52 wroathe joins (~wroathe@user/wroathe)
05:17:29 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 264 seconds)
05:17:41 × hexology quits (~hexology@user/hexology) (Ping timeout: 252 seconds)
05:18:19 hexology joins (~hexology@user/hexology)
05:19:53 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
05:21:11 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:21:17 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 246 seconds)
05:24:34 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
05:24:34 allbery_b joins (~geekosaur@xmonad/geekosaur)
05:24:37 allbery_b is now known as geekosaur
05:27:10 chomwitt joins (~chomwitt@ppp-94-67-1-143.home.otenet.gr)
05:32:03 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
05:41:16 Izem parts (~Izem@bras-base-london1483w-grc-31-74-12-158-179.dsl.bell.ca) (Good Bye)
05:42:47 ec joins (~ec@gateway/tor-sasl/ec)
05:43:47 nfd joins (~nfd@user/nfd)
05:49:36 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
05:52:37 × superbil quits (~superbil@1-34-176-171.HINET-IP.hinet.net) (Quit: WeeChat 3.2)
05:52:58 superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net)
05:53:02 × jacks quits (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
06:01:31 fef joins (~thedawn@user/thedawn)
06:03:54 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
06:06:13 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
06:07:36 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
06:08:05 × brainfreeze quits (~brainfree@2a03:1b20:4:f011::20d) (Remote host closed the connection)
06:16:03 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
06:20:46 ec joins (~ec@gateway/tor-sasl/ec)
06:24:10 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
06:26:06 ubert joins (~Thunderbi@77.119.172.39.wireless.dyn.drei.com)
06:27:41 arjun joins (~Srain@user/arjun)
06:33:00 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
06:33:16 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
06:34:27 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
06:35:20 kenran joins (~kenran@b2b-37-24-119-190.unitymedia.biz)
06:35:45 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds)
06:44:42 Lycurgus joins (~juan@98.4.112.204)
06:46:27 fef joins (~thedawn@user/thedawn)
06:50:20 lavaman joins (~lavaman@98.38.249.169)
06:50:46 ub joins (~Thunderbi@77.119.172.39.wireless.dyn.drei.com)
06:51:32 × seeg quits (~thelounge@static.89.161.217.95.clients.your-server.de) (Quit: The Lounge - https://thelounge.chat)
06:52:06 seeg joins (~thelounge@static.89.161.217.95.clients.your-server.de)
06:52:35 ec joins (~ec@gateway/tor-sasl/ec)
06:54:02 × fresheyeball quits (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net) (Ping timeout: 246 seconds)
06:55:02 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
06:56:03 fresheyeball joins (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net)
06:56:04 michalz joins (~michalz@185.246.204.62)
06:58:38 × phma quits (~phma@host-67-44-208-5.hnremote.net) (Read error: Connection reset by peer)
06:59:03 × ub quits (~Thunderbi@77.119.172.39.wireless.dyn.drei.com) (Quit: ub)
06:59:22 ub joins (~Thunderbi@77.119.172.39.wireless.dyn.drei.com)
06:59:42 phma joins (~phma@host-67-44-209-62.hnremote.net)
07:03:50 × ub quits (~Thunderbi@77.119.172.39.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
07:06:18 × fef quits (~thedawn@user/thedawn) (Ping timeout: 276 seconds)
07:08:40 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:08:42 × Nosrep quits (~archbox@user/nosrep) (Ping timeout: 265 seconds)
07:09:45 jstolarek joins (~jstolarek@erx128.neoplus.adsl.tpnet.pl)
07:12:42 × gioyik quits (~gioyik@gateway/tor-sasl/gioyik) (Quit: WeeChat 3.1)
07:13:26 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
07:14:06 ec joins (~ec@gateway/tor-sasl/ec)
07:16:29 fendor joins (~fendor@77.119.193.149.wireless.dyn.drei.com)
07:17:42 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:18:45 wonko joins (~wjc@62.115.229.50)
07:19:51 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
07:23:02 lortabac joins (~lortabac@2a01:e0a:541:b8f0:2e6e:d4a5:1c64:daa)
07:24:29 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
07:26:25 hexfive joins (~eric@50.35.83.177)
07:27:28 mastarija joins (~mastarija@31.217.13.108)
07:29:57 × hexfive quits (~eric@50.35.83.177) (Client Quit)
07:30:50 Guest73 joins (~Guest73@wificampus-022110.grenet.fr)
07:32:17 <Guest73> hello. I've stumbled upon this type definition: `data Compose f g a = Compose { getCompose :: f (g a) } -- haskell book`
07:33:23 <Guest73> I assumed it would be used like so `Compose Node Maybe 1`
07:33:35 × Morrow quits (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 246 seconds)
07:33:52 chele joins (~chele@user/chele)
07:33:57 acidjnk joins (~acidjnk@p200300d0c703cb65087a628f3300f5c4.dip0.t-ipconnect.de)
07:33:59 <opqdonut> more like Compose Node Maybe Int
07:34:18 <Guest73> But the compiler yelled at me, I'm not sure I understand the constructor there
07:34:27 <opqdonut> Compose (Just [True]) :: Compose Maybe [] Bool
07:34:44 <opqdonut> you might have an easier time grokking this if you rename the value constructor to something like MkCompose
07:34:51 <opqdonut> then it's harder to mix up the types and values
07:35:03 <opqdonut> so: MkCompose (Just [True]) :: Compose Maybe [] Bool
07:35:46 <Guest73> so the inputs to the constructor have to also be in the form f (g a) ? I thought that was just what getCompose returned
07:36:05 <opqdonut> that's how named field work
07:36:16 <opqdonut> they give the type of the field, but also name the accessor function
07:36:35 <Guest73> thank you very much
07:36:54 <opqdonut> if you have something like `data Example = MkExample {getValue :: Int}` , you construct a value with `MkExample 1`
07:36:59 <opqdonut> same thing here, except more complex types
07:38:07 <Guest73> makes sense now, I should be more careful with notations from now on
07:39:10 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
07:40:03 × Guest73 quits (~Guest73@wificampus-022110.grenet.fr) (Quit: Client closed)
07:43:56 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
07:49:17 × lbseale_ quits (~lbseale@user/ep1ctetus) (Ping timeout: 264 seconds)
07:52:42 × Nahra`` quits (~user@static.161.95.99.88.clients.your-server.de) (Remote host closed the connection)
07:55:07 kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be)
07:56:55 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Remote host closed the connection)
07:56:59 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
07:58:38 max22- joins (~maxime@2a01cb088335980068341cc0d04f7803.ipv6.abo.wanadoo.fr)
08:00:58 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
08:03:09 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
08:05:37 hendursa1 joins (~weechat@user/hendursaga)
08:05:57 × arjun quits (~Srain@user/arjun) (Remote host closed the connection)
08:07:44 × michalz quits (~michalz@185.246.204.62) (Remote host closed the connection)
08:08:42 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
08:11:02 × xff0x quits (~xff0x@2001:1a81:53e4:c100:5359:f89f:44a7:385e) (Ping timeout: 246 seconds)
08:12:03 xff0x joins (~xff0x@2001:1a81:53e4:c100:b3ec:1b10:ec18:8c2)
08:15:12 lbseale joins (~lbseale@user/ep1ctetus)
08:15:42 qbt joins (~edun@user/edun)
08:16:43 × mastarija quits (~mastarija@31.217.13.108) (Quit: Leaving)
08:16:51 michalz joins (~michalz@185.246.204.61)
08:17:40 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
08:17:40 allbery_b joins (~geekosaur@xmonad/geekosaur)
08:17:43 allbery_b is now known as geekosaur
08:21:55 chris joins (~chris@81.96.113.213)
08:21:59 chris is now known as Guest3894
08:22:16 <sshine> 'ghcup tui' is really kinda neat.
08:22:44 <maerwald[m]> 💯
08:24:04 <sshine> if I hadn't read a comment on this channel about HLS, I probably wouldn't have guessed that if I upgrade HLS to 1.4.0, the labels next to GHC 8.10.7 would update to 'hls-powered' from not having it
08:25:12 <maerwald[m]> There's also `ghcup compile hls` now
08:25:19 <maerwald[m]> But it needs a bit fiddling for 9.0.1
08:34:53 Morrow joins (~MorrowM_@147.161.14.83)
08:36:04 haykam2 joins (~haykam@static.100.2.21.65.clients.your-server.de)
08:36:14 × azeem quits (~azeem@2a00:801:3c7:f4f5:1ae6:c0ab:f962:792a) (Read error: Connection reset by peer)
08:36:16 mikoto-chan joins (~mikoto-ch@84.199.144.235)
08:36:18 MorrowM joins (~MorrowM_@147.161.14.83)
08:36:24 azeem joins (~azeem@2a00:801:3c7:f4f5:1ae6:c0ab:f962:792a)
08:36:38 pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
08:36:45 chele_ joins (~chele@user/chele)
08:36:56 × azeem quits (~azeem@2a00:801:3c7:f4f5:1ae6:c0ab:f962:792a) (Read error: Connection reset by peer)
08:37:15 × cheater quits (~Username@user/cheater) (Read error: Connection reset by peer)
08:37:15 × abraham quits (~abraham@143.244.185.86) (Quit: Ping timeout (120 seconds))
08:37:37 abraham joins (~abraham@143.244.185.86)
08:37:38 × adamCS quits (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com) (Ping timeout: 265 seconds)
08:38:02 × chele quits (~chele@user/chele) (Read error: Connection reset by peer)
08:38:03 × nitrix quits (~nitrix@user/nitrix) (Quit: Genius is one percent inspiration and ninety-nine percent perspiration)
08:38:05 × pieguy128 quits (~pieguy128@bras-base-mtrlpq5031w-grc-57-65-92-163-194.dsl.bell.ca) (Quit: ZNC 1.8.2 - https://znc.in)
08:38:23 pieguy128 joins (~pieguy128@bas1-montreal02-65-92-163-194.dsl.bell.ca)
08:38:39 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
08:38:42 nitrix joins (~nitrix@ns569831.ip-51-79-81.net)
08:38:42 × nitrix quits (~nitrix@ns569831.ip-51-79-81.net) (Changing host)
08:38:42 nitrix joins (~nitrix@user/nitrix)
08:39:34 × Morrow quits (~MorrowM_@147.161.14.83) (Ping timeout: 265 seconds)
08:39:34 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 265 seconds)
08:39:35 × haykam1 quits (~haykam@static.100.2.21.65.clients.your-server.de) (Ping timeout: 265 seconds)
08:39:54 cheater joins (~Username@user/cheater)
08:40:07 cfricke joins (~cfricke@user/cfricke)
08:40:46 adamCS joins (~adamCS@ec2-34-207-160-255.compute-1.amazonaws.com)
08:41:26 favonia joins (~favonia@user/favonia)
08:42:35 __monty__ joins (~toonn@user/toonn)
08:45:28 × ubert quits (~Thunderbi@77.119.172.39.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
08:45:42 sheddow joins (~sheddow@2001:4652:3064:0:855:8e28:191f:6ce6)
08:47:50 × hnOsmium0001 quits (uid453710@id-453710.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
08:48:20 × MorrowM quits (~MorrowM_@147.161.14.83) (Ping timeout: 252 seconds)
08:50:12 × mikoto-chan quits (~mikoto-ch@84.199.144.235) (Quit: mikoto-chan)
08:51:05 × qbt quits (~edun@user/edun) (Ping timeout: 252 seconds)
08:57:09 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 268 seconds)
08:57:20 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
09:01:42 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Ping timeout: 260 seconds)
09:10:58 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
09:13:26 × neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Remote host closed the connection)
09:13:55 <jchia[m]> Is there a simple way (e.g. some haddock library) to take a random subset of size k from a list of n items, k <= n? I can almost use `sampleSubset` from https://hackage.haskell.org/package/monte-carlo-0.2/docs/Control-Monad-MC-Class.html but I don't care about order of the result, so I'd still have to sort the result from `sampleSubset`. I believe there's a rather standard algorithm for this but I prefer not to reinvent the wheel.
09:15:05 × vemek quits (~vemek@2a03:b0c0:2:d0::d98:1) (Quit: WeeChat 2.8)
09:15:30 <merijn> jchia[m]: Yes, but I forgot the name
09:15:40 <merijn> jchia[m]: I use it to sample from a stream of millions
09:16:22 <merijn> jchia[m]: basically, for every element generate a random number with range 0-N (where N is remaining elements)
09:16:51 <merijn> Then, if the generated number is smaller than K (remaining number of sample elements) keep the element and decrement K
09:17:24 <[exa]> merijn jchia[m]: it might be a Knuth shuffle, except just for the first K elems
09:17:41 Guest8973 joins (~neo3@cpe-292712.ip.primehome.com)
09:17:46 Guest8973 is now known as neo1
09:17:53 <merijn> [exa]: What I describe is effectively a variation of Fisher-Yates shuffle, yeah
09:18:12 <jchia[m]> merijn: Was there an actual haddock library that you used to do this?
09:18:34 <merijn> jchia[m]: No, because I do it in C inside an SQLite query :p
09:19:36 <[exa]> jchia[m]: what do you mean by "I'd have to sort the result" ?
09:20:09 <[exa]> you need the same order of the subset as in the original data?
09:20:28 <jchia[m]> exa: sampleSubset produces a sequence of random elements, but I don't want a sequence; I want a subset and don't care about the order.
09:20:34 <merijn> jchia[m]: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/cbits/random_sample.c#L12-L22
09:20:53 <merijn> jchia[m]: That's trivially solved by converting the sequence to a Set?
09:20:56 <jchia[m]> i want the elements in the subset to be in the same order as the original set/list.
09:21:02 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Remote host closed the connection)
09:21:08 × favonia quits (~favonia@user/favonia) (Ping timeout: 265 seconds)
09:21:08 <[exa]> jchia[m]: the order is "random generator order", there's always going to be an order with random numbers
09:21:19 <merijn> jchia[m]: Right, then you want my suggestion
09:21:20 <[exa]> ah so
09:21:39 <merijn> Which lets you uniform randomly drop (or keep, depending on your point of view) elements from an existing sequence
09:21:41 <jchia[m]> but i reckon i don't have more than a few million items in the original set, so it's no big deal to use sampleIntSubset and sort the resulting indexes
09:22:04 <[exa]> what's your `k`, roughly?
09:22:23 <[exa]> if it's like 10, just take 10 random integers and retry if some of them are same. :D
09:22:45 <jchia[m]> The conversion to set or sorting is just additional work that can be avoided if using a more precise algorithm, but I think I can live with the inefficiency.
09:22:54 <jchia[m]> around 10 million, probably
09:22:58 <jchia[m]> so, it's no big deal to do the sorting
09:23:32 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 252 seconds)
09:24:24 <jchia[m]> In C++, this type of sorting probably takes just a few seconds. My entire program takes hours typically and this sampling happens once per run.
09:26:15 <merijn> jchia[m]: I mean, my solution is simple, runs in linear time and (if input is a stream) storage linear in number of kept elements
09:26:33 <merijn> All you need is a decent uniform int generator
09:27:09 <jchia[m]> merijn: Doesn't conversion to Set take O(k log k)?
09:27:12 <merijn> Trivial to implement as a foldr too
09:27:41 <merijn> jchia[m]: Not that one, that was just an alternative when using sampleSubset
09:28:01 <merijn> I meant the C code I linked/described
09:28:03 <[exa]> there's some constructor that can build a Set from pre-ordered stuff right?
09:28:38 <merijn> [exa]: There are functions that create set assuming ordering, yes
09:28:42 <[exa]> yap https://hackage.haskell.org/package/containers-0.6.5.1/docs/Data-Set.html#v:fromAscList
09:28:52 jinsun joins (~quassel@user/jinsun)
09:29:17 <jchia[m]> merijn: OK, I think you mean the algorithm itself. The efficiency is not super-important. I'll start with the simple solution using sampleIntSubset first and if that's not fast enough, implement the algorithm in Haskell.
09:33:26 × mixfix41 quits (~homefame@user/mixfix41) (Ping timeout: 260 seconds)
09:34:56 juhp joins (~juhp@bb42-60-204-249.singnet.com.sg)
09:37:59 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
09:41:39 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
09:42:47 azimut joins (~azimut@gateway/tor-sasl/azimut)
09:48:20 × chomwitt quits (~chomwitt@ppp-94-67-1-143.home.otenet.gr) (Ping timeout: 246 seconds)
09:55:25 alzgh joins (~alzgh@user/alzgh)
09:55:26 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
09:58:21 × hgolden quits (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) (Ping timeout: 265 seconds)
09:59:09 × kenran quits (~kenran@b2b-37-24-119-190.unitymedia.biz) (Quit: WeeChat info:version)
10:05:46 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
10:07:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
10:08:42 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
10:09:53 qbt joins (~edun@user/edun)
10:10:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:13:53 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
10:15:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:15:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:16:58 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:20:32 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
10:21:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:26:08 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
10:26:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:29:12 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
10:32:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
10:32:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:32:38 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
10:34:53 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
10:37:25 × Guest3894 quits (~chris@81.96.113.213) (Remote host closed the connection)
10:40:58 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
10:42:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
10:43:34 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:48:47 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:49:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:51:13 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
10:51:44 lavaman joins (~lavaman@98.38.249.169)
10:54:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
10:55:16 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:56:21 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 265 seconds)
10:58:11 Morrow joins (~MorrowM_@147.161.14.83)
10:59:15 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
10:59:25 oxide joins (~lambda@user/oxide)
11:00:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
11:00:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:03:20 × nitrix quits (~nitrix@user/nitrix) (Remote host closed the connection)
11:03:41 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Ping timeout: 264 seconds)
11:04:11 jespada joins (~jespada@2803:9800:9842:7a62:4d47:2975:7b31:a447)
11:05:16 nitrix joins (~nitrix@ns569831.ip-51-79-81.net)
11:05:32 × nitrix quits (~nitrix@ns569831.ip-51-79-81.net) (Changing host)
11:05:32 nitrix joins (~nitrix@user/nitrix)
11:06:28 × michalz quits (~michalz@185.246.204.61) (Remote host closed the connection)
11:07:05 michalz joins (~michalz@185.246.204.33)
11:08:34 Cajun joins (~Cajun@user/cajun)
11:09:07 × max22- quits (~maxime@2a01cb088335980068341cc0d04f7803.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds)
11:09:41 ubert joins (~Thunderbi@178.115.37.114.wireless.dyn.drei.com)
11:12:48 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
11:13:16 azeem joins (~azeem@2a00:801:3c7:f4f5:1ae6:c0ab:f962:792a)
11:14:14 × pooryorick quits (~pooryoric@87-119-174-173.tll.elisa.ee) (Ping timeout: 265 seconds)
11:16:12 × azeem quits (~azeem@2a00:801:3c7:f4f5:1ae6:c0ab:f962:792a) (Read error: Connection reset by peer)
11:16:37 chomwitt joins (~chomwitt@ppp-94-67-1-143.home.otenet.gr)
11:17:12 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
11:20:36 __monty__ joins (~toonn@user/toonn)
11:20:40 × betelgeuse quits (~betelgeus@94-225-47-8.access.telenet.be) (Ping timeout: 260 seconds)
11:21:14 betelgeuse joins (~betelgeus@94-225-47-8.access.telenet.be)
11:24:35 pbrisbin joins (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net)
11:26:31 Guest68 joins (~Guest68@212.8.115.226)
11:29:00 × Guest68 quits (~Guest68@212.8.115.226) (Client Quit)
11:32:29 Guest07 joins (~Guest07@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
11:33:41 × pbrisbin quits (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net) (Ping timeout: 246 seconds)
11:34:59 <Guest07> Hello, I just installed stack and started a new project. But it locked base at >= 4.7 and < 5
11:35:04 <Guest07> Is this normal?
11:35:40 <dminuoso> Guest07: stack resolves packages using its resolvers, so everything is tied to whats in them anyway
11:35:48 <dminuoso> by default, anyhow
11:36:30 <merijn> Guest07: It's locked at *one* specific version of base
11:36:50 <merijn> Guest07: Base is hard-wired into GHC and any resolver only includes one GHC version anyway
11:37:10 <merijn> tbh, if it's generating ">= 4.7 && < 5" constraints on base that's bogus anyway
11:38:06 <Guest07> yes the base constraints are in my package.yaml. But stack.yaml references an lts resolver
11:38:29 <Guest07> specifically: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/10.yaml
11:39:14 <Guest07> merijn: so the contraints are redundant? Or are they there for when I upgrade the resolver?
11:39:50 <merijn> Guest07: Well, if you want anyone who doesn't use stack to have any hope of compiling/using your code, they're not redundant
11:40:42 <merijn> Guest07: My objection is that, unless you've tested code with other versions/ranges, your range should be "the PVP compatible range of what you're using *now*", so if stack is inserting wider ranges (like "4.7 >= && <5") that's just bogus
11:43:05 <Guest07> maybe there is something game breaking about base = 5, this is the latest lts afterall
11:44:15 <merijn> base 5 doesn't exist
11:44:36 <merijn> It's claiming the code works with "all future versions of base until version 5"
11:44:49 <Guest07> that can't be very sensible
11:44:49 <merijn> Which is obviously nonsense, since you dunno what will change in future versions of base
11:45:01 <merijn> It isn't
11:45:32 <merijn> Guest07: Incidentally, related to discussion of bounds: https://pvp.haskell.org/
11:45:33 <Guest07> merijn: thanks for the explanations
11:46:37 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Ping timeout: 265 seconds)
11:48:05 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
11:50:23 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
11:50:27 × Guest07 quits (~Guest07@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 256 seconds)
11:50:31 azeem joins (~azeem@emp-91-123.eduroam.uu.se)
11:53:37 <merijn> Also, you should commit the generated cabal file from your package into the repository (and, personal opinion incoming: probably ditch package.yaml entirely and just use the cabal file directly)
11:55:35 <maerwald> burn package.yaml
11:55:45 <maerwald> the pain it has caused us
12:01:35 × michalz quits (~michalz@185.246.204.33) (Remote host closed the connection)
12:02:19 michalz joins (~michalz@185.246.204.62)
12:03:47 × michalz quits (~michalz@185.246.204.62) (Remote host closed the connection)
12:04:27 michalz joins (~michalz@185.246.204.61)
12:08:09 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
12:09:55 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
12:14:32 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Remote host closed the connection)
12:20:35 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:20:59 pooryorick joins (~pooryoric@87-119-174-173.tll.elisa.ee)
12:21:06 [exa] hands over a box of matches
12:22:18 xiongxin joins (~quassel@119.123.102.205)
12:22:54 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
12:23:34 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
12:23:45 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
12:28:17 × dextaa quits (~DV@user/dextaa) (Ping timeout: 264 seconds)
12:29:19 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
12:32:09 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
12:32:33 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
12:33:26 tj_allemaal joins (~tj_allema@17-14-122.cgnat.fonira.net)
12:34:55 gehmehgeh joins (~user@user/gehmehgeh)
12:35:16 slowButPresent joins (~slowButPr@user/slowbutpresent)
12:35:21 chexum joins (~quassel@gateway/tor-sasl/chexum)
12:36:54 <Morrow> I think I've heard that stack includes the bogus bounds on base because Hackage requires it.
12:37:10 <maerwald> Morrow: I use base <100000
12:37:12 <maerwald> xD
12:37:25 <Morrow> lol
12:37:27 <merijn> Morrow: But why bogus bounds instead of just *actual* bounds
12:37:57 <Morrow> Because this is stack-land, where version bounds don't exist!
12:37:59 <merijn> i.e. "base ^>= 4.x" where x = base of the GHC in the resolver
12:38:12 <merijn> That's accepted by hackage and actually reasonable
12:38:17 <maerwald> merijn: meh, most packages work with more than one x
12:38:37 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
12:38:39 <merijn> maerwald: Sure, but if people don't *test* that they shouldn't *specify* it
12:38:57 <maerwald> PVP failed
12:39:22 <merijn> And that's a solid argument for "failing even more stuff"?
12:39:48 <int-e> applying PVP to base is not worth the hassle
12:40:50 <merijn> int-e: And yet shit breaks every GHC release
12:41:01 <merijn> There are at most 2 GHC releases a year
12:41:07 <int-e> A lot of stuff just keeps working.
12:41:16 <merijn> Which means worst case scenario, relax your base constraint twice a year
12:41:29 <merijn> (you need to update your CI for the new GHC anyway...)
12:41:33 <merijn> "oh god, the horror"
12:41:51 <merijn> int-e: If it keeps working you just edit one number twice a year :O
12:42:11 <merijn> ez pz
12:42:55 <maerwald> merijn: lol
12:43:03 <maerwald> right... file an NMU that takes half a year to process
12:43:23 <merijn> maerwald: That says something about "unmaintained packages" not "how constraints are too hard"
12:43:37 <maerwald> idc what it says, it's annoying
12:44:11 <int-e> merijn: So I'd have 3 times the number of releases for this silly little thing: https://hackage.haskell.org/package/ivar-simple
12:44:25 <int-e> (package size and stability is clearly a factor)
12:44:38 <merijn> int-e: You don't even have to make a new release
12:44:45 <merijn> You can revise the bound
12:45:02 <int-e> I can also do that when things break
12:45:04 int-e shrugs
12:46:38 <maerwald> int-e: exactly
12:46:49 <int-e> Personally I hate people having strict upper bounds on base because it makes it harder to try out a new version of ghc
12:46:57 <int-e> --allow-newer=base is too crude
12:47:29 <merijn> int-e: That's what ^>= is for? Then you can just relax all those bounds at once
12:47:40 fendor_ joins (~fendor@91.141.44.67.wireless.dyn.drei.com)
12:47:48 <maerwald> merijn: ^>= isn't enough
12:47:51 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.2.1)
12:48:44 <maerwald> it's bad syntax... I want to express a) 4.7-4.9 is tested, below 4.7 is broken shite, above 4.9 may work
12:49:56 <merijn> ^>= {4.7, 4.8, 4.9}
12:50:01 <maerwald> yeah, ugh
12:50:05 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
12:50:20 × fendor quits (~fendor@77.119.193.149.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
12:50:29 <maerwald> get someone to use this
12:50:37 pbrisbin joins (~patrick@pool-173-49-147-250.phlapa.fios.verizon.net)
12:50:45 <merijn> maerwald: Do you have better syntax?
12:50:57 <maerwald> probably if I thought hard enough
12:51:10 <maerwald> the point is... this is bolted on stuff that most ppl don't even know
12:51:15 <maerwald> and came too late
12:51:47 <merijn> So instead of "better late than never and educating people" you're solution is "fuck it, let's throw in the towel and give up"
12:51:49 <maerwald> damage is done, we're going to add stackage resolvers to cabal and then move on
12:52:05 <maerwald> (well, more complex contraints, but ...)
12:52:24 <maerwald> so no one is gonna rely heavily on PVP anymore anyway
12:52:57 <maerwald> and have you ever seen a haskell maintainner backport bugfixes to a previous major version?
12:53:23 <maerwald> so to get the bugfix you gotta upgrade to new API anyway
12:53:33 <maerwald> what's the point of PVP here
12:56:52 <int-e> ^>= {4.7, 4.8, 4.9} still doesn't allow people to *try* 4.10 without relaxing bounds.
12:57:25 <merijn> int-e: Except you can relax ^>= without relaxing regular bounds
12:57:52 dextaa joins (~DV@user/dextaa)
12:57:53 <merijn> int-e: The distinction is ^>= "not known to work with newer" whereas "<" says "known to not work with newer"
12:58:27 <merijn> int-e: The main problem with allow-newer was the inability to relax unknown bounds without immediately *also* breaking bounds known to not work
12:59:24 <int-e> So, the documentation is lying about ^>= being equivalent to >= ... <?
12:59:47 <merijn> int-e: It's equivalent in what it *does*, it's not equivalent in *meaning*
12:59:57 <merijn> int-e: i.e. it's equivalent in terms of what the solver will do
13:00:12 <merijn> It's not equivalent in terms of "supported operations on the commandline"
13:00:51 <merijn> int-e: You will get the same buildplans with ">= ... <" and "^>=", but you can choose to *only* relax ^>= bounds without touching < bounds on the cabal-install commandline
13:01:08 × dextaa quits (~DV@user/dextaa) (Read error: Connection reset by peer)
13:01:18 <merijn> Else there'd be no point to having ^>=
13:01:20 dextaa joins (~DV@user/dextaa)
13:01:33 <maerwald> no, how many people know this? :)
13:01:36 <maerwald> s/no/now/
13:01:55 <maerwald> version policies only work if people understand them
13:02:05 <int-e> Also, the documentation of that feature sucks. I looked around for a long time and finally found it described for cabal.project files.
13:02:12 <maerwald> yeah
13:02:16 <int-e> I didn't know.
13:02:45 <maerwald> bad syntax, bad documentation and too late... I think this feature isn't going to save us
13:02:54 <merijn> int-e: Maybe, but it was implemented during the time that all development and maintenance was basically just hvr and Oleg
13:03:47 <merijn> int-e: Lots of experienced Haskellers like to complain about the inadequacy of tool documentation, but not many step up and help...
13:04:13 <maerwald> I already have enough stuff to document :>
13:04:28 <merijn> So does everyone
13:04:37 zardoz joins (~bc8165b6@217.29.117.252)
13:04:54 <maerwald> if you want me to redo cabal docs, I'm afraid that will be a paid job
13:05:06 <merijn> I just get tired of people "just pointing out problems". Everyone already knows they're problems
13:05:20 <merijn> Either you help address them, or stop complaining
13:05:44 <int-e> I know. I also know that documenting stuff is hard, because documentation often needs to be redundant to be useful, but it's hard to think of all the perspectives, and it's also hard to overcome the instinct of not repeating oneself.
13:05:49 <zardoz> hi. what are your thoughts of using Show/Read instance for config files? I have something like this: data Action = MoveWindow Int Int | ResizeWindow Int Int | MinimizeWindow | MaximizeWindow deriving (Show, Read)
13:05:55 <maerwald> I don't think anyone is complaining. I'm merely stating my opinion that a) upper bounds are horrid and b) Caret operator isn't gonna solve it
13:05:58 <merijn> zardoz: Terrible
13:06:00 <dminuoso> zardoz: No.
13:06:04 <zardoz> why?
13:06:10 <dminuoso> So many reasons.
13:06:15 <merijn> zardoz: I only read the first sentence and I already know whatever else comes next is terrible
13:06:17 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
13:06:19 <maerwald> zardoz: use ini
13:06:21 <zardoz> I'm listening :P
13:06:27 <dminuoso> There's essentially non-existent useful errors for Read
13:06:30 <maerwald> https://hackage.haskell.org/package/ini
13:06:31 <int-e> merijn: It's not so much a complaint as an explanation why this feature is probably hardly known at all.
13:06:34 <dminuoso> The format is horrid and hard to explain for non-haskellers
13:06:36 <zardoz> maerwald, I am actually using ini. this is "action" property of an ini file
13:06:41 <dminuoso> Show also risks leaking secrets in the wrong places
13:06:42 <merijn> Read has no errors, Read is slow, Read is implementation specific
13:06:51 <maerwald> ini is great
13:06:53 <merijn> Show is implementation specific too
13:07:22 <merijn> zardoz: Many people think "I know, I'll just tie my external format directly to my internal datatypes. It'll be easy"
13:07:31 <dminuoso> zardoz: Personally Im quite fond of config-schema
13:07:33 <int-e> > read ('"' : repeat ' ') :: Int
13:07:36 <merijn> These same people are in for lots of lots of pain in the medium to long future
13:07:39 <lambdabot> mueval-core: Time limit exceeded
13:08:09 <dminuoso> It has a nice config format with an automatically derivable parser, good error diagnostics, and built-in documentation generation of expected format.
13:08:17 <dminuoso> With a mild dependency overhead.
13:08:40 <dminuoso> ini is also fine, but potentially too limiting depending on your needs
13:08:41 <zardoz> parsing this myself isn't too hard, but seems like a a double effort. and I like the syntax Show/Read gives me. though I didn't know Read is implementation specific (not that it matters at this point, but still)
13:08:42 tj_allemaal parts (~tj_allema@17-14-122.cgnat.fonira.net) ()
13:08:45 <merijn> zardoz: The number of times I've added an explicit conversion/parsing step between "external data format" and "internal data types" and regretted it, is zero. The number of times I *didn't* do that and regretted it is: literally every time
13:09:05 <dminuoso> zardoz: you have *no* useful error other than "Nope!" if there's any syntax error.
13:09:18 <dminuoso> take the extra time and set up proper parsing
13:09:23 <zardoz> dminuoso, error is easy to add. wrong action in section X at property Y
13:09:28 <dminuoso> nope, its not
13:09:30 <zardoz> wrong action syntax*
13:09:39 <dminuoso> `readMaybe` gives you Nothing.
13:09:40 <zardoz> well I did it :P
13:09:40 <dminuoso> That's it.
13:09:47 <zardoz> right. that's enough for error above
13:10:06 <dminuoso> "invalid config" is quite useless if you dont even know what's wrong.
13:10:19 <dminuoso> you dont have "wrong action in section X at property Y" with read.
13:10:25 <dminuoso> It's simply "
13:10:27 <dminuoso> "nope"
13:10:36 <zardoz> I am parsing ini file manually. read is just used to parse a single line of a single property in an ini file
13:11:01 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
13:11:31 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
13:12:04 <zardoz> (well, one line per property, and there's one action property in every ini section)
13:13:16 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
13:13:53 <zardoz> example of test ini file: https://pastebin.com/gegbbiP7
13:13:59 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 252 seconds)
13:14:38 cheater joins (~Username@user/cheater)
13:14:40 <zardoz> so I have to parse the ini file, get all the sections, get target/action properties, and then I send those lines to readMaybe. so I know exactly what failed
13:14:48 <zardoz> so error messages are not an issue. other things might be though
13:17:50 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
13:18:17 MQ-17J joins (~MQ-17J@2607:fb90:885d:dc4:b0b2:2c03:76da:1640)
13:20:24 × qbt quits (~edun@user/edun) (Ping timeout: 265 seconds)
13:20:42 × dextaa quits (~DV@user/dextaa) (Ping timeout: 260 seconds)
13:20:53 favonia joins (~favonia@user/favonia)
13:21:06 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
13:21:06 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
13:21:06 wroathe joins (~wroathe@user/wroathe)
13:21:50 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
13:22:02 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
13:22:15 chexum joins (~quassel@gateway/tor-sasl/chexum)
13:22:40 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
13:22:53 × acidjnk quits (~acidjnk@p200300d0c703cb65087a628f3300f5c4.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
13:24:37 thyriaen joins (~thyriaen@dynamic-078-054-003-131.78.54.pool.telefonica.de)
13:25:38 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3)
13:25:53 zebrag joins (~chris@user/zebrag)
13:34:04 max22- joins (~maxime@2a01cb08833598009945523f8c6be6aa.ipv6.abo.wanadoo.fr)
13:35:47 dextaa joins (~DV@user/dextaa)
13:36:40 × hrnz quits (~ulli@vegan.im.it) (Ping timeout: 240 seconds)
13:37:10 × noddy quits (~user@user/noddy) (Ping timeout: 240 seconds)
13:37:34 × dyniec quits (~dyniec@mail.dybiec.info) (Ping timeout: 252 seconds)
13:38:05 dyniec joins (~dyniec@mail.dybiec.info)
13:38:08 noddy joins (~user@user/noddy)
13:38:41 × sheddow quits (~sheddow@2001:4652:3064:0:855:8e28:191f:6ce6) (Ping timeout: 256 seconds)
13:38:55 robbert-vdh joins (~robbert@robbertvanderhelm.nl)
13:42:01 hrnz joins (~ulli@vegan.im.it)
13:42:48 <ldlework> "An astute reader might have noticed that the mapping from integers to adders follows from the second interpretation of the type signature of mappend as m->(m->m). It tells us that mappend maps an element of a monoid set to a function acting on that set."
13:42:50 <ldlework> huh
13:44:06 <robbert-vdh> Anyone know of some kind of trick to get some sort of default value with the ImplicitParameters extension? Basically, I have a function that evaluates a form with an implicit parameter set, and I'd like it to not do that when the parameter is already set. (kind of like how withFrozenCallStack doesn't do anything when the call stack is already frozen)
13:44:34 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
13:44:34 allbery_b joins (~geekosaur@xmonad/geekosaur)
13:44:37 allbery_b is now known as geekosaur
13:45:19 <lortabac> robbert-vdh: maybe you can use a Maybe?
13:45:19 <robbert-vdh> I was hoping that using an overlapping type class with the parameter as a constraint would do the trick, but the type checker obviously doesn't like that :)
13:46:27 <robbert-vdh> lortabac: Is there some implementation detail that lets `(?foo :: Maybe Bar)` default to Nothing? (I'd also not want this all the time, I just need this fallback behaviour in a single function)
13:49:31 Brumaire joins (~quassel@37.164.75.100)
13:49:48 mc47 joins (~mc47@xmonad/TheMC47)
13:49:59 viluon joins (uid453725@id-453725.helmsley.irccloud.com)
13:50:39 <robbert-vdh> Basically, as an XY problem, if something along the lines of this would work (so, kinda like C++'s SFINAE) then that would be great https://hastebin.com/wobuvukubi.hs
13:50:50 × Morrow quits (~MorrowM_@147.161.14.83) (Ping timeout: 252 seconds)
13:51:23 × phma quits (~phma@host-67-44-209-62.hnremote.net) (Read error: Connection reset by peer)
13:52:26 <lortabac> robbert-vdh: I would use a Reader and start the whole thing with runReader ... Nothing
13:52:40 <lortabac> then you can override the value with local
13:54:31 phma joins (~phma@host-67-44-209-25.hnremote.net)
13:54:38 <lortabac> what you want to achieve is probably doable but I wouldn't rely on such tricks
13:55:44 × MQ-17J quits (~MQ-17J@2607:fb90:885d:dc4:b0b2:2c03:76da:1640) (Read error: Connection reset by peer)
13:56:01 <dminuoso> ldlework: So this is the observation that functions take only a single argument.
13:56:09 <dminuoso> lortabac: mappend takes a single argument and returns a function.
13:56:13 MQ-17J joins (~MQ-17J@35.50.35.3)
13:56:14 <dminuoso> Woah. This is confusing.
13:56:17 <dminuoso> % :t mappend
13:56:17 <yahb> dminuoso: Monoid a => a -> a -> a
13:56:29 <dminuoso> lortabac: ^- This parses as `Monoid a => a -> (a -> a)`
13:56:48 <dminuoso> And again. sorry. ldlework - somehow I expected weechat to do tabcompletion a particular way.
13:56:49 shriekingnoise joins (~shrieking@186.137.144.80)
13:57:28 <ldlework> dminuoso: Sure, but I already knew that. It's the realization in that doing so there is a CT arrow in play.
13:57:38 <dminuoso> A CT arrow?
13:58:05 × Brumaire quits (~quassel@37.164.75.100) (Ping timeout: 265 seconds)
13:58:14 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
13:58:19 <ldlework> category theory arrow
13:58:44 <[exa]> I'm not sure if this arrow is that much abstract
13:58:49 <ldlework> I'm reading Milewski
13:59:43 <dminuoso> Good to see that beginners are still misdirected into the category theory trap.
13:59:45 <robbert-vdh> lortabac: It would need to be an implicit parameter, so that's not really an option. (without refactoring ~30k LoC to operate within a monad) We're currently hijacking HasCallStack and that works, but it would be much nicer to have a separate implicit parameter.
14:00:08 <dminuoso> Haskell has been losing its reputation as "being hard and requiring category theory" lately
14:00:35 <ldlework> dminuoso: HFFP very much gave me that exact impression. It is simply the fact that at this point I am merely curious now.
14:00:55 <lortabac> honestly I don't get why so many beginners want to learn Haskell and category theory at the same time
14:01:02 <lortabac> it makes their lives much harder
14:01:20 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
14:01:30 <dminuoso> With what I know of category theory now, I wouldn't reapproach it unless I happened to pick up some random fields of mathematics, just so category theory would make more sense..
14:01:33 <[exa]> ldlework: [*imperator voice:*] good, gooood.
14:01:37 <ldlework> I have been coding for a long time. It took about 6 days to consume Haskell as a normal ML and start writing graphical and network applications of it
14:02:01 <dminuoso> Merely learning CT for Haskell is as useful as learning group theory for adding numbers..
14:02:13 <ldlework> I have simply been hooked by learning about the abstract side of things. I come from a philosophy background so I'm interested in this more general structure.
14:02:18 <dminuoso> At least that's how I feel about it
14:03:20 lavaman joins (~lavaman@98.38.249.169)
14:03:24 <ldlework> An aquaintance of mine tried to get me into Haskell for years, and simply could not help himself from presenting it in the verbiage of category theory which consistently put me off. I refused to believe I needed to know all this crap just to write programs.
14:04:08 <ldlework> But now that I've got the uptake of Haskell as just a programming language, I guess I'm finally at a place where I'm curious to find out about this other stuff for its own right.
14:04:10 <ldlework> Something like that
14:05:01 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 252 seconds)
14:05:20 <[exa]> CT is sometimes great for discovering structures&relations that are not obvious at all, and haskell programming kinda encourages that
14:05:41 <lortabac> robbert-vdh: I think the sane way of doing it is to set the implicit parameter to Nothing before the whole computation starts
14:05:58 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Ping timeout: 260 seconds)
14:06:17 <lortabac> robbert-vdh: you probably need to add the constraint to a couple of signatures, but that's better than refactoring 30k lines
14:06:47 <[exa]> ldlework: as with the monoids, it might be useful to see they're isomorphic to functions tat paste tiny amount of stuff to the other stuff, sometimes later enjoying this fact by pasting the functions together with <> or mconcat without much extra thinking
14:07:30 <[exa]> but like, don't overdo it
14:07:37 <ldlework> [exa]: I do suspect that my struggle will being able to keep these generalizations in mind while actually writing code
14:07:50 <robbert-vdh> lortabac: That's sadly also not possible here. Or at least, not without refactoring thousands of functions. This is a library, so you'd need to set that default value at the start of every exposed library function, but the libraries functions tend to also call other library functions. So then you'd either need to do that refactor, or be left with the same problem.
14:07:51 <ldlework> And that I'll forget them and just code how I usually do
14:08:02 <[exa]> ldlework: yeah well, think about people who will read the code after you
14:08:23 <[exa]> anyway most of it becomes pretty intuitive after you actually use the concepts for a few times
14:08:47 <robbert-vdh> (so the actual end goal is to save call stack information in an implicit parameter so it can be accessed deep inside of some function calling chain)
14:09:15 <lortabac> robbert-vdh: https://blog.csongor.co.uk/global-implicit-parameters/
14:09:30 <lortabac> you can try this ↑
14:11:50 <lortabac> however I don't know what the rules are when overriding implicit parameters, and whether those rules are reliable
14:11:55 Sgeo joins (~Sgeo@user/sgeo)
14:12:08 hnOsmium0001 joins (uid453710@id-453710.hampstead.irccloud.com)
14:12:23 <lortabac> as I said, Reader is a better option for this kind of stuff
14:12:39 haritz joins (~hrtz@62.3.70.206)
14:12:40 × haritz quits (~hrtz@62.3.70.206) (Changing host)
14:12:40 haritz joins (~hrtz@user/haritz)
14:12:45 Everything joins (~Everythin@37.115.210.35)
14:12:54 × haritz quits (~hrtz@user/haritz) (Remote host closed the connection)
14:13:54 haritz joins (~hrtz@62.3.70.206)
14:13:54 × haritz quits (~hrtz@62.3.70.206) (Changing host)
14:13:54 haritz joins (~hrtz@user/haritz)
14:14:06 <dminuoso> CT is something that's nice to sprinkle ontop *after* you've become a seasoned haskeller - but only if you enjoy CT.
14:14:06 <robbert-vdh> lortabac: Yeah I also found that one! But the issue there is that you'll end up with basically the same situation as with HasCallStack, while relying on even more GHC implementation details. The main benefit I envisioned when using some custom implicit parameter instead of HasCallStack would be that you'd get a type checker error if you forgot to either define or propagate it.
14:14:20 <dminuoso> Learning CT *before* or *while* learning Haskell is likely not going to be helpful and just confusing.
14:14:22 <robbert-vdh> Reader would be the better option, but that's just not going to be feasible
14:14:22 <dminuoso> I made that mistake.
14:14:37 <dminuoso> Wish I hadnt, it delayed my basic haskell competencies by nearly half a year.
14:15:25 <dminuoso> ldlework: Im not trying to dissuade you from learning CT, but when you're also new to Haskell, Im confident it's going to be more time efficient to look at CT after you've become acquianted with haskell
14:20:27 <jneira[m]> <maerwald> "if you want me to redo cabal..." <- https://github.com/haskell/cabal-userguide
14:21:16 <ldlework> I become confused when I read:
14:21:18 <ldlework> "Now I want you to forget that you are dealing with the set of natural numbers and just think of it as a single object, a blob with a bunch of morphisms — the adders. A monoid is a single object category. In fact the name monoid comes from Greek mono, which means single. Every monoid can be described as a single object category with a set of morphisms that follow appropriate rules of
14:21:20 <ldlework> composition.
14:21:53 <ldlework> Are the set of natural numbers, the single object? Or is the blob of morphisms, the adders, the functions, the object?
14:22:12 <ldlework> by "single object category" do they mean "a category with a single object"?
14:22:21 <ldlework> I have a hard time understanding what that single object is.
14:24:53 <ldlework> When I think morphism I think of transformation, and are the morphisms things that work on the "single object" or are morphisms things that work on the numbers, which are in the set of natural numbers, which is the single object in the category/monoid?
14:26:40 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
14:27:17 flouflou joins (~flouflou@modemcable032.110-177-173.mc.videotron.ca)
14:29:29 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 264 seconds)
14:34:42 jakalx joins (~jakalx@base.jakalx.net)
14:35:25 qbt joins (~edun@user/edun)
14:36:21 doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net)
14:38:47 <geekosaur> as I (possibly incorrectly) understand it, all the numbers in the category behave the same way because otherwise it wouldn't be a category, so you only need one of them
14:39:10 × pooryorick quits (~pooryoric@87-119-174-173.tll.elisa.ee) (Ping timeout: 265 seconds)
14:39:26 <geekosaur> the other possibility being that we're operating at a level above the numbers themselves
14:40:43 <ldlework> Right, I had the intuition that the morphisms maybe work upon the "single object", the "set of natural numbers" like it works upon the set itself. But the "adders" here are like partially-applied addition functions.
14:40:44 pooryorick joins (~pooryoric@87-119-174-173.tll.elisa.ee)
14:40:50 <ldlework> One for each number in the natural set.
14:41:46 × azeem quits (~azeem@emp-91-123.eduroam.uu.se) (Read error: Connection reset by peer)
14:42:03 <dminuoso> ldlework: Consider a subcategory of Set. A single object might be the set of all natural numberrs.
14:42:09 azeem joins (~azeem@2a00:801:2d6:ba33:1dbc:2215:71a9:ffcb)
14:43:26 <dminuoso> Morphisms are functions from set to set, but we consider not all such functions, but perhaps one that adds nothing, and one that adds one, one - both `f : Nat -> Nat`, `g : Nat -> Nat`
14:43:34 <dminuoso> That's it.
14:44:10 <dminuoso> These morphisms are valid, as they respect composition laws
14:44:43 <ldlework> But what is the single object that milewski refers to in the case at hand
14:45:04 <dminuoso> In my example, the set of natural numbers.
14:45:25 <Morrow[m]> It doesn't matter, any single-object category will do.
14:45:41 <dminuoso> The really magical part of category theory is that you no longer *care* about the internals of those objects.
14:45:51 <dminuoso> It's all about the morphisms. :)
14:46:26 × ubert quits (~Thunderbi@178.115.37.114.wireless.dyn.drei.com) (Ping timeout: 265 seconds)
14:46:52 <dminuoso> The term `monoid` in category theory is terribly confusing since there's multiple (related) notions
14:47:27 <Morrow[m]> The power we get, is that since we don't examine the internals of objects, the theorems apply very generally, to a wide range of topics.
14:47:39 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
14:48:42 <Morrow[m]> So anything we prove about categorical monoids will apply to the natural numbers with id and (+1).
14:49:31 <dminuoso> Morrow[m]: Sure you meant categorical monoids here?
14:49:41 <dminuoso> That seems orthogonal
14:50:23 <Morrow[m]> I meant "monoids in CT" by that, sorry.
14:59:28 ubert joins (~Thunderbi@178.115.37.114.wireless.dyn.drei.com)
15:03:20 × MQ-17J quits (~MQ-17J@35.50.35.3) (Ping timeout: 265 seconds)
15:03:31 MQ-17J joins (~MQ-17J@2607:fb90:885d:dc4:b0b2:2c03:76da:1640)
15:04:02 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
15:04:41 <monochrom> You can compose two morphisms. This can model adding two numbers. Note that both are associative, both have identities, this is a decent match.
15:05:27 × max22- quits (~maxime@2a01cb08833598009945523f8c6be6aa.ipv6.abo.wanadoo.fr) (Quit: Leaving)
15:06:01 <monochrom> If you use two objects for two numbers, what can you do to two objects? You can't even compose them. Your model of addition will be some kind of add-on that doesn't play to the strength of categories.
15:07:15 dut joins (~dut@user/dut)
15:09:49 jcob joins (~jcob@216-165-95-181.natpool.nyu.edu)
15:09:55 <monochrom> And then you will want to use "f . f . f . f" to model "x + x + x + x". If you have so much as "f . f", type inference forces f to be an endomorphism. The eureka is then all numbers are endomorphisms and they all have the same domain. You need only one object to hang them on.
15:10:05 <jcob> Hi everyone! Here for a recc. Anybody know good communities for parsing and compiler construction?
15:10:18 <jcob> I have some questions on course material and I'm interested in the field as well.
15:11:52 max22- joins (~maxime@2a01cb0883359800d93abb16064ffecc.ipv6.abo.wanadoo.fr)
15:12:29 <dolio> You could have objects be numbers, and + be tensor product. Then you can do something else with arrows.
15:13:52 <dolio> Arrows could be ordering. Then `3 ≤ 4` and `10 ≤ 15` gives rise to `3+10 ≤ 4+15`.
15:14:28 <monochrom> Yeah there will be times when you model something else, where using objects for numbers is advantageous.
15:14:38 <ldlework> I appreciate the answers. dminuoso, so if the object is the set of natural numbers, then the morphisms in a category must be things that work upon items within the set. Like adding 1 to a number in the set of all natural numbers. So I can get away from the idea that morphisms work upon categories. But rather, for a given category, it's specific morphisms work upon items inside the objects (sets?)
15:14:39 <ldlework> of the category. I'm anticipating eventually that there will be categories who's objects (sets) are comprised of items which are themselves categories, in which case the morphisms would be operating on categories.
15:14:42 <ldlework> Did I get any of that right?
15:15:34 × dut quits (~dut@user/dut) (Quit: Leaving)
15:15:48 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
15:15:56 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 246 seconds)
15:16:35 <dolio> The object doesn't have to be the set of natural numbers. It doesn't really matter what the object is, there's just one of them.
15:17:00 <monochrom> Yeah in this model the homset is the set of numbers.
15:17:14 <monochrom> galaxy brain?
15:17:39 <monochrom> Note how I keep using the word "model" to prime a subtext.
15:18:35 <dolio> In cases like the category of sets, it's useful to say that the objects are sets, because you need one object for each possible set, so what else are you going to use. But for monoids-as-categories it doesn't really matter as much.
15:20:02 <monochrom> You are applying a piece of math. The measure of how right you are is based on what benefit you get out of it, whether it solves your problem (so it depends on your problem). Not on whose authority it is.
15:21:47 ub joins (~Thunderbi@178.115.37.114.wireless.dyn.drei.com)
15:24:20 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
15:26:12 nschoe joins (~quassel@178.251.84.79)
15:26:20 asthasr joins (~asthasr@162.210.28.151)
15:28:42 <monochrom> Perhaps the problem of learning here is once again hoping that the object and the endomorphisms are defined in terms of things you already know, as opposed to simply axiomatizing that you have an object (no further definition), you have these endomorphisms that satisfy certain expectations (no further definition).
15:28:42 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
15:28:44 × ub quits (~Thunderbi@178.115.37.114.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
15:32:26 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
15:32:31 × jcob quits (~jcob@216-165-95-181.natpool.nyu.edu) (Quit: Client closed)
15:34:26 <ldlework> "In cases like the category of sets, it's useful to say that objects are sets, because you need one object for each possible set." So when we are talking about the set of natural numbers, is the category we're talking about "Natural Numbers" or "Monoids"? If it's the former, wouldnt' what you said imply that each natural number would be an object? If it's the latter, I suppose that means that
15:34:27 <ldlework> there's one object in the Category of Monoids, and that single object is a generic representation of anything that has an associative operator with identity where the set of natural numbers is merely an example of such an object?
15:34:36 <ldlework> (thank you all so much for your replied, srsly)
15:34:40 <ldlework> replies too
15:35:23 <timCF> Hello! Could anybody help me a bit with `Fixed a` type? A want a type signature `a :: Fixed 8` but for some reason GHC is saying "Expected a type, but 8 has kind Nat". At the same time `a :: Fixed E9` works fine.
15:35:24 <monochrom> Neither. Here we use one category to model one monoid.
15:35:27 <c_wraith> I'm not sure what a "Category of Monoids" is.
15:35:37 <ldlework> c_wraith: me either clearly :P
15:35:42 <c_wraith> It doesn't make much sense. I'm not sure how to connect arrows.
15:35:53 <dolio> 'Category of monoids' would presumably have monoids as objects and monoid homomorphisms as arrows.
15:35:54 <ldlework> Well what category are we talking about, when talking about the natural numbers and monoids?
15:36:24 <c_wraith> I think as monochrom points out, you're looking for a slightly different idea - the fact that all monoids are the same thing as a single-object category
15:36:29 <geekosaur> timCF, the possible values for Fixed are defined in Data.Fixed
15:36:32 <monochrom> or one category to model all of the natural numbers, or rather, natural number addition.
15:36:39 <geekosaur> you probably want something like Fixed E8
15:37:13 <ldlework> OK so "there is a category of natural number addition and it is true of the monoid laws"
15:37:15 <ldlework> something like that?
15:37:16 <geekosaur> although I'm not sure that's predefined. there are some things for building your own iirc
15:37:20 Null_A joins (~null_a@2601:645:8700:2290:887d:3c4c:6983:4192)
15:38:16 <ldlework> I'll just keep reading :P
15:38:20 <monochrom> Don't worry, there are also times when we need multiple objects and they carry information, and the morphisms are boring. For example when modeling natural number order, like dolio's example but suppose I omit addition.
15:39:19 <ldlework> A difficulty with category theory I've always had is that I cannot help but to understand a category in the philosophical sense, of a set of objects who are true for a set of properties.
15:39:24 <timCF> geekosaur: seems like `E8` is not exported, but I do see that there is one instance (first which is supposed to give me any custom precision I want), but I don't have an idea how to use it https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Fixed.html#t:HasResolution
15:39:35 <ldlework> But my old acquaintance would always badger me that that is completely wrong.
15:39:47 <monochrom> Generally we can use one category to model one partial order. An object is an element. Each morphism X->Y is trivial, but it exists iff X<=Y.
15:40:00 <Cale> ldlework: One thing you might be a little confused about, I can't tell... there is a category of monoids, where the objects are monoids, and the arrows are monoid homomorphisms between them. But then you can also take any one monoid and turn it into a category having a single object, and where the arrows are the elements of that monoid, and composing arrows multiplies the elements according to that monoid's
15:40:00 <Cale> multiplication.
15:40:04 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:40:23 <c_wraith> call it a mathegory in your head, if you need to distinguish the ideas. :P
15:40:32 <Cale> ldlework: A category in this setting has a particular technical definition which you ought to learn first :)
15:40:53 <monochrom> Ugh category theory is totally not about a collection of objects who are true for a collection of properties.
15:41:05 × MQ-17J quits (~MQ-17J@2607:fb90:885d:dc4:b0b2:2c03:76da:1640) (Read error: Connection reset by peer)
15:41:13 <monochrom> If anything the properties are for morphisms not objects.
15:41:52 <ldlework> Yeah I suspect this will be a hurdle for me.
15:41:52 <geekosaur> hm, the docs I'm looking at suggest that shoulkd work, but the docs are for ghc 9.0
15:41:54 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
15:41:58 <geekosaur> may not work in 8.10
15:42:11 <monochrom> If you don't secretly realize that each category is defined by its morphisms, that the objects are only there for type checking, you are doing it wrong.
15:42:12 <Cale> It's not just a collection of things having a common property, it's a particular sort of structure consisting of a collection of "objects" and a collection of "arrows" which are arranged in a particular way between the objects, and a definition for how to "compose" the arrows
15:42:19 lavaman joins (~lavaman@98.38.249.169)
15:42:49 <ldlework> Cale: right so it seems to be a super-notion of the philosophical "category"
15:42:53 <Cale> (but you'll be better served by reading Wikipedia's definition) https://en.wikipedia.org/wiki/Category_(mathematics)#Definition
15:43:05 <c_wraith> it's just totally independent
15:43:06 <ldlework> because, there is still notion of objects that are in the category, and objects that are not
15:43:06 <sclv> what you're calling a philosophical "category" is just like... a "set"
15:43:09 <geekosaur> looks like data E8; instance HasResolution E8 where resolution _ = 8
15:43:09 <c_wraith> forget philosophy
15:43:21 <sclv> a category is a set _and_ structure about morphisms
15:43:29 <ldlework> sclv: right, it's hard for me not to see a category as a set with lawful constraints or something like that
15:43:42 <Cale> ldlework: Or a sub-notion, but only insofar as you have a collection of objects
15:44:04 <timCF> geekosaur: oh, so I just define my own resolution type locally? I'll try, thanks!
15:44:13 <geekosaur> seems like it
15:44:30 <monochrom> If you mix up the philosophy community and the math community, your next point of confusion is that they also use the same word "monad" for two unrelated definitions.
15:44:42 <ldlework> Cale: I guess a sub-notion because there's more baggage, and so more restrictive in definition. I was thinking in the sense that since all Javascript is valid Typescript but not the otherway around, Typescript is a superset of Javascript. But I think I see what you mean.
15:44:43 × xiongxin quits (~quassel@119.123.102.205) (Remote host closed the connection)
15:44:54 <geekosaur> sadly the KnownNat entry for Fixed has no "Since:"
15:44:55 <sclv> think of a set as a "bag of marbles". there's no real difference between the set of five marbles and the set {a,b,c,d,e} and the set {1,2,3,4,5} because you can get between them by renaming
15:45:01 <Cale> But also those objects really needn't have anything to do with one another apart from being part of the category. What the objects "are" is almost entirely irrelevant to us, they mostly serve as labels to make sure we don't compose arrows that we shouldn't.
15:45:08 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.2.1)
15:45:10 <sclv> but you can have different categories each of which have five objects, but have totally different morphism structures
15:45:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
15:45:35 <sclv> a good example is you can look at categories _only_ with one element, and they _still_ have a rich morphism structure
15:45:37 <ldlework> morphism sturctures "sounds like" a very abstracted notion of qualitative restrictions on membership
15:45:58 xiongxin joins (~quassel@119.123.102.205)
15:46:00 dut joins (~dut@user/dut)
15:46:03 <ldlework> IE a list of predicates that must be all true of an object for it to be in that set or category
15:46:20 <timCF> geekosaur: it worked, thanks!
15:46:26 <sclv> i.e. i pick the category with the object *, the identity arrow on * (which must exist) and also with morphisms generated by a single self map `i : * -> *` -- what is this category?
15:46:35 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:47:00 <monochrom> Yeah sets are a very poor way to explain categories to yourself.
15:47:05 <dolio> monochrom: But the next step is to realize that the objects do matter, and the arrows may not actually all matter. :)
15:47:29 <ldlework> monochrom: I'm only describing my current pathology not advocating for it :P
15:47:32 <sclv> my example above gives the category of natural numbers under addition
15:47:34 <monochrom> categories have so much more structure than sets. You are only doing a forgetful thing.
15:47:55 <ldlework> sclv: I got lost at "and also with morphisms generated by a single self map `i : * -> *`
15:48:08 <monochrom> or rather s/structure/information/
15:48:22 <sclv> its a category that looks like one dot, the identity arrow that points to itself, and also an arrow from that dot to itself that is _not_ the identity
15:48:39 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
15:48:39 <Cale> ldlework: Basically, we run out of words in mathematics for "collection of some sort with additional structure", and so there are dozens of special words that sound roughly like some sort of collection, but actually have a detailed technical meaning and lots of additional structure.
15:48:45 <ldlework> monochrom: in philosophy ontological categories are not just mathematical sets, they have qualitative constraints on them
15:48:46 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
15:48:46 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Ping timeout: 265 seconds)
15:48:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
15:49:00 <ldlework> and i was saying it sounds like the morphisms of a category are a way of very abstractly encoding those qualitative constraints
15:49:05 <ldlework> formalizing them
15:49:14 <sclv> but of course, you also get generated by that the composition of that arrow `i . i` and `i . i . i` etc. (you can also throw in identities into the composition, but the laws say they don't do anything, so you can ignore them
15:49:22 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
15:49:24 <sclv> )
15:49:30 <ldlework> it mean in philosophy this is all rooted in predicate and propositional logics and certainly in some grander sense category theory is going to link up
15:49:42 <sclv> not in any useful sense for you, though, just ignore that
15:49:58 <ldlework> Cale: yeah that makes sense
15:50:08 <sclv> again, put a dot on a piece of paper, and draw an arrow that's a loop going from that dot to itself, and think about it
15:50:12 <sclv> now draw two loops and think about that
15:50:21 <sclv> now draw one loop, but have it be invertible, and think about that
15:50:35 <sclv> these are all categories with one object, but representing very different mathematical strutures
15:50:42 <ldlework> sclv: i get the notion of identity
15:50:44 <ldlework> but like
15:50:51 <ldlework> you can a notion of identity for transofrmation on specific numbers
15:50:54 <ldlework> like (+0)
15:50:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
15:50:56 <ldlework> or
15:51:08 <ldlework> you could have identity on some more general object like the set of all natural numbers
15:51:10 <ldlework> pointing back to itself
15:51:17 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
15:51:21 <sclv> not in this setup. there's plenty of categories you can generate using numbers that have totally different morphism structures. there's not "one category of natural numbers"
15:51:23 × xiongxin quits (~quassel@119.123.102.205) (Quit: No Ping reply in 180 seconds.)
15:51:24 <ldlework> where there could be "morphisms" from the set of natural numbers, to some other kind of objects
15:51:34 <monochrom> I have friends who are very fluent in C++. Do they know functors? Yes and no.
15:51:36 <ldlework> it's hard to understand at which level of abstraction we're really working
15:51:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:52:04 <ldlework> Like I can imagine 1 with a self loop, and a loop to 2, which also has a self loop, etc
15:52:04 <monochrom> They know C++'s functors. They don't know Haskell's or math's functor. Oh btw there is a 3rd functor, from SML.
15:52:22 <ldlework> but I can also imagine a graph where the first node is "the set of all natural numbers" with a self loop, and an arrow pointing to some other object
15:52:29 <ldlework> representing the set of all even natural numbers
15:52:31 <ldlework> or something like that
15:52:38 <sclv> sure. these are all possible categories
15:52:38 xiongxin joins (~quassel@119.123.100.167)
15:52:47 <ldlework> sclv: even the first example?
15:52:54 <ldlework> where the number 1 has a self loop?
15:53:12 <ldlework> and another arrow which points to the number 2, etc?
15:53:16 × _bin quits (~bin@user/bin/x-1583188) (Quit: ZNC - https://znc.in)
15:53:17 <ldlework> is that a category?
15:53:36 <sclv> well it depends what you mean. you can create a discrete category where every natural corresponds to a different object. then _every_ object has an identity loop, by definition
15:53:52 <ldlework> that's what i'm imagining right now
15:53:56 <sclv> but also you can draw whatever other arrows you want. and then you get "for free" the compositions.
15:53:57 <dsal> I knew functors from O'Caml, which made Haskell functors confusing.
15:54:09 <sclv> this is known as the "free category generated by a graph" and any graph you can draw generates a category
15:54:30 <ldlework> sclv: right since we have the arrow that goes from 1 to 2
15:54:36 <ldlework> that means there will be an arrow going from 2 to 3
15:54:38 _bin joins (~bin@user/bin/x-1583188)
15:54:38 <sclv> it just so happens that categories may have _more rules for composition_ than those that come for free, so graphs don't capture that
15:54:40 <ldlework> so we can compose from 1 to 3
15:54:43 <ldlework> and everything else?
15:54:57 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
15:54:58 <sclv> no, if you have an arrow from 1 to 2, there's no reason you'd have an arrow from 2 to 3 if they're all distinct objects
15:55:19 <sclv> if you have 1 -> 2, and _also_ 2 -> 3 then you get the composition 1 -> 3 automatically
15:55:20 wonko joins (~wjc@62.115.229.50)
15:55:28 <ldlework> Right that's what I meant I think
15:55:34 <ldlework> But you're saying
15:55:39 <ldlework> If we're taking seriously that 1 is different than 2
15:55:41 <sclv> but you may have _another_ arrow 1 -> 3 not generated by that composition, and that's not equal to the composition
15:55:47 <ldlework> than we can't assume they have the same arrows or whatever
15:55:51 <ldlework> because they are truly distinct
15:55:56 <sclv> right -- they're different objects in that setup, yet
15:55:58 <sclv> yes
15:56:03 <ldlework> ok so
15:56:16 <ldlework> if we presumed that for every object in this category we're talking about where the objects are naturals
15:56:24 <ldlework> there was such an arrow between each of them, with the identity
15:56:27 <sclv> the best place to start with categories is not sets imho. instead start with partial orders, and then consider when more arrows may exist
15:56:39 <ldlework> is that just an arbitrary category we made up that has no generally known name?
15:56:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
15:56:58 <sclv> so all objects have an arrow to every other object?
15:57:03 × xiongxin quits (~quassel@119.123.100.167) (Client Quit)
15:57:04 <ldlework> to their subsequent
15:57:10 <ldlework> i forget what math calls that
15:57:13 <ldlework> the next natural
15:57:23 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:57:23 <ldlework> like when you define them in peano arithmetic
15:57:31 <ldlework> ancestor... no
15:57:38 <ldlework> i forget, but hopefully you get what i mean
15:57:42 <sclv> that's often what people will call "the naturals as a preorder category"
15:57:48 <ldlework> each object has a self-arrow, and an arrow pointing to it's +1
15:57:50 <ldlework> I see
15:57:56 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
15:57:58 <ldlework> OK
15:58:02 <ldlework> So how does this differentiate
15:58:03 <sclv> the relationship shouldn't be thought of as addition, it should be thought of as <=
15:58:15 <ldlework> When the first object in our new graph is "the set of natural numbers"
15:58:18 xiongxin joins (~quassel@113.116.33.208)
15:58:19 hendursaga joins (~weechat@user/hendursaga)
15:58:21 <sclv> as in "every object has a unique morphism to every other object it is less than or equal to"
15:58:21 × dut quits (~dut@user/dut) (Quit: Leaving)
15:58:27 <monochrom> sclv, that's how I started, and therefore I ended with being stuck at Galois connection for 20 years without wanting/needing/being capable of stepping up to adjunctions. >:)
15:58:35 <zardoz> I'm kind of shocked that this works flawlessly in windows.. cool library! https://hackage.haskell.org/package/concurrent-output
15:58:59 <sclv> monochrom: yeah i actually find order theory very powerful on its own -- especially when one considers richer lattices, etc
16:00:21 <timCF> I have one more question. Is there some standard class which I can use in type signature to declare that type `a` can be coerced to type `b` using `coerce` function? This might be useful for functions like `apply0 :: Coerce a b => (b -> b) -> a -> a` where `apply0 f = coerce . f . coerce`.
16:00:25 akegalj joins (~akegalj@93-138-133-62.adsl.net.t-com.hr)
16:02:34 <sclv> ?ty coerce
16:02:35 <lambdabot> error:
16:02:35 <lambdabot> • Variable not in scope: coerce
16:02:35 <lambdabot> • Perhaps you meant ‘coerced’ (imported from Control.Lens)
16:02:43 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:02:45 <sclv> ah well: `coerce :: Coercible a b => a -> b `
16:02:52 <sclv> so that would be the type class?
16:03:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:04:01 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
16:04:08 <timCF> sclv: Interesting! I have used `coerce` many times, but never dealed with actual `Coercible` class instances, I'll try it, thanks!
16:04:28 <timCF> have never seen it be derived also
16:04:43 × xiongxin quits (~quassel@113.116.33.208) (Quit: No Ping reply in 180 seconds.)
16:04:46 <monochrom> The :type command is underappreciated :)
16:04:51 <sclv> you can't derive it -- see the docs
16:04:51 <sclv> https://hackage.haskell.org/package/ghc-prim-0.7.0/docs/GHC-Types.html#t:Coercible
16:05:50 <timCF> Interesting :)
16:05:58 xiongxin joins (~quassel@113.116.33.208)
16:06:29 <akegalj> Hey. I was watching last years talk from skillsmatter by "Winter is comming even faster" by Joachim Breitner (https://skillsmatter.com/skillscasts/14903-winter-is-coming-even-faster) where at 11:18 he explains optimization technique/trick (Avoid the quadratic (++)). The trick/transformation explanation is about a minute long but I just can't seem to get it :/ If anyone is interested to have a look and
16:06:35 <akegalj> give me some tips that would be great <3
16:07:59 <monochrom> Is it when you replace x++y++z by (x++) . (y++) . (z++) ?
16:08:08 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
16:08:36 × xiongxin quits (~quassel@113.116.33.208) (Client Quit)
16:08:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:08:46 × jstolarek quits (~jstolarek@erx128.neoplus.adsl.tpnet.pl) (Ping timeout: 252 seconds)
16:08:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:09:26 <akegalj> monochrom: it might be. He is replacing ++ with . , but there are some transformations that I don't get...
16:10:25 <akegalj> monochrom: [t] replaced with [t] -> [t], [] with id, [x] with (x:), xs++ys with xs . ys
16:11:00 <akegalj> monochrom: do you think thats the same?
16:12:28 <sclv> consider what all the transformations he gives look like when applied to the one element list
16:12:31 <sclv> er to the empty list
16:12:43 <c_wraith> there was a good blog post about that trick a while back
16:12:52 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Remote host closed the connection)
16:13:15 <sclv> https://en.wikipedia.org/wiki/Difference_list
16:13:17 <c_wraith> something about how it implicitly rewrites everything into a right-associated form
16:14:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:14:41 <akegalj> sclv: I think that's it, thanks!
16:14:50 <akegalj> c_wraith: monochrom: thanks both!
16:14:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:18:06 <kuribas> akegalj: https://hackage.haskell.org/package/dlist
16:18:06 yauhsien joins (~yauhsien@118-167-47-202.dynamic-ip.hinet.net)
16:19:13 <akegalj> kuribas: thanks, there is also link from wiki to haskell wiki explanation https://wiki.haskell.org/Difference_list
16:19:59 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
16:20:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:21:14 zachjs joins (~zachjs@pool-96-224-239-180.nycmny.fios.verizon.net)
16:22:15 maroloccio joins (~marolocci@93-136-18-134.adsl.net.t-com.hr)
16:23:29 × yauhsien quits (~yauhsien@118-167-47-202.dynamic-ip.hinet.net) (Ping timeout: 246 seconds)
16:23:40 × Null_A quits (~null_a@2601:645:8700:2290:887d:3c4c:6983:4192) (Ping timeout: 252 seconds)
16:23:49 Null_A joins (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781)
16:26:45 Null_A_ joins (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781)
16:28:04 Null_A__ joins (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781)
16:28:57 × kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection)
16:29:05 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
16:29:14 × Null_A quits (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781) (Ping timeout: 260 seconds)
16:29:25 alzgh joins (~alzgh@user/alzgh)
16:29:58 × timCF quits (~timCF@m91-129-108-244.cust.tele2.ee) (Quit: leaving)
16:30:10 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:2e6e:d4a5:1c64:daa) (Quit: WeeChat 2.8)
16:30:18 Null_A joins (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781)
16:31:06 × Null_A_ quits (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781) (Ping timeout: 260 seconds)
16:31:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
16:32:17 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:33:26 × Null_A__ quits (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781) (Ping timeout: 260 seconds)
16:33:46 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Remote host closed the connection)
16:35:19 <c_wraith> huh. do TH typed splices participate in bidirectional inference?
16:36:42 × Null_A quits (~null_a@2601:645:8700:2290:25aa:2fd7:a477:7781) (Ping timeout: 260 seconds)
16:37:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:37:37 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: No route to host)
16:38:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:39:51 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
16:40:28 <c_wraith> looks like it does. you can generate a (TExp a) value by selecting an instance based on a
16:40:51 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
16:40:56 <c_wraith> that's probably a large part of why TExp was added.
16:41:06 Null_A joins (~null_a@2600:1010:b0d9:2882:48a4:bec2:eba0:2e41)
16:41:07 <c_wraith> but I hadn't thought about it.
16:43:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
16:44:05 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:44:29 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 246 seconds)
16:46:10 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
16:49:23 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
16:49:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:50:09 × neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 265 seconds)
16:50:30 ub joins (~Thunderbi@178.115.37.114.wireless.dyn.drei.com)
16:51:38 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
16:51:41 fefufo[m] is now known as fcortesi
16:51:42 cheater1__ joins (~Username@user/cheater)
16:51:45 cheater1__ is now known as cheater
16:52:26 × fcortesi quits (~fefufomat@2001:470:69fc:105::f3a9) (Quit: Reconnecting)
16:52:40 fcortesi joins (~fefufomat@2001:470:69fc:105::f3a9)
16:53:03 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Quit: ran away)
16:53:30 × fcortesi quits (~fefufomat@2001:470:69fc:105::f3a9) (Client Quit)
16:53:44 fcortesi joins (~fcortesi@2001:470:69fc:105::f3a9)
16:54:25 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:54:42 Yotta joins (~Yotta@195.1.199.74)
16:55:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
16:55:06 <Yotta> Howdy
16:55:27 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
16:55:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:55:34 <glguy> hi
16:55:52 × zachjs quits (~zachjs@pool-96-224-239-180.nycmny.fios.verizon.net) (Quit: zachjs)
16:55:54 Null_A_ joins (~null_a@2600:1010:b0d9:2882:943f:60e0:140f:bb0f)
16:57:43 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 252 seconds)
16:58:08 × Null_A quits (~null_a@2600:1010:b0d9:2882:48a4:bec2:eba0:2e41) (Ping timeout: 246 seconds)
16:59:15 × max22- quits (~maxime@2a01cb0883359800d93abb16064ffecc.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
16:59:38 <Yotta> I'm struggling with a university task, anyone keen to lend a hand?
17:00:56 zaquest joins (~notzaques@5.128.210.178)
17:01:22 Null_A joins (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e)
17:03:12 <dminuoso> Hi, good to let us know this is a homework assignment. Let us know how we can help
17:03:43 mixfix41 joins (~homefame@user/mixfix41)
17:03:45 <Yotta> Of course. So I created this function to check if a is a prefix of b
17:03:53 waleee joins (~waleee@student-223-182.eduroam.uu.se)
17:03:58 <Yotta> isPrefix :: String -> String -> Bool
17:03:58 <Yotta> isPrefix [] _ = True
17:03:59 <Yotta> isPrefix _ [] = False
17:03:59 <Yotta> isPrefix (x:xs) (y:ys) = x == y && isPrefix xs ys
17:04:14 × Null_A_ quits (~null_a@2600:1010:b0d9:2882:943f:60e0:140f:bb0f) (Ping timeout: 260 seconds)
17:04:46 dut joins (~dut@user/dut)
17:04:52 <Yotta> Now I'm trying create a function `locate` which should check if a exists in b, and output the index of the location (so not just prefix)
17:05:11 awpr wonders if everyone asking very similar questions here and on the FP Discord is from the same course
17:05:25 <Yotta> locate :: String -> String -> [(Int, Int)]
17:05:25 <Yotta> locate [] _ = []
17:05:26 <Yotta> locate _ [] = []
17:05:26 <Yotta> locate (x:xs) (y:ys) = (
17:05:30 <Yotta> Haha probably awpr
17:05:45 <dsal> Pasting lots of lines of code here is a bad idea. Try this: Paste code/errors: https://paste.tomsmeding.com
17:06:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
17:06:23 <Yotta> Okay cool
17:06:24 <Yotta> https://paste.tomsmeding.com/rsYIHdcz
17:06:34 <awpr> (no implied judgment there, just interesting that there's been a flurry of like 3-4 people struggling with nearly the same thing)
17:06:48 max22- joins (~maxime@2a01cb0883359800388d3ba1f1b932ab.ipv6.abo.wanadoo.fr)
17:06:48 lavaman joins (~lavaman@98.38.249.169)
17:07:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:07:35 <Yotta> Yeah sorry I'm sure, I just entered here
17:08:07 <dminuoso> No worries, cant expect newcomers to me familiar with the finer details of IRC.
17:08:20 × qbt quits (~edun@user/edun) (Remote host closed the connection)
17:08:36 <Yotta> Haven't used IRC in 10+ years haha
17:10:12 <monochrom> Is it OK for locate to call isPrefix?
17:10:28 <dminuoso> Yotta: What is your question?
17:10:33 <dminuoso> Or are you still working on that?
17:11:07 <Yotta> So I'm thinking when a == b, add the position of b to the first index, and as the second index i just do ` b + length of a`
17:11:15 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
17:11:39 <Yotta> But I can't figure out how to write that in haskell
17:11:55 <awpr> so the expected result is pairs of (start index, end index)?
17:12:27 <awpr> by which I mean after-the-end
17:12:32 <monochrom> "a == b" is not a good special case to split on.
17:12:45 <Yotta> I phrased the question a bit poorly, the function should behave like this: `locate “oo” “foobarbarfoo” = [(1,3), (10,12)]` `locate “oo” “barbarbar” = [] `
17:13:04 × chele_ quits (~chele@user/chele) (Remote host closed the connection)
17:14:34 <Yotta> So input a should be split into (x:xs), right? And if it doesn't match with y, then the function should recursively run `function xs` ?
17:14:42 <awpr> yep, that clears it up. so, you made a point to mention you've written `isPrefix`. does that mean you have an approach in mind to use it as part of `locate`?
17:14:48 × nschoe quits (~quassel@178.251.84.79) (Ping timeout: 265 seconds)
17:15:06 <awpr> "yep" was re: the example inputs/outputs
17:15:08 neo1 joins (~neo3@cpe-292712.ip.primehome.com)
17:15:11 <Yotta> I understand
17:15:45 <Yotta> Well `isPrefix` was the previous task, idk if it's easier to use it in my next task here
17:15:58 <monochrom> Yes very much easier.
17:15:59 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 246 seconds)
17:16:22 <monochrom> "oo" occurs in "food" because "oo" is a prefix of "ood".
17:16:31 <monochrom> Not only that.
17:16:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
17:16:48 <awpr> have you internalized that String is the same as [Char], and what that means for what sub-structures exist in "foobarbarfoo"?
17:17:05 <monochrom> "oo" in "food" has index 1 because "oo" in "ood" has index 0, and the 'f' bumps that to 1.
17:17:05 × TDANG_ quits (~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 252 seconds)
17:18:05 ksqsf joins (~user@2001:da8:d800:611:9de8:5c9:5157:fa51)
17:18:16 <Yotta> I understand String is a list of char's
17:18:26 <Yotta> Yeah got it monochrom
17:18:41 TDANG_ joins (~TDANG@cpe-107-15-144-45.nc.res.rr.com)
17:19:22 <Yotta> So I guess I should loop `locate` until `isPrefix` returns True, then add the current position to a list of Int's?
17:19:25 <monochrom> I should steal this assignment question :)
17:19:35 <Yotta> Haha, you a teacher?
17:19:41 <monochrom> Yes.
17:19:45 <Yotta> cool
17:20:12 <dminuoso> Who knows, perhaps monochrom is your professor even.
17:20:20 <dminuoso> :)
17:20:21 <Yotta> tell your students it's Prelude only
17:20:33 <monochrom> Nah I didn't know of this question.
17:20:40 <Yotta> if so, you gave us way too little time on this assigment monochrom!
17:21:50 justsomeguy joins (~justsomeg@user/justsomeguy)
17:23:40 <awpr> I wonder if anyone will implement Knuth-Morris-Pratt for this
17:24:32 <monochrom> Fat chance. There are two barriers.
17:24:40 <monochrom> First is to learn KMP in the first place.
17:24:47 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
17:24:58 <monochrom> Second is to re-express the imperative KMP you have learned in FP terms.
17:25:41 <c_wraith> Holy crap, template haskell changed completely in ghc 9
17:25:52 <awpr> yeah fair enough, probably not gonna happen unless someone already knew a lot of Haskell going into the course
17:25:59 <monochrom> A student in this course, by definition, has already great trouble re-expressing any easy imperative algorithm in FP terms.
17:26:54 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
17:27:37 <Yotta> word
17:29:00 TDANG joins (~TDANG@inet-177-7.ets.org)
17:29:12 <c_wraith> ok, so. typed applications aren't bidirectionally inferred. I tried to do that and got a ghc panic
17:29:36 <c_wraith> err. typed splices
17:29:45 <monochrom> Yikes. panic is not good. :)
17:30:21 Morrow joins (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net)
17:31:14 × TDANG_ quits (~TDANG@cpe-107-15-144-45.nc.res.rr.com) (Ping timeout: 265 seconds)
17:31:56 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
17:33:11 <c_wraith> ok, that's not a problem with bidirectional inference in general, just with partial type signatures
17:33:58 <c_wraith> that makes me think I should test in a newer ghc than 9.0.1
17:35:27 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
17:35:47 alzgh joins (~alzgh@user/alzgh)
17:36:45 python476 joins (~user@88.160.31.174)
17:37:09 <c_wraith> yeah, it's fixed in newer (pre-release) versions
17:37:18 <monochrom> nice
17:38:21 <c_wraith> it does give me the partial type signature warning *twice* for some reason, but whatever.
17:38:45 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:39:03 × glguy quits (x@libera/staff/glguy) (Quit: Quit)
17:40:08 glguy joins (x@libera/staff/glguy)
17:42:20 <c_wraith> is there a writeup on the new template-haskell somewhere?
17:47:58 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
17:48:02 fendor_ is now known as fendor
17:48:58 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
17:50:38 × neo1 quits (~neo3@cpe-292712.ip.primehome.com) (Ping timeout: 246 seconds)
17:54:41 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
17:56:27 <Yotta> https://paste.tomsmeding.com/kOJ2Hec7
17:56:37 <Yotta> Does this make sense at all (obviously it's not finished) ?
17:56:56 × akegalj quits (~akegalj@93-138-133-62.adsl.net.t-com.hr) (Quit: leaving)
17:57:01 <monochrom> Yes.
17:57:36 <tomsmeding> locate [] _ = [] feels fishy to me
17:57:41 × waleee quits (~waleee@student-223-182.eduroam.uu.se) (Ping timeout: 264 seconds)
17:57:52 <tomsmeding> clearly, the empty list appears in any list at position 0, doesn't it? :p
17:57:54 <Yotta> May I ask how I can add the indexes/position to become the return value?
17:57:54 × fendor quits (~fendor@91.141.44.67.wireless.dyn.drei.com) (Remote host closed the connection)
17:58:00 <monochrom> Right, I need second thoughts on that.
17:58:10 <Yotta> Aha
17:58:50 <awpr> but also if you're using isPrefix, you won't be tearing down the search term to the point of reaching an empty list
17:58:51 <monochrom> I think I would first and foremost test for prefixness first.
17:59:00 <tomsmeding> 'isPrefix = (all (uncurry (==)) .) . zip' but please don't do that
17:59:09 <monochrom> Only when x is not a prefix of y do I care "OK is y empty then?"
18:00:38 <Yotta> tbh I don't understand what you mean
18:01:02 <Yotta> tomsmeding
18:01:09 <tomsmeding> don't try :p
18:01:40 <Yotta> haha ok
18:01:46 <tomsmeding> that uncurry thing is a deliberately complicated way to write a simple thing
18:02:12 <awpr> haskellers sometimes like to code-golf while avoiding naming any function arguments for fun. an equivalent definition that might be more understandable is `isPrefix x = and . zipWith (==) x`
18:02:34 tomsmeding always forgets the existence of 'and'
18:02:51 fendor joins (~fendor@91.141.44.67.wireless.dyn.drei.com)
18:03:03 <monochrom> > ((all (uncurry (==)) .) . zip) "fooood" "foo"
18:03:05 <lambdabot> True
18:03:13 <monochrom> That's your bug there.
18:03:16 <tomsmeding> ow
18:03:17 <awpr> oops
18:03:24 <tomsmeding> here, it's even wrong ;)
18:03:51 <monochrom> The difficult is that "isPrefix [] _" and "isPrefix _ []" are not both True. You lost a symmetry there.
18:04:08 <tomsmeding> yeah, I don't do non-symmetric problems
18:05:25 <dsal> It's unfair to ask if a long string is a prefix of a shorter string.
18:05:50 <monochrom> All assymetries are unfair. :)
18:06:11 <c_wraith> let's redefine "prefix" so that both inputs must be the same length.
18:06:22 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Remote host closed the connection)
18:06:33 <dsal> isPrefix works in the zipWith case, it's just not picky about which is a prefix of which.
18:06:52 yinghua joins (~yinghua@2800:2121:1400:1db:8c9e:15bc:1174:e66f)
18:07:17 <monochrom> I have a less radical redefinition. Redefine "prefix" to be bidirectional. x is a prefix of y or y is a prefix of x.
18:07:25 <monochrom> Yeah that.
18:07:40 <Yotta> how the hell do i do that
18:08:29 <awpr> step one: look up prefix on etymonline.com; step two: go back in time to that date and convince the originator of the word to choose a different definition
18:08:43 <Yotta> haha
18:08:53 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
18:09:01 <Yotta> or accept the bug...
18:09:14 <monochrom> The Teen Titans can help.
18:09:34 <c_wraith> I still don't understand why typed template haskell changed to introduce the Code type. Anyone have any link to a discussion of this change?
18:10:27 <janus> is there a good overview of haskell linting tools? or should i just read through the hlint docs ?
18:10:35 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
18:10:37 <Yotta> may i ask what to put in `then() ` and `else` in order to output index of position?
18:11:20 <c_wraith> I suppose it gives a top-level constructor for things that would otherwise by polymorphic over a type variable. If you want to create instances, that's a good thing. Hmm.
18:11:22 <monochrom> the else branch is easier.
18:11:50 <c_wraith> polymorphic over their top-level type constructor, specifically
18:11:52 <monochrom> "oo" is not a prefix of "food". What should you do next?
18:11:53 <awpr> do you have the present index in scope? if not, I'd start with keeping track of that (or the else branch)
18:12:00 <glguy> Here's a contribution to the unrequested golfing: (. tails) . findIndices . isPrefixOf
18:12:01 Guest47 joins (~Guest47@rrcs-98-6-18-130.sw.biz.rr.com)
18:12:15 ksqsf parts (~user@2001:da8:d800:611:9de8:5c9:5157:fa51) (ERC (IRC client for Emacs 27.2))
18:12:53 yauhsien joins (~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
18:13:12 <Yotta> monochrom run the same function with `x tail(y) `?
18:13:41 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Read error: No route to host)
18:14:20 <dminuoso> Yotta: What is `x tail(y)` supposed to denote?
18:14:27 <Guest47> on a new install of OSX big sur running `stack install text-show` fails with > ghc: couldn't find archive in `/usr/bin/iconv'at offset 16384; ghc: panic! (the 'impossible' happened); loadArchive "/usr/bin/iconv": failed . Any ideas?
18:14:31 <Yotta> Or wait, does that happen automatically? since i'm sending `x y` to `isPrefix `
18:14:39 <monochrom> awpr, at this point I think I am a fan of post-processing, i.e., OK so locate "oo" "ood" returns [(0,1)], but the answer I need for locate "oo" "food" is [(1,2)], how do I do some post-processing to fix up that difference?
18:15:06 <dminuoso> Guest47: Check the GHC bug tracker
18:15:15 <awpr> yeah, good point
18:15:32 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
18:15:42 <Yotta> dminuoso I'm thinking that if the inputs are "oo" and "foobar", then it's False, but if the next loop then is "oo" and "oobar", then we found position of the "prefix" ? so
18:15:52 nvmd joins (~nvmd@user/nvmd)
18:15:59 <Yotta> if y = "foobar", then tail(y) = "oobar" no?
18:16:00 <dminuoso> Yotta: No I meant, syntactically, what is that supposed to even mean?
18:16:14 <dminuoso> Function application has no parens in Haskell
18:16:16 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.2)
18:16:34 <Yotta> Oh right
18:17:24 <dminuoso> Guest47: Mmm, actually nothing up yet. Irrespective of what the solution is, please file a bug report. A panic is always a bug.
18:17:49 <dminuoso> That error looks almost like GHC could fail more graciously
18:17:56 <Guest47> dminuoso thanks dont see anything specifically
18:18:05 × yauhsien quits (~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
18:18:36 <Guest47> it almost seems like I am missing some dep in OSX but `/usr/bin/iconv` exists and is the same version as my other mac which works fine
18:18:43 <monochrom> Does tail y always exist?
18:19:24 <geekosaur> Guest47, it's not an archive though. in fact I'm kinda bewildered by it using loadArchive on it
18:19:32 <geekosaur> this does smell like a bug
18:19:51 <Yotta> https://paste.tomsmeding.com/k73xO9F0
18:20:03 <Guest47> your right - its just the binary
18:20:17 × Yotta quits (~Yotta@195.1.199.74) (Quit: Client closed)
18:20:18 <dminuoso> geekosaur: Do you know what GHC even means by "archive"?
18:20:27 Yotta joins (~Yotta@195.1.199.74)
18:20:31 <Guest47> I assume .a or dylib?
18:20:36 <dminuoso> Im staring at C code of this, and I cant quite make sense of it
18:20:50 <geekosaur> I'd expect "archive" to mena a .a
18:21:03 <Guest47> I can install libiconv with brew and it changes the path of iconv in the error but nothing much else
18:21:35 <dminuoso> geekosaur: ah indeed!
18:21:48 <dminuoso> Turns out .a archives start with the "!<arch>" magic header, which is what the C code probes for.
18:22:11 <dminuoso> Guest47: File a bug report. It's likely the GHC team might have some workaround
18:22:23 <dminuoso> But this looks really strange
18:22:24 <glguy> Guest47: What version of GHC? What version of stack?
18:22:39 <Guest47> (.venv) ❱ stack --version
18:22:39 <Guest47> Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4
18:22:43 <awpr> Yotta: GHC thinks you want to apply `[]` to that if-expression, because it's just stuck next to the list. you've written the body of another clause without writing the function name and argument patterns
18:22:54 <janus> dminuoso: haha i thought <arch> was supposed be the actual architecture, but it is that literal string. weird
18:23:06 <glguy> Guest47: and is it an x86_64 or arm mac?
18:23:16 <monochrom> "Agh" :)
18:23:24 <Guest47> x86_64
18:23:24 <monochrom> or even, "Argh"
18:23:47 <geekosaur> nope, short for "archive"
18:24:07 <Guest47> so far it happens with every version of stack resolvers including nightly
18:24:12 <geekosaur> while making a 8-byte / 64-bit magic number
18:24:24 <janus> % file /usr/lib/libdb-4.8.a
18:24:24 <yahb> janus: ; <interactive>:66:1: error: Variable not in scope: file :: a -> c; <interactive>:66:7: error:; * Variable not in scope: usr :: a -> c; * Perhaps you meant `use' (imported from Control.Lens); <interactive>:66:11: error: Variable not in scope: lib :: a -> c; <interactive>:66:15: error: Variable not in scope: libdb :: a -> c; <interactive>:66:25: error: Variable not in scope: a :: a -> b0
18:24:24 <janus> /usr/lib/libdb-4.8.a: current ar archive
18:24:31 <janus> i wonder what "current" means
18:24:58 <tomsmeding> janus: you thoroughly confused ghci right there
18:26:10 <janus> yeah maybe i shouldn't use % in my PS1... i dunno, i just picked my favorite zsh preset.. why didn't they stick with $?
18:26:20 <geekosaur> janus, archives have had a number of different magic numbers over the years
18:26:56 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
18:26:57 <geekosaur> binary codes, then #!ar, then #!<arch>
18:27:15 econo joins (uid147250@user/econo)
18:27:27 <janus> hmm when it was #!ar was it something like a linker script then?
18:27:36 <janus> never fiddled with linker scripts, don't know if i want to :P
18:27:54 <geekosaur> I don't thinl the concept of linker scripts existed at that time
18:28:07 <geekosaur> but linkers were just starting to become more complex
18:28:23 <dminuoso> geekosaur: Judging from the source code of `fil` "a number" means 2 total.
18:28:29 <geekosaur> and archoves were starting to change to "nobody uses them for anything but object files"
18:28:36 <dminuoso> There is `System V Release 1 ar archive` and `current ar archive`
18:28:42 <tomsmeding> what if we get a new .a file format that supersedes the current one? "new ar archive", and have "current" refer to the old one? :p
18:29:05 <awpr> `postmodern ar archive`
18:29:07 SawyerBergeron[m joins (~sawyerber@2001:470:69fc:105::3036)
18:29:09 <dminuoso> postcurrent.
18:29:15 <geekosaur> dminuoso, the binary ones were from V7 unix, I assume file just doesn't care about those
18:29:23 <dminuoso> Possibly, yeah
18:29:31 <tomsmeding> blackcurrant ar archive
18:29:44 <awpr> to catch up with anthropology, it needs to reach the point where "postcurrent" is a few generations back
18:30:29 <tomsmeding> there _should_ have been a better name than "current" to give to that file format
18:30:30 <dminuoso> A century from now, the term "current" will mean "back around 2000"
18:30:31 <Guest47> opened https://gitlab.haskell.org/ghc/ghc/-/issues/20407
18:34:59 <dminuoso> Mmm, this probably happens right in template haskell
18:35:31 jstolarek joins (~jstolarek@erx128.neoplus.adsl.tpnet.pl)
18:35:40 × koolazer quits (~koo@user/koolazer) (Ping timeout: 252 seconds)
18:36:23 <dminuoso> The number of strange linker bugs Ive had over the years in TH..
18:37:53 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
18:39:21 <janus> dminuoso: haha kinda like 'modern' in architecture means 1910s and after :P ?
18:39:49 <monochrom> I thought that was "decca".
18:40:24 <monochrom> I have a decca style Monopoly set. :)
18:41:37 <janus> monochrom: i never heard that term, google doesn't seem to helpful. is it an architecture term? or something else?
18:41:56 <shapr> art deco?
18:42:14 <shapr> https://en.wikipedia.org/wiki/Art_Deco ?
18:46:52 × oxide quits (~lambda@user/oxide) (Quit: oxide)
18:49:23 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
18:50:38 <monochrom> Err yeah, deco
18:51:23 <monochrom> Decca is a music record label. I have had too much classical musical recordings from Decca. :)
18:52:10 <Yotta> awpr i don't quite understand - i have written `if isPrefix x y == True then `, which part is incorrect?
18:52:36 <awpr> no part of that is incorrect, it's just in an incorrect contex
18:52:40 <awpr> context
18:52:49 <Yotta> aha
18:52:59 <Yotta> thanks so far btw
18:53:24 <Yotta> what would be the correct context?
18:53:27 hendursa1 joins (~weechat@user/hendursaga)
18:53:46 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
18:53:48 allbery_b joins (~geekosaur@xmonad/geekosaur)
18:53:51 allbery_b is now known as geekosaur
18:54:19 <awpr> it currently looks like either not part of any function definition, or smashed into the previous clause for empty lists
18:56:06 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
18:56:09 <geekosaur> also `== True` is completely redundant
18:56:33 <Yotta> right
18:56:36 <Yotta> ty
18:57:27 <Yotta> awpr so i need another line starting with `locate` and then something before if?
18:58:03 kenran joins (~kenran@200116b82b5cf400e8fdcfa3687d60f9.dip.versatel-1u1.de)
18:59:03 <awpr> yep, something to bind/match the parameters
19:01:48 × shailangsa quits (~shailangs@host86-186-132-44.range86-186.btcentralplus.com) ()
19:02:48 kuribas joins (~user@188.189.40.222)
19:03:28 <Yotta> https://paste.tomsmeding.com/t9eSHvZo
19:03:31 <Yotta> am i getting there?
19:03:38 <Yotta> or closer at least haha
19:03:49 <Yotta> (1,2) just placeholders
19:04:06 <awpr> yeah, that's a step in the right direction
19:05:29 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds)
19:08:40 ub1 joins (~Thunderbi@178.115.76.102.wireless.dyn.drei.com)
19:09:05 <Yotta> Thanks, I fixed the last line to `else locate x(tail y)
19:09:21 × ubert quits (~Thunderbi@178.115.37.114.wireless.dyn.drei.com) (Ping timeout: 265 seconds)
19:09:22 ub1 is now known as ubert
19:09:46 ubert1 joins (~Thunderbi@178.115.76.102.wireless.dyn.drei.com)
19:10:53 × ub quits (~Thunderbi@178.115.37.114.wireless.dyn.drei.com) (Ping timeout: 264 seconds)
19:12:01 sneq joins (~user@88.160.31.174)
19:12:42 sneq parts (~user@88.160.31.174) ()
19:13:02 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
19:13:27 hendursaga joins (~weechat@user/hendursaga)
19:14:55 × viluon quits (uid453725@id-453725.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
19:16:05 lavaman joins (~lavaman@98.38.249.169)
19:16:09 mikoto-chan joins (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be)
19:17:15 × yinghua quits (~yinghua@2800:2121:1400:1db:8c9e:15bc:1174:e66f) (Read error: Connection reset by peer)
19:17:32 yinghua joins (~yinghua@2800:2121:1400:1db:28cd:b538:6ec9:eacd)
19:18:49 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Remote host closed the connection)
19:19:38 justsomeguy joins (~justsomeg@user/justsomeguy)
19:20:43 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
19:23:10 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
19:23:35 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 252 seconds)
19:25:42 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
19:25:46 nvmd joins (~nvmd@user/nvmd)
19:30:37 hendursa1 joins (~weechat@user/hendursaga)
19:33:48 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 276 seconds)
19:34:23 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
19:35:06 <TDANG> Hi. From haskell package: https://hackage.haskell.org/package/base-4.15.0.0/docs/src/GHC-List.html#filter
19:35:17 <TDANG> I found this:
19:35:28 <TDANG> filter :: (a -> Bool) -> [a] -> [a]
19:35:30 <TDANG> filter _pred [] = []
19:35:31 <TDANG> filter pred (x:xs)
19:35:33 <TDANG> | pred x = x : filter pred xs
19:35:34 <TDANG> | otherwise = filter pred xs
19:36:43 <[exa]> TDANG: hi! please use pastebin to paste more than 1 or 2 lines of code. It's okay now I guess but people get frowny when there's traffic and people start pasting around
19:37:05 <[exa]> anyways yeah that's the standard `filter`
19:37:26 <TDANG> I don't know if this is Guards or not.
19:37:36 <monochrom> It is.
19:37:50 <[exa]> yep
19:38:03 <TDANG> As far as I know, Guards should come with condition
19:38:32 <monochrom> "pred x" is a condition. "otherwise" is a condition.
19:38:35 <[exa]> it's kinda combined, you've got 2 definitions of `filter` that are distinguished by pattern matching, and the second one has 2 guards, first condition is `pred x`, the second one is `otherwise`
19:39:12 <awpr> > otherwise
19:39:13 <lambdabot> True
19:39:29 <[exa]> `pred x` returns Bool so it's technically a condition, and you see the `otherwise` there ^ :]
19:40:36 <monochrom> This is a nitpick but I don't see what could possibly be a line between "a condition" and "technically a condition but morally not".
19:41:14 <monochrom> If the line is "if I see < or >= then it's morally a condition else morally not" that's dumb.
19:41:25 TDANG__ joins (~TDANG@inet-177-7.ets.org)
19:41:54 <monochrom> Even if C you would write "if (func(x,y)) { ..." all the time.
19:41:55 <TDANG__> Does first condition mean : If "pred x" is True
19:42:02 <monochrom> Yes.
19:42:17 <TDANG__> Oh, I got you. Cool. Thanks a lot
19:42:39 × zardoz quits (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/)
19:42:50 <[exa]> :]
19:43:11 × TDANG quits (~TDANG@inet-177-7.ets.org) (Ping timeout: 265 seconds)
19:43:31 <TDANG__> So, I can rewrite 1st condition like this
19:43:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:43:57 <TDANG__> | pred x == True = x : filter pred xs
19:44:02 <[exa]> yes, precisely
19:44:24 <monochrom> Sure, but I don't understand the obsession with "== True".
19:44:26 <TDANG__> thanks
19:44:41 <monochrom> Do you write "if (func(x,y) == true)" in C?
19:44:42 <awpr> could also rewrite it like `| (pred x == True) == (not (not (True == True)))`
19:45:17 <TDANG__> because, condition mean evaludate expression with True
19:45:23 <monochrom> Do you say "if my computer works tomorrow is true, I can email you tomorrow is true" to people?
19:45:53 <[exa]> TDANG__: yep, you may imagine the language does the "==True" thing internally already, so writing it again doesn't make much sense
19:46:18 <awpr> the guard syntax already (colloquially) means "if <the expression> evaluates to True, pick this clause"
19:46:20 <TDANG__> ya, just to better understand
19:46:33 <TDANG__> ya, I see. Thanks
19:46:52 <monochrom> So this goes back to "I insist to see a comparison operator in the middle".
19:47:19 <[exa]> there's a strong push to avoid comparison and various other operations on Bools, preferably not even storing them, due to various logical problems that often arise from that
19:48:43 <awpr> this actually tripped me up in the opposite direction trying to write some bash: `if [[ $? ]]` does not do what I wanted
19:49:05 <[exa]> which is only topped by the effort of #haskell to eliminate all redundat code.
19:49:46 × doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Quit: benchmarking)
19:50:05 <[exa]> awpr: `test -z $?` ?
19:50:11 <monochrom> I don't so much worry about longer, more redundant code.
19:50:47 <monochrom> But liberating yourself from "a boolean must compare two things" makes you a better, more sophisticated thinker.
19:50:55 <[exa]> true ^
19:51:13 lavaman joins (~lavaman@98.38.249.169)
19:51:15 <monochrom> Is 'x' a letter? Just yes or no. Nothing to compare.
19:51:23 <janus> [exa]: what would Bool-averse haskeller use instead of the 'filter' function? or are bools only bad if they get names?
19:51:31 × ubert1 quits (~Thunderbi@178.115.76.102.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
19:52:22 × ubert quits (~Thunderbi@178.115.76.102.wireless.dyn.drei.com) (Ping timeout: 265 seconds)
19:52:55 <janus> i dunno, i understand that haskellers tend towards "correct by construction" and somehow Bools are too general purpose to be used in that spirit, is that true?
19:53:04 <monochrom> I don't think Haskellers are bool-averse.
19:53:19 <monochrom> I think they are bool-overuse-averse instead.
19:53:43 <janus> ok, but it is only overuse because it is so easy to make sum types and derive Eq for them, right?
19:53:43 <[exa]> janus: not necessarily, if you are talking about e.g. raw propositional logic values. Otherwise the bools have semantics that doesn't really match True/False naming very well, such as "Matches/Fails" or "Found/NotFound" etc, and usually there's a lot of other information you'd put into the type
19:53:47 <monochrom> For example "filter xs = if null xs then ... else ... head ... tail..." would be the one Haskellers object to.
19:53:56 <[exa]> and there's the nice boolean blindness post
19:54:19 <monochrom> But "filter (x:xs) = if pred x then ... else ..." is cool.
19:54:47 <[exa]> kinda wondering why it's implemented with guards in Base then
19:54:55 <monochrom> Give booleans what belongs to booleans, give patterns what belongs to patterns.
19:55:01 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:55:01 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
19:55:01 wroathe joins (~wroathe@user/wroathe)
19:55:08 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
19:55:19 <janus> right, i know booleans are the most problematic. but it just seems a bit arbitrary to draw the line at bools. if nats were easier to use in haskell, would people have the same aversion toward Ints?
19:55:23 <TDANG__> ;-)
19:55:39 <geekosaur> janus, some people do
19:55:55 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
19:55:59 <geekosaur> and regularly complain about e.g. length producing Int
19:56:17 <monochrom> We are also string-overuse-averse. We just don't have a chance to talk about it. No beginner comes from tcl backgrounds.
19:56:50 <[exa]> eyebrow raised
19:57:16 <geekosaur> there does seem to be a certain amount of overlap with Perlers though
19:57:28 <monochrom> And by string I don't just mean [Char], it could be Text too.
19:58:32 <janus> sure, tcl probably doesn't have a linked list for its strings since they are everywhere there
19:58:37 <monochrom> Right? We have PHP friends who convert our 'data X = A | B | C' to 3 strings, "A", "B", "C".
19:59:02 <janus> right right, i sympathize, and it is great that people pick battles they can win
19:59:13 <janus> would be depressing to see the same amount of Nat-zealotry ;)
19:59:33 × kenran quits (~kenran@200116b82b5cf400e8fdcfa3687d60f9.dip.versatel-1u1.de) (Quit: WeeChat info:version)
20:01:11 × m5zs7k quits (aquares@web10.mydevil.net) (Quit: m5zs7k)
20:01:37 favonia joins (~favonia@user/favonia)
20:01:41 deejaytee joins (~deejaytee@vpn-fn-228.net.ed.ac.uk)
20:01:54 × Null_A quits (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e) (Remote host closed the connection)
20:02:38 × kuribas quits (~user@188.189.40.222) (Quit: ERC (IRC client for Emacs 26.3))
20:03:11 × n3t quits (n3t@s45.mydevil.net) (Ping timeout: 252 seconds)
20:06:34 <monochrom> Our integer-overuse-averseness is already shown in "compare x y" giving you LT, GT, EQ, not "an integer that could be 0, positive, negative".
20:07:14 <monochrom> There are already Scalaers who criticize Scala for that. "We were in a position to fix this! But we didn't!"
20:08:45 Null_A joins (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e)
20:09:56 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
20:10:59 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:10:59 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
20:10:59 wroathe joins (~wroathe@user/wroathe)
20:14:37 <deejaytee> Does anyone know of a library that derives an "index datatype" for any simple container datatype? e.g. if I were to write `data XYZ a = X Int | Y a a | Z a` it could derive `data XYZIdx = XIdx Void | YIdx Bool | ZIdx`, and a corresponding `lookup :: XYZ a -> XYZIdx -> Maybe a`, and ideally maybe even `attachIndices :: XYZ a -> XYZ (XYZIdx, a)`.
20:14:43 <deejaytee> I've seen `keys` and `Representable`, but both get hung up on sum types when all I need is straightforward "failing lookup"
20:15:01 yauhsien joins (~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
20:15:17 × mikoto-chan quits (~mikoto-ch@ip-83-134-2-136.dsl.scarlet.be) (Ping timeout: 252 seconds)
20:16:19 TDANG joins (~TDANG@inet-177-7.ets.org)
20:16:35 × nfd quits (~nfd@user/nfd) (Ping timeout: 246 seconds)
20:17:14 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
20:17:23 × neurocyte013 quits (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat)
20:17:39 geekosaur joins (~geekosaur@xmonad/geekosaur)
20:17:42 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2)
20:17:57 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
20:17:58 × TDANG__ quits (~TDANG@inet-177-7.ets.org) (Ping timeout: 252 seconds)
20:18:39 × Null_A quits (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e) (Remote host closed the connection)
20:18:59 m5zs7k joins (aquares@web10.mydevil.net)
20:19:34 × yauhsien quits (~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
20:20:03 n3t joins (n3t@s45.mydevil.net)
20:20:56 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5) (Remote host closed the connection)
20:22:11 × chomwitt quits (~chomwitt@ppp-94-67-1-143.home.otenet.gr) (Ping timeout: 246 seconds)
20:22:35 Null_A joins (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e)
20:23:35 shailangsa joins (~shailangs@host86-186-132-44.range86-186.btcentralplus.com)
20:31:53 × jstolarek quits (~jstolarek@erx128.neoplus.adsl.tpnet.pl) (Ping timeout: 264 seconds)
20:32:29 × Null_A quits (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e) (Remote host closed the connection)
20:34:11 Cajun joins (~Cajun@user/cajun)
20:35:29 × MQ-17J quits (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer)
20:38:45 Null_A joins (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e)
20:38:56 × ulvarrefr quits (~user@185.24.53.152) (Remote host closed the connection)
20:39:34 tfeb joins (~tfb@88.98.95.237)
20:40:24 MQ-17J joins (~MQ-17J@d192-24-122-179.try.wideopenwest.com)
20:40:28 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 252 seconds)
20:43:17 × deejaytee quits (~deejaytee@vpn-fn-228.net.ed.ac.uk) (Ping timeout: 264 seconds)
20:46:17 × Null_A quits (~null_a@2601:645:8700:2290:2108:e73c:fa5c:78e) (Ping timeout: 264 seconds)
20:47:01 <jle`> deejaytee: that sounds a lot like what the lens deriving mechanisms give you, just without a concrete data type
20:47:12 <jle`> aw they left :(
20:47:29 <jle`> hm, actually it doesn't give you that attachIndices
20:48:13 Pickchea joins (~private@user/pickchea)
20:48:31 lavaman joins (~lavaman@98.38.249.169)
20:51:28 × TDANG quits (~TDANG@inet-177-7.ets.org) (Ping timeout: 252 seconds)
20:51:54 TDANG_ joins (~TDANG@inet-177-7.ets.org)
20:52:36 ulvarrefr joins (~user@185.24.53.152)
20:53:29 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
20:53:55 Null_A_ joins (~null_a@2601:645:8700:2290:a969:7066:ab00:d0f1)
20:55:20 <jle`> would be neat tho
20:56:03 × dut quits (~dut@user/dut) (Quit: Leaving)
20:56:10 <jle`> you could probably do something using generics-sop or generic-lens-core
20:56:11 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
20:56:55 × tfeb quits (~tfb@88.98.95.237) (Quit: died)
20:59:59 × Null_A_ quits (~null_a@2601:645:8700:2290:a969:7066:ab00:d0f1) (Ping timeout: 246 seconds)
21:00:43 × terrorjack quits (~terrorjac@ec2-54-95-39-30.ap-northeast-1.compute.amazonaws.com) (Remote host closed the connection)
21:01:40 terrorjack joins (~terrorjac@ec2-54-95-39-30.ap-northeast-1.compute.amazonaws.com)
21:03:03 × Guest47 quits (~Guest47@rrcs-98-6-18-130.sw.biz.rr.com) (Quit: Client closed)
21:04:50 × Yotta quits (~Yotta@195.1.199.74) (Quit: Client closed)
21:05:11 × fendor quits (~fendor@91.141.44.67.wireless.dyn.drei.com) (Quit: Leaving)
21:07:49 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
21:07:52 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:1c28:7782:3d08:8ee5)
21:08:55 chris joins (~chris@81.96.113.213)
21:08:59 chris is now known as Guest8325
21:09:05 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 264 seconds)
21:09:52 × raoul quits (~raoul@95.179.203.88) (Quit: The Lounge - https://thelounge.chat)
21:10:28 raoul joins (~raoul@95.179.203.88)
21:10:35 Lord_of_Life_ is now known as Lord_of_Life
21:12:47 nandomartinez joins (~nandomart@125.red-79-152-207.dynamicip.rima-tde.net)
21:12:48 Null_A joins (~null_a@2601:645:8700:2290:2cad:b1e0:101a:8137)
21:12:54 <nandomartinez> hi
21:13:06 <nandomartinez> does anyone know how to install haskell?
21:13:16 <maerwald> nandomartinez: https://www.haskell.org/ghcup/
21:13:44 <nandomartinez> i put the link on the terminal and the software got intsalled but now i dont know what to do
21:14:21 <nandomartinez> on mac os i mean
21:14:31 <maerwald> did you do what it says at then end?
21:14:44 <nandomartinez> it didnt say anything
21:14:48 <nandomartinez> it just said
21:14:56 <nandomartinez> the software is installed
21:15:05 <maerwald> no, it says more than that
21:15:19 <nandomartinez> i didnt see it :(
21:15:26 <nandomartinez> what does it say?
21:15:38 pavonia joins (~user@user/siracusa)
21:15:47 <nandomartinez> and thank you btw
21:15:59 <maerwald> https://gitlab.haskell.org/haskell/ghcup-hs/-/blob/master/scripts/bootstrap/bootstrap-haskell#L407
21:16:18 <maerwald> source ~/.ghcup/env
21:16:47 <nandomartinez> thank you so muchj
21:16:49 <nandomartinez> much
21:17:37 Brumaire joins (~quassel@81-64-14-121.rev.numericable.fr)
21:19:22 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds)
21:19:47 acidjnk joins (~acidjnk@p200300d0c703cb65087a628f3300f5c4.dip0.t-ipconnect.de)
21:19:56 × Null_A quits (~null_a@2601:645:8700:2290:2cad:b1e0:101a:8137) (Remote host closed the connection)
21:20:10 Null_A joins (~null_a@2601:645:8700:2290:2cad:b1e0:101a:8137)
21:21:07 × nandomartinez quits (~nandomart@125.red-79-152-207.dynamicip.rima-tde.net) (Quit: Connection closed)
21:22:16 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 252 seconds)
21:24:41 × flouflou quits (~flouflou@modemcable032.110-177-173.mc.videotron.ca) (Quit: WeeChat 3.2)
21:24:42 khanred joins (~khanred@user/khanred)
21:25:04 nfd joins (~nfd@user/nfd)
21:26:56 × Null_A quits (~null_a@2601:645:8700:2290:2cad:b1e0:101a:8137) (Ping timeout: 246 seconds)
21:28:41 Null_A joins (~null_a@2601:645:8700:2290:dc8f:40ba:7f6f:b65c)
21:31:55 deejaytee joins (~deejaytee@vpn-fn-228.net.ed.ac.uk)
21:37:32 × Morrow quits (~MorrowM_@bzq-110-168-31-106.red.bezeqint.net) (Read error: Connection reset by peer)
21:39:17 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:45:07 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
21:51:48 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
21:52:52 hendursaga joins (~weechat@user/hendursaga)
21:54:22 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:58:14 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:00:45 dumbsharka joins (~amirvince@user/amirvincent64)
22:01:03 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2.1)
22:01:21 × max22- quits (~maxime@2a01cb0883359800388d3ba1f1b932ab.ipv6.abo.wanadoo.fr) (Quit: Leaving)
22:09:09 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
22:09:19 × michalz quits (~michalz@185.246.204.61) (Remote host closed the connection)
22:14:04 × danso quits (~danso@23.233.111.52) (Quit: WeeChat 3.2)
22:14:41 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:16:19 yauhsien joins (~yauhsien@61-231-35-247.dynamic-ip.hinet.net)
22:16:29 × Null_A quits (~null_a@2601:645:8700:2290:dc8f:40ba:7f6f:b65c) (Remote host closed the connection)
22:19:00 Null_A joins (~null_a@2601:645:8700:2290:dc8f:40ba:7f6f:b65c)
22:21:14 × yauhsien quits (~yauhsien@61-231-35-247.dynamic-ip.hinet.net) (Ping timeout: 252 seconds)
22:23:49 × eruditass quits (uid248673@id-248673.uxbridge.irccloud.com) (Quit: Connection closed for inactivity)
22:27:29 × deejaytee quits (~deejaytee@vpn-fn-228.net.ed.ac.uk) (Ping timeout: 246 seconds)
22:27:45 madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net)
22:27:55 × maroloccio quits (~marolocci@93-136-18-134.adsl.net.t-com.hr) (Quit: WeeChat 3.0)
22:28:55 × Null_A quits (~null_a@2601:645:8700:2290:dc8f:40ba:7f6f:b65c) (Remote host closed the connection)
22:33:42 × xff0x quits (~xff0x@2001:1a81:53e4:c100:b3ec:1b10:ec18:8c2) (Ping timeout: 260 seconds)
22:34:28 xff0x joins (~xff0x@2001:1a81:53e4:c100:9734:4648:32e:324)
22:35:58 Guest30 joins (~Guest30@c-73-184-127-183.hsd1.ga.comcast.net)
22:36:26 × Guest30 quits (~Guest30@c-73-184-127-183.hsd1.ga.comcast.net) (Client Quit)
22:36:53 Null_A joins (~null_a@2601:645:8700:2290:dc8f:40ba:7f6f:b65c)
22:39:13 × ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection)
22:39:40 × euandreh_ quits (~euandreh@2804:14c:33:9fe5:b7ad:e92:1630:34c7) (Ping timeout: 260 seconds)
22:39:45 ec joins (~ec@gateway/tor-sasl/ec)
22:40:26 euandreh_ joins (~euandreh@2804:14c:33:9fe5:220c:6f8c:d2f2:cb9)
22:43:17 × Brumaire quits (~quassel@81-64-14-121.rev.numericable.fr) (Ping timeout: 264 seconds)
22:44:38 × euandreh_ quits (~euandreh@2804:14c:33:9fe5:220c:6f8c:d2f2:cb9) (Ping timeout: 246 seconds)
22:45:34 brainfreeze joins (~brainfree@2a03:1b20:4:f011::20d)
22:48:47 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds)
22:56:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 246 seconds)
22:57:51 × ec quits (~ec@gateway/tor-sasl/ec) (Quit: ec)
23:05:36 euandreh_ joins (~euandreh@2804:14c:33:9fe5:53a9:7ace:bc32:5ab9)
23:10:34 yinghua_ joins (~yinghua@2800:2121:1400:1db:8c9e:15bc:1174:e66f)
23:11:30 × madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Ping timeout: 265 seconds)
23:12:59 × yinghua quits (~yinghua@2800:2121:1400:1db:28cd:b538:6ec9:eacd) (Ping timeout: 246 seconds)
23:13:13 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:13:14 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:13:14 wroathe joins (~wroathe@user/wroathe)
23:18:16 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 265 seconds)
23:19:30 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
23:19:31 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
23:19:31 wroathe joins (~wroathe@user/wroathe)
23:20:29 × euandreh_ quits (~euandreh@2804:14c:33:9fe5:53a9:7ace:bc32:5ab9) (Ping timeout: 264 seconds)
23:21:04 euandreh_ joins (~euandreh@2804:14c:33:9fe5:1ad2:21b6:1fe4:5cba)
23:27:14 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
23:36:42 × euandreh_ quits (~euandreh@2804:14c:33:9fe5:1ad2:21b6:1fe4:5cba) (Ping timeout: 260 seconds)
23:37:50 lavaman joins (~lavaman@98.38.249.169)
23:42:12 × favonia quits (~favonia@user/favonia) (Quit: Leaving)
23:42:31 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
23:48:41 × acidjnk quits (~acidjnk@p200300d0c703cb65087a628f3300f5c4.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
23:49:12 × Guest8325 quits (~chris@81.96.113.213) (Remote host closed the connection)
23:56:19 chris joins (~chris@81.96.113.213)
23:56:23 chris is now known as Guest8432

All times are in UTC on 2021-09-22.