Logs on 2024-07-01 (liberachat/#haskell)
| 00:00:32 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 00:01:56 | → | califax joins (~califax@user/califx) |
| 00:05:53 | → | phma joins (~phma@host-67-44-208-142.hnremote.net) |
| 00:11:15 | × | Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection) |
| 00:14:06 | → | Leary joins (~Leary@user/Leary/x-0910699) |
| 00:21:16 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 00:29:37 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 272 seconds) |
| 00:34:53 | × | xdminsy quits (~xdminsy@117.147.70.231) (Ping timeout: 240 seconds) |
| 00:35:48 | → | xdminsy joins (~xdminsy@117.147.70.231) |
| 00:37:06 | → | dcoutts joins (~duncan@cpc113460-oxfd27-2-0-cust409.4-3.cable.virginm.net) |
| 00:44:02 | × | ft quits (~ft@mue-88-130-107-007.dsl.tropolys.de) (Ping timeout: 268 seconds) |
| 00:45:18 | → | ft joins (~ft@mue-88-130-106-118.dsl.tropolys.de) |
| 00:59:29 | <Axman6> | :o |
| 01:16:47 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 264 seconds) |
| 01:32:26 | lol_ | is now known as jcarpenter2 |
| 01:33:37 | <mikko> | is there any way to install packages such that they are available in the default ghci (outside any project) without introducing a ~/.ghc directory? |
| 01:33:53 | <mikko> | here's what i tried https://bpa.st/raw/XPGA |
| 01:34:28 | × | caryfitz quits (~caryfitz@2600:1700:e72:9000::47) (Ping timeout: 256 seconds) |
| 01:34:39 | <mikko> | i spent good 20 minutes chatting with chatgippity about package-db and whatever but none of its suggestions helped |
| 01:35:43 | <mikko> | i'm a bit confused where cabal is even installing the package and why removing .ghc affects anything when there's clearly no package there |
| 01:36:02 | <mikko> | and why it even generates .ghc when i already have ~/.config/ghc/ghci.conf |
| 01:36:41 | <sclv> | cabal doesn’t generate .ghc. unsurprisingly, ghc does |
| 01:37:27 | <mikko> | well it's definitely the cabal command that generates it |
| 01:37:44 | <sclv> | the thing cabal writes in there is the default env file. which is mentioned in your paste |
| 01:38:10 | <sclv> | thats where the package is picked up by ghci from, as a “pointer” to the actual location its installed |
| 01:38:50 | <mikko> | i tried moving that to ~/.config/ghc/ but it didn't seem to help |
| 01:38:56 | <sclv> | you can explicitly pass in a different env file location to ghci if you don’t want it to use the one in .ghc — and similarly you can direct cabal to write that enc file elsewhere |
| 01:39:50 | <sclv> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/packages.html#package-environments |
| 01:41:35 | <mikko> | hmm maybe it belong in $XDG_DATA_HOME not $XDG_CONFIG_HOME |
| 01:44:31 | <jcarpenter2> | I've been working on this program that does pattern matching against expression trees, and just noticed pattern matching is sort of like parsing |
| 01:45:26 | <jcarpenter2> | Instead of parsers that match parts of an input string, there are patterns that match parts of a structured expression tree |
| 01:47:27 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
| 01:48:53 | <mikko> | yup moving the environment thingamagic from ~/.ghc/ to ~/.local/share/ghc/ did the trick |
| 01:56:12 | <sclv> | nice |
| 02:09:47 | → | rosco joins (~rosco@175.136.155.137) |
| 02:11:24 | × | Typedfern quits (~Typedfern@82.red-83-37-24.dynamicip.rima-tde.net) (Ping timeout: 255 seconds) |
| 02:16:08 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 02:16:41 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 02:26:08 | → | Typedfern joins (~Typedfern@182.red-83-37-43.dynamicip.rima-tde.net) |
| 02:41:02 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 02:41:52 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 02:43:48 | × | td_ quits (~td@i5387093F.versanet.de) (Ping timeout: 255 seconds) |
| 02:45:37 | → | td_ joins (~td@i53870923.versanet.de) |
| 02:46:59 | × | [exa] quits (~exa@user/exa/x-3587197) (Ping timeout: 260 seconds) |
| 02:48:36 | × | bairyn quits (~bairyn@50.250.232.19) (Ping timeout: 268 seconds) |
| 02:49:55 | → | bairyn joins (~bairyn@50.250.232.19) |
| 03:01:27 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 260 seconds) |
| 03:20:15 | × | aforemny quits (~aforemny@2001:9e8:6cdc:700:7c5a:7635:6125:375c) (Ping timeout: 255 seconds) |
| 03:20:26 | → | aforemny_ joins (~aforemny@i59F516CB.versanet.de) |
| 03:24:58 | × | rosco quits (~rosco@175.136.155.137) (Ping timeout: 246 seconds) |
| 03:34:46 | → | rosco joins (~rosco@175.136.155.137) |
| 03:47:31 | × | JimL quits (~quassel@89.162.16.26) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 03:50:32 | → | JimL joins (~quassel@89.162.16.26) |
| 04:01:11 | × | zzz quits (~yin@user/zero) (Ping timeout: 264 seconds) |
| 04:14:19 | × | TactfulCitrus quits (~al@2a02:8012:87a6:0:fbe0:6116:6e30:e047) (Ping timeout: 268 seconds) |
| 04:21:13 | × | CrunchyFlakes quits (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 04:23:42 | → | CrunchyFlakes joins (~CrunchyFl@146.52.130.128) |
| 04:29:05 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 04:55:00 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 04:56:05 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 05:02:28 | → | euphores joins (~SASL_euph@user/euphores) |
| 05:13:40 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 05:24:54 | → | michalz joins (~michalz@185.246.207.221) |
| 05:31:07 | → | simendsjo joins (~user@84.209.170.3) |
| 05:34:52 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 05:49:40 | → | misterfish joins (~misterfis@84.53.85.146) |
| 05:53:17 | × | joeyadams quits (~joeyadams@2603:6010:5100:2ed:2bef:3f32:3ac3:d5e) (Quit: Leaving) |
| 05:55:26 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:05:29 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 06:08:06 | × | amjoseph quits (~amjoseph@static-198-44-128-146.cust.tzulo.com) (Ping timeout: 268 seconds) |
| 06:10:51 | → | amjoseph joins (~amjoseph@static-198-44-128-146.cust.tzulo.com) |
| 06:25:25 | → | TactfulCitrus joins (~al@2a02:8012:87a6:0:fbe0:6116:6e30:e047) |
| 06:40:04 | × | ft quits (~ft@mue-88-130-106-118.dsl.tropolys.de) (Remote host closed the connection) |
| 06:42:57 | × | simendsjo quits (~user@84.209.170.3) (Remote host closed the connection) |
| 06:51:08 | × | dcoutts quits (~duncan@cpc113460-oxfd27-2-0-cust409.4-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 07:00:17 | → | danza joins (~francesco@151.44.206.77) |
| 07:02:50 | × | nurupo quits (~nurupo.ga@user/nurupo) (Quit: nurupo.ga) |
| 07:03:39 | → | nurupo joins (~nurupo.ga@user/nurupo) |
| 07:05:33 | → | dcoutts joins (~duncan@cpc113460-oxfd27-2-0-cust409.4-3.cable.virginm.net) |
| 07:06:05 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 272 seconds) |
| 07:07:14 | → | misterfish joins (~misterfis@84.53.85.146) |
| 07:15:33 | × | michalz quits (~michalz@185.246.207.221) (Ping timeout: 256 seconds) |
| 07:21:55 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 256 seconds) |
| 07:21:56 | × | danza quits (~francesco@151.44.206.77) (Ping timeout: 252 seconds) |
| 07:22:43 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:26:23 | → | lewisje joins (~lewisje@74.215.19.22) |
| 07:31:31 | → | simendsjo joins (~user@84.209.170.3) |
| 07:40:27 | × | mikess quits (~mikess@user/mikess) (Ping timeout: 264 seconds) |
| 07:41:33 | → | gmg joins (~user@user/gehmehgeh) |
| 07:42:26 | → | danse-nr3 joins (~danse-nr3@151.44.206.77) |
| 08:00:41 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 08:05:24 | → | michalz joins (~michalz@185.246.207.193) |
| 08:12:02 | → | __monty__ joins (~toonn@user/toonn) |
| 08:13:49 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:15:38 | → | img joins (~img@user/img) |
| 08:30:40 | → | swistak joins (~swistak@185.21.216.141) |
| 08:31:45 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 08:33:47 | → | emm joins (~emm@user/edmeme) |
| 08:36:30 | → | cheater_ joins (~Username@user/cheater) |
| 08:36:39 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 08:37:01 | × | danse-nr3 quits (~danse-nr3@151.44.206.77) (Ping timeout: 268 seconds) |
| 08:37:14 | × | p3n quits (~p3n@217.198.124.246) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:40:43 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 08:40:48 | cheater_ | is now known as cheater |
| 08:41:18 | → | greenflower joins (~greenflow@122.171.18.1) |
| 08:42:14 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 08:43:36 | → | chele joins (~chele@user/chele) |
| 08:46:36 | → | danse-nr3 joins (~danse-nr3@151.44.206.77) |
| 08:48:03 | → | p3n joins (~p3n@217.198.124.246) |
| 08:52:50 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 08:58:44 | → | [exa] joins (~exa@user/exa/x-3587197) |
| 09:07:00 | → | killy joins (~killy@staticline-31-183-144-171.toya.net.pl) |
| 09:07:25 | → | oo_miguel joins (~Thunderbi@78.10.207.46) |
| 09:12:01 | → | alexherbo2 joins (~alexherbo@2a02-8440-3404-2111-f9f6-780a-2169-fa49.rev.sfr.net) |
| 09:12:10 | × | emm quits (~emm@user/edmeme) (Ping timeout: 268 seconds) |
| 09:15:59 | × | fun-safe-math quits (~fun-safe-@24.21.106.247) () |
| 09:16:16 | × | killy quits (~killy@staticline-31-183-144-171.toya.net.pl) (Quit: leaving) |
| 09:16:55 | × | alexherbo2 quits (~alexherbo@2a02-8440-3404-2111-f9f6-780a-2169-fa49.rev.sfr.net) (Remote host closed the connection) |
| 09:19:04 | → | alexherbo2 joins (~alexherbo@2a02-8440-3404-2111-844d-6b69-bf95-f1f7.rev.sfr.net) |
| 09:37:49 | × | simendsjo quits (~user@84.209.170.3) (Remote host closed the connection) |
| 09:40:02 | → | simendsjo joins (~user@84.209.170.3) |
| 09:44:47 | × | simendsjo quits (~user@84.209.170.3) (Remote host closed the connection) |
| 09:53:49 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 10:00:25 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 10:11:34 | × | rosco quits (~rosco@175.136.155.137) (Quit: Lost terminal) |
| 10:35:09 | × | dcoutts quits (~duncan@cpc113460-oxfd27-2-0-cust409.4-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 10:41:23 | × | danse-nr3 quits (~danse-nr3@151.44.206.77) (Ping timeout: 264 seconds) |
| 10:41:50 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 10:42:29 | → | danse-nr3 joins (~danse-nr3@151.44.206.77) |
| 10:43:09 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 10:51:34 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 10:52:55 | → | zzz joins (~yin@user/zero) |
| 11:03:55 | × | danse-nr3 quits (~danse-nr3@151.44.206.77) (Ping timeout: 256 seconds) |
| 11:04:09 | → | danse-nr3 joins (~danse-nr3@151.35.249.42) |
| 11:10:08 | × | tomsmeding quits (~tomsmedin@2a01:4f8:c0c:5e5e::2) (Quit: ZNC 1.9.0 - https://znc.in) |
| 11:11:38 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 11:17:41 | → | ircbrowse_tom joins (~ircbrowse@user/tomsmeding/bot/ircbrowse-tom) |
| 11:17:43 | Server | sets mode +Cnt |
| 11:18:11 | × | yahb2 quits (~yahb2@user/tomsmeding/bot/yahb2) (Remote host closed the connection) |
| 11:18:36 | → | yahb2 joins (~yahb2@user/tomsmeding/bot/yahb2) |
| 11:18:36 | ChanServ | sets mode +v yahb2 |
| 11:19:14 | × | waleee quits (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) (Ping timeout: 256 seconds) |
| 11:19:48 | → | pavonia joins (~user@user/siracusa) |
| 11:20:25 | → | dcoutts joins (~duncan@185.201.60.211) |
| 11:27:35 | × | igemnace quits (~igemnace@user/igemnace) (Quit: ZNC 1.8.2+deb2build5 - https://znc.in) |
| 11:29:54 | × | Ekho quits (~Ekho@user/ekho) (Quit: CORE ERROR, SYSTEM HALTED.) |
| 11:30:14 | × | Catty quits (~catties@user/meow/catties) (Remote host closed the connection) |
| 11:30:50 | → | igemnace joins (~igemnace@user/igemnace) |
| 11:32:06 | × | danse-nr3 quits (~danse-nr3@151.35.249.42) (Ping timeout: 255 seconds) |
| 11:34:29 | → | danse-nr3 joins (~danse-nr3@151.35.249.42) |
| 11:35:21 | → | catties joins (~catties@user/meow/catties) |
| 11:41:19 | → | Ekho joins (~Ekho@user/ekho) |
| 11:41:35 | → | rosco joins (~rosco@175.136.155.137) |
| 11:42:27 | × | dcoutts quits (~duncan@185.201.60.211) (Remote host closed the connection) |
| 11:44:46 | → | Square joins (~Square@user/square) |
| 11:45:03 | → | dcoutts joins (~duncan@ip-185-104-136-21.ptr.icomera.net) |
| 11:57:26 | × | hgolden quits (~hgolden@2603:8000:9d00:3ed1:2678:8497:aa5c:7fa9) (Remote host closed the connection) |
| 11:59:33 | → | hgolden joins (~hgolden@2603:8000:9d00:3ed1:2678:8497:aa5c:7fa9) |
| 12:03:41 | × | dcoutts quits (~duncan@ip-185-104-136-21.ptr.icomera.net) (Ping timeout: 240 seconds) |
| 12:06:00 | → | Nixkernal joins (~Nixkernal@240.17.194.178.dynamic.cust.swisscom.net) |
| 12:15:56 | × | greenflower quits (~greenflow@122.171.18.1) (Ping timeout: 250 seconds) |
| 12:28:28 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 12:29:21 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 12:34:37 | → | noumenon joins (~noumenon@113.51-175-156.customer.lyse.net) |
| 12:35:39 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 264 seconds) |
| 12:40:52 | × | danse-nr3 quits (~danse-nr3@151.35.249.42) (Ping timeout: 256 seconds) |
| 12:43:43 | × | driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 12:44:42 | → | driib3 joins (~driib@vmi931078.contaboserver.net) |
| 12:45:38 | × | driib3 quits (~driib@vmi931078.contaboserver.net) (Client Quit) |
| 12:47:49 | → | driib3 joins (~driib@vmi931078.contaboserver.net) |
| 12:49:35 | → | cfricke joins (~cfricke@user/cfricke) |
| 12:54:38 | × | bitdex_ quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:04:00 | × | alexherbo2 quits (~alexherbo@2a02-8440-3404-2111-844d-6b69-bf95-f1f7.rev.sfr.net) (Remote host closed the connection) |
| 13:04:46 | × | tired quits (~tired@user/tired) (Remote host closed the connection) |
| 13:05:57 | → | tired joins (~tired@user/tired) |
| 13:38:53 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 268 seconds) |
| 13:43:12 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 13:43:23 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 13:43:29 | → | danse-nr3 joins (~danse-nr3@151.35.249.42) |
| 13:44:00 | × | mrmonday quits (~robert@what.i.hope.is.not.a.tabernaevagant.es) (Quit: .) |
| 13:45:22 | → | mrmonday joins (~robert@what.i.hope.is.not.a.tabernaevagant.es) |
| 13:59:36 | → | dcoutts joins (~duncan@185.201.60.13) |
| 14:08:36 | → | ystael joins (~ystael@user/ystael) |
| 14:09:16 | × | dcoutts quits (~duncan@185.201.60.13) (Ping timeout: 256 seconds) |
| 14:11:50 | → | cheater_ joins (~Username@user/cheater) |
| 14:15:20 | → | dcoutts joins (~duncan@94.119.32.11) |
| 14:16:11 | × | cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds) |
| 14:16:17 | cheater_ | is now known as cheater |
| 14:24:22 | × | driib3 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 14:28:13 | → | driib3 joins (~driib@vmi931078.contaboserver.net) |
| 14:32:03 | × | dcoutts quits (~duncan@94.119.32.11) (Ping timeout: 252 seconds) |
| 14:34:08 | → | maroloccio joins (~marolocci@151.73.250.151) |
| 14:39:46 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 246 seconds) |
| 14:44:29 | × | spenat quits (~spenat@c-1125235c.012-6-62726f1.bbcust.telenor.se) (Ping timeout: 256 seconds) |
| 14:46:20 | → | dcoutts joins (~duncan@ip-185-104-136-57.ptr.icomera.net) |
| 14:50:26 | → | ft joins (~ft@p4fc2ab80.dip0.t-ipconnect.de) |
| 14:58:40 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 15:00:40 | × | danse-nr3 quits (~danse-nr3@151.35.249.42) (Read error: Connection reset by peer) |
| 15:01:08 | → | danse-nr3 joins (~danse-nr3@151.43.102.201) |
| 15:02:44 | → | dsrt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
| 15:09:17 | → | meritamen joins (~user@user/meritamen) |
| 15:11:15 | → | spenat joins (~spenat@c-1125235c.012-6-62726f1.bbcust.telenor.se) |
| 15:14:24 | × | dcoutts quits (~duncan@ip-185-104-136-57.ptr.icomera.net) (Ping timeout: 252 seconds) |
| 15:19:01 | × | rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
| 15:19:33 | → | rvalue joins (~rvalue@user/rvalue) |
| 15:20:05 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 272 seconds) |
| 15:22:57 | × | rncwnd quits (~quassel@2a01:4f8:221:27c6::1) (Quit: Later) |
| 15:23:43 | → | rncwnd joins (~quassel@2a01:4f8:221:27c6::1) |
| 15:23:47 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 15:23:56 | → | euleritian joins (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) |
| 15:24:16 | × | euleritian quits (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 15:24:33 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 15:28:05 | × | meritamen quits (~user@user/meritamen) (Ping timeout: 240 seconds) |
| 15:30:48 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds) |
| 15:31:43 | → | cfricke joins (~cfricke@user/cfricke) |
| 15:33:41 | → | dcoutts joins (~duncan@212.187.183.33) |
| 15:35:43 | → | cheater_ joins (~Username@user/cheater) |
| 15:37:04 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 15:37:08 | cheater_ | is now known as cheater |
| 15:47:28 | → | AlexNoo_ joins (~AlexNoo@94.233.240.124) |
| 15:47:42 | → | segfaultfizzbuzz joins (~segfaultf@23-93-79-84.fiber.dynamic.sonic.net) |
| 15:48:25 | → | mikess joins (~mikess@user/mikess) |
| 15:50:39 | × | AlexZenon quits (~alzenon@94.233.240.141) (Ping timeout: 264 seconds) |
| 15:51:28 | × | AlexNoo quits (~AlexNoo@94.233.240.141) (Ping timeout: 268 seconds) |
| 15:51:29 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 15:54:03 | → | soverysour joins (~soverysou@81.196.150.219) |
| 15:54:03 | × | soverysour quits (~soverysou@81.196.150.219) (Changing host) |
| 15:54:03 | → | soverysour joins (~soverysou@user/soverysour) |
| 15:56:59 | AlexNoo_ | is now known as AlexNoo |
| 16:11:25 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 16:13:17 | × | machinedgod quits (~machinedg@d173-183-246-216.abhsia.telus.net) (Ping timeout: 240 seconds) |
| 16:14:34 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 16:28:39 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 255 seconds) |
| 16:33:33 | × | danse-nr3 quits (~danse-nr3@151.43.102.201) (Ping timeout: 272 seconds) |
| 16:34:26 | → | danza joins (~francesco@151.43.102.201) |
| 16:35:33 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 16:36:13 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 16:52:25 | × | danza quits (~francesco@151.43.102.201) (Ping timeout: 246 seconds) |
| 16:56:16 | × | dsrt^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Ping timeout: 246 seconds) |
| 17:00:24 | × | dcoutts quits (~duncan@212.187.183.33) (Ping timeout: 256 seconds) |
| 17:02:49 | → | dsrt^ joins (~cd@c-98-242-74-66.hsd1.ga.comcast.net) |
| 17:04:10 | → | AlexZenon joins (~alzenon@94.233.240.124) |
| 17:04:42 | → | danse-nr3 joins (~danse-nr3@151.43.102.201) |
| 17:08:08 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 17:08:16 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 17:13:22 | × | AlexZenon quits (~alzenon@94.233.240.124) (Read error: Connection reset by peer) |
| 17:18:02 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 4.2.2) |
| 17:18:11 | → | AlexZenon joins (~alzenon@94.233.240.124) |
| 17:20:17 | × | maroloccio quits (~marolocci@151.73.250.151) (Quit: WeeChat 3.8) |
| 17:20:51 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 17:24:05 | → | dcoutts joins (~duncan@212.187.183.33) |
| 17:29:47 | × | CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Read error: Connection reset by peer) |
| 17:32:12 | → | CrunchyFlakes joins (~CrunchyFl@146.52.130.128) |
| 17:38:16 | <Athas> | What are good introductory Haskell textbooks these days? |
| 17:38:52 | <monochrom> | I think Hutton's book. |
| 17:38:53 | <haskellbridge> | <sm> what kind of style, focus, and prequisites ? |
| 17:39:01 | <haskellbridge> | <sm> Hutton is always considered good |
| 17:39:06 | <Athas> | I know of Hutton's book, and I will recommend it. But what else? |
| 17:39:23 | <Athas> | The context is a master's level course with no required textbook, but merely recommended ones. |
| 17:39:30 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds) |
| 17:39:30 | <haskellbridge> | <sm> for a light intro I always liked |
| 17:39:30 | <haskellbridge> | @where htac |
| 17:39:31 | <lambdabot> | "Haskell Tutorial and Cookbook" by Mark Watson in 2017-09-04 at <https://leanpub.com/haskell-cookbook> |
| 17:39:45 | <Athas> | I'm taking over the course, which used to recommend Hutton and LYAH, but I think the latter is outdated (and I never liked it much myself). |
| 17:39:59 | → | euleritian joins (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) |
| 17:40:44 | <Athas> | That Haskell Cookbook looks good; I will take a closer look. |
| 17:41:28 | <monochrom> | The other resources I am familiar with, I have described them in http://www.vex.net/~trebla/haskell/learn-sources.html |
| 17:41:37 | <haskellbridge> | <sm> more: https://www.extrema.is/articles/haskell-books -> beginner |
| 17:41:47 | <monochrom> | But the wikibook is always a good place to start for free. |
| 17:41:57 | <haskellbridge> | <sm> that too |
| 17:42:28 | × | Noinia quits (~Frank@77-162-168-71.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 17:42:40 | <haskellbridge> | <sm> I heard good things about Effective Haskell IIRC |
| 17:43:37 | <Athas> | Woah, there's more books than I expected. This used to be simpler. |
| 17:44:04 | <monochrom> | Well yeah consider "which book do you recommend for Java?" >:) |
| 17:44:05 | <Athas> | In the old days, you read Hutton, and then you read RWH (while walking uphill). |
| 17:44:26 | <Athas> | And in the even older days, the Gentle Introduction. |
| 17:44:52 | <monochrom> | But ironically in the case of C I just need to know to recommend King's. (Unless you don't have that much money.) |
| 17:47:58 | <dolio> | Up to date with C99. |
| 17:48:36 | <haskellbridge> | <sm> Athas: let us know what you decide |
| 17:48:55 | <Athas> | How is LYAH perceived nowadays? Is it actually outdated? |
| 17:49:27 | <haskellbridge> | <sm> people usually say it's lacking hands-on exercises, I think ? |
| 17:49:29 | <monochrom> | About the money thing: I realize that I am completely out of touch these days. Young people simply find free (probably pirated) PDF on the internet. :) |
| 17:50:05 | <monochrom> | I change my mind about LYAH every 11 years. >:) |
| 17:50:24 | <dolio> | We could have a much cheaper book to recommend. Just one page. "Don't use C." |
| 17:50:26 | <Athas> | I'll be writing my own exercises anyway, so that's not an important aspect. |
| 17:50:29 | <haskellbridge> | <sm> unless there's a repo with recent commits, you can be pretty sure any haskell book is a bit outdated on tools and setup |
| 17:50:48 | × | dcoutts quits (~duncan@212.187.183.33) (Ping timeout: 256 seconds) |
| 17:50:56 | <Athas> | Yes, I don't expect tooling to be covered, but I prefer that the code in the book will at least work. |
| 17:51:15 | <Athas> | Actually, I don't remember if Hutton is pre or post things like the Functor=>Applicative=>Monad change. |
| 17:51:19 | <haskellbridge> | <sm> well that's a long shot also. Most books don't ensure that |
| 17:51:41 | <monochrom> | I wonder if LYAH is GI made longer and slower. :) |
| 17:52:10 | <monochrom> | To be sure, LYAH covers more topics, so not really fair. |
| 17:52:33 | <monochrom> | Hutton's has FAM. |
| 17:53:25 | <Athas> | That is good to know. I left my copy at the office. |
| 17:55:26 | <monochrom> | Hrm, Bird's is the one that's pre-FAM. |
| 17:55:42 | <geekosaur> | and he bitched about it iirc |
| 17:55:47 | <dolio> | What is the status of the evil bird book, though? |
| 17:55:56 | <geekosaur> | because his book had just gone off to press when FAM landed |
| 17:56:24 | <haskellbridge> | <sm> what is this "press" you speak of |
| 17:56:40 | <monochrom> | What is the evil bird book? |
| 17:57:31 | → | tomsmeding joins (~tomsmedin@static.21.109.88.23.clients.your-server.de) |
| 17:57:53 | <dolio> | https://0x0.st/XaBG.jpg |
| 17:58:43 | <monochrom> | Oh haha, now I see what "evil bird" means heh. |
| 17:59:56 | × | rosco quits (~rosco@175.136.155.137) (Quit: Lost terminal) |
| 18:01:30 | <EvanR> | they are so close to the title with so much whitespace below |
| 18:01:36 | <EvanR> | what is going ON with that layout |
| 18:01:39 | × | danse-nr3 quits (~danse-nr3@151.43.102.201) (Ping timeout: 260 seconds) |
| 18:02:23 | <dolio> | Dunno. There's an OCaml one, too. |
| 18:02:45 | <monochrom> | Leave blank space to show the spacious atmosphere/vibe. |
| 18:02:48 | <dolio> | With an angry robin or something. |
| 18:02:52 | <haskellbridge> | <sm> they didn't stand where they were asked. They're _evil_. |
| 18:03:03 | <monochrom> | For example Chinese painting and the Dune Part 1 movie. |
| 18:04:21 | × | hueso quits (~root@user/hueso) (Quit: hueso) |
| 18:05:38 | <monochrom> | In most Chinese paintings, it's like 70%-90% blank space. In one scene in Dune where the Baron, his nephew, and the reverend mother were meeting, it's 10% those 3 persons and 90% the empty hall they're in. |
| 18:06:31 | <monochrom> | In my https://www.vex.net/~trebla/haskell/forwardconstraint/ForwardConstraint.hs , it's 90% docs/comments and 10% code. >:) |
| 18:07:59 | → | hueso joins (~root@user/hueso) |
| 18:08:33 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 18:08:46 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 18:12:13 | × | EvanR quits (~EvanR@user/evanr) (Quit: Leaving) |
| 18:12:37 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer) |
| 18:13:34 | → | mulk joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 18:16:23 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 18:21:21 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 18:23:20 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:33:53 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:35:47 | × | euleritian quits (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 18:36:11 | → | euleritian joins (~euleritia@2a02:810a:b00:1568:a497:6bd5:cbcc:abc0) |
| 18:40:20 | × | jrm quits (~jrm@user/jrm) (Quit: ciao) |
| 18:41:57 | → | jrm joins (~jrm@user/jrm) |
| 18:52:29 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 18:57:14 | × | qqq quits (~qqq@92.43.167.61) (Remote host closed the connection) |
| 19:00:58 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:01:27 | × | jrm quits (~jrm@user/jrm) (Quit: ciao) |
| 19:02:56 | → | jrm joins (~jrm@user/jrm) |
| 19:03:08 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 19:05:47 | × | Arsen quits (arsen@gentoo/developer/managarm.dev.Arsen) (Quit: Quit.) |
| 19:07:50 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 19:08:21 | → | Arsen joins (arsen@aarsen.me) |
| 19:08:45 | Arsen | is now known as Guest702 |
| 19:09:51 | × | euleritian quits (~euleritia@2a02:810a:b00:1568:a497:6bd5:cbcc:abc0) (Ping timeout: 264 seconds) |
| 19:10:48 | → | euleritian joins (~euleritia@95.90.211.232) |
| 19:10:56 | → | hseg joins (~gesh@46.120.21.14) |
| 19:11:26 | → | pavonia joins (~user@user/siracusa) |
| 19:11:38 | <tomsmeding> | monochrom: (disclaimer, read the books (1-3) but didn't see the movie) Herbert does like his grand halls. We get a grand hall (the previous emperor's metal contraption on Arrakis) at the end of book 1, and in books 2 and 3 we get Alia's temple, the palace in Arrakeen, and various other big places |
| 19:13:33 | <hseg> | Hi. IIRC, typeclass inference is confluent (in particular, the category of typeclasses is thin). How does GHC enforce this (eg what prevents me from writing an inconsistent pair of inferences Ord a => Eq [a])? |
| 19:13:52 | <tomsmeding> | have you tried it and looked at the error message? |
| 19:14:28 | <hseg> | not yet, should've done so first, sorry |
| 19:15:46 | <hseg> | guessing -- that's going to get me into overlapping instance trouble, isn't it? |
| 19:15:51 | <tomsmeding> | also try 'data T a = T a ; instance Eq (f a) ; instance Eq (T a)' and look at all the diagnostics |
| 19:16:05 | <tomsmeding> | well for your 'Eq [a]' GHC just plainly says "duplicate instances" |
| 19:16:32 | <tomsmeding> | but with my example you get "Overlapping instances" errors |
| 19:17:00 | <hseg> | hrm, https://0x0.st/XaMG.txt doesn't get me into trouble yet, odd |
| 19:17:56 | <monochrom> | Basically overlapping instances at some point. Plus the implicit fact that you gain more instances from importing and it's accumulative, and you perpetuate what you gain to those who import you, therefore two branches that overlap each other will be noticed eventually (e.g., in your main). |
| 19:18:41 | <tomsmeding> | monochrom: why do hseg's two Q instances not overlap |
| 19:18:41 | <monochrom> | Sometimes we even say "incoherent" which is more scaremongering than "overlap" :) |
| 19:18:42 | <hseg> | ah, ok |
| 19:19:28 | <monochrom> | Hrm... I don't know. Let me try... |
| 19:19:33 | <tomsmeding> | ah, ghc does throw an error when trying to instantiate an ambiguous situation |
| 19:19:53 | <tomsmeding> | hseg: https://play.haskell.org/saved/xlgZHO2X |
| 19:19:57 | <monochrom> | I should be creating a Unix-and-C midterm test instead of playing with Haskell... |
| 19:20:24 | <tomsmeding> | ask them to implement closures in C |
| 19:21:12 | <hseg> | Ah, OK so _now_ I get an UndecidableInstances warning |
| 19:21:22 | <hseg> | https://0x0.st/XaM7.txt |
| 19:21:26 | <monochrom> | Hrm interesting, you have to use methods before conflicts are noticed. This is truly lazy. :) |
| 19:21:41 | <hseg> | rofl |
| 19:21:45 | × | zzz quits (~yin@user/zero) (Ping timeout: 268 seconds) |
| 19:21:45 | <tomsmeding> | UndecidableInstances is irrelevant to preserving confluence though, I think |
| 19:21:53 | × | Guest702 quits (arsen@aarsen.me) (Changing host) |
| 19:21:53 | → | Guest702 joins (arsen@gentoo/developer/managarm.dev.Arsen) |
| 19:22:04 | <tomsmeding> | it's relevant for preserving, well, decidability |
| 19:22:16 | <hseg> | tomsmeding: I'm unsurprised by your case, though -- it's clearly overlapping |
| 19:22:22 | <tomsmeding> | it is |
| 19:22:43 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 256 seconds) |
| 19:23:14 | <hseg> | Ah, OK, with UI am getting the Overlapping instances warning |
| 19:23:48 | × | Guest702 quits (arsen@gentoo/developer/managarm.dev.Arsen) (Quit: Quit.) |
| 19:23:58 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 246 seconds) |
| 19:24:16 | <hseg> | though doesn't this mean that the promise of the thinness of typeclasses is a) only true in the absence of overlap and b) only reflects that absence's tiebreaking power? |
| 19:24:45 | <tomsmeding> | can you usefully define overlapping typeclasses though |
| 19:24:53 | <tomsmeding> | (without {-# OVERLAPPING #-} and friends) |
| 19:24:53 | <hseg> | think so? |
| 19:25:04 | <tomsmeding> | (because that's explicitly opting out of confluence) |
| 19:25:21 | <tomsmeding> | that is, can you define overlapping instances in such a way that you can use them |
| 19:25:47 | <tomsmeding> | any use of a method from overlapping classes will be ambiguous |
| 19:25:56 | <tomsmeding> | if both are in scope, that is |
| 19:25:57 | → | Arsen joins (arsen@gentoo/developer/managarm.dev.Arsen) |
| 19:27:26 | <tomsmeding> | perhaps not as satisfying as overlapping definitions being rejected at definition site, but at least it does preserve confluence |
| 19:27:47 | <carbolymer> | @pl \(k,v) -> (, v) <$> V2.readParamName @V2.ParamName k |
| 19:27:47 | <lambdabot> | (line 1, column 13): |
| 19:27:47 | <lambdabot> | unexpected ',' |
| 19:27:47 | <lambdabot> | expecting expression |
| 19:27:56 | <carbolymer> | lambdabot does not understand tuplesections? |
| 19:28:06 | <tomsmeding> | well, @pl at least doesn't |
| 19:28:12 | <geekosaur> | @pl doesn't understand tuples |
| 19:28:23 | → | soverysour joins (~soverysou@user/soverysour) |
| 19:28:35 | <tomsmeding> | @pl \a b -> (a, b) |
| 19:28:35 | <lambdabot> | (,) |
| 19:28:37 | <tomsmeding> | that it does |
| 19:29:03 | <geekosaur> | more precisely, there's some simple mapping of some simple cases but the general case throws an error |
| 19:29:21 | <tomsmeding> | also it parses the type application as a use of infix (@) |
| 19:29:24 | <tomsmeding> | @pl \(k,v) -> (\x -> (x, v)) <$> f k |
| 19:29:24 | <lambdabot> | uncurry (flip ((<$>) . flip (,)) . f) |
| 19:29:48 | <geekosaur> | in particular, pattern matching can't be made pointfree unless it can render the whole expression without breaking apart the tuple, iircc |
| 19:29:58 | × | RiXSon quits (~rixson@178-164-206-66.pool.digikabel.hu) (Ping timeout: 264 seconds) |
| 19:30:22 | <tomsmeding> | @pl \(a, b) -> (b, a) |
| 19:30:22 | <lambdabot> | uncurry (flip (,)) |
| 19:30:28 | <tomsmeding> | seems to have _some_ understanding |
| 19:30:34 | <geekosaur> | and it predates tuplesections, so won't handle it at all |
| 19:31:27 | <geekosaur> | yes, that one it knows it can use uncurry. I think it has trouble with more complex ones though] |
| 19:31:57 | <tomsmeding> | perhaps "it understands tuples but the transformation is not complete in their presence" |
| 19:32:39 | → | emm joins (~emm@user/edmeme) |
| 19:32:49 | <monochrom> | @pl isn't even a LLM so nevermind "understand" >:) |
| 19:33:22 | <tomsmeding> | you get what I meant :p |
| 19:33:47 | → | EvanR joins (~EvanR@user/evanr) |
| 19:37:12 | × | superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Read error: Connection reset by peer) |
| 19:37:39 | → | superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net) |
| 19:37:46 | <cheater> | if i have a function f :: [Int] -> [Int], f = (++ [2]), where do i say the 2 "comes from" in something like f [1, 7] == [1, 7, 2]? |
| 19:41:29 | <monochrom> | I don't understand the question. But probably "2 comes from f"? |
| 19:42:53 | × | superbil quits (~superbil@1-34-176-171.hinet-ip.hinet.net) (Read error: Connection reset by peer) |
| 19:49:27 | × | hseg quits (~gesh@46.120.21.14) (Quit: WeeChat 4.3.3) |
| 19:51:15 | × | euleritian quits (~euleritia@95.90.211.232) (Ping timeout: 264 seconds) |
| 19:51:52 | <EvanR> | 2 goes anywhere Int is expected, it doesn't come from anywhere |
| 19:52:14 | <EvanR> | in the sense that ++ comes from the Num class |
| 19:52:16 | → | euleritian joins (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) |
| 19:52:21 | <EvanR> | what |
| 19:52:26 | <EvanR> | the Data.List module |
| 19:52:40 | tomsmeding | looks at EvanR |
| 19:52:42 | <EvanR> | heat wave destroying my brain |
| 19:53:05 | <tomsmeding> | maybe ++ comes from Num twice |
| 19:53:20 | <EvanR> | beep once for yes twice for no |
| 19:53:28 | <EvanR> | yes yes |
| 19:53:47 | <geekosaur> | beeep - beeep - beeep - beeep - beeep … |
| 19:59:01 | × | remedan quits (~remedan@ip-62-245-108-153.bb.vodafone.cz) (Quit: Bye!) |
| 19:59:06 | → | superbil joins (~superbil@1-34-176-171.hinet-ip.hinet.net) |
| 20:01:30 | × | lain` quits (lain`@user/lain/x-9874679) (Ping timeout: 255 seconds) |
| 20:01:54 | → | lain` joins (lain`@user/lain/x-9874679) |
| 20:09:59 | <mreh> | what is this magic by which a case statement can help clarify an existential type in an eliminator? |
| 20:10:50 | <mreh> | withSomeSBool (toSBool bool) $ \(sb :: SBool b) -> |
| 20:10:50 | <mreh> | case dict @MonadLogging sb of |
| 20:10:53 | <mreh> | Dict -> runLogging @b program |
| 20:12:36 | <tomsmeding> | mreh: what's the type of 'dict' |
| 20:12:59 | <mreh> | it's a biggie |
| 20:13:02 | <mreh> | hang on |
| 20:13:47 | <mreh> | dict :: ( c 'True, c 'False ) => SBool b -> Dict (c b) |
| 20:13:48 | → | machinedgod joins (~machinedg@d173-183-246-216.abhsia.telus.net) |
| 20:14:17 | <tomsmeding> | well then that 'dict' function produces 'MonadLogging b' evidence |
| 20:14:27 | <tomsmeding> | that wasn't there before |
| 20:14:50 | <tomsmeding> | there was MonadLogging 'True and MonadLogging 'False; 'dict' does the case analysis and produces MonadLogging b |
| 20:15:15 | <tomsmeding> | writing 'case sb of { STrue -> runLogging @b program ; SFalse -> runLogging @b program }' should also work |
| 20:15:17 | <mreh> | yeah, I get that bit, but like, what? |
| 20:15:44 | <mreh> | before GHC doesn't know what b is, and now it does |
| 20:15:48 | <tomsmeding> | no it doesn't |
| 20:15:50 | <mreh> | it's forall b. |
| 20:15:58 | <tomsmeding> | it just knows that whatever b is, there is apparently a MonadLogging instance for it |
| 20:15:58 | × | lain` quits (lain`@user/lain/x-9874679) (Remote host closed the connection) |
| 20:16:04 | <tomsmeding> | 'dict' proved that |
| 20:16:12 | <mreh> | oooo |
| 20:16:14 | <tomsmeding> | (by case analysis) |
| 20:16:48 | <tomsmeding> | Dict :: c => Dict c |
| 20:17:20 | → | lain` joins (lain`@user/lain/x-9874679) |
| 20:17:22 | <tomsmeding> | if we make the dictionaries explicit (and turn => into ->), it looks more like: case dict @MonadLogging sb of Dict d -> runLoggin @b d program |
| 20:17:39 | <tomsmeding> | and: dict SFalse = Dict dMonadLoggingFalse ; dict STrue = Dict dMonadLoggingTrue |
| 20:18:41 | <mreh> | okay |
| 20:18:57 | <mreh> | so it's to placate the type checker |
| 20:19:20 | <tomsmeding> | well, 'dict' is actually doing something here |
| 20:19:26 | <tomsmeding> | look at my expanded version of 'dict' |
| 20:19:39 | <mreh> | yes |
| 20:19:41 | <tomsmeding> | the Dict constructor _has a field_: it's invisible in normal haskell, but there is a field there |
| 20:19:48 | <tomsmeding> | the dictionary for MonadLogging |
| 20:20:06 | <tomsmeding> | 'dict' pattern matches on the singleton for 'b' and chooses the correct dictionary to put in Dict's field |
| 20:20:19 | <tomsmeding> | with your match on Dict, GHC has that dictionary available to pass to runLogging |
| 20:20:20 | <mreh> | is this the implicit variable GHC uses to find typeclasses? |
| 20:20:40 | <tomsmeding> | my use of the word "dictionary" here refers to how GHC implements type classes at runtime |
| 20:20:59 | × | lain` quits (lain`@user/lain/x-9874679) (Remote host closed the connection) |
| 20:21:05 | <tomsmeding> | if you have a type class, say 'class Eq a where { (==), (/=) :: a -> a -> a }', then at runtime, that is a _record with two fields_ |
| 20:21:45 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 20:21:45 | <tomsmeding> | and if you have a polymorphic function 'foo :: Eq a => a -> a -> Int', then at runtime that has type 'EqDict a -> a -> a -> Int' |
| 20:21:48 | → | lain` joins (lain`@user/lain/x-9874679) |
| 20:22:04 | <tomsmeding> | but these dictionaries (the records) are passed around automatically by GHC |
| 20:22:05 | <mreh> | riight |
| 20:22:20 | <tomsmeding> | if you show the Core of a piece of code, you can see them |
| 20:22:23 | <mreh> | so I've read |
| 20:22:30 | <mreh> | okay |
| 20:22:58 | <tomsmeding> | mreh: https://play.haskell.org/saved/aScvorhS press Core and look at the definition for 'foo' (the third in the output) |
| 20:22:58 | <mreh> | I guess this is a consequnce of type erasure? |
| 20:23:18 | <tomsmeding> | it takes 4 arguments: a type (the 'a' type variable), the Eq dictionary for 'a', and 'x' and 'y' |
| 20:23:58 | <tomsmeding> | and in foo's body in Core you can see that it takes the "==" field of that dictionary and applies it to x and y |
| 20:24:03 | → | mulk joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 20:24:33 | <mreh> | `== @a_aII`? |
| 20:24:48 | <tomsmeding> | in normal haskell syntax that would be `(==) @a dEq x y` |
| 20:25:20 | <tomsmeding> | i.e. type-apply the `(==)` field name of the Eq dictionary to 'a', use it to get the field out of the record dEq, and apply the value (of type a -> a -> Bool) to x and y |
| 20:25:50 | <mreh> | cooool |
| 20:25:53 | <mreh> | I'm learning core |
| 20:26:07 | <tomsmeding> | I'm not sure I would connect it to type erasure, though I guess one could say that because types are erased at runtime, you can't look up instances from scratch so they have to be passed around explicitly? |
| 20:26:15 | <tomsmeding> | it's cool, isn't it? :) |
| 20:26:39 | <tomsmeding> | so now look back at my expanded versions after "if we make the dictionaries explicit" |
| 20:27:07 | <tomsmeding> | I explicitly wrote those dMonadLogging values there to show what's really going on |
| 20:27:12 | <tomsmeding> | GHC infers them, but they're there |
| 20:27:44 | <tomsmeding> | dMonadLoggingFalse and dMonadLoggingTrue would be top-level constants (if a class is a record type, an instance is a top-level value of that type) |
| 20:28:11 | → | remedan joins (~remedan@ip-62-245-108-153.bb.vodafone.cz) |
| 20:28:16 | → | byorgey joins (~byorgey@user/byorgey) |
| 20:28:22 | <mreh> | yup |
| 20:28:36 | × | noumenon quits (~noumenon@113.51-175-156.customer.lyse.net) (Quit: Leaving) |
| 20:28:46 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 20:31:45 | × | bionade24 quits (~quassel@2a03:4000:33:45b::1) (Quit: Apocalypse Incoming!) |
| 20:32:30 | → | bionade24 joins (~quassel@2a03:4000:33:45b::1) |
| 20:35:02 | <mreh> | it still seems a big magical that the dictionary implicitly finds its way over on the other side of that arrow |
| 20:35:17 | <tomsmeding> | the -> arrow of the case match? |
| 20:35:20 | <mreh> | yeah |
| 20:35:25 | <tomsmeding> | that's type class inference for you |
| 20:35:26 | × | soverysour quits (~soverysou@user/soverysour) (Ping timeout: 268 seconds) |
| 20:35:37 | <tomsmeding> | whenever a dictionary is required, ghc looks in the environment to see if there are any suitable ones around |
| 20:35:51 | <tomsmeding> | usually they come from the top level, or from some top-level function applied to some other value |
| 20:36:35 | <tomsmeding> | e.g. if you have 'instance Eq (T a) => Ord (T a) where', then that's a top-level _function_ dOrdT :: EqDict a -> OrdDict a |
| 20:36:50 | <tomsmeding> | but they can also come from the local scope, as you see in your example |
| 20:37:22 | <tomsmeding> | ghc always collects all instances in the environment that match, and if multiple match you get an overlapping instances error |
| 20:48:04 | → | mulk joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 20:50:05 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:53:19 | × | dsrt^ quits (~cd@c-98-242-74-66.hsd1.ga.comcast.net) (Remote host closed the connection) |
| 20:54:24 | → | waleee joins (~waleee@h-176-10-144-38.NA.cust.bahnhof.se) |
| 20:56:33 | <Leary> | mreh: By the way, "magic by which pattern matching can refine a type" (paraphrasing) is exactly what GADTs provide. E.g. `forall p. p :~: P -> R p` is equivalent to `R P`, and you can witness this from inside it by pattern matching on the argument. |
| 20:57:25 | → | benkard joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 20:57:51 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 20:57:51 | benkard | is now known as mulk |
| 21:00:50 | × | euleritian quits (~euleritia@dynamic-176-007-148-253.176.7.pool.telefonica.de) (Read error: Connection reset by peer) |
| 21:01:06 | → | euleritian joins (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) |
| 21:02:05 | → | benkard joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 21:02:39 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 21:05:38 | → | mulk joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 21:06:51 | × | benkard quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 21:10:27 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 21:12:25 | → | mulk joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 21:16:09 | → | benkard joins (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) |
| 21:17:22 | × | mulk quits (~mulk@p5b2dc1a2.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 21:17:23 | benkard | is now known as mulk |
| 21:27:47 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 21:32:33 | × | lisbeths quits (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 21:38:32 | × | michalz quits (~michalz@185.246.207.193) (Quit: ZNC 1.9.0 - https://znc.in) |
| 21:40:16 | × | EvanR quits (~EvanR@user/evanr) (Quit: Leaving) |
| 21:41:31 | → | EvanR joins (~EvanR@user/evanr) |
| 21:52:46 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 256 seconds) |
| 21:58:59 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 21:59:03 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:05:11 | × | CrunchyFlakes quits (~CrunchyFl@146.52.130.128) (Quit: ZNC 1.8.2 - https://znc.in) |
| 22:05:45 | → | CrunchyFlakes joins (~CrunchyFl@ip92348280.dynamic.kabel-deutschland.de) |
| 22:12:07 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:17:51 | × | mikess quits (~mikess@user/mikess) (Ping timeout: 255 seconds) |
| 22:20:12 | × | target_i quits (~target_i@user/target-i/x-6023099) (Quit: leaving) |
| 22:22:26 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 268 seconds) |
| 22:38:05 | × | emm quits (~emm@user/edmeme) (Ping timeout: 256 seconds) |
| 22:52:17 | × | acidjnk_new3 quits (~acidjnk@p200300d6e72cfb4649ca0157bfe844d2.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 23:05:46 | → | mreh joins (~matthew@host86-160-168-12.range86-160.btcentralplus.com) |
| 23:09:22 | × | poscat quits (~poscat@user/poscat) (Ping timeout: 246 seconds) |
| 23:12:13 | × | mreh quits (~matthew@host86-160-168-12.range86-160.btcentralplus.com) (Ping timeout: 256 seconds) |
| 23:15:54 | → | poscat joins (~poscat@user/poscat) |
| 23:24:33 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:48:40 | × | Taneb quits (~Taneb@runciman.hacksoc.org) (Quit: I seem to have stopped.) |
| 23:53:31 | → | mikess joins (~mikess@user/mikess) |
| 23:54:43 | × | euleritian quits (~euleritia@ip4d16fc38.dynamic.kabel-deutschland.de) (Ping timeout: 256 seconds) |
| 23:54:53 | × | Square quits (~Square@user/square) (Ping timeout: 240 seconds) |
| 23:55:02 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 23:56:11 | <oo_miguel> | Trying to figure out how to create [a->b] from a->[b]. Appears like this should be straightforward. |
| 23:57:13 | <EvanR> | @djinn (a->[b]) -> [a->b] |
| 23:57:13 | <lambdabot> | Error: Undefined type [] |
| 23:58:53 | <EvanR> | the problem is, how long should that list be |
| 23:59:28 | <oo_miguel> | same length as the list returned by the first function |
| 23:59:31 | <EvanR> | :t \f -> map (\i x -> f x !! i) [0..] |
| 23:59:32 | <lambdabot> | (t -> [a]) -> [t -> a] |
| 23:59:51 | <EvanR> | you can't call the first function without an argument |
| 23:59:56 | <EvanR> | catch 22 |
All times are in UTC on 2024-07-01.