Logs on 2024-11-19 (liberachat/#haskell)
| 00:01:55 | × | Everything quits (~Everythin@31.144.80.156) (Quit: leaving) |
| 00:11:29 | × | alp quits (~alp@2001:861:e3d6:8f80:568b:9761:243e:95b5) (Ping timeout: 248 seconds) |
| 00:14:18 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 00:19:26 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 244 seconds) |
| 00:19:32 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 00:20:56 | Lord_of_Life_ | is now known as Lord_of_Life |
| 00:25:35 | → | Alleria joins (~Alleria@user/alleria) |
| 00:27:29 | × | Alleria_ quits (~Alleria@user/alleria) (Ping timeout: 248 seconds) |
| 00:41:16 | × | sprotte24 quits (~sprotte24@p200300d16f36e9004570e4f99d260ace.dip0.t-ipconnect.de) (Quit: Leaving) |
| 00:48:10 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 00:48:11 | × | housemate quits (~housemate@2a04:9dc0:0:162::5d91:d7ed) (Quit: Nothing to see here. I wasn't there.) |
| 00:53:14 | → | talismanick joins (~user@2601:644:937c:ed10::ae5) |
| 00:54:30 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 01:04:11 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds) |
| 01:06:18 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 01:06:44 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Ping timeout: 255 seconds) |
| 01:10:27 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 252 seconds) |
| 01:12:56 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 01:14:24 | × | Alleria quits (~Alleria@user/alleria) (Ping timeout: 246 seconds) |
| 01:24:42 | → | housemate joins (~housemate@2a04:9dc0:0:162::5d91:d7ed) |
| 01:27:47 | → | Alleria joins (~Alleria@user/alleria) |
| 01:47:56 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 260 seconds) |
| 01:48:04 | → | son0p joins (~ff@2800:e2:f80:ee7::4) |
| 01:51:31 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 02:02:06 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:02:19 | → | Guest49 joins (~Guest49@2001:16a2:cf8d:df00:80b8:7a13:6821:1741) |
| 02:02:37 | → | gorignak joins (~gorignak@user/gorignak) |
| 02:03:03 | × | Guest49 quits (~Guest49@2001:16a2:cf8d:df00:80b8:7a13:6821:1741) (Client Quit) |
| 02:03:51 | × | troojg quits (~troojg@user/troojg) (Ping timeout: 276 seconds) |
| 02:12:17 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:12:48 | → | gorignak joins (~gorignak@user/gorignak) |
| 02:16:09 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds) |
| 02:20:31 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 264 seconds) |
| 02:22:08 | → | troojg joins (~troojg@user/troojg) |
| 02:22:28 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:22:59 | → | gorignak joins (~gorignak@user/gorignak) |
| 02:32:39 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:33:40 | → | gorignak joins (~gorignak@user/gorignak) |
| 02:42:50 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:43:21 | → | gorignak joins (~gorignak@user/gorignak) |
| 02:45:27 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 276 seconds) |
| 02:53:01 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 02:53:32 | → | gorignak joins (~gorignak@user/gorignak) |
| 03:03:12 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 03:03:42 | → | gorignak joins (~gorignak@user/gorignak) |
| 03:06:08 | × | euleritian quits (~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Remote host closed the connection) |
| 03:06:28 | → | euleritian joins (~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) |
| 03:07:03 | × | euleritian quits (~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Remote host closed the connection) |
| 03:07:20 | → | euleritian joins (~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) |
| 03:13:07 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:13:23 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 03:13:54 | → | gorignak joins (~gorignak@user/gorignak) |
| 03:18:40 | × | haetsal quits (~quassel@221.138.168.192) (Quit: No Ping reply in 180 seconds.) |
| 03:20:57 | → | haetsal joins (~quassel@221.138.168.192) |
| 03:21:12 | × | son0p quits (~ff@2800:e2:f80:ee7::4) (Ping timeout: 276 seconds) |
| 03:22:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:30:19 | × | gorignak quits (~gorignak@user/gorignak) (Quit: quit) |
| 03:30:49 | → | gorignak joins (~gorignak@user/gorignak) |
| 03:32:48 | × | Alleria quits (~Alleria@user/alleria) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:35:43 | × | housemate quits (~housemate@2a04:9dc0:0:162::5d91:d7ed) (Quit: Nothing to see here. I wasn't there.) |
| 03:35:54 | × | cptaffe quits (~cptaffe@user/cptaffe) (Ping timeout: 260 seconds) |
| 03:36:49 | → | cptaffe joins (~cptaffe@user/cptaffe) |
| 03:36:50 | → | Alleria joins (~Alleria@user/alleria) |
| 03:38:22 | → | dpk joins (~dpk@jains.nonceword.org) |
| 03:49:05 | × | troojg quits (~troojg@user/troojg) (Ping timeout: 248 seconds) |
| 03:55:41 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Ping timeout: 260 seconds) |
| 03:58:26 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 04:03:16 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 04:03:31 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 04:03:56 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:37:41 | × | califax quits (~califax@user/califx) (Ping timeout: 260 seconds) |
| 04:37:59 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 04:38:42 | → | califax joins (~califax@user/califx) |
| 04:51:49 | → | lockywolf joins (~lockywolf@coconut.lockywolf.net) |
| 04:55:24 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 260 seconds) |
| 05:06:29 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 05:13:37 | × | troydm quits (~troydm@user/troydm) (Ping timeout: 265 seconds) |
| 05:20:23 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 05:31:39 | → | son0p joins (~ff@2800:e2:f80:ee7::4) |
| 05:34:47 | → | notzmv joins (~daniel@user/notzmv) |
| 05:43:19 | → | michalz joins (~michalz@185.246.207.193) |
| 05:58:53 | × | euleritian quits (~euleritia@dynamic-176-002-004-196.176.2.pool.telefonica.de) (Ping timeout: 244 seconds) |
| 05:59:24 | → | euleritian joins (~euleritia@dynamic-176-007-203-044.176.7.pool.telefonica.de) |
| 06:07:28 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:07:29 | → | alp joins (~alp@2001:861:8ca0:4940:9ecb:356a:49a5:63a3) |
| 06:19:18 | × | unalmasIRC quits (~alphazone@2.219.56.221) (Ping timeout: 276 seconds) |
| 06:23:26 | → | briandaed joins (~root@user/briandaed) |
| 06:25:30 | × | euleritian quits (~euleritia@dynamic-176-007-203-044.176.7.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 06:25:38 | → | euleritian joins (~euleritia@77.22.252.159) |
| 06:25:49 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 06:30:05 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 06:38:45 | × | euleritian quits (~euleritia@77.22.252.159) (Ping timeout: 248 seconds) |
| 06:39:29 | → | euleritian joins (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) |
| 06:44:58 | × | euleritian quits (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 06:45:38 | → | euleritian joins (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) |
| 06:50:14 | × | euleritian quits (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 06:50:31 | → | euleritian joins (~euleritia@77.22.252.159) |
| 06:56:16 | → | alphazone joins (~alphazone@2.219.56.221) |
| 06:57:32 | × | euleritian quits (~euleritia@77.22.252.159) (Ping timeout: 265 seconds) |
| 06:59:58 | → | Square2 joins (~Square4@user/square) |
| 07:00:05 | → | euleritian joins (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) |
| 07:00:53 | → | acidjnk_new joins (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) |
| 07:04:21 | × | dumptruckman quits (~dumptruck@66-175-211-75.ip.linodeusercontent.com) (Ping timeout: 252 seconds) |
| 07:05:10 | → | dumptruckman joins (~dumptruck@66-175-211-75.ip.linodeusercontent.com) |
| 07:17:59 | × | zlqrvx_ quits (~zlqrvx@2001:8003:8c8b:e00:58ff:a30c:881f:1fe4) (Quit: %quit%) |
| 07:18:00 | × | j1n37 quits (j1n37@user/j1n37) (Read error: Connection reset by peer) |
| 07:24:50 | → | j1n37 joins (j1n37@user/j1n37) |
| 07:29:02 | × | kronicmage quits (~kronicmag@neotame.csclub.uwaterloo.ca) (Ping timeout: 272 seconds) |
| 07:29:25 | → | kronicmage joins (~kronicmag@neotame.csclub.uwaterloo.ca) |
| 07:33:16 | → | zlqrvx joins (~zlqrvx@user/zlqrvx) |
| 07:55:12 | × | alp quits (~alp@2001:861:8ca0:4940:9ecb:356a:49a5:63a3) (Remote host closed the connection) |
| 07:55:29 | → | alp joins (~alp@2001:861:8ca0:4940:e2f7:5955:8ab2:2afc) |
| 07:58:59 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:59:49 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 08:00:01 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 08:00:41 | → | caconym joins (~caconym@user/caconym) |
| 08:03:22 | → | misterfish joins (~misterfis@h239071.upc-h.chello.nl) |
| 08:19:29 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 08:29:55 | × | p3n quits (~p3n@217.198.124.246) (Quit: ZNC 1.8.2 - https://znc.in) |
| 08:30:58 | × | euleritian quits (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 08:31:15 | → | euleritian joins (~euleritia@77.22.252.159) |
| 08:31:35 | → | p3n joins (~p3n@2a00:19a0:3:7c:0:d9c6:7cf6:1) |
| 08:32:24 | → | rootnode` joins (~user@softbank126206228003.bbtec.net) |
| 08:32:36 | × | rootnode` quits (~user@softbank126206228003.bbtec.net) (Client Quit) |
| 08:33:06 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 08:36:55 | → | petrichor joins (~znc-user@user/petrichor) |
| 08:37:45 | × | emmanuelux_ quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 08:46:39 | × | euleritian quits (~euleritia@77.22.252.159) (Ping timeout: 252 seconds) |
| 08:47:21 | → | euleritian joins (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) |
| 08:52:02 | × | ft quits (~ft@p4fc2a26f.dip0.t-ipconnect.de) (Quit: leaving) |
| 08:52:16 | × | ski quits (~ski@remote11.chalmers.se) (Read error: Connection reset by peer) |
| 08:54:20 | → | housemate joins (~housemate@2a04:9dc0:0:162::5d91:d7ed) |
| 08:54:57 | × | housemate quits (~housemate@2a04:9dc0:0:162::5d91:d7ed) (Remote host closed the connection) |
| 08:58:19 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 08:59:00 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 09:03:54 | → | chele joins (~chele@user/chele) |
| 09:04:21 | → | shilowon joins (~Guest4@105.112.117.167) |
| 09:04:25 | × | gorignak quits (~gorignak@user/gorignak) (Read error: Connection reset by peer) |
| 09:04:47 | → | gorignak joins (~gorignak@user/gorignak) |
| 09:06:19 | × | euleritian quits (~euleritia@dynamic-176-006-146-018.176.6.pool.telefonica.de) (Read error: Connection reset by peer) |
| 09:06:36 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 09:08:47 | → | divya` joins (~user@139.5.11.231) |
| 09:09:25 | × | divya quits (~user@139.5.11.231) (Read error: Connection reset by peer) |
| 09:13:05 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 09:14:29 | × | misterfish quits (~misterfis@h239071.upc-h.chello.nl) (Ping timeout: 248 seconds) |
| 09:17:26 | <Leary> | So I'm generating instances with TH, but I'm not sure how best to deal with messy constraints. I can generate a /sufficient/ (highly redundant and simplifiable) constraint easily, but cleaning it up looks to be quite a hassle. Any tips? |
| 09:23:37 | → | misterfish joins (~misterfis@31-161-39-137.biz.kpn.net) |
| 09:25:26 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 09:35:37 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 09:37:15 | × | shilowon quits (~Guest4@105.112.117.167) (Quit: Ping timeout (120 seconds)) |
| 09:41:00 | × | igemnace quits (~igemnace@user/igemnace) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in) |
| 09:41:18 | → | sroso joins (~sroso@user/SrOso) |
| 09:42:28 | → | igemnace joins (~igemnace@user/igemnace) |
| 09:44:28 | → | Guest4 joins (~Guest4@105.112.117.167) |
| 09:53:34 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 09:54:11 | × | Guest4 quits (~Guest4@105.112.117.167) (Quit: Ping timeout (120 seconds)) |
| 09:55:35 | <jackdk> | Generate deriving via instances instead of generating the constraint directly, maybe? |
| 09:55:54 | × | carbolymer quits (~carbolyme@dropacid.net) (Read error: Connection reset by peer) |
| 09:58:11 | × | sand-witch quits (~m-mzmz6l@vmi833741.contaboserver.net) (Ping timeout: 255 seconds) |
| 10:02:09 | <Leary> | jackdk: Hmmm. So the idea is to hide the messy instances by tying them to a private newtype wrapper, then produce a standalone `deriving instance ... via ...` declaration, for which GHC would infer a clean context? Sounds feasible... |
| 10:05:43 | → | Guest4 joins (~Guest4@102.91.71.26) |
| 10:06:05 | × | Guest4 quits (~Guest4@102.91.71.26) (Client Quit) |
| 10:06:35 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 10:06:41 | → | CrunchyFlakes joins (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) |
| 10:07:15 | → | Guest4 joins (~Guest4@102.91.71.26) |
| 10:07:21 | × | Guest4 quits (~Guest4@102.91.71.26) (Client Quit) |
| 10:12:58 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 10:13:12 | <jackdk> | Something like that. I don't know enough about your problem to be sure |
| 10:18:31 | <Leary> | jackdk: For e.g. `type data Wibble = Wobble Foo | Nibble Wibble Wibble` I'm writing TH that ought to generate `deriving instance Show (Wibble @ t)` given that we already have `Show! Foo` in scope, but really it will generate `deriving instance (Show! Foo, Show! Wibble, Show! Wibble) => Show (Wibble @ t)`. |
| 10:19:23 | <Leary> | (where `type f ! k = forall t. f (k @ t)`) |
| 10:21:54 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 10:23:37 | × | mange quits (~user@user/mange) (Quit: Zzz...) |
| 10:53:16 | → | __monty__ joins (~toonn@user/toonn) |
| 11:01:56 | <kuribas> | Would it be possible to train a llm to generate better error messages? |
| 11:02:31 | <Hecate> | kuribas: hahahahahahaha |
| 11:02:32 | <Hecate> | you silly |
| 11:02:33 | <Hecate> | :P |
| 11:03:01 | <int-e> | @ghc |
| 11:03:01 | <lambdabot> | Its main purpose is to encapsulate the Horrible State Hack |
| 11:03:04 | <kuribas> | Is that so outrageous? |
| 11:03:20 | <int-e> | @ghc |
| 11:03:20 | <lambdabot> | the eta-reduction property does not hold |
| 11:03:28 | <Hecate> | kuribas: no it's not outrageous, it's ridiculous :P |
| 11:03:30 | <int-e> | kuribas: define "better" |
| 11:03:41 | <kuribas> | More beginner friendly. |
| 11:04:00 | <int-e> | but error messages need to be accurate |
| 11:04:02 | <kuribas> | I am happy with GHC error messages, but I am interested in creating a general purpose dependently typed language. |
| 11:04:06 | <int-e> | and LLMs are terrible at that |
| 11:04:11 | <Hecate> | kuribas: To rephrase your suggestion: "Would it be possible to train an LLM on an existing dataset to generate new things, which an LLM simply cannot?" |
| 11:04:35 | <kuribas> | Or maybe elaborate a bit then? |
| 11:04:40 | <Hecate> | kuribas: ah, DT languages with good ergonomics are something that need you to advance the state of the art |
| 11:04:52 | <kuribas> | Hecate: agreed :) |
| 11:04:53 | <Hecate> | best case, an LLM will feed off of your work later |
| 11:05:07 | <kuribas> | When dabbling with idris I feel there is a lot of low hanging fruit there. |
| 11:05:14 | <Hecate> | there are indeed |
| 11:05:16 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 11:05:23 | <Hecate> | maybe improve idris too while you're at it? :D |
| 11:05:33 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 11:05:35 | <kuribas> | yeah ... |
| 11:05:52 | <kuribas> | One blocking issue for me with idris and error messages is the ad-hoc polymorphism. |
| 11:06:05 | <kuribas> | Which makes getting accurate error message difficult. |
| 11:06:18 | <kuribas> | And type checking very slow. |
| 11:07:20 | <kuribas> | It's a nice to have in idris, because it allows syntactic overloading, but I am not sure it is necessary to have. |
| 11:09:56 | × | notzmv quits (~daniel@user/notzmv) (Read error: Connection reset by peer) |
| 11:10:02 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 11:10:30 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 11:10:49 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 11:11:12 | <kuribas> | For example, do can be overloaded by defining your own (>>=) function. |
| 11:21:35 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 11:29:18 | → | pavonia joins (~user@user/siracusa) |
| 11:29:34 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 260 seconds) |
| 11:31:19 | <geekosaur> | we have that in at least two ways though (RebindableSyntax and QualifiedDo) |
| 11:31:19 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 11:32:28 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 11:34:08 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 11:36:54 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 11:38:18 | → | euleritian joins (~euleritia@dynamic-176-001-000-183.176.1.pool.telefonica.de) |
| 11:39:20 | × | igemnace quits (~igemnace@user/igemnace) (Quit: ZNC 1.9.0+deb2build3 - https://znc.in) |
| 11:40:42 | → | Smiles joins (uid551636@id-551636.lymington.irccloud.com) |
| 11:42:10 | → | igemnace joins (~igemnace@user/igemnace) |
| 11:43:05 | → | housemate joins (~housemate@2a04:9dc0:0:162::5d91:d7ed) |
| 11:45:55 | <hellwolf> | what's the standard "hush" function for Ether a b -> Maybe b? |
| 11:45:58 | <hellwolf> | I can't find one. |
| 11:46:39 | → | sprotte24 joins (~sprotte24@p200300d16f3e1d00202469f625d2cba6.dip0.t-ipconnect.de) |
| 11:46:47 | <mari-estel> | @hoogle Either a b -> Maybe b |
| 11:46:48 | <lambdabot> | Data.Either.Combinators rightToMaybe :: Either a b -> Maybe b |
| 11:46:48 | <lambdabot> | Data.Either.Extra eitherToMaybe :: Either a b -> Maybe b |
| 11:46:48 | <lambdabot> | Extra eitherToMaybe :: Either a b -> Maybe b |
| 11:47:08 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 11:47:12 | <mari-estel> | @hoogle Either a b -> Maybe a |
| 11:47:13 | <lambdabot> | Data.Either.Combinators leftToMaybe :: Either a b -> Maybe a |
| 11:47:13 | <lambdabot> | Rebase.Prelude leftToMaybe :: () => Either a b -> Maybe a |
| 11:47:13 | <lambdabot> | Protolude leftToMaybe :: Either l r -> Maybe l |
| 11:47:29 | <hellwolf> | so lambdabot doesn't show which package it's from. |
| 11:47:41 | × | sprotte24 quits (~sprotte24@p200300d16f3e1d00202469f625d2cba6.dip0.t-ipconnect.de) (Client Quit) |
| 11:47:47 | <hellwolf> | but I can't find it from base... :/ |
| 11:48:03 | <geekosaur> | it's not in base |
| 11:48:26 | <geekosaur> | eitherToMaybe = either Nothing Just |
| 11:48:35 | <geekosaur> | er |
| 11:48:42 | <geekosaur> | eitherToMaybe = either (const Nothing) Just |
| 11:49:16 | <dminuoso> | It's usually called `hush` |
| 11:49:25 | <geekosaur> | I think losing information is not encouraged, though |
| 11:50:01 | <dminuoso> | Every non-injective loses information. :-) |
| 11:51:11 | <hellwolf> | yea, fair enough. in this case, the error information is not too useful in production. |
| 11:51:24 | <hellwolf> | I opt just inline it: case S.decode bs of Left _ -> Nothing; Right a -> Just (ADDR a) |
| 11:52:00 | <dminuoso> | hellwolf: You can alsoo just write `either Nothing Just` inline. |
| 11:52:15 | × | yaroot quits (~yaroot@2400:4052:ac0:d901:1cf4:2aff:fe51:c04c) (Remote host closed the connection) |
| 11:52:23 | <dminuoso> | Or `either nothing (Just . Addr)` in your case. |
| 11:52:45 | <hellwolf> | That's smart |
| 11:53:22 | <Leary> | % :t asum . fmap Just |
| 11:53:22 | <yahb2> | asum . fmap Just :: (Foldable t, Functor t) => t a -> Maybe a |
| 11:53:28 | <Leary> | Another option. |
| 11:53:36 | → | yaroot joins (~yaroot@2400:4052:ac0:d901:1cf4:2aff:fe51:c04c) |
| 11:53:53 | <hellwolf> | $ echo 'make this shorter: case S.decode bs of Left _ -> Nothing; Right a -> Just (ADDR a)' | chatgpt |
| 11:53:53 | <hellwolf> | This: S.decode bs >>= Just . ADDR |
| 11:54:13 | <dminuoso> | That looks wrong |
| 11:54:35 | <hellwolf> | it compiles. actually it's correct. since Either is a monad |
| 11:54:45 | <hellwolf> | no, it doesn't compile |
| 11:54:46 | <hellwolf> | sorry |
| 11:54:48 | <hellwolf> | bad gpt |
| 11:54:59 | <dminuoso> | hellwolf: Here's a quick hint |
| 11:55:02 | <dminuoso> | :t (>>=) |
| 11:55:03 | <lambdabot> | Monad m => m a -> (a -> m b) -> m b |
| 11:55:14 | <dminuoso> | Note that it's the same `m` here in both arguments and the resultg? |
| 11:56:10 | <hellwolf> | yea, got it, it would stay Either |
| 11:56:43 | <hellwolf> | but "either" is good. here shows my lack of production experience of Haskell, in general. I only plays around :) |
| 11:57:47 | <dminuoso> | No worries. Leary's answer is more clever, though if you are curious. |
| 11:59:33 | <hellwolf> | yes, that's interest. but I had to import Data.Applicative |
| 11:59:54 | <hellwolf> | same for nothing <-- where is it even from? I used Const nothing |
| 12:00:04 | × | son0p quits (~ff@2800:e2:f80:ee7::4) (Ping timeout: 260 seconds) |
| 12:00:09 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 12:00:23 | <dminuoso> | hellwolf: You can use hoogle https://hoogle.haskell.org/?hoogle=nothing to discover likely origins of identifiers. |
| 12:01:09 | <dminuoso> | As you can see, it's from other packages. I think hoogle always lists `base` references first. |
| 12:01:33 | <dminuoso> | (Or maybe its defined in some module in your project) |
| 12:02:01 | → | caconym joins (~caconym@user/caconym) |
| 12:03:22 | × | sroso quits (~sroso@user/SrOso) (Quit: Leaving :)) |
| 12:03:31 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 12:05:40 | <hellwolf> | I can't wrap my head around intuitively wrt asum. fmap Just. I can see the type matches. |
| 12:05:41 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 260 seconds) |
| 12:05:41 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 12:05:58 | <hellwolf> | "The sum of a collection of actions using (<|>), generalizing concat." |
| 12:07:40 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 12:07:46 | × | mari-estel quits (~mari-este@user/mari-estel) (Remote host closed the connection) |
| 12:08:08 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 12:09:03 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 12:10:52 | <kuribas> | geekosaur: It's not the same. In haskell you must have a non ambiguous way to resolve (>>=), but in idris it's overloaded, it will do a search. |
| 12:11:57 | <kuribas> | geekosaur: rebindable syntax will use the (>>=) in scope, but in idris it will try every definition of (>>=), and pick the one that typechecks.. |
| 12:12:56 | <Leary> | Sounds evil. Isn't that just IncoherentInstances? |
| 12:14:20 | <kuribas> | Leary: no, that's just type checking, implicit resolution and proof search are different features. |
| 12:14:30 | <kuribas> | instance resolution corresponds to proof search. |
| 12:14:46 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 12:14:59 | <kuribas> | Literally. They merged the auto implicit feature and type classes. |
| 12:15:06 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 12:15:16 | × | euleritian quits (~euleritia@dynamic-176-001-000-183.176.1.pool.telefonica.de) (Read error: Connection reset by peer) |
| 12:15:28 | <dminuoso> | Sounds like the type system way of duck typing. :-) |
| 12:15:34 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 12:15:48 | <dminuoso> | If it type checks like a duck, we shall make it a duck. |
| 12:16:15 | <kuribas> | Isn't duck typing the equivalent of type classes? |
| 12:17:25 | <dminuoso> | Id say not really. |
| 12:18:26 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 12:18:42 | <kuribas> | Well, if duck typing is structural typing, then idris doesn't have it, but it's possible to emulate it with dependent types. |
| 12:18:44 | × | Digit quits (~user@user/digit) (Ping timeout: 260 seconds) |
| 12:19:04 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 12:19:06 | <kuribas> | For example anonymous records. |
| 12:19:10 | <dminuoso> | In duck typing, rather than formally (via a type system) asserting that you have some sort of impedance match between componets (say the function signature with the passed arguments), if it works out at runtime, thats just as good. |
| 12:19:40 | <kuribas> | "if it works out". If it doesn't, you get an unpredictable error. |
| 12:19:47 | <dminuoso> | Duck typing is nothing that you can sensibly annotate with formal names, because its a very loose abstract idea. |
| 12:20:04 | <dminuoso> | Well, the "if it doesn't" is not something that duck type proponents really worry about. |
| 12:20:17 | <kuribas> | looks like structural subtyping to me: https://peps.python.org/pep-0544/ |
| 12:20:41 | <dminuoso> | It mostly arises from the idea of smalltalk object orientation, where if some object behaves as if it was a duck, you can just call it a duck. |
| 12:21:34 | <dminuoso> | kuribas: Structural subtyping captures some, but not all commonly mentioned, ideas of duck typing. |
| 12:23:29 | <mauke> | structural doctyping |
| 12:31:18 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 12:31:26 | <bwe> | I'd like to define some instances for a type class without the member of the class as argument, like `f :: Int` instead of `f :: a -> Int`. Reason: Before `a` gets constructed, I need some functions that are specific to the variant of `a`. Which approaches do you recommend? |
| 12:34:47 | <haskellbridge> | <hellwolf> Proxy |
| 12:34:47 | <haskellbridge> | or AmbiguousTypes |
| 12:34:55 | <Leary> | bwe: Proxies and TypeApplications are the usual options. If you're fine with being limited to GHC 9.10 or newer you can use RequiredTypeArguments instead. |
| 12:36:30 | <mauke> | f :: Const Int a |
| 12:40:05 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 12:40:23 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 12:41:48 | → | notzmv joins (~daniel@user/notzmv) |
| 12:44:39 | → | alexherbo2 joins (~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) |
| 12:47:11 | <bwe> | mauke: Excellent. Does my job. |
| 12:49:37 | <hellwolf> | interesting :) |
| 12:49:49 | <hellwolf> | Const () a probably could work too |
| 12:50:09 | <mauke> | that's just Proxy |
| 12:50:56 | → | carbolymer joins (~carbolyme@dropacid.net) |
| 12:52:13 | <hellwolf> | right. I also misread the original question, in the first place. |
| 12:56:06 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 252 seconds) |
| 12:56:10 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:56:49 | × | acidjnk_new quits (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 13:00:27 | → | Digit joins (~user@user/digit) |
| 13:01:03 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
| 13:01:13 | → | acidjnk_new joins (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) |
| 13:01:21 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 13:01:28 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Remote host closed the connection) |
| 13:05:37 | → | sand-witch joins (~m-mzmz6l@vmi833741.contaboserver.net) |
| 13:07:08 | <Leary> | Oh, bit late, but I thought of something cute and silly! |
| 13:07:14 | <Leary> | % :t find \_ -> True |
| 13:07:14 | <yahb2> | find \_ -> True :: Foldable t => t a -> Maybe a |
| 13:07:17 | <Leary> | hellwolf: ^ |
| 13:10:18 | × | housemate quits (~housemate@2a04:9dc0:0:162::5d91:d7ed) (Ping timeout: 244 seconds) |
| 13:19:34 | → | housemate joins (~housemate@2a04:9dc0:0:162::5d91:d7ed) |
| 13:27:46 | <hellwolf> | that's very cute, indeed |
| 13:28:05 | <hellwolf> | it all hinges all the fact of the Foldable Either instance. |
| 13:28:28 | <hellwolf> | Left elements are mempty, right elements are actually "foldable" |
| 13:30:53 | <hellwolf> | fmap ADDR . find (const True) $ S.decode b |
| 13:30:59 | <hellwolf> | or |
| 13:31:00 | <hellwolf> | either (const Nothing) (Just . ADDR) (S.decode b) |
| 13:31:38 | <hellwolf> | hard to choose :) |
| 13:31:48 | <hellwolf> | import Data.List (find) is required though |
| 13:34:21 | <Leary> | Personally, I would go with `asum`. Either way, get them from `Data.Foldable`; a `Data.List` import suggests list specialisation (which could actually happen at some point). |
| 13:34:51 | <dminuoso> | bwe: Id say Proxy is the least akward and most common way. |
| 13:35:11 | <dminuoso> | Const will constantly (the pun!) be in the way because you need to wrap/unwrap potentially many times |
| 13:35:23 | <dminuoso> | And it will probably require using ScopedTypeVariables and some annoyances. |
| 13:35:48 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 265 seconds) |
| 13:36:09 | <hellwolf> | Leary: I could balance between readability (which is subjective, up to the code reader's knowledge about all these instances) and performance; so what about any performance consideration? |
| 13:36:20 | <bwe> | dminuoso: that's exactly where I am stuck right now: applying a function wrapped in a Const to values wrapped in Const |
| 13:36:24 | <dminuoso> | Leary: That `find (const True)` is cunning. :-) |
| 13:36:45 | <dminuoso> | bwe: Yeah, just use Proxy. |
| 13:37:07 | <hellwolf> | is Const a r Coercible with a? |
| 13:37:15 | <dminuoso> | bwe: For extra points parameterize by `proxy Foo` rather than `Proxy `Foo` |
| 13:37:54 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 13:38:05 | <hellwolf> | dminuoso: I never understood that. I see base code having lower case proxy in many places. why? |
| 13:38:20 | <dminuoso> | hellwolf: It allows for arbitrary parameterized types. |
| 13:38:37 | <hellwolf> | I mean, okay, what is the second example of proxy? from a differenr base, perhaps? |
| 13:38:38 | <bwe> | dminuoso: Do you mean I should define `proxy` as my own function? I don't find `proxy` in https://hackage.haskell.org/package/base-4.20.0.1/docs/Data-Proxy.html |
| 13:38:41 | <Leary> | hellwolf: All approaches should optimise to pretty much the same code; it shouldn't matter. |
| 13:38:44 | <dminuoso> | bwe: No, as a type variable. |
| 13:39:10 | <dminuoso> | bwe: i.e. `f :: HasFoo a => proxy a -> ...` |
| 13:39:29 | <dminuoso> | Which is essentially just `f :: forall proxy a. HasFoo a => proxy a -> ...` |
| 13:39:31 | <[exa]> | Is there any "good natural" way to make an instances for `Ord (Tree a)` other than what is in Data.Tree? The one there is the automatic one obtained with `deriving`, i.e. basically follows the syntax. I feel like that ordering is very left-subtree-biased but no idea how to compensate for that (and esp. if there's some ground reason for why not). |
| 13:39:35 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:39:42 | <hellwolf> | Leary: in that case, I still think either has lower requirement of for Haskell knowledge for readability |
| 13:39:52 | → | rvalue joins (~rvalue@user/rvalue) |
| 13:39:53 | <hellwolf> | but it was fun to discover the N ways of doing the same thing. |
| 13:40:00 | <dminuoso> | bwe: (I have added the constraint just as an example, since many uses of Proxy usually only make sense together with a constraint) |
| 13:40:47 | <dminuoso> | [exa]: If there is not a single authoritative instance, I would hide them behind newtypes. |
| 13:41:40 | <[exa]> | dminuoso: yeah me too, which brings me to the question "why is the default `deriving Ord` THE authoritative one" |
| 13:42:01 | <dminuoso> | Sort of how ZonedTime has no Eq instance because there's two different ways to think about equality, none of them clearly better. |
| 13:42:34 | <bwe> | dminuoso: I don't grasp how to use Proxy instead of Const. `Const Int a` becomes what using Proxy? |
| 13:42:46 | <dminuoso> | bwe: Just add an extra argument. |
| 13:43:01 | <dminuoso> | Always make it an argument. |
| 13:43:16 | <bwe> | oh, that's it. |
| 13:43:23 | <dminuoso> | 13:39:10 dminuoso │ bwe: i.e. `f :: HasFoo a => proxy a -> ...` |
| 13:43:34 | <bwe> | dminuoso: I missed that message! Thanks! |
| 13:43:35 | <Leary> | [exa], dminuoso: I wouldn't bother with that for `Ord`. Usually you don't actually want to sort e.g. trees, you just want /any/ Ord instance for loggy assymptotics in things like Set/Map/etc. |
| 13:44:03 | <[exa]> | saaaaaad but truuuuuuueeeeee |
| 13:44:44 | <dminuoso> | Yup, and if you really want it just add via newtype with some haddock so the price foor your comparee is obvious. |
| 13:45:35 | <hellwolf> | as a bit OCD in certain things, I find the choice between with or without "forall." an nuance. I sometimes do "forall." . Is that psychopathic? |
| 13:46:11 | <dminuoso> | bwe: The beauty here is that you can bind that proxy to a parameter name and pass it along for further functions needing that type tag. |
| 13:46:18 | <dminuoso> | bwe: servant does this all over the place, by the way. |
| 13:46:54 | <bwe> | dminuoso: I get `f :: HasFoo a => Proxy a -> b -> c`, what's the next step to understand turning `Proxy` into type argument `proxy`? |
| 13:47:10 | <dminuoso> | bwe: You just call at some point with `f (Proxy :: Proxy Int)` |
| 13:47:40 | <dminuoso> | Or if you like, one of the few safe uses of type applications: f (Proxy @Int) |
| 13:47:49 | <[exa]> | hellwolf: might serve as a kinda complexity warning. "hey there's a forall here, smells like rankNtypes" |
| 13:48:56 | <hellwolf> | oh? I haven't seen that. but what choice do I have if I just want to say, "there is no other type variables, and I want to be clear to you, GHC." |
| 13:49:49 | <dminuoso> | hellwolf: Use a different language. Sadly `forall` is implicitg. |
| 13:50:33 | <hellwolf> | huh? so "Class A a where f :: forall. a -> a" is not good? |
| 13:50:39 | <Leary> | [exa]: BTW, re left-subtree bias and derived instances, the choice between `data Tree a = ... | Node (Tree a) a (Tree a) | ...` and `Node a (Tree a) (Tree a)` will give you depth-first and breadth-first instances respectively for things like Foldable, Traversable and Ord. The latter could be a serious optimisation, since comparisons would average constant rather than log n complexity. |
| 13:50:48 | <hellwolf> | I thought rankn would require "(forall. a) -> a" |
| 13:50:59 | <hellwolf> | a parenthesis is mandatory |
| 13:51:18 | <dminuoso> | hellwolf: Not sure what your `Class A a where f :: forall. a -> a` example is meant to mean. |
| 13:51:30 | <hellwolf> | that's where things get less intuitive for people used to parenthesis being an aid to oprand priority |
| 13:51:41 | <dminuoso> | But shouldn'tg that signature read `f :: forall a. A a => a` ? |
| 13:52:02 | <[exa]> | Leary: oh ok that's a valid point... The Data.Tree is the breadth one, right? (data Tree a = Tree a [Tree a]) |
| 13:52:31 | <Leary> | Yeah. |
| 13:52:39 | <dminuoso> | hellwolf: well we could just toss out all fixity and demand that you write a function signature lik `f :: ((A -> B) -> C) -> D |
| 13:52:50 | <dminuoso> | hellwolf: Or we just accept the fact that fixity is part of grammars for less clutter. |
| 13:53:12 | <bwe> | dminuoso: https://paste.tomsmeding.com/DGhLoKgV something like this? |
| 13:53:19 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 13:53:25 | <mauke> | bwe: that's because f doesn't actually need to look at the proxy value. it only cares about the type parameter a, so proxy can be free |
| 13:53:31 | <[exa]> | Leary: ok great thanks |
| 13:54:09 | <bwe> | how then does my instance type signature look like? |
| 13:54:26 | <dminuoso> | bwe: What kind of class are you thinking of? |
| 13:54:36 | <mauke> | bwe: it also means you can define your function without importing Data.Proxy, and if someone already has an expression of the right parameterized type, they can pass that in |
| 13:54:52 | <mauke> | e.g. if you take 'proxy a', then f ([] :: [Int]) is a valid use |
| 13:55:14 | <mauke> | (because proxy = [] for this call) |
| 13:55:27 | <dminuoso> | ^- Of course, [Int] is just some infix notation for `[] Int` |
| 13:55:49 | <dminuoso> | Where proxy ~ [] |
| 13:55:51 | <mauke> | (circumfix) |
| 13:55:56 | <dminuoso> | circumfix? |
| 13:55:59 | <dminuoso> | Ah I guess. |
| 13:56:11 | <mauke> | :-) |
| 13:56:52 | <dminuoso> | Ah right, infix is for something like `f :+: b` |
| 13:57:35 | <dminuoso> | bwe: Out of curiosity, that snippet reads `Proxy 3`, where is that from? |
| 13:59:31 | <bwe> | dminuoso: here is some more specific example: https://paste.tomsmeding.com/M0BnSi2q |
| 13:59:40 | <bwe> | (of a type class) |
| 13:59:54 | <bwe> | (before switching to Proxy) |
| 14:00:06 | <dminuoso> | Im not quite sure what the intent is. |
| 14:00:29 | <dminuoso> | You could add `proxy a` to your methods. |
| 14:00:35 | <dminuoso> | (If thats the intent) |
| 14:00:52 | <dminuoso> | That way you could write `getNavigationURIs (Proxy @Website)` |
| 14:01:05 | <bwe> | Yes, it is. I omitted functions with `a` which do exist. |
| 14:01:16 | <dminuoso> | i.e. `class FromWebsite a where getNavigationURIs :: proxy a -> [NaviURI]` |
| 14:01:28 | <mauke> | (the latter part being equivalent to (Proxy :: Proxy Website)) |
| 14:02:23 | <dminuoso> | bwe: Take note that this is exactly how servant works its magic: |
| 14:02:26 | <dminuoso> | https://hackage.haskell.org/package/servant-server-0.20.2/docs/Servant-Server.html#t:HasServer |
| 14:04:11 | <dminuoso> | bwe: Fun fact, the proxy pattern is what sizeOf in Storable should arguably use. |
| 14:04:25 | <dminuoso> | You will find plenty of snippets like `sizeOf (undefined :: T)` in the wild. |
| 14:04:38 | <dminuoso> | Something like `sizeOf (Proxy :: Proxy T)` would have been cleaner. |
| 14:05:30 | <dminuoso> | (Now in this particular example it could be argued, that sizeOf might also be applied to actual values not just undefined at a type) |
| 14:07:28 | <dminuoso> | Though we could conceive a world of having `sizeOf :: Storable s => s -> Int`, `sizeOfP :: Storable s => proxy s -> Int`, `alignment :: Storable s => s -> Int` and `alignmentP :: Storable s => proxy s -> Int` |
| 14:07:53 | <dminuoso> | With default implementations of sizeOfP |
| 14:14:46 | <bwe> | dminuoso: wow, I've got it working now. It's magic. |
| 14:18:53 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 14:21:25 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 14:22:54 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 276 seconds) |
| 14:24:08 | → | jinsun joins (~jinsun@user/jinsun) |
| 14:30:45 | <bwe> | dminuoso, mauke, Leary: Thanks for your inputs! |
| 14:33:51 | <haskellbridge> | <hellwolf> https://kf8nh.com/_heisenbridge/media/matrix.org/UnZTcaLGKnpftQUaEXKifiUY/SmsNSH3-GDQ/image.png |
| 14:34:10 | <hellwolf> | emacs lsp haskell formatting just not ideal, not sure how to fix :/ |
| 14:34:18 | <hellwolf> | I bet vscode has it better. |
| 14:36:41 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 14:37:04 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 14:42:18 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 14:42:35 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 14:43:33 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 248 seconds) |
| 14:44:19 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 14:48:39 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 14:49:17 | → | euleritian joins (~euleritia@dynamic-176-001-192-221.176.1.pool.telefonica.de) |
| 14:50:45 | × | tv quits (~tv@user/tv) (Quit: derp) |
| 14:51:19 | → | tv joins (~tv@user/tv) |
| 15:00:08 | × | alexherbo2 quits (~alexherbo@2a02-8440-3201-1725-d030-8edc-2b2b-9bf9.rev.sfr.net) (Remote host closed the connection) |
| 15:09:08 | × | divya` quits (~user@139.5.11.231) (Ping timeout: 244 seconds) |
| 15:17:37 | × | alp quits (~alp@2001:861:8ca0:4940:e2f7:5955:8ab2:2afc) (Remote host closed the connection) |
| 15:18:00 | → | alp joins (~alp@2001:861:8ca0:4940:789d:8e16:7be2:5e3) |
| 15:18:07 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Remote host closed the connection) |
| 15:18:16 | → | f-a joins (ff2a@joined.irc.for-some.fun) |
| 15:18:26 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 15:20:51 | × | m5zs7k quits (aquares@web10.mydevil.net) (Read error: Connection reset by peer) |
| 15:21:14 | → | alp_ joins (~alp@2001:861:8ca0:4940:483b:a21e:7fb4:76cd) |
| 15:21:15 | → | m5zs7k joins (aquares@web10.mydevil.net) |
| 15:22:26 | × | alp quits (~alp@2001:861:8ca0:4940:789d:8e16:7be2:5e3) (Ping timeout: 248 seconds) |
| 15:23:36 | <f-a> | https://pastebin.com/mzSwq1um UndecidableInstances question |
| 15:24:40 | → | son0p joins (~ff@2800:e6:4001:6cc3:2748:5c2a:65d9:57ac) |
| 15:28:04 | → | weary-traveler joins (~user@user/user363627) |
| 15:34:17 | <haskellbridge> | <hellwolf> Perhaps removing the functional dependencies, since the first instance you have does not really comply with it? |
| 15:35:12 | <haskellbridge> | <hellwolf> Also, how "instance Mul a b c" can even have a parametric implementation? you know nothing about c |
| 15:35:26 | <haskellbridge> | <hellwolf> it seems a bottom is the only "valid" formular |
| 15:35:47 | × | mari-estel quits (~mari-este@user/mari-estel) (Remote host closed the connection) |
| 15:35:57 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 15:36:11 | <f-a> | the example is take from the end of this paragraph, hellwolf https://downloads.haskell.org/ghc/latest/docs/users_guide/exts/instances.html#instance-termination-rules |
| 15:36:56 | <f-a> | adding f :: Mul a [b] b => Bool -> a -> b -> b |
| 15:37:01 | <Leary> | f-a: Guesswork: it does infer that much, but the constraint is not explicitly given so GHC tries to resolve it from top-level instances. `instance Mul a b c => Mul a [b] [c]` & `b ~ [c]` then put it into a loop. |
| 15:40:30 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.4.2) |
| 15:42:43 | <hellwolf> | the instance you added was not workable, and signals something wrong. what do you want to achieve? |
| 15:44:26 | <f-a> | hellwolf: if I add a signature to that function (`f :: Mul a [b] b => Bool -> a -> b -> b`) the program compiles. This is not a real program, it is an example taken from the GHC manual. I want to understand why GHC cannot infer `Mult [b] b`. |
| 15:45:05 | <Leary> | Unrelated TH question: we have `liftData :: (Data a, Quote q) => a -> q Exp` and `liftTyped :: (Lift a, Quote q) => a -> Code q a`. Why no `liftDataTyped :: (Data a, Quote q) => a -> Code q a`? I've written it myself, but I don't like that I had to use `unsafeCodeCoerce`. |
| 15:47:33 | × | misterfish quits (~misterfis@31-161-39-137.biz.kpn.net) (Ping timeout: 248 seconds) |
| 15:48:16 | <hellwolf> | f-a: I see. I guess having a b -> c in the constraint, it does not infer a [b] -> c is the reason. |
| 15:49:21 | × | notzmv quits (~daniel@user/notzmv) (Ping timeout: 276 seconds) |
| 15:49:32 | <hellwolf> | You somehow need to inject some how that a [b] -> c; you'd need a type family dependency to inject that. |
| 15:50:01 | <hellwolf> | (in theory, but I am not sure how to, in this case) |
| 15:52:45 | → | notzmv joins (~daniel@user/notzmv) |
| 15:53:36 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:55:51 | → | loonycyborg_ joins (loonycybor@chat.chantal.wesnoth.org) |
| 15:56:02 | × | loonycyborg quits (loonycybor@wesnoth/developer/loonycyborg) (Ping timeout: 252 seconds) |
| 16:01:50 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 16:05:00 | <bwe> | dminuoso: how about generating a Proxy from a sum type stored with db, that indicates the variant of an entry? Variant1 -> Proxy @A |
| 16:05:13 | <bwe> | Is this possible at all? My compiler complains: https://paste.tomsmeding.com/Yq5YBhtC |
| 16:06:45 | × | pabs3 quits (~pabs3@user/pabs3) (Ping timeout: 248 seconds) |
| 16:07:30 | → | gentauro joins (~gentauro@user/gentauro) |
| 16:09:08 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Remote host closed the connection) |
| 16:09:22 | → | ubert joins (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) |
| 16:09:35 | <Leary> | bwe: The correct type signature would be `genProxy :: Variant -> exists a. HasFoo a *> Proxy a`, but haskell does not have an existential quantifier. In general you can encode existentials with universals, but that would be pointless with `Proxy` as the type cannot be recovered. |
| 16:11:24 | <Leary> | bwe: Consider something like `type data AB = A | B`; `data Variant (ab :: AB) where { Variant1 :: Variant A; Variant2 :: Variant B }`. |
| 16:11:24 | → | pabs3 joins (~pabs3@user/pabs3) |
| 16:18:38 | → | Square joins (~Square@user/square) |
| 16:22:04 | × | Square2 quits (~Square4@user/square) (Ping timeout: 252 seconds) |
| 16:31:18 | → | droshux joins (~droshux@147.188.245.217) |
| 16:32:41 | × | euleritian quits (~euleritia@dynamic-176-001-192-221.176.1.pool.telefonica.de) (Ping timeout: 252 seconds) |
| 16:32:56 | <droshux> | Hi everyone :) |
| 16:35:44 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:39:02 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Quit: leaving) |
| 16:43:10 | <zzz> | hls is such a memory hog... |
| 16:43:32 | <droshux> | I've not found it too bad but I've not been using a system with super limited memory |
| 16:44:07 | <zzz> | i find it amazing that a ls can take as much memory as a web browser |
| 16:44:33 | × | mari-estel quits (~mari-este@user/mari-estel) (Ping timeout: 245 seconds) |
| 16:44:51 | <droshux> | Tbh I haven't really paid attention to it, maybe I should next time. |
| 16:44:54 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 16:45:01 | <droshux> | Hi!Q |
| 16:46:52 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:48:10 | → | ski joins (~ski@remote11.chalmers.se) |
| 16:50:02 | ← | droshux parts (~droshux@147.188.245.217) () |
| 16:57:08 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:58:02 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 16:58:24 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 17:01:07 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 17:04:27 | → | guy joins (~guy@2a01:4b00:d007:ed00:3c30:fab:460b:9474) |
| 17:04:44 | <guy> | hi! I am wondering what a "stateful functional programing language" would be like as compared to haskell |
| 17:04:46 | → | SlackCoder joins (~SlackCode@64-94-63-8.ip.weststar.net.ky) |
| 17:05:02 | <guy> | i know that basically haskell can handle stateful computations, so i wonder what the difference would be |
| 17:05:42 | <guy> | the idea is to make the last argument in a series of partial applications `s' and have the return type as (s,output) |
| 17:06:08 | <guy> | and all functions therefore needing to be passed as instantiated objects |
| 17:06:36 | <guy> | such that this `s' data would be handled automatically |
| 17:06:49 | <guy> | (functions come with actual value associated) |
| 17:07:43 | <guy> | again, this is something that can be implemented in haskell, and im wondering what the switch to "stateful by default" at a syntax level, would mean for a language |
| 17:08:21 | <guy> | im hoping it can be a good idea for a project in linear types, since the state data is always replaced |
| 17:11:48 | → | ardell joins (~ardell@user/ardell) |
| 17:12:55 | <bwe> | Leary: could I do it without Proxy like `genProxy :: Variant -> HasFoo a *> a` ? Does the Proxy require existential quantifier? |
| 17:14:52 | <guy> | yeah you need a forall a. if your going to use typeApplications it requires RankNTypes |
| 17:14:57 | <Leary> | bwe: It's existential regardless, because you don't know statically which type you're producing. You could write `withFoo :: Variant -> (forall a. HasFoo a => a -> r) -> r`. |
| 17:15:16 | <guy> | idk if you need to put it in a continuations like that |
| 17:16:02 | <guy> | whats *> btw? |
| 17:16:07 | <bwe> | Leary: ok, so there's no way getting around type level data constructor? |
| 17:16:11 | × | mari-estel quits (~mari-este@user/mari-estel) (Remote host closed the connection) |
| 17:16:50 | <guy> | HasFoo should stop it being ambiguous if its on the lhs of the *> *depending on what that is* |
| 17:17:06 | → | mvk joins (~mvk@2607:fea8:5c96:5800::2d42) |
| 17:17:40 | <guy> | like if it were in a class that had `a' in its header, then you wouldnt need to resolve `a' via a forall |
| 17:17:55 | <guy> | but only as long as it doesnt just appear in a return type |
| 17:18:01 | × | mvk quits (~mvk@2607:fea8:5c96:5800::2d42) (Client Quit) |
| 17:18:16 | <guy> | you need to pass the proxy, or the equivalent typeApplication in that case |
| 17:18:44 | <guy> | is HasFoo your proxy? |
| 17:19:28 | <guy> | because if thats the case it can be ommited, but then `a' only appears in the rhs, so it requires the forall and AmbiguousTypes |
| 17:20:20 | <guy> | this is basically why TypeApplications was introduced, it saves having to use the proxy as an input argument, when the polymorphic variable appears in the return type |
| 17:20:41 | <guy> | and it *is* ambiguous, so you just use that extension |
| 17:21:04 | <guy> | that machinery i think makes proxies essentially redundant |
| 17:21:37 | <guy> | but that said, so should your proxy remove the need for the existential quantifier, since it brings it into scope via an input argument |
| 17:22:40 | <bwe> | guy: no, HasFoo is not my proxy |
| 17:23:15 | <Leary> | bwe: I don't know about that, but producing proxies from a variant is always going to be iffy in a standalone function. Making the variant the proxy itself is my recommendation. |
| 17:23:26 | <guy> | so its a datatype that makes use of the `a' annotation internally |
| 17:24:39 | <guy> | i dont think its iffy at all. @args are just as valid as regular args and the user can branch on choices easily like this |
| 17:26:51 | <guy> | Leary, seems to be talking about returning Proxies from a "varient", and suggests the Variant datatype contains the disambiguating type annotation, itself as a proxy. dont do this, instead use the TypeApplication as the syntax for the disambiguating argument |
| 17:27:35 | <guy> | blankVec @Double :: Vec Double |
| 17:27:53 | × | son0p quits (~ff@2800:e6:4001:6cc3:2748:5c2a:65d9:57ac) (Ping timeout: 245 seconds) |
| 17:28:04 | <guy> | blankVec :: forall a. Vec a |
| 17:28:17 | <guy> | which is anyway implicit |
| 17:29:02 | <guy> | rather than eg |
| 17:29:02 | <guy> | blankVec :: Proxy a -> Vec a |
| 17:29:24 | <guy> | let xs = blankVec (Proxy :: Proxy Double) |
| 17:29:32 | <guy> | much worse |
| 17:29:58 | <guy> | let xs = blankVec @Double |
| 17:30:43 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 17:30:52 | <guy> | the forall is kind of like the list of function arguments, except requiring @ arguments that are types |
| 17:31:11 | <guy> | and you dont need to supply all or any usually, but can if there is ambiguity |
| 17:31:36 | <guy> | there is a wildcard @_ to avoid having to supply preceeding types |
| 17:31:50 | <guy> | but normally you write the forall so the ambiguous types come first |
| 17:33:02 | <guy> | .... |
| 17:33:12 | <guy> | did anyone have any thoughts on a stateful language? |
| 17:33:21 | <ardell> | If I may throw in an unrelated question: I'd like to write something small in Haskell. What's the current recommendation for initial setup? ghcup and cabal? Or is stack still recommended? |
| 17:34:14 | <haskellbridge> | <maerwald> hls works better with cabal |
| 17:34:25 | ← | f-a parts (ff2a@joined.irc.for-some.fun) () |
| 17:37:24 | <bwe> | guy & Leary: I've put together some minimum example: https://paste.tomsmeding.com/MrYnuSCc |
| 17:37:27 | <geekosaur> | also these days stack hooks into ghcup, which generally works better than stack's own ghc management |
| 17:37:54 | <bwe> | btw. does anyone has hlint working within helix editor with or without using hls? |
| 17:38:08 | <guy> | cabal ftw |
| 17:38:18 | <guy> | ghcup still going strong |
| 17:39:14 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Remote host closed the connection) |
| 17:40:56 | <guy> | A -> fromHTML (Proxy @SiteA) html |
| 17:42:27 | <guy> | also your instance should not replace the type with a new type, that should be a comment, and it should not be incorrect accotrding to the class |
| 17:43:22 | <guy> | then the B case should work, if you also supply an instance for that class |
| 17:43:56 | <guy> | its all valid in terms of proxies. but you have an error matching here; |
| 17:43:57 | <guy> | DBEntry {..} = case siteVariant |
| 17:44:26 | <guy> | (DBEntry siteVariant html) |
| 17:45:38 | <geekosaur> | ardell: tbh stack is still easier to start with, but as your extra-deps start to grow cabal will become easier to work with. if you can stick to the snapshot then stack will be easier |
| 17:45:57 | <guy> | writing; data DBEntry where DBEntry :: SiteVariant -> BS.ByteString -> DBEntry |
| 17:46:03 | <guy> | might help with these matching issues |
| 17:47:18 | <guy> | cabal projects and v2-repl in .bat files is a good way to easily point the compiler to a subproject / cabal package in a directory structure |
| 17:48:21 | <guy> | a stateful language another time |
| 17:48:21 | <bwe> | guy: https://paste.tomsmeding.com/lGOCgwrY |
| 17:49:07 | <guy> | still needs the offending extra type at the instance commented out |
| 17:49:15 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 17:49:19 | <guy> | anyway, theres no question here other than syntax errors |
| 17:50:48 | → | mari-estel joins (~mari-este@user/mari-estel) |
| 17:51:28 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 17:56:31 | × | pabs3 quits (~pabs3@user/pabs3) (Ping timeout: 264 seconds) |
| 17:59:41 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 255 seconds) |
| 18:03:51 | <bwe> | guy: https://paste.tomsmeding.com/3ZhcPekE |
| 18:04:42 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 18:05:19 | × | CrunchyFlakes quits (~CrunchyFl@ip1f13e94e.dynamic.kabel-deutschland.de) (Quit: ZNC 1.8.2 - https://znc.in) |
| 18:06:12 | → | rachelambda8 joins (~rachelamb@cust-95-80-25-71.csbnet.se) |
| 18:08:17 | × | rachelambda quits (~rachelamb@cust-95-80-25-71.csbnet.se) (Ping timeout: 248 seconds) |
| 18:08:18 | rachelambda8 | is now known as rachelambda |
| 18:09:47 | → | pabs3 joins (~pabs3@user/pabs3) |
| 18:09:49 | × | Alleria quits (~Alleria@user/alleria) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:21:50 | → | Alleria joins (~Alleria@user/alleria) |
| 18:24:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:30:08 | × | mari-estel quits (~mari-este@user/mari-estel) (Remote host closed the connection) |
| 18:31:17 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 18:35:41 | → | ft joins (~ft@p4fc2a26f.dip0.t-ipconnect.de) |
| 18:39:41 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:42:57 | × | SlackCoder quits (~SlackCode@64-94-63-8.ip.weststar.net.ky) (Remote host closed the connection) |
| 18:43:24 | → | SlackCoder joins (~SlackCode@64-94-63-8.ip.weststar.net.ky) |
| 18:49:50 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 18:49:59 | <haskellbridge> | <sm> @ardell my 2c: ghcup certainly, then cabal or stack as you prefer; it can vary by project, if you have the disk space for both. Getting a first build working can be easier with cabal, especially if your required deps are diverse in age or maintainedness. Keeping a build working long term and general UX can be easier with stack. |
| 18:50:24 | × | Natch quits (~natch@c-92-34-7-158.bbcust.telenor.se) (Remote host closed the connection) |
| 18:54:25 | → | Natch joins (~natch@c-92-34-7-158.bbcust.telenor.se) |
| 18:55:23 | <ardell> | thanks, I'll shortly look up the current differences between stack and cabal and then I'll roll a dice or something. since it's simple stuff I might just use cabal. |
| 18:56:12 | × | acidjnk_new quits (~acidjnk@p200300d6e7283f33f1310e0154b357f3.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 18:59:19 | × | jinsun quits (~jinsun@user/jinsun) (Ping timeout: 260 seconds) |
| 18:59:58 | <haskellbridge> | <hellwolf> I would recommend either cabal script or stack script and not spending too much time in tinkering with toolings. The language is way more fun than those tooling |
| 19:00:52 | <haskellbridge> | <hellwolf> with ghcup you are all set within 5 minutes, cabal or stack |
| 19:00:52 | <haskellbridge> | Then start to write stuff, for fun! |
| 19:01:23 | <haskellbridge> | <hellwolf> find an interesting problem to you to start with, to keep it fun |
| 19:07:30 | <JuanDaugherty> | do i understand correctly haskellbridge is coming from discord? |
| 19:09:06 | <yushyin> | matrix |
| 19:09:34 | <JuanDaugherty> | ah, ty yushyin |
| 19:09:35 | <haskellbridge> | <sm> hellwolf: I agree, great way to start for small (or even not so small) things |
| 19:09:49 | <haskellbridge> | <sm> Until you want to publish on hackage |
| 19:10:47 | <haskellbridge> | <sm> a bridge convention I've seen elsewhere: hsMatrix |
| 19:14:02 | <sm> | mentioning the bridged system makes the source of chat clearer, mentioning the project/topic avoids name collisions |
| 19:14:37 | sm | wonders how many haskellers are in discord |
| 19:14:44 | × | alphazone quits (~alphazone@2.219.56.221) (Quit: Connection error?!) |
| 19:16:26 | <JuanDaugherty> | non zero for sure |
| 19:16:39 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:17:00 | <JuanDaugherty> | and not 'small' except relative to total |
| 19:17:34 | <sm> | it's not mentioned on https://www.haskell.org/community/ |
| 19:18:07 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:18:51 | <haskellbridge> | <sm> Also: until you want to use HLS. HLS doesn't support scripts yet AFAIK. |
| 19:22:30 | <JuanDaugherty> | has matrix changed functionally, e.g. video or such? I dont think i've looked at it in at least 5-6 years |
| 19:22:48 | → | misterfish joins (~misterfis@84.53.85.146) |
| 19:23:08 | <Leary> | sm: Nevermind HLS; you can't even use ghcid with them. Or if you can, it's not an invocation I was able to discover. |
| 19:23:22 | <JuanDaugherty> | i sorta expected slack actually |
| 19:23:41 | <JuanDaugherty> | or something setup with mattermost since its hs |
| 19:30:04 | <JuanDaugherty> | by implication it's not sm's homeserver but having trouble instantiating matrix from the protocal / server implementations |
| 19:33:45 | <JuanDaugherty> | terminating inquiry for now with apparent realization that matrix.org is a peer domain of libera.chat, from whose servers |
| 19:35:14 | JuanDaugherty | and no video or substantial change since last check |
| 19:36:16 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 19:40:54 | <sm> | the element X clients are getting good now - fast, with easier crypto UX, and built in next-gen audio/video calls |
| 19:42:10 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 19:44:44 | <sm> | oh. That was fast. |
| 19:46:39 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 19:48:11 | <guy> | there was this thing i was talking about last time i was on did anyone see? |
| 19:48:34 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 19:48:50 | <guy> | i was trying to talk about stateful functional programming, but before i was talking about local rescoping as nonlinearity in the program graph |
| 19:49:28 | haskellbridge | sm did see a wall of "guy>" yes |
| 19:50:14 | <guy> | and the concept of (nonlinear) graphical turing completeness, and the local scoping about changing the lookup numbers on the turing tape |
| 19:51:13 | <guy> | this amounts to modification on the program graph, asside from just deconstruction and reconstruction to change it to the linear list tape |
| 19:51:33 | <guy> | i think it violates traversable laws about revisitation |
| 19:51:40 | <guy> | local rescoping, somehow |
| 19:52:27 | <guy> | i like how haskell adds, by supporting local rescoping, nonlinearity, to its graphical turing completeness |
| 19:52:34 | <guy> | this is the kind of statement |
| 19:54:20 | <guy> | "functor scheduling" adds. which can build revisitation into an otherwise suspended traversal amounting with a "total schedule" to an fmap instance, maybe with several modification to one entry |
| 19:55:12 | <guy> | traversal itself is built around pattern matching on the constructor |
| 19:55:47 | <guy> | additional editing on top of this can break traversal laws about unique visitation |
| 19:56:18 | <guy> | and your not just dealing with the constructor as a deconstructor reconstructor pair on pattern matching |
| 19:56:51 | <guy> | but also editing. which is what local rescoping is doing on the program graph. reusing like its a memory slot |
| 19:57:05 | <guy> | reasigning to the named lookup variable bound into scope upon function definition |
| 19:58:01 | <guy> | functor scheduling adds repeated modification within fmap, unlike traverse which would visit each element once |
| 19:58:20 | → | Alleria_ joins (~Alleria@user/alleria) |
| 19:58:24 | <guy> | and somehow captures within it the nature of local scoping |
| 19:58:45 | <guy> | as a way to dance around the ideas of graphical turing completeness |
| 19:58:54 | <guy> | ciao x |
| 19:59:46 | × | guy quits (~guy@2a01:4b00:d007:ed00:3c30:fab:460b:9474) (Quit: Client closed) |
| 19:59:50 | × | Alleria quits (~Alleria@user/alleria) (Ping timeout: 255 seconds) |
| 20:00:03 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 20:00:41 | → | caconym joins (~caconym@user/caconym) |
| 20:02:32 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 20:02:39 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 20:06:09 | → | mehlon__ joins (~mehlon__@user/mehlon) |
| 20:06:25 | × | mehlon__ quits (~mehlon__@user/mehlon) (Remote host closed the connection) |
| 20:06:30 | × | notzmv quits (~daniel@user/notzmv) (Read error: Connection reset by peer) |
| 20:07:44 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 260 seconds) |
| 20:13:58 | → | acidjnk_new joins (~acidjnk@p200300d6e7283f33ad61be24cfbe8605.dip0.t-ipconnect.de) |
| 20:19:36 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 246 seconds) |
| 20:19:37 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 20:20:53 | → | notzmv joins (~daniel@user/notzmv) |
| 20:20:55 | → | euleritian joins (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) |
| 20:24:27 | × | notzmv quits (~daniel@user/notzmv) (Remote host closed the connection) |
| 20:25:40 | × | Square quits (~Square@user/square) (Ping timeout: 265 seconds) |
| 20:28:19 | → | sprotte24 joins (~sprotte24@p200300d16f3e1d0004a3986a39ff8486.dip0.t-ipconnect.de) |
| 20:28:58 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 20:30:10 | → | Digitteknohippie joins (~user@user/digit) |
| 20:30:34 | × | Digit quits (~user@user/digit) (Ping timeout: 272 seconds) |
| 20:36:24 | × | euleritian quits (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) (Read error: Connection reset by peer) |
| 20:36:40 | Digitteknohippie | is now known as Digit |
| 20:36:40 | <hellwolf> | > 11-19 21:49 [haskellbridge sm did see a wall of "guy>" yes] |
| 20:36:42 | <lambdabot> | <hint>:1:46: error: parse error on input ‘of’ |
| 20:37:04 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 20:42:52 | <dminuoso> | bwe: There's some tricks you can do here. For one, you could tap into `constraints` and carry a `Dict HasFoo` around. |
| 20:43:05 | <dminuoso> | See https://hackage.haskell.org/package/constraints-0.14.2/docs/Data-Constraint.html |
| 20:43:22 | <dminuoso> | (Note that Im not necessarily giving advice on how to do this, just exploring the design space here) |
| 20:44:22 | <dminuoso> | Or you could do this with GADTs manually (which is how Dict does it anyway) |
| 20:45:15 | <dminuoso> | The idea here is, that instead of carrying a type level tag you carry a value level dictionary around. |
| 20:45:37 | <dminuoso> | So assuming `constraints` you can use this bizarre thing: |
| 20:45:40 | <dminuoso> | withDict :: HasDict c e => e -> (c => r) -> r |
| 20:45:46 | × | ardell quits (~ardell@user/ardell) (Quit: Leaving) |
| 20:46:18 | <dminuoso> | Or if we imagine a simplified version: withDict :: Dict c -> (c => r) -> r |
| 20:46:53 | <dminuoso> | Which is exactly the thing you are trying to conjure. |
| 20:47:32 | <dminuoso> | Also, that package has the best description on all of hackage. :-) |
| 20:49:47 | × | briandaed quits (~root@user/briandaed) (Ping timeout: 255 seconds) |
| 20:53:32 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 20:54:00 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 20:55:34 | → | fr33domlover joins (~fr33domlo@towards.vision) |
| 20:57:55 | × | Alleria_ quits (~Alleria@user/alleria) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:00:38 | → | evocatus joins (~evocatus@2a02:a210:20c2:d600:1496:234e:dc9f:5868) |
| 21:02:33 | <evocatus> | Hi! What are the best resources to learn Haskell in 2024? |
| 21:02:38 | → | ljdarj1 joins (~Thunderbi@user/ljdarj) |
| 21:02:47 | <evocatus> | for someone with experience in other languages, including functional |
| 21:04:25 | → | Alleria joins (~Alleria@user/alleria) |
| 21:06:35 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 252 seconds) |
| 21:06:35 | ljdarj1 | is now known as ljdarj |
| 21:07:23 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 21:07:45 | <bwe> | dminuoso: Thanks for laying out the design space. I'll look into it tomorrow. Though, I don't know how you actually mean the description is really good or just irony. |
| 21:08:10 | → | mcfrd joins (~mcfrdy@user/mcfrdy) |
| 21:08:21 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) (Ping timeout: 252 seconds) |
| 21:08:30 | × | mcfrdy quits (~mcfrdy@user/mcfrdy) (Ping timeout: 276 seconds) |
| 21:08:46 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 21:08:46 | × | chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 260 seconds) |
| 21:09:09 | × | n3t quits (~n3t@user/n3t) (Ping timeout: 276 seconds) |
| 21:09:25 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 21:10:46 | → | n3t joins (~n3t@user/n3t) |
| 21:11:08 | mcfrd | is now known as mcfrdy |
| 21:13:31 | <sm> | evocatus: books, free books, video, courses ? hands-on or conceptual ? friendly or dry ? |
| 21:15:12 | → | alphazone joins (~alphazone@2.219.56.221) |
| 21:16:37 | <sm> | https://haskell-links.org links to many of them, eg the Book list. I like the look of the Haskell for Dilettantes youtube series. |
| 21:16:43 | <evocatus> | usually I learn new languages by reading a book usually by the author of the language itself :) |
| 21:17:42 | <haskellbridge> | <sm> ok you'd enjoy that SPJ history of haskell paper I bet |
| 21:18:13 | <haskellbridge> | <sm> https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf I think it is |
| 21:19:06 | <evocatus> | haskellbridge, thanks, that doesn't look so scary as an academic paper may |
| 21:19:11 | <haskellbridge> | <sm> there are a ton of books now but everyone agrees Hutton's is good |
| 21:20:57 | <evocatus> | cool, looks like he also has a video course on Youtube |
| 21:21:17 | <haskellbridge> | <sm> yup |
| 21:22:21 | <haskellbridge> | <sm> https://gotchamana.github.io/wiwinwlh/ and https://github.com/Gabriella439/post-rfc/blob/main/sotu.md#state-of-the-haskell-ecosystem are useful ecosystem overviews |
| 21:22:50 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 21:22:55 | <haskellbridge> | <sm> but maybe I mention them too soon |
| 21:23:15 | <evocatus> | I will have a look anyway :) |
| 21:36:59 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 21:41:14 | <hellwolf> | instance (KnownBool s, KnownNat n, n <= 32) => ABIWordValue (INTx s n) where |
| 21:41:14 | <hellwolf> | this got "Illegal use of type family" error. I get that. But is there a good workaround when using Nat kind? |
| 21:44:19 | × | cyphase quits (~cyphase@user/cyphase) (Quit: cyphase.com) |
| 21:44:59 | → | Everything joins (~Everythin@46-133-188-81.mobile.vf-ua.net) |
| 21:45:43 | <dmj`> | hellwolf: you can capture the type family result with ~ in the instance context, INTx s n ~ result |
| 21:46:11 | <dmj`> | equality constraint |
| 21:48:04 | → | cyphase joins (~cyphase@user/cyphase) |
| 21:48:42 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 21:48:50 | → | euleritian joins (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) |
| 21:49:09 | × | euleritian quits (~euleritia@dynamic-176-003-072-074.176.3.pool.telefonica.de) (Read error: Connection reset by peer) |
| 21:49:25 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 21:51:46 | <hellwolf> | The one that is invalid is "n <= 32) |
| 21:53:34 | <hellwolf> | I don't mind using UndicidableInstance for: |
| 21:53:36 | <hellwolf> | class ValidINTn (n :: Nat) |
| 21:53:36 | <hellwolf> | instance forall (n :: Nat) . (1 <= n, n <= 32) => ValidINTn n |
| 21:53:58 | <hellwolf> | but I don't want to enable it in module-level... I wish there is a {-# UndicidableInstance #-} pragma. |
| 21:57:19 | → | Alleria_ joins (~Alleria@user/alleria) |
| 21:57:34 | × | ubert quits (~Thunderbi@178.115.41.15.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 21:58:59 | × | Alleria quits (~Alleria@user/alleria) (Ping timeout: 260 seconds) |
| 22:04:09 | <hellwolf> | https://gitlab.haskell.org/ghc/ghc/-/issues/14609 found it |
| 22:05:33 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 252 seconds) |
| 22:05:46 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 22:08:18 | <hellwolf> | For now I opt for a simpler one, since there are only 32 of them |
| 22:08:19 | <hellwolf> | $ for i in `seq 1 32`;do echo -n "instance ValidINTn $i;";done |
| 22:09:49 | × | euleritian quits (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) (Read error: Connection reset by peer) |
| 22:10:25 | → | euleritian joins (~euleritia@ip4d16fc9f.dynamic.kabel-deutschland.de) |
| 22:12:52 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 22:14:13 | <mauke> | TH? |
| 22:16:02 | <hellwolf> | that'd require a separate module, right? |
| 22:16:24 | <hellwolf> | at that point, I might as well use the UndecidableInstances in that small module. |
| 22:16:42 | <Leary> | You should just do that anyway. |
| 22:18:24 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 260 seconds) |
| 22:19:22 | <hellwolf> | oh? how so? |
| 22:21:06 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:22:23 | <Leary> | UndecidableInstances won't bite |
| 22:24:39 | <hellwolf> | Understood. I would still prefer per instance scope. I guess it's for the granularity of controls. |
| 22:24:42 | <hellwolf> | https://pastebin.com/DqJ6yay3 <-- an excerpt, as of now. I am content with this version of ValidINTn, It restricts what "n :: Nat" a valid program can use, which is what I strive for. |
| 22:28:31 | × | michalz quits (~michalz@185.246.207.193) (Remote host closed the connection) |
| 22:31:09 | <Leary> | Oh dear. Well, in any case, TH doesn't necessarily require another module. Try `flip foldMap [1..32] \i -> [d| instance ValidINTn $(litT (numTyLit i)) |]`. |
| 22:32:03 | <hellwolf> | oh?! was that a dogma in that I believed? |
| 22:32:24 | <hellwolf> | I never truly understood why TH has to be in a separate module. |
| 22:33:51 | → | esph joins (~weechat@user/esph) |
| 22:34:04 | × | evocatus quits (~evocatus@2a02:a210:20c2:d600:1496:234e:dc9f:5868) (Ping timeout: 272 seconds) |
| 22:34:12 | <Leary> | Non-trivial TH does, so that the functions you invoke within are already compiled. |
| 22:35:05 | <hellwolf> | (say no more, let me try, learning something every day) |
| 22:36:42 | → | mange joins (~user@user/mange) |
| 22:39:11 | → | ljdarj1 joins (~Thunderbi@user/ljdarj) |
| 22:39:41 | <hellwolf> | GHC stage restriction: |
| 22:39:41 | <hellwolf> | ‘declare_all_valid_intn’ is used in a top-level splice, quasi-quote, or annotation, |
| 22:39:41 | <hellwolf> | and must be imported, not defined locally |
| 22:39:42 | <hellwolf> | :( |
| 22:40:22 | <geekosaur> | what were you expecting? that ghc would pull the definition out and build it separately |
| 22:40:22 | <hellwolf> | but I can indeed use that in a separate module, which doesn't make the module organization awkward |
| 22:40:23 | <geekosaur> | ? |
| 22:40:49 | <hellwolf> | but then it would warn about orphaned instances, which is probably not too bad. |
| 22:41:12 | <hellwolf> | me? I was expecting magic. |
| 22:41:34 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 260 seconds) |
| 22:41:34 | ljdarj1 | is now known as ljdarj |
| 22:41:58 | <hellwolf> | my dogmatic belief was that I should always use TH Qs imported. |
| 22:42:12 | <hellwolf> | (without full understanding of why) |
| 22:43:10 | <Leary> | hellwolf: https://play-haskell.tomsmeding.com/saved/T1DSbH8S |
| 22:43:30 | × | haritz quits (~hrtz@user/haritz) (Ping timeout: 252 seconds) |
| 22:44:01 | → | Alleria joins (~Alleria@user/alleria) |
| 22:44:12 | <hellwolf> | oh wait, so you didn't wrap it in a Q Dec |
| 22:44:14 | <hellwolf> | and it did work! |
| 22:44:34 | <hellwolf> | hallelujah |
| 22:44:40 | <hellwolf> | this is magic |
| 22:47:18 | × | Alleria_ quits (~Alleria@user/alleria) (Ping timeout: 276 seconds) |
| 22:47:34 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:47:34 | → | haritz joins (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) |
| 22:47:37 | × | haritz quits (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) (Changing host) |
| 22:47:37 | → | haritz joins (~hrtz@user/haritz) |
| 22:47:50 | <hellwolf> | https://play-haskell.tomsmeding.com/saved/fFgkdYeB <-- I saved the excerpt. |
| 22:47:54 | <hellwolf> | Thank you! |
| 22:48:18 | <hellwolf> | https://play-haskell.tomsmeding.com/saved/BnEqXAOh |
| 22:50:25 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 22:50:59 | <Leary> | hellwolf: It is a `Q [Dec]`, implicitly wrapped in $(). The key to avoiding the stage restriction is to inline it into the top-level instead of naming it or its components. |
| 22:51:38 | <hellwolf> | I didn't know the trick of not naming it. |
| 22:51:55 | <hellwolf> | I took your example and named it, and it didn't work. |
| 22:52:17 | <hellwolf> | but then... it seems all very reasonable that I didn't have to name it. |
| 22:52:28 | <hellwolf> | I understood that I could skip the $() at top-level. |
| 22:55:14 | <hellwolf> | you can do a lot with this trick... this needn't to be a amazement if GHC didn't have that "stage restriction". But for now, it's wonderful. |
| 22:56:48 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) (Error from remote client) |
| 23:03:12 | <geekosaur> | I still don't know how you think that would work |
| 23:03:17 | <geekosaur> | think about it |
| 23:04:52 | <geekosaur> | "Magic" would be quite literal |
| 23:05:43 | <Leary> | I mean, GHC could just do the inlining for you. Not like it doesn't already do plenty of that. |
| 23:07:24 | <hellwolf> | the fact is it worked. I take that as a magic. |
| 23:07:33 | <hellwolf> | *works |
| 23:17:30 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 23:21:51 | <hellwolf> | I also defined I8,I16..I256, U8,U16...U256, all without TH. I can now replace that with the magic too. Can you actually do such a splice in the module export list too? I guess that's where the magic is limited? |
| 23:22:22 | <hellwolf> | module XYZ ( ... U8, U16, ... U256,...) |
| 23:28:20 | <geekosaur> | things defined via TH can be exported, yes |
| 23:29:52 | × | Smiles quits (uid551636@id-551636.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
| 23:32:18 | <hellwolf> | right. I am more curious about if one can go one step of further of not to write this manually |
| 23:32:18 | <hellwolf> | -- *** Assorted INTx Types |
| 23:32:18 | <hellwolf> | , U8,U16,U24,U32,U40,U48,U56,U64 |
| 23:32:18 | <hellwolf> | ... and so on, in the module export list |
| 23:32:18 | <hellwolf> | ... but I am quite content already comparing to where I was few hours ago about this part of the code. |
| 23:33:00 | <geekosaur> | I don't think you can, no; it'd be kinda the extreme case of the staging restriction |
| 23:33:00 | × | remexre quits (~remexre@user/remexre) (Ping timeout: 252 seconds) |
| 23:34:14 | × | Eoco quits (~ian@128.101.131.218) (Ping timeout: 272 seconds) |
| 23:34:39 | × | sawilagar quits (~sawilagar@user/sawilagar) (Ping timeout: 265 seconds) |
| 23:35:35 | → | remexre joins (~remexre@user/remexre) |
| 23:36:01 | → | Eoco joins (~ian@128.101.131.218) |
| 23:36:06 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 23:40:42 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 23:41:02 | × | mange quits (~user@user/mange) (Remote host closed the connection) |
| 23:42:18 | → | notzmv joins (~umar@user/notzmv) |
All times are in UTC on 2024-11-19.