Logs on 2022-11-18 (liberachat/#haskell)
| 00:06:34 | × | titibandit quits (~titibandi@xdsl-78-35-182-184.nc.de) (Remote host closed the connection) |
| 00:09:29 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 00:10:22 | × | elevenkb quits (~elevenkb@105.184.125.168) (Ping timeout: 256 seconds) |
| 00:10:46 | → | mauke_ joins (~mauke@p57b6eb34.dip0.t-ipconnect.de) |
| 00:12:19 | × | mauke quits (~mauke@p54958ca8.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 00:14:54 | × | Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 260 seconds) |
| 00:14:58 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 00:15:57 | <cowboy8625> | what I dont understand is how to parse calls. |
| 00:16:17 | <cowboy8625> | calls are kicking my butt |
| 00:19:10 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) |
| 00:19:11 | × | king_gs quits (~Thunderbi@187.201.139.206) (Read error: Connection reset by peer) |
| 00:19:30 | → | king_gs joins (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) |
| 00:19:32 | × | gqplox quits (~textual@2a02:c7c:941d:fd00:c91:4591:f163:6ae7) (Quit: Textual IRC Client: www.textualapp.com) |
| 00:20:33 | × | detuneattune quits (~detuneatt@user/detuneattune) (Quit: The Lounge - https://thelounge.chat) |
| 00:22:24 | <Axman6> | App <$> expr <*> expr? :P |
| 00:23:20 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Remote host closed the connection) |
| 00:24:00 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) (Ping timeout: 260 seconds) |
| 00:24:49 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 00:25:09 | → | causal joins (~user@50.35.83.177) |
| 00:28:19 | × | acidjnk_new quits (~acidjnk@p200300d6e7137a332868e30cc8c30a1f.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 00:29:16 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1) |
| 00:29:47 | <cowboy8625> | yeah I get that |
| 00:30:02 | <Axman6> | so, this might be more of a unix question, but I'm thinking about it from a haskell perspective - If you wanted to spawn two subprocesses and pipe the output from one to another, you's first spawn the recipient of the data, get its stdin handle, then use that as the stdout handle, correct? |
| 00:31:19 | <geekosaur> | should work, I think. might need to use the lower level process stuff from the unix package though |
| 00:31:38 | <Axman6> | I'm wondering if there's a way to find out how much data has been sent between the two processes - hFileSize specifically talks about being only for handles for real files |
| 00:31:58 | <Axman6> | I guess trying the piping would be pretty easy |
| 00:32:19 | <geekosaur> | there isn't, really |
| 00:32:36 | <geekosaur> | a pipe has a kernel buffer and no other "memory" |
| 00:32:49 | → | mixfix41 joins (~sdeny9ee@user/mixfix41) |
| 00:33:14 | <Axman6> | so if you wanted to do that, from haskell, you'd be better off forking a thread to read, keep track of stats and then write to separate handles? |
| 00:33:29 | <geekosaur> | yeh |
| 00:33:53 | → | freeside joins (~mengwong@103.252.202.193) |
| 00:34:24 | <Axman6> | Wondering how hard writing something like pv would be in Haskell |
| 00:34:31 | <Axman6> | (pipe viewer) |
| 00:35:17 | <geekosaur> | the unix package should give you everything you need, unless it's accessing /proc directly, and possibly even then |
| 00:35:47 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Remote host closed the connection) |
| 00:37:18 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 00:37:54 | <Axman6> | is GHC2021 a base language or an extension? |
| 00:38:08 | <Axman6> | (is it even GHC2021 or 2020?) |
| 00:38:27 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 00:38:43 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 00:39:52 | <monochrom> | How to parse calls: `some expr` to get a non-empty list, then you can split it or even foldl1 FunApp. |
| 00:40:57 | <monochrom> | To a large extent I would parse s-expressions that way too. |
| 00:43:58 | → | acidjnk_new joins (~acidjnk@p200300d6e7137a332868e30cc8c30a1f.dip0.t-ipconnect.de) |
| 00:44:51 | × | zeenk quits (~zeenk@2a02:2f04:a208:3600::7fe) (Quit: Konversation terminated!) |
| 00:45:16 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Remote host closed the connection) |
| 00:50:44 | → | mmhat joins (~mmh@p200300f1c722a143ee086bfffe095315.dip0.t-ipconnect.de) |
| 00:50:46 | → | zebrag joins (~chris@user/zebrag) |
| 00:51:36 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 00:53:06 | <cowboy8625> | WOOOOOOO I think I got it!!!!!!! |
| 00:57:35 | × | mixfix41 quits (~sdeny9ee@user/mixfix41) (Ping timeout: 260 seconds) |
| 00:58:03 | → | srz joins (~srz@181.228.49.93) |
| 00:58:32 | × | xff0x quits (~xff0x@2405:6580:b080:900:43db:c639:c914:6f0d) (Ping timeout: 256 seconds) |
| 00:59:30 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 240 seconds) |
| 00:59:51 | <geekosaur> | Axman6, it's a language, although ghc itself accepts all language designators with the same -X / LANGUAGE pragma as extensions |
| 01:00:01 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 01:00:17 | <geekosaur> | cabal will accept `default-language: GHC2021` if you're using ghc 9.2 or later |
| 01:00:29 | <geekosaur> | (stack as well, if it's recent enough) |
| 01:00:58 | → | freeside joins (~mengwong@103.252.202.193) |
| 01:01:33 | <Axman6> | yeah, cabal/ghc weren't happy with default-language: Haskell2010 and other-extensions: GHC2021, so tried changing the language and it's all good. I should read what's in GHC2021 now... |
| 01:03:05 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 260 seconds) |
| 01:03:21 | × | king_gs quits (~Thunderbi@2806:103e:29:bfeb:c988:bbd5:2586:4924) (Remote host closed the connection) |
| 01:03:23 | <geekosaur> | https://downloads.haskell.org/ghc/9.4.2/docs/users_guide/exts/control.html?highlight=ghc2021#extension-GHC2021 |
| 01:04:22 | × | td_ quits (~td@83.135.9.50) (Ping timeout: 268 seconds) |
| 01:04:52 | × | maerwald quits (~maerwald@user/maerwald) (Ping timeout: 248 seconds) |
| 01:05:27 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 01:05:30 | × | ubert quits (~Thunderbi@77.119.167.253.wireless.dyn.drei.com) (Ping timeout: 240 seconds) |
| 01:05:36 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 01:05:55 | → | ubert joins (~Thunderbi@178.165.197.162.wireless.dyn.drei.com) |
| 01:06:06 | → | ub joins (~Thunderbi@178.165.197.162.wireless.dyn.drei.com) |
| 01:06:41 | × | akegalj quits (~akegalj@210-96.dsl.iskon.hr) (Quit: leaving) |
| 01:06:49 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Client Quit) |
| 01:07:35 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 01:07:36 | × | ubert1 quits (~Thunderbi@77.119.167.253.wireless.dyn.drei.com) (Ping timeout: 256 seconds) |
| 01:09:11 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 01:09:46 | → | xff0x joins (~xff0x@2405:6580:b080:900:43db:c639:c914:6f0d) |
| 01:10:00 | → | td_ joins (~td@83.135.9.50) |
| 01:10:05 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds) |
| 01:10:24 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:53 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 01:12:10 | × | malte quits (~malte@mal.tc) (Ping timeout: 240 seconds) |
| 01:14:58 | × | mmhat quits (~mmh@p200300f1c722a143ee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 01:15:44 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Remote host closed the connection) |
| 01:16:31 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:17:11 | × | pavonia quits (~user@user/siracusa) (Ping timeout: 260 seconds) |
| 01:17:45 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 01:18:50 | → | malte joins (~malte@mal.tc) |
| 01:19:47 | → | pavonia joins (~user@user/siracusa) |
| 01:19:56 | → | freeside joins (~mengwong@103.252.202.193) |
| 01:24:22 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 01:25:29 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 01:25:34 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 01:28:23 | × | xff0x quits (~xff0x@2405:6580:b080:900:43db:c639:c914:6f0d) (Ping timeout: 260 seconds) |
| 01:29:07 | → | mmhat joins (~mmh@p200300f1c701b7cbee086bfffe095315.dip0.t-ipconnect.de) |
| 01:29:32 | × | dtman34 quits (~dtman34@2601:447:d080:83c8:24bc:55ba:13b9:cc55) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 01:29:39 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 268 seconds) |
| 01:29:39 | × | merijn quits (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 01:29:49 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:29:53 | → | dtman34 joins (~dtman34@2601:447:d080:83c8:3fe9:6f54:f618:67a8) |
| 01:32:48 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 01:33:27 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 01:33:27 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 01:33:27 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:40:47 | × | maerwald quits (~maerwald@mail.hasufell.de) (Quit: gone) |
| 01:42:24 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
| 01:43:14 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 01:51:38 | → | srz_ joins (~srz@179.36.100.24) |
| 01:53:22 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 01:53:25 | × | hsw_ quits (~hsw@112-104-142-182.adsl.dynamic.seed.net.tw) (Quit: Leaving) |
| 01:53:37 | → | hsw joins (~hsw@2001-b030-2303-0104-0172-0025-0012-0132.hinet-ip6.hinet.net) |
| 01:54:04 | × | srz quits (~srz@181.228.49.93) (Ping timeout: 256 seconds) |
| 01:56:03 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 01:58:19 | → | nate4 joins (~nate@98.45.169.16) |
| 02:02:57 | <cowboy8625> | well I am extremly excited! Pratt Parsing is awesome! SOO simple really. |
| 02:03:34 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 02:06:08 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 02:07:55 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 02:08:42 | × | srz_ quits (~srz@179.36.100.24) (Remote host closed the connection) |
| 02:12:46 | × | maerwald quits (~maerwald@mail.hasufell.de) (Ping timeout: 256 seconds) |
| 02:13:08 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 02:14:40 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 02:16:44 | × | mmhat quits (~mmh@p200300f1c701b7cbee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 02:16:58 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 02:16:58 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 02:16:58 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:19:49 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 02:20:38 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) |
| 02:24:32 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 02:25:20 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) (Ping timeout: 260 seconds) |
| 02:27:04 | × | acidjnk_new quits (~acidjnk@p200300d6e7137a332868e30cc8c30a1f.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
| 02:27:54 | × | shapr quits (~user@68.54.166.125) (Ping timeout: 260 seconds) |
| 02:28:58 | → | mmhat joins (~mmh@p200300f1c70468f6ee086bfffe095315.dip0.t-ipconnect.de) |
| 02:30:42 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
| 02:37:55 | × | youziqi quits (~youziqi@103.37.140.45) (Ping timeout: 260 seconds) |
| 02:42:49 | → | shapr joins (~user@68.54.166.125) |
| 02:45:13 | → | youziqi joins (~youziqi@103.37.140.125) |
| 02:45:14 | → | razetime joins (~quassel@117.254.35.237) |
| 02:45:51 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 02:48:30 | × | ddellacosta quits (~ddellacos@143.244.47.83) (Ping timeout: 240 seconds) |
| 02:48:54 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 260 seconds) |
| 02:50:12 | <elvishjerricco> | So I was trying to be clever, doing `asum $ fmap f [1..5] ++ [die "too many tries"]`, where `f` is an `IO` function. The bulk of `f` is a `callProcess`. I expected that `ctrl-c` would kill the whole thing, but it just kills one of the tries at a time. |
| 02:50:44 | → | ddellacosta joins (~ddellacos@143.244.47.70) |
| 02:51:18 | <elvishjerricco> | I wanted it to be that if `callProcess` failed, `asum` would just cause it to try again through the `IO` instance of `Alternative` |
| 02:51:52 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 256 seconds) |
| 02:52:38 | → | freeside joins (~mengwong@103.252.202.193) |
| 02:54:49 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Quit: leaving) |
| 02:55:03 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 02:55:10 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Client Quit) |
| 02:55:41 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 03:00:31 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:05:22 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:07:12 | → | zebrag joins (~chris@user/zebrag) |
| 03:08:18 | × | td_ quits (~td@83.135.9.50) (Ping timeout: 256 seconds) |
| 03:10:05 | → | td_ joins (~td@83.135.9.5) |
| 03:15:08 | → | marc___ joins (~marc@5.83.191.79) |
| 03:18:31 | × | marc__ quits (~marc@5.83.191.222) (Ping timeout: 260 seconds) |
| 03:19:55 | × | Batzy quits (~quassel@user/batzy) (Ping timeout: 260 seconds) |
| 03:20:39 | × | merijn quits (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 03:21:18 | → | Batzy joins (~quassel@user/batzy) |
| 03:21:48 | × | Batzy quits (~quassel@user/batzy) (Client Quit) |
| 03:23:12 | → | Batzy joins (~quassel@user/batzy) |
| 03:23:46 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 03:24:08 | → | maxfan8 joins (~max@2a01:4f8:192:5356::2) |
| 03:25:13 | → | Batzy_ joins (~quassel@user/batzy) |
| 03:25:27 | × | Batzy_ quits (~quassel@user/batzy) (Client Quit) |
| 03:26:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 03:27:01 | × | Batzy quits (~quassel@user/batzy) (Read error: Connection reset by peer) |
| 03:29:19 | → | Batzy joins (~quassel@user/batzy) |
| 03:39:03 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 03:41:13 | × | euandreh quits (~Thunderbi@179.214.113.107) (Remote host closed the connection) |
| 03:42:09 | × | cowboy8625 quits (~cowboy@96-2-208-2-static.midco.net) (Quit: WeeChat 3.5) |
| 03:42:55 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 03:44:16 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 03:44:31 | → | jinsun__ joins (~jinsun@user/jinsun) |
| 03:44:31 | × | jinsun quits (~jinsun@user/jinsun) (Killed (silver.libera.chat (Nickname regained by services))) |
| 03:44:31 | jinsun__ | is now known as jinsun |
| 03:51:05 | × | evanvarvell quits (~evanvarve@097-088-181-216.res.spectrum.com) (Quit: Leaving) |
| 03:56:12 | × | hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
| 03:57:01 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 03:57:06 | → | polo joins (~polo@user/polo) |
| 03:57:36 | → | hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com) |
| 03:57:40 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 03:59:29 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 04:00:02 | × | haasn quits (~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 04:00:13 | <Inst> | ummm, i'm looking for some help on Cabal |
| 04:00:30 | <Inst> | I'm on Windows, and somehow it's not allowing me to compile based on .configure scripts, but my installation is managed by maerwald's ghcup |
| 04:00:42 | × | euandreh quits (~Thunderbi@179.214.113.107) (Remote host closed the connection) |
| 04:01:14 | → | freeside joins (~mengwong@103.252.202.193) |
| 04:01:24 | → | haasn joins (~nand@haasn.dev) |
| 04:02:52 | × | merijn quits (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 04:03:09 | → | euandreh joins (~Thunderbi@179.214.113.107) |
| 04:06:49 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:09:09 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::4b68) (Quit: Going elsewhere) |
| 04:09:22 | × | ddellacosta quits (~ddellacos@143.244.47.70) (Ping timeout: 268 seconds) |
| 04:09:53 | × | polo quits (~polo@user/polo) (Ping timeout: 256 seconds) |
| 04:10:17 | → | polo joins (~polo@user/polo) |
| 04:10:50 | × | polo quits (~polo@user/polo) (Client Quit) |
| 04:12:24 | → | Guest75 joins (~Guest75@178.141.130.118) |
| 04:15:09 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 04:17:10 | × | denl^ quits (~denl@76.145.185.103) (Remote host closed the connection) |
| 04:17:13 | × | Guest75 quits (~Guest75@178.141.130.118) (Ping timeout: 260 seconds) |
| 04:18:09 | <sm> | @where paste |
| 04:18:09 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
| 04:21:23 | <Inst> | https://paste.tomsmeding.com/QX4w8JGZ |
| 04:21:49 | <Inst> | except msys+mingw should be installed? |
| 04:25:38 | <sm> | I'm not sure how that works with ghcup, #haskell-ghcup / maerwald may know |
| 04:30:08 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 04:31:28 | <maerwald[m]> | Inst: your cabal.config? |
| 04:31:32 | <maerwald[m]> | The global one |
| 04:32:16 | → | mbuf joins (~Shakthi@49.204.132.239) |
| 04:33:31 | <Inst> | maerwald: |
| 04:33:32 | <Inst> | https://paste.tomsmeding.com/51QGzezE |
| 04:33:39 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
| 04:34:02 | <Inst> | if i delete the config file and reinstall cabal, it should attempt to regenerate the bindings to msys, right? |
| 04:34:41 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) |
| 04:34:54 | <maerwald[m]> | extra-include-dirs, extra-lib-dirs and extra-prog-path are not set for some reason |
| 04:35:00 | × | InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 04:35:02 | <maerwald[m]> | https://github.com/hasufell/ghcup-hs/blob/e924ad8278966795ea6f8393fc38900c549f6e2a/scripts/bootstrap/bootstrap-haskell#L595 |
| 04:35:35 | <maerwald[m]> | The bootstrap script should set them. It's possible that you're using different shell or something and cabal.config.location is different |
| 04:35:50 | <maerwald[m]> | Set those values manually |
| 04:39:35 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 04:40:31 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 04:41:28 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 04:42:36 | <Inst> | how do i force the bootstrap script to run? |
| 04:43:14 | × | razetime quits (~quassel@117.254.35.237) (Ping timeout: 260 seconds) |
| 04:44:27 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
| 04:46:52 | <maerwald[m]> | It's invoked by the powershell script. If you're already in an msys2 bash shell, you can invoke the same as on unix |
| 04:48:36 | <Inst> | i'm reinstalling ghcup, would that work? |
| 04:49:37 | × | catern quits (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) (Read error: Connection reset by peer) |
| 04:53:35 | <Inst> | yup, it's refusing to run |
| 04:53:40 | <Inst> | which powershell script? |
| 04:55:58 | × | Vajb quits (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer) |
| 04:56:57 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) |
| 04:58:26 | <Inst> | okay, got a fresh config file for cabal |
| 05:02:38 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 05:02:57 | → | Vajb joins (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) |
| 05:03:54 | <maerwald[m]> | https://github.com/haskell/ghcup-hs/blob/master/scripts/bootstrap/bootstrap-haskell.ps1 |
| 05:06:10 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 05:18:23 | → | pottsy joins (~pottsy@129.227.183.244) |
| 05:31:12 | → | freeside joins (~mengwong@122.11.214.158) |
| 05:31:59 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 05:32:08 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 05:32:14 | × | Neuromancer quits (~Neuromanc@user/neuromancer) (Ping timeout: 256 seconds) |
| 05:33:23 | Lord_of_Life_ | is now known as Lord_of_Life |
| 05:36:16 | → | Guest12 joins (~Guest12@110.226.84.78) |
| 05:36:41 | × | freeside quits (~mengwong@122.11.214.158) (Read error: Connection reset by peer) |
| 05:37:41 | × | rembo10 quits (~rembo10@main.remulis.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:38:47 | × | merijn quits (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 05:39:50 | → | rembo10 joins (~rembo10@main.remulis.com) |
| 05:44:07 | × | Guest12 quits (~Guest12@110.226.84.78) (Quit: Client closed) |
| 05:44:13 | × | mbuf quits (~Shakthi@49.204.132.239) (Quit: Leaving) |
| 05:45:50 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 05:48:20 | × | red-snail quits (~snail@static.151.210.203.116.clients.your-server.de) (Ping timeout: 260 seconds) |
| 05:51:21 | × | ircbrowse_tom quits (~ircbrowse@2a01:4f8:1c1c:9319::1) (ZNC 1.8.2+deb2build5 - https://znc.in) |
| 05:51:36 | → | ircbrowse_tom joins (~ircbrowse@2a01:4f8:1c1c:9319::1) |
| 05:51:41 | Server | sets mode +Cnt |
| 05:51:49 | → | xnbya joins (~xnbya@2a01:4f8:c17:cbdd::1) |
| 05:52:25 | × | Hafydd quits (~Hafydd@user/hafydd) (Ping timeout: 260 seconds) |
| 05:52:33 | → | fiddlerwoaroof joins (~fiddlerwo@user/fiddlerwoaroof) |
| 05:53:40 | → | maxfan8 joins (~max@personal.max.fan) |
| 05:56:59 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds) |
| 05:59:51 | → | nate4 joins (~nate@98.45.169.16) |
| 06:04:32 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
| 06:10:20 | → | Hafydd joins (~Hafydd@user/hafydd) |
| 06:10:20 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 06:15:18 | × | res0nat0r0844909 quits (~Fletch@fenrir.whatbox.ca) (Ping timeout: 256 seconds) |
| 06:15:21 | × | DDR quits (~DDR@2604:3d08:4c7f:8250:7257:f6a:ab73:6e5d) (Remote host closed the connection) |
| 06:15:51 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:17:14 | → | chromoblob joins (~user@37.113.164.122) |
| 06:17:53 | × | mmhat quits (~mmh@p200300f1c70468f6ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1) |
| 06:18:19 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 06:19:18 | → | Luj37 joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) |
| 06:20:07 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 06:21:35 | × | Luj3 quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 260 seconds) |
| 06:21:35 | Luj37 | is now known as Luj3 |
| 06:22:06 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 256 seconds) |
| 06:22:40 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 06:26:59 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 06:29:17 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 06:31:59 | money | is now known as Guest1479 |
| 06:32:23 | × | Guest1479 quits (sid532813@user/polo) () |
| 06:47:02 | × | tcard quits (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (Quit: Leaving) |
| 06:48:12 | → | chomwitt joins (~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) |
| 06:49:20 | × | nisstyre quits (wes@user/nisstyre) (Quit: WeeChat 3.4) |
| 06:50:03 | → | Guest1479 joins (sid532813@user/polo) |
| 06:50:06 | Guest1479 | is now known as money |
| 06:52:29 | → | tcard joins (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) |
| 06:53:19 | → | nisstyre joins (wes@user/nisstyre) |
| 06:58:56 | → | Guest75 joins (~Guest75@178.141.130.118) |
| 06:58:57 | × | youziqi quits (~youziqi@103.37.140.125) (Ping timeout: 256 seconds) |
| 07:01:51 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:02:08 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 07:06:28 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Remote host closed the connection) |
| 07:06:52 | × | merijn quits (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
| 07:13:30 | × | kaskal quits (~kaskal@213-225-13-82.nat.highway.a1.net) (Ping timeout: 240 seconds) |
| 07:14:11 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds) |
| 07:16:27 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 07:20:18 | → | Major_Biscuit joins (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) |
| 07:23:52 | × | ft quits (~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving) |
| 07:26:36 | → | fockerize joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 07:29:30 | → | kenran joins (~user@user/kenran) |
| 07:32:47 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Remote host closed the connection) |
| 07:33:06 | × | mud quits (~mud@user/kadoban) (Ping timeout: 255 seconds) |
| 07:34:06 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 268 seconds) |
| 07:34:32 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:65cf:cc10:c4dc:168) |
| 07:43:49 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:47:49 | → | chromoblob joins (~user@37.113.164.122) |
| 07:50:51 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 07:56:12 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 07:56:50 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 07:57:45 | → | mud joins (~mud@user/kadoban) |
| 07:59:06 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 07:59:10 | → | youziqi joins (~youziqi@103.37.140.90) |
| 08:00:17 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 08:00:42 | → | zeenk joins (~zeenk@2a02:2f04:a208:3600::7fe) |
| 08:01:40 | <tomsmeding> | dminuoso: relevant to our discussion yesterday, and published two days before it :p https://serokell.io/blog/datakinds-are-not-what-you-think |
| 08:02:03 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:02:38 | → | Kaiepi joins (~Kaiepi@108.175.84.104) |
| 08:08:20 | → | coot joins (~coot@213.134.171.3) |
| 08:09:28 | → | michalz joins (~michalz@185.246.207.203) |
| 08:12:03 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 260 seconds) |
| 08:15:35 | → | mncheck joins (~mncheck@193.224.205.254) |
| 08:17:20 | → | libertyprime joins (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) |
| 08:20:54 | <Inst> | this freaking toolchain |
| 08:21:18 | <Inst> | why is it a bad idea to --lib with Cabal again? |
| 08:21:27 | <Inst> | I think I just discovered why because I've been using --lib to get HLS to work |
| 08:21:53 | <Inst> | now i'm stuck reinstalling GHCup and my whole Haskell toolchain |
| 08:22:02 | <Inst> | VSC Haskell wouldn't recognize a bunch of libraries, etc |
| 08:22:08 | <Inst> | VSC HLS |
| 08:22:17 | <Inst> | then it stalled my attempt to get servant to work because fo types |
| 08:22:19 | <Inst> | great |
| 08:22:48 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 08:26:07 | → | chromoblob joins (~user@37.113.164.122) |
| 08:27:51 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Quit: leaving) |
| 08:28:54 | <tomsmeding> | Inst: HLS won't recognise a bunch of libraries? Are they correctly listed in the build-depends of you .cabal file, did you 'cabal build', and did you restart HLS? |
| 08:29:11 | <tomsmeding> | doing those things hasn't failed me yet with semi-recent HLS versions |
| 08:30:04 | <c_wraith> | if they're using cabal install --lib, they probably don't have a .cabal file |
| 08:30:45 | <tomsmeding> | c_wraith: they said they've been using --lib to get HLS to work; presumably they at least have a .cabal file but something somehow doesn't work? |
| 08:31:02 | <tomsmeding> | Otherwise it makes sense they're criticising the toolchain, because they don't understand it :p |
| 08:31:12 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 08:31:43 | → | merijn joins (~merijn@c-001-001-012.client.esciencecenter.eduvpn.nl) |
| 08:32:03 | <Inst> | i have a cabal file |
| 08:32:07 | <Inst> | i don't use cabal files that much |
| 08:32:20 | <tomsmeding> | does it list all the dependencies you need? Does 'cabal build' work? |
| 08:32:26 | <tomsmeding> | (or 'stack build') |
| 08:32:31 | <Inst> | let me try this stuff again |
| 08:32:43 | <Inst> | cabal build works, HLS on the other hand reports a type error |
| 08:32:50 | <Inst> | sorry about this |
| 08:32:51 | <Inst> | ugh |
| 08:32:56 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 252 seconds) |
| 08:32:59 | <tomsmeding> | do you have a stack.yaml file too? |
| 08:33:12 | <tomsmeding> | Perhaps HLS is using the stack infrastructure to build and is getting different package versions |
| 08:33:13 | <Inst> | i don't think i do |
| 08:33:21 | <Inst> | just reinstalled GHCup, restarting VSC |
| 08:33:22 | <tomsmeding> | is there a .stack-work folder in your project? |
| 08:33:33 | <Inst> | nope |
| 08:33:35 | <tomsmeding> | good |
| 08:36:22 | <Inst> | hmmm, Haskell extension on VSC on Windows is demanding to install Stack |
| 08:36:23 | <Inst> | ffff |
| 08:36:42 | <tomsmeding> | don't |
| 08:36:46 | <tomsmeding> | just say no |
| 08:37:05 | <tomsmeding> | it's too pushy about that IMO |
| 08:38:25 | <Inst> | too late |
| 08:38:32 | <Inst> | i suppose ghcup rm stack, no? |
| 08:39:16 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:40:03 | <tomsmeding> | if it used ghcup to install it, yes |
| 08:40:24 | <maerwald[m]> | GHCup installs stack by default |
| 08:40:31 | <maerwald[m]> | You can tell the vscode extension to never install stack |
| 08:40:34 | <tomsmeding> | only if you ask it to, right? |
| 08:40:35 | <tomsmeding> | OH |
| 08:40:37 | <tomsmeding> | TELL ME HOW |
| 08:40:44 | <tomsmeding> | I need to tell my students that |
| 08:40:57 | <money> | HELP |
| 08:41:00 | <maerwald[m]> | https://github.com/haskell/vscode-haskell#setting-a-specific-toolchain |
| 08:42:10 | <maerwald[m]> | {"haskell.toolchain": { "stack": null }} |
| 08:43:01 | <tomsmeding> | <3 |
| 08:44:50 | → | gmg joins (~user@user/gehmehgeh) |
| 08:44:56 | <maerwald[m]> | Anyone knows why the survey results take so long? |
| 08:46:11 | <dminuoso> | I havent fixed up the results, yet. |
| 08:46:44 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 248 seconds) |
| 08:48:33 | → | cfricke joins (~cfricke@user/cfricke) |
| 08:49:45 | → | titibandit joins (~titibandi@xdsl-87-78-52-100.nc.de) |
| 08:51:52 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 08:53:28 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:54:35 | <tomsmeding> | dminuoso: are you running it this year? |
| 08:55:41 | <dminuoso> | No sorry, that was just a snarky comment. |
| 08:55:51 | <tomsmeding> | :p |
| 08:56:38 | → | Inst_ joins (~Inst@c-98-208-218-119.hsd1.fl.comcast.net) |
| 08:56:40 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 08:56:49 | → | acidjnk joins (~acidjnk@p200300d6e7137a33bcc873a44fb839de.dip0.t-ipconnect.de) |
| 08:57:33 | → | Robert35 joins (~Robert@wpa52.eduroam.gu.se) |
| 08:57:45 | × | Inst quits (~Inst@2601:6c4:4081:54f0:155b:1b8c:fa18:504e) (Ping timeout: 256 seconds) |
| 08:58:12 | <Robert35> | Hi! One or two weeks ago I brought up some questions of MVar and IORef. Someone posted a hack of creating an 'empty' ioref, but I did not save that code |
| 08:58:36 | <dminuoso> | Robert35: foo <- newIORef (error "foo not initialized") |
| 08:58:38 | <Robert35> | Does anyone have any tips for creating 'empty' IORef, similarly to MVar? I need to create & get a reference to an IORef before I actually can write to it |
| 08:58:42 | dminuoso | is fairly sure that was himself |
| 08:58:45 | <Robert35> | Oh right |
| 08:58:59 | <Robert35> | newIORef does not evaluate the initial contents |
| 08:59:01 | <dminuoso> | Robert35: Alternatively hide the IORef behind an interface that uses Maybe |
| 08:59:20 | <dminuoso> | Benefit is that you can cleanly throw an IO exception upon your readIORef wrapper if the actual IORef has a Nothing |
| 08:59:26 | <Robert35> | I think your LOC above is sufficient |
| 08:59:43 | <Inst_> | the thing disables itself |
| 08:59:44 | Inst_ | is now known as Inst |
| 08:59:49 | <Robert35> | I wlll initialize them in a principled way, so I have no risk of reading it before there is an actual value in it |
| 08:59:59 | <dminuoso> | Robert35: Is this more than just one use of it? |
| 09:00:05 | <Inst> | if you say no |
| 09:00:11 | <Inst> | thanks for the override to disable stack |
| 09:00:12 | <dminuoso> | If yes, I would strongly consider using a wrapper interface. |
| 09:00:48 | <Inst> | now HLS is complaining it can't find a package database |
| 09:00:50 | <dminuoso> | Robert35: Anyway, there's a bunch of different perhaps better techniques - mostly "dont let this happen in the first place" |
| 09:01:05 | <Inst> | haskell-language-server-9.2.4~1.8.0.0.exe: can't find a package database at C:\GHCup\cabal\store\ghc-9.2.4\package.dbcompiler |
| 09:01:16 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 09:01:18 | <dminuoso> | Robert35: One example is using a higher kinded data type, where you have some `validateInput :: Input Maybe -> Validation Err (Input Identity)` |
| 09:01:30 | <Robert35> | The codebase I am modifying is full of hacks anyway |
| 09:01:39 | <Robert35> | This seems like a fairly simple hack |
| 09:01:46 | <dminuoso> | With `data Input f = Input { inpUser :: f Text, inpEmail :: f Text, inpAge :: Int }` |
| 09:02:23 | → | gmg joins (~user@user/gehmehgeh) |
| 09:02:29 | <dminuoso> | Robert35: fair enough, just use it sparingly. it is a powerful technique however |
| 09:02:33 | <Robert35> | I will read from it more than once, but in a controlled way |
| 09:02:36 | <Robert35> | With great power ~ |
| 09:02:40 | <dminuoso> | GHC itself in its implementation actually uses this trick in a few places |
| 09:02:57 | <dminuoso> | Mostly because it avoids the need to have multiple versions of a data type where one or two fields might be missing at some stage |
| 09:04:10 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
| 09:04:41 | <Inst> | i mean, it could be worse |
| 09:04:48 | <Inst> | i'm sure if i reinstall windows this'll all of a sudden start working |
| 09:08:34 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 09:09:50 | × | libertyprime quits (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Ping timeout: 256 seconds) |
| 09:09:56 | → | __monty__ joins (~toonn@user/toonn) |
| 09:10:19 | <sm> | Inst: for hls stuff, try also #haskell-language-server |
| 09:10:33 | <Inst> | thanks |
| 09:10:38 | <Inst> | also, dead chat, but what can i do |
| 09:12:33 | <__monty__> | Meditate and become a paragon of patience. |
| 09:13:05 | × | Robert35 quits (~Robert@wpa52.eduroam.gu.se) (Ping timeout: 260 seconds) |
| 09:13:18 | → | dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 09:13:19 | × | dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 09:13:19 | → | dibblego joins (~dibblego@haskell/developer/dibblego) |
| 09:13:43 | → | chele joins (~chele@user/chele) |
| 09:14:50 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 09:15:28 | × | simp|e quits (skralg@user/simple) (Ping timeout: 252 seconds) |
| 09:19:44 | → | `2jt joins (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) |
| 09:21:22 | <Inst> | meditate and drop off this mortal coil |
| 09:21:26 | <Inst> | but programming is a lot about patience, tbh |
| 09:22:11 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 09:22:13 | <Inst> | strangely enough, but this is part of an opinion of mine, that haskell is more about engineering, lisps are about wizardry |
| 09:22:24 | <Inst> | are there any actual haskell gods / wizards? |
| 09:22:39 | <Inst> | i hear more of haskell skill being ascribed to Haskell than Haskellers |
| 09:22:44 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 09:29:54 | × | titibandit quits (~titibandi@xdsl-87-78-52-100.nc.de) (Remote host closed the connection) |
| 09:30:57 | <__monty__> | There's the Kmettiverse and people like Oleg : ) |
| 09:32:25 | → | nschoe joins (~q@2a01:e0a:8e:a190:c3cc:9b76:de4b:1492) |
| 09:32:52 | → | CiaoSen joins (~Jura@p200300c95701f1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 09:39:18 | <maerwald[m]> | __monty__: there's no one like Oleg. There's just Oleg. |
| 09:39:36 | → | arthurs115 joins (~arthurs11@2405:9800:b653:8c03:e450:c6b6:f077:6a04) |
| 09:39:52 | × | arthurs115 quits (~arthurs11@2405:9800:b653:8c03:e450:c6b6:f077:6a04) (Client Quit) |
| 09:40:49 | → | simp|e joins (~skralg@user/simple) |
| 09:41:40 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 260 seconds) |
| 09:41:52 | <Inst> | Are Haskell gods different from other programming gods / wizards, though? |
| 09:42:06 | <Inst> | To me, Oleg is known through his papers. |
| 09:42:24 | <Inst> | Kmett is known for his libraries |
| 09:42:46 | <Inst> | I'd assume other programmers would be known for their work; like, of prominent clojurists, what they're known for is that so and so can code without tests |
| 09:43:07 | <Inst> | anyways, nuked my GHCide |
| 09:43:32 | <Inst> | works now, but back to the older problem |
| 09:43:36 | <dminuoso> | It should be said, we also have a second Oleg that is prominent for having authored or maintaining a lot of libraries too. |
| 09:44:16 | → | eggplant_ joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 09:44:33 | <dminuoso> | Maintainer for what feels like a third of the widely used packages on hackage. |
| 09:45:02 | <dminuoso> | (Well trustee in fact) |
| 09:45:05 | <Inst> | Oleg Grenrus? |
| 09:45:52 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:3cb4:cd70:33e6:e916) (Ping timeout: 260 seconds) |
| 09:46:10 | <__monty__> | How are libraries not "their work?" |
| 09:46:43 | <Inst> | I assume one difference is that Haskell gods tend to be known for their papers and their libraries, in part because say, Oleg Kisarov: he seems to be a defense contractor so his "good stuff" is likely national security |
| 09:47:02 | <__monty__> | And coding without tests sounds more like a disability. Only makes it harder for whoever comes after you. And they're probably constantly testing stuff in the REPL anyway which is just non-automated testing. |
| 09:47:14 | <Inst> | oh, he's at Tohoku University right now |
| 09:47:52 | <__monty__> | Also though, why are you looking for cults of personality? |
| 09:48:17 | <dminuoso> | I think there is a misconception that good programmers are "gods given gift" that dont even need to write tests. |
| 09:48:29 | <dminuoso> | What makes a programmer good it not really the ability to write complicated code. |
| 09:48:44 | <Inst> | also possibly it might be an issue with Clojure culture, my understanding of Clojure is that it's all wizards who write unmaintainable code |
| 09:48:55 | <Inst> | more powerful than Haskell, but substantially less scalable |
| 09:49:05 | <Inst> | like Klarna abandoned Clojure |
| 09:50:11 | <Inst> | https://news.ycombinator.com/item?id=27301219 |
| 09:50:53 | <dminuoso> | I recall a stackoverflow thread, in which someone claimed that a language like go (or some other similar language) was good because it allowed complete newcomers to instantly dead and understood code that any senior expert wrote. |
| 09:51:16 | <dminuoso> | And someone else (might have been edward even) remarked, that they thought this was scary and perhaps actually a downside to go. |
| 09:51:32 | <dminuoso> | If the bar was so low, that you could only communicate the simplest thoughts that a beginner could express, then you could never express your actual thoughts. |
| 09:52:11 | <dminuoso> | Part of what makes Haskell a bit more complicated, and perhaps imbue that legendary perception of some programmers, is that unlike many other languages, you can express thought much like you can express ideas in mathematics |
| 09:52:40 | <dminuoso> | It lets you express domain specific things very well, but only for people well versed in that domain |
| 09:53:00 | <probie> | Things like "not supporting a map function" are considered to be positive features of Go |
| 09:53:28 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 09:53:47 | <dminuoso> | Well I mean this is by design. Go is designed to have the bar at the entry level, so you can hire people straight from high school en masse, and put them to work. |
| 09:54:10 | <dminuoso> | That's not really a "downside", its a core design feature of the language. |
| 09:54:51 | → | Cid47 joins (~Cid47@110.226.84.78) |
| 09:55:35 | <dminuoso> | It's designed for hiring and throwing lots of inexperienced people at a problem. And for that, it must not be even possible to express complicated thought. |
| 09:58:05 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 09:58:45 | <dminuoso> | Much of edkmet code is not really that complicated, or requires magical powers to understand. It just requires a reader to study the domain for a moment |
| 09:59:31 | × | acidjnk quits (~acidjnk@p200300d6e7137a33bcc873a44fb839de.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 10:00:22 | <c_wraith> | :t confusing |
| 10:00:23 | <lambdabot> | Applicative f => LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f)) s t a b -> LensLike f s t a b |
| 10:00:27 | <c_wraith> | but sometimes there's that |
| 10:01:21 | → | nate4 joins (~nate@98.45.169.16) |
| 10:04:50 | → | chromoblob joins (~user@37.113.164.122) |
| 10:04:53 | <dminuoso> | c_wraith: To be fair, that isnt even Edwards creation. Eric Mertens was responsible for that,. |
| 10:05:55 | × | mncheck quits (~mncheck@193.224.205.254) (Remote host closed the connection) |
| 10:06:24 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 260 seconds) |
| 10:06:54 | <dminuoso> | And in addition, lens has received a lot of work over the years. If you start at how `confusing` was introduced, it seemed much simpler and more obvious this way. It was just over the years that it was generalized |
| 10:07:15 | Cid47 | is now known as Sid47 |
| 10:07:50 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 240 seconds) |
| 10:12:45 | × | Sid47 quits (~Cid47@110.226.84.78) (Quit: Connection closed) |
| 10:13:32 | → | acidjnk joins (~acidjnk@p200300d6e7137a33d8eab253bd5e2a70.dip0.t-ipconnect.de) |
| 10:15:04 | → | Sid47 joins (~sid@110.226.84.78) |
| 10:15:32 | × | Sid47 quits (~sid@110.226.84.78) (Client Quit) |
| 10:19:06 | → | kuribas joins (~user@ptr-17d51enw7vbqv4wetdn.18120a2.ip6.access.telenet.be) |
| 10:24:30 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 10:28:29 | → | zaquest joins (~notzaques@5.130.79.72) |
| 10:31:20 | × | tabaqui quits (~root@85.106.195.55) (Quit: WeeChat 3.7.1) |
| 10:32:47 | → | vpan joins (~0@212.117.1.172) |
| 10:34:30 | <Inst> | also re maerwald: |
| 10:34:31 | <Inst> | [ Warn ] New ghc version available. To upgrade, run 'ghcup install ghc 9.4.3' |
| 10:34:31 | <Inst> | [ Info ] verifying digest of: gs.exe |
| 10:34:31 | <Inst> | [ Warn ] stack-2.9.1 is already installed; if you really want to reinstall it, you may want to run 'ghcup install cabal --force 2.9.1' |
| 10:36:30 | <tomsmeding> | lol typo |
| 10:39:11 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 10:40:00 | × | fockerize quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 10:40:28 | <Guest75> | Hello. Can anyone help with producing an instance of FixF? https://hackage.haskell.org/package/data-fix-0.3.2/docs/Data-Fix.html |
| 10:40:55 | <Guest75> | I fail, 'cause that List a isn't Fix f |
| 10:40:57 | × | ubert quits (~Thunderbi@178.165.197.162.wireless.dyn.drei.com) (Remote host closed the connection) |
| 10:40:57 | ub | is now known as ubert |
| 10:43:49 | × | eggplant_ quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Remote host closed the connection) |
| 10:44:16 | <byorgey> | Guest75: not sure I understand your question. Can you put your code so far on https://paste.tomsmeding.com/ ? |
| 10:45:15 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:47:13 | → | ubert1 joins (~Thunderbi@178.165.197.162.wireless.dyn.drei.com) |
| 10:48:31 | <dminuoso> | What is FixF? |
| 10:50:08 | × | CiaoSen quits (~Jura@p200300c95701f1002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 10:50:42 | <Guest75> | byorgey: here it is https://paste.tomsmeding.com/qYZmBqnp |
| 10:51:19 | <Guest75> | dminuoso: I believe it's like Fixed point combinator, but for types |
| 10:51:34 | <Guest75> | related video: https://www.youtube.com/watch?v=zkDVCQiveEo |
| 10:51:55 | → | sid__ joins (~sid@110.226.84.78) |
| 10:52:07 | <kuribas> | Guest75: are you missing a Fix constructor? |
| 10:52:22 | <sid__> | exit |
| 10:52:29 | <dminuoso> | Guest75: Which `Fix` are you using? Did you define it yourself? Or which module is it from? |
| 10:52:53 | <dminuoso> | Are we talking about Data.Fix from data-fix? |
| 10:52:57 | <tomsmeding> | dminuoso: presumably https://hackage.haskell.org/package/data-fix-0.3.2/docs/Data-Fix.html which they linked before |
| 10:53:07 | <dminuoso> | Oh I did not see that link |
| 10:53:10 | <kuribas> | Cons 1 $ Fix $ Cons 2 $ Fix $ Cons 3 $ Fix Nil |
| 10:53:17 | <Guest75> | aha |
| 10:54:24 | <Guest75> | thanks kuribas, it works now! |
| 10:55:11 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 10:55:28 | <kuribas> | np |
| 10:55:28 | <Guest75> | so that menas that if I make my own type higher-kinded, then for all my data constructors I'll need to prepend them with Fix |
| 10:55:35 | <kuribas> | yes |
| 10:55:47 | <Guest75> | +about 50 lines of code :/ |
| 10:56:13 | <kuribas> | So just use normal lists :) |
| 10:56:22 | <kuribas> | And don't bother with recursion schemes |
| 10:56:30 | <kuribas> | they don't add much anyway. |
| 10:56:56 | × | sid__ quits (~sid@110.226.84.78) (Ping timeout: 256 seconds) |
| 10:56:57 | <byorgey> | Guest75: pattern synonyms can be helpful |
| 10:57:10 | <kuribas> | ah true |
| 10:57:19 | <kuribas> | and wrapping stuff in newtypes is pretty idiomatic haskell. |
| 10:57:42 | <Guest75> | well: https://github.com/andrewboltachev/pyparts/blob/master/src/Lib.hs#L68 |
| 10:57:46 | <kuribas> | I find the amount of boilerplate in haskell still much less than in java. |
| 10:58:18 | <Guest75> | for this I think I it'll be helpful for many reasons if I'll make the type parametric |
| 10:58:28 | <Guest75> | i.e. higher-kinded |
| 10:59:01 | <kuribas> | Guest75: that's not higher-kinded? |
| 10:59:33 | <Guest75> | it's just "data MatchPattern = ...", not "data MatchPattern a = ..." |
| 11:02:53 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 11:03:39 | <Guest75> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/pattern_synonyms.html — giving programming languages as example — insane! (though that's what I also use) |
| 11:04:01 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 11:04:07 | × | AkechiShiro quits (~licht@user/akechishiro) (Ping timeout: 256 seconds) |
| 11:04:09 | <kuribas> | Guest75: so what's wrong with that code? |
| 11:04:39 | <Guest75> | no that's fine. just it's not "apples and bananas" or "cats and dogs", or "users and orders" etc |
| 11:04:41 | × | Raito_Bezarius quits (~Raito@wireguard/tunneler/raito-bezarius) (Ping timeout: 256 seconds) |
| 11:04:52 | × | Luj3 quits (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (Ping timeout: 256 seconds) |
| 11:07:36 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 11:08:13 | <kuribas> | I find you often end up with GADTs, HKD types, etc, when trying to create declarative specs. |
| 11:08:31 | <kuribas> | As opposed to using function combinators. |
| 11:09:20 | <kuribas> | The advantage of a declarative spec is that you can use them in multiple ways, simplify or transform them, etc... |
| 11:09:32 | <kuribas> | But you easily reach the limits of haskells type system. |
| 11:09:56 | dminuoso | finds HKDs disstateful |
| 11:10:12 | <kuribas> | Having to wrap a lot of stuff in newtypes is one result of it, though not a big deal. |
| 11:10:18 | <kuribas> | dminuoso: that's a nice word :) |
| 11:10:27 | <dminuoso> | Heh that typo |
| 11:10:44 | <Guest75> | kuribas: I have similar feeling. that I will reach limits soon |
| 11:11:23 | <Guest75> | moreover, I need this "structurre" to be mapped to sth else. i.e. to create an UI to construct this data type expressions |
| 11:11:54 | <kuribas> | dminuoso: they are necessary when you want to make declarative specs like in lisp, but keep type safety. |
| 11:12:15 | <Guest75> | kuribas: what's the minimal example of function combinators? |
| 11:12:35 | <kuribas> | Guest75: a parser for example. |
| 11:12:44 | <kuribas> | Guest75: like parsec |
| 11:12:53 | <Guest75> | well, what I'm doing is essentially a parser |
| 11:13:16 | <Guest75> | well, I need to read up and learn about on existing stuff first then |
| 11:13:17 | <dminuoso> | kuribas: I dont think of them as being *necessary* |
| 11:13:22 | dminuoso | shrugs |
| 11:14:09 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 11:19:11 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 11:23:58 | → | ScK joins (~ScK@110.226.84.78) |
| 11:25:03 | × | ScK quits (~ScK@110.226.84.78) (Quit: Leaving) |
| 11:29:43 | × | swamp_ quits (~zmt00@user/zmt00) (Ping timeout: 252 seconds) |
| 11:30:21 | → | beteigeuze joins (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) |
| 11:30:41 | → | razetime joins (~quassel@117.193.0.17) |
| 11:37:23 | → | szkl joins (uid110435@id-110435.uxbridge.irccloud.com) |
| 11:44:17 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 11:48:53 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Ping timeout: 256 seconds) |
| 11:50:14 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 260 seconds) |
| 11:50:53 | <lortabac> | I find that those who are used to dynamically-typed languages tend to use advanced types in Haskell more than those who come from an OOP background |
| 11:52:02 | <lortabac> | maybe there is a desire to replicate the same flexibility and genericity that we enjoyed in the dynamically-typed world |
| 11:52:57 | <merijn> | lortabac: I find that's mostly people getting excited about types and then overcorrecting and leaning on them too hard |
| 11:53:02 | <merijn> | trying to do *everything* in the types |
| 11:53:46 | <lortabac> | merijn: that's also an important factor |
| 11:54:37 | <lortabac> | but there is also this habit of making super-generic duck-typed abstractions |
| 11:54:41 | <dminuoso> | merijn: +1 |
| 11:54:58 | <lortabac> | when you try to replicate them in Haskell you end up with HKD and other complicated stuff |
| 11:55:13 | <dminuoso> | Once I realized that I increased complexity and issues by doing that, I've actually come down to writing simple code as much as possible. |
| 11:55:20 | <lortabac> | at least that's my personal experience |
| 11:56:12 | <lortabac> | it took me years to understand that in a statically-typed setting sometimes it's better to accept a little bit of duplication |
| 11:57:43 | <dminuoso> | What I would really like is being able to attach data to constructors and fields, in a way that you can recover them. Quite a few non-trivial uses of HKDs or even weird Generics would be better solved by that. |
| 11:58:12 | × | glguy quits (~glguy@libera/staff-emeritus/glguy) (Ping timeout: 248 seconds) |
| 11:58:15 | <lortabac> | that would be a great feature |
| 11:59:18 | → | glguy joins (~glguy@libera/staff-emeritus/glguy) |
| 12:05:21 | → | chromoblob joins (~user@37.113.164.122) |
| 12:06:17 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 12:07:16 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 12:10:02 | × | Techcable quits (~Techcable@user/Techcable) (Ping timeout: 256 seconds) |
| 12:15:33 | → | titibandit joins (~titibandi@xdsl-87-78-52-100.nc.de) |
| 12:18:00 | × | Major_Biscuit quits (~MajorBisc@2a02-a461-129d-1-193d-75d8-745d-e91e.fixed6.kpn.net) (Ping timeout: 260 seconds) |
| 12:21:13 | → | Luj3 joins (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) |
| 12:25:14 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 260 seconds) |
| 12:26:42 | → | chromoblob joins (~user@37.113.164.122) |
| 12:26:45 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 12:27:47 | → | AkechiShiro joins (~licht@user/akechishiro) |
| 12:27:57 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 12:28:09 | <dminuoso> | tomsmeding: https://github.com/dminuoso/flatparse-state/blob/main/app/Main.hs |
| 12:28:21 | <dminuoso> | Here we go, this is actually even better. :) |
| 12:28:38 | <dminuoso> | Idea being to rework all of flatparse with `State# s` threading |
| 12:28:56 | <dminuoso> | It's kind of cute you get a) pure parsers, b) IO parser and c) ST parsers all for free from this. |
| 12:30:17 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 12:34:43 | <Xeroine> | Hi, what is the problem here https://bpa.st/LFDQ I was trying to install ghc-vis while using debian's repo cabal-install, ghc and ghci but after several hours of trying to find what was causing ghci not to find GHC.Vis despite it being installed I decided to reinstall ghc, ghci and cabal-install using ghcup since it has newer versions of them and now I'm getting this error |
| 12:34:58 | × | InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds) |
| 12:35:22 | <Xeroine> | previously I had a similar issue but I resolved it by installing a library with cairo or svg in it's name (don't remember what was the package's name) |
| 12:35:57 | <Xeroine> | now I'm guessing there's some kind of issue with the version I have for that library from the debian repo? |
| 12:38:03 | <Xeroine> | I don't really understand the error message, is it trying to install svgcairo as a dependency for ghc-vis and is trying different versions of svgcairo until it no longer satisfies the dependecy version? is that what's happening? |
| 12:38:25 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 12:41:26 | → | xff0x joins (~xff0x@ai071162.d.east.v6connect.net) |
| 12:43:19 | mauke_ | is now known as mauke |
| 12:44:20 | × | pottsy quits (~pottsy@129.227.183.244) (Quit: Leaving) |
| 12:46:04 | <Xeroine> | vacuum-graphviz also has some kind of version issue https://bpa.st/ACVQ |
| 12:46:29 | <dminuoso> | https://github.com/gtk2hs/svgcairo/blob/master/svgcairo.cabal#L35 |
| 12:46:44 | <dminuoso> | Xeroine: So this has an upper bound of Cabal to be lower than 3.1 |
| 12:46:51 | ← | frase parts (~Fraser@159.196.13.21) () |
| 12:46:55 | <dminuoso> | [__2] rejecting: svgcairo:setup.Cabal-3.6.3.0/installed-3.6.3.0 (conflict: svgcairo => svgcairo:setup.Cabal>=1.24 && <3.1) |
| 12:47:12 | <dminuoso> | The cabal planner is trying to figure out version of cabal to pick that satisfies its constraints |
| 12:47:24 | <dminuoso> | The installed version 3.6.3.0 cant be picked (because it violates the constraint <3.1) |
| 12:49:02 | <dminuoso> | (it first tries the installed version) |
| 12:49:13 | <dminuoso> | It then proceeds to skip cabal versions between 3.6.10 and 3.2.1.0 because they all fail the same constraint |
| 12:49:31 | <dminuoso> | What I dont quite understand however, is this: |
| 12:49:38 | <dminuoso> | svgcairo:setup.Cabal-1.24.1.0 (constraint from minimum version of Cabal used by Setup.hs requires >=3.4) |
| 12:51:41 | <Xeroine> | oh |
| 12:51:55 | <dminuoso> | That line really doesnt compute |
| 12:52:38 | <Xeroine> | dminuoso: wait but so what happens when it figures out 3.6.3.0 can't be picked? it tries to install different cabal versions? |
| 12:52:50 | <dminuoso> | Xeroine: Right. |
| 12:52:53 | <Xeroine> | ah |
| 12:52:54 | <dminuoso> | Xeroine: Cabal does this normally anyway |
| 12:53:05 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 12:53:35 | <dminuoso> | So normally Cabal (the library!) should be installed at version 2.4.1.0 |
| 12:53:39 | <dminuoso> | (or it should attempt that version) |
| 12:53:50 | <dminuoso> | but for some reason I cant explain, a constraint >=3.4 is introduced |
| 12:54:13 | <dminuoso> | (and >=3.4 combined with <3.1 is obviously mutually exclusive to the point that no version of Cabal could ever satisfy that) |
| 12:54:59 | <dminuoso> | `cabal check` has some curious warnings about svgcairo, I wonder whether the cabal file might be broken |
| 12:55:49 | <dminuoso> | Xeroine: My assumption is as follows: |
| 12:55:52 | <dminuoso> | https://github.com/gtk2hs/svgcairo/blob/master/svgcairo.cabal#L9 |
| 12:55:55 | <dminuoso> | This format with >= is no longer legit |
| 12:57:01 | <dminuoso> | (It was only allowed before 1.12) |
| 12:57:28 | <dminuoso> | https://cabal.readthedocs.io/en/stable/cabal-package.html says its supported up until >=2.0 however. |
| 12:57:39 | × | coot quits (~coot@213.134.171.3) (Quit: coot) |
| 12:59:31 | × | youziqi quits (~youziqi@103.37.140.90) (Ping timeout: 260 seconds) |
| 13:00:01 | <Xeroine> | hmm |
| 13:00:55 | → | Raito_Bezarius joins (~Raito@wireguard/tunneler/raito-bezarius) |
| 13:01:10 | <Xeroine> | well I don't know, maybe it's easier to get something similar like vacuum-graphviz working then, but like I said I tried that as well and got different errors |
| 13:01:40 | <Xeroine> | I just want to visualize data structures in haskell but looks like it's a pain in the ass to get those libraries installed and working =/ |
| 13:04:52 | <dminuoso> | Aha! |
| 13:04:56 | <dminuoso> | I have it figured out |
| 13:05:39 | <dminuoso> | Xeroine: The package has a missing upper base constraint. |
| 13:06:37 | <Xeroine> | dminuoso: you mean https://hackage.haskell.org/package/base ? |
| 13:06:43 | <dminuoso> | (And an incorrect Cabal constraint in setup-depends) |
| 13:06:48 | <dminuoso> | (or both, I guess) |
| 13:07:01 | <dminuoso> | The Cabal constraint should be removed its redundant |
| 13:07:06 | <dminuoso> | Roughly we have this: |
| 13:07:23 | <dminuoso> | If you use a Setup.hs build, then cabal-install will automatically add a setup-depends constraint on Cabal |
| 13:07:31 | <dminuoso> | In particular a minimum version |
| 13:07:34 | <dminuoso> | https://github.com/haskell/cabal/blob/master/cabal-install/src/Distribution/Client/ProjectPlanning.hs#L1205-L1221 |
| 13:07:39 | <dminuoso> | That logic is used to select the minimum cabal version |
| 13:08:04 | <dminuoso> | So presumably you use GHC 9.4, which is how cabal-install derives Cabal 3.4 or newer must be present |
| 13:08:11 | <dminuoso> | However, that is in direct conflict with the author specified: |
| 13:08:17 | <dminuoso> | https://github.com/gtk2hs/svgcairo/blob/master/svgcairo.cabal#L35 |
| 13:08:24 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
| 13:09:34 | <dminuoso> | Using that table you can deduce, that this package at present can only build up until GHC 8.8, which means up until base 4.13.0.0 |
| 13:09:54 | <Xeroine> | ah |
| 13:10:12 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 13:10:25 | <Xeroine> | I'll try install a <= 8.8 GHC then |
| 13:10:30 | <dminuoso> | I dont know whether there is actual restrictions, or whether the bounds can be bumped. Try it out or file a a bug report. Until then, use GHC 8.8 or older |
| 13:13:46 | → | Major_Biscuit joins (~MajorBisc@145.94.173.169) |
| 13:14:27 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 13:18:30 | × | acidjnk quits (~acidjnk@p200300d6e7137a33d8eab253bd5e2a70.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 13:24:05 | × | Major_Biscuit quits (~MajorBisc@145.94.173.169) (Ping timeout: 256 seconds) |
| 13:27:20 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 13:28:22 | → | zmt00 joins (~zmt00@user/zmt00) |
| 13:28:22 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 13:30:31 | × | ssw quits (~ssw@user/ssw) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 13:31:53 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 13:32:58 | → | epolanski joins (uid312403@id-312403.helmsley.irccloud.com) |
| 13:33:04 | → | ssw joins (~ssw@user/ssw) |
| 13:33:29 | → | blueonyx joins (~blueonyx@user/blueonyx) |
| 13:34:28 | × | pie_ quits (~pie_bnc@user/pie/x-2818909) () |
| 13:34:46 | → | pie_ joins (~pie_bnc@user/pie/x-2818909) |
| 13:37:35 | → | Major_Biscuit joins (~MajorBisc@145.94.173.169) |
| 13:38:12 | × | ssw quits (~ssw@user/ssw) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
| 13:38:16 | <Xeroine> | dminuoso: it installed but I got a warning which said I might have needed to use --lib when installing but none of documentation for ghc-vis recommends --lib so I'm not sure if I should use it. Also ghc-vis window pops up when I run ":vis" in ghci but using ":view" on variables causes and error. Here's the paste with all of this https://bpa.st/ACVQ |
| 13:39:16 | <Xeroine> | I'm on GHC 8.8.4 now by the way |
| 13:41:17 | <dminuoso> | Xeroine: Is this the right paste? |
| 13:41:34 | <dminuoso> | That looks like the output of `cabal install vacuum-graphviz`, not ghc-vis |
| 13:42:30 | <Xeroine> | oh my bad |
| 13:42:37 | <merijn> | hg diff |
| 13:42:44 | <merijn> | terminal fail >.> |
| 13:42:53 | <Xeroine> | I meant this one https://bpa.st/OJCA |
| 13:45:24 | <dminuoso> | Xeroine: You can ignore the warning. |
| 13:45:41 | <dminuoso> | ghc-vis is a bit special in that you do not get actual executables, but it is assumed you run this from ghci |
| 13:46:02 | <Xeroine> | oh |
| 13:46:12 | <dminuoso> | cabal-install acknowledges such cases by phrasing "it *might* not be completed" |
| 13:47:00 | <dminuoso> | Xeroine: and the error you get is because you need the `dot` binary |
| 13:47:08 | <dminuoso> | (s/binary/executable/) |
| 13:48:22 | <Xeroine> | from the debian package manager or cabal? |
| 13:48:33 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:49:02 | <dminuoso> | debian package manager |
| 13:49:08 | <Xeroine> | alright |
| 13:49:24 | <dminuoso> | http://felsin9.de/nnis/ghc-vis/installing-debian/ |
| 13:49:32 | <dminuoso> | Note the installation of `graphviz` |
| 13:49:48 | <dminuoso> | And some other dependencies you may need |
| 13:51:54 | <Xeroine> | sigh... now it installed ghc from apt as well, I'll see if it causes problems in a sec |
| 13:52:58 | <dminuoso> | oh, probably yes |
| 13:53:12 | <dminuoso> | feel free to uninstall that, I did not closely go through the installed packages |
| 13:53:50 | <Xeroine> | I think it installed it as a dependency of one of those libraries |
| 13:54:12 | <Xeroine> | anyways the ghcup ghc is still being used over the debian one so I guess it's all good |
| 13:54:15 | <Xeroine> | :view works as well now |
| 13:54:18 | <Xeroine> | dminuoso: thanks |
| 13:55:43 | <kuribas> | lortabac: the advantage of a declarative spec is that you can have multiple usecases for that spec. |
| 13:56:24 | <kuribas> | lortabac: where a combinator usually just has a single usecase. |
| 13:57:09 | <kuribas> | lortabac: or in other words, a combinator cannot be repurposed, while a data spec can. |
| 13:57:47 | <kuribas> | or you have to go into metaprogramming using template haskell. |
| 13:58:16 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 13:58:31 | → | ft joins (~ft@i59F54BF7.versanet.de) |
| 13:59:06 | <kuribas> | lortabac: take for example servant, you can generate openapi documentation, clients, etc... from a single spec. |
| 13:59:13 | <kuribas> | you cannot do that with combinators. |
| 13:59:43 | <dminuoso> | kuribas: You can do it with a code generator. |
| 14:00:13 | <dminuoso> | Normally with OpenAPI the idea is the other way around. |
| 14:00:21 | <dminuoso> | Start with the OpenAPI specification, generate boilerplate code from it. |
| 14:01:12 | <kuribas> | that's easier for clients than for servers |
| 14:01:28 | <dminuoso> | Why would it be any more difficult for servers? |
| 14:02:12 | <kuribas> | how can you verify that your server matches the openapi spec, without unit tests? |
| 14:02:23 | <kuribas> | you'll end up with redundant code. |
| 14:02:41 | <dminuoso> | I can think of a few ways. |
| 14:02:52 | → | nate4 joins (~nate@98.45.169.16) |
| 14:02:58 | <dminuoso> | You simply generate stub calls in the Setup.hs from the OpenAPI spec |
| 14:03:06 | <dminuoso> | Which will assure matching types |
| 14:03:07 | <kuribas> | and you know, openapi is actually a typed declarative spec :) |
| 14:03:11 | <kuribas> | just not in the same language |
| 14:03:15 | <dminuoso> | Sure. |
| 14:03:28 | <kuribas> | dminuoso: and when you need to update the spec? |
| 14:03:46 | <kuribas> | can you garantee the stub stays in sync? |
| 14:04:01 | <dminuoso> | well, you can actually use the same stubs to actually call your code. |
| 14:04:07 | <dminuoso> | then its a matter of you just fixing type errors. |
| 14:04:55 | <dminuoso> | say an endpoint of `foo :: Int -> String -> IO Bool` is expected, and it gets changed to `foo :: Int -> String -> IO ()`, you have a "expected (), actual Bool" type of warning. |
| 14:04:57 | <kuribas> | yes, that's a possibility |
| 14:05:29 | <dminuoso> | this is roughly what the Corba IDL compilers do |
| 14:05:56 | → | Everything joins (~Everythin@37.115.210.35) |
| 14:07:44 | <dminuoso> | kuribas: We do generate OpenAPI specs for one of our largest projects. |
| 14:07:47 | <dminuoso> | via servant |
| 14:07:55 | <dminuoso> | It's probably the most horrid haskell experience I've had., |
| 14:08:04 | × | GoldsteinQ quits (~goldstein@goldstein.rs) (Quit: ZNC 1.8.2 - https://znc.in) |
| 14:08:04 | <dminuoso> | And I am comfortable with type level shenanigans |
| 14:08:10 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
| 14:08:26 | × | mud quits (~mud@user/kadoban) (Quit: quit) |
| 14:08:38 | → | GoldsteinQ joins (~goldstein@goldstein.rs) |
| 14:10:18 | → | mncheck joins (~mncheck@193.224.205.254) |
| 14:12:00 | → | srz joins (~srz@157.92.5.222) |
| 14:12:25 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:12:29 | → | mud joins (~mud@user/kadoban) |
| 14:13:37 | → | srz_ joins (~srz@devil.dm.uba.ar) |
| 14:15:37 | <lortabac> | it's a horrid experience because Haskell is not powerful enough for this kind of stuff, but given an imaginary infinitely expressive and ergonomic language I would definitely choose a Servant-like DSL to code-generation |
| 14:16:38 | <lortabac> | code-generation is less powerful than types and introduces complexity at build level |
| 14:16:47 | × | srz quits (~srz@157.92.5.222) (Ping timeout: 256 seconds) |
| 14:17:29 | <dminuoso> | But at least it is trivial to build said build level tools, and rig it with simple and expressive diagnostics |
| 14:17:33 | <dminuoso> | Making it tractable in any way |
| 14:20:27 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
| 14:21:27 | <lortabac> | yes I agree, I was thinking abstractly about the two approaches |
| 14:22:03 | <lortabac> | but in practice I think you are right |
| 14:22:36 | × | feliix42 quits (~felix@gibbs.uberspace.de) (Ping timeout: 255 seconds) |
| 14:23:18 | × | titibandit quits (~titibandi@xdsl-87-78-52-100.nc.de) (Remote host closed the connection) |
| 14:25:21 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 14:30:44 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 248 seconds) |
| 14:31:03 | × | jinsun quits (~jinsun@user/jinsun) (Read error: Connection reset by peer) |
| 14:31:37 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 14:31:42 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 14:36:08 | × | Guest75 quits (~Guest75@178.141.130.118) (Ping timeout: 260 seconds) |
| 14:36:32 | × | InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 268 seconds) |
| 14:37:22 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 14:38:38 | → | poljar joins (~poljar@93-139-1-236.adsl.net.t-com.hr) |
| 14:38:56 | → | econo joins (uid147250@user/econo) |
| 14:39:39 | → | _srz joins (~srz@157.92.5.222) |
| 14:42:05 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 14:42:41 | × | srz_ quits (~srz@devil.dm.uba.ar) (Ping timeout: 268 seconds) |
| 14:44:46 | → | acidjnk joins (~acidjnk@p200300d6e7137a305cc03b10fd7a2523.dip0.t-ipconnect.de) |
| 14:47:12 | → | feliix42 joins (~felix@gibbs.uberspace.de) |
| 14:53:02 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 14:53:03 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 14:53:03 | → | wroathe joins (~wroathe@user/wroathe) |
| 14:54:37 | → | srz_ joins (~srz@devil.dm.uba.ar) |
| 14:57:12 | × | _srz quits (~srz@157.92.5.222) (Ping timeout: 256 seconds) |
| 14:57:46 | × | chomwitt quits (~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) (Ping timeout: 256 seconds) |
| 15:07:58 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 15:15:02 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:19:18 | × | Vajb quits (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer) |
| 15:20:28 | → | catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) |
| 15:20:31 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) |
| 15:22:12 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 15:26:34 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 15:29:42 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 15:29:53 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 15:34:36 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 256 seconds) |
| 15:42:33 | → | azimut_ joins (~azimut@gateway/tor-sasl/azimut) |
| 15:45:56 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 15:47:43 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 15:49:10 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:51:23 | → | chomwitt joins (~chomwitt@athedsl-351939.home.otenet.gr) |
| 15:56:44 | × | azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 15:57:55 | × | srz_ quits (~srz@devil.dm.uba.ar) (Ping timeout: 268 seconds) |
| 15:58:10 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 15:59:24 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:06:05 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Ping timeout: 260 seconds) |
| 16:07:37 | → | Vajb joins (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) |
| 16:14:27 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 16:17:44 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:20:28 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 16:21:39 | → | bjourne joins (~bjourne@2001:6b0:1:1140:42bf:ff4:f8fa:50e5) |
| 16:22:11 | × | Major_Biscuit quits (~MajorBisc@145.94.173.169) (Quit: WeeChat 3.6) |
| 16:23:57 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 16:24:18 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 16:24:50 | × | justGrit quits (~justache@user/justache) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:25:15 | → | justache joins (~justache@user/justache) |
| 16:26:44 | <bjourne> | what is the haskell syntax for: data Eq a => Foo a = Blah a ...? |
| 16:27:59 | <geekosaur> | it isn't. the "correct" syntax doesn't do what you expect or want, usually; you should put the constraint on functions that consume a Foo |
| 16:28:28 | <geekosaur> | DatatypeContexts aka "stupid theta" was removed in Haskell2010 |
| 16:29:21 | <geekosaur> | you can get something somewhat closer to what you usually intend with GADTs, but you're usually still better off putting it on consumers of a Foo than on its construction |
| 16:29:59 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 268 seconds) |
| 16:30:49 | × | justache quits (~justache@user/justache) (Remote host closed the connection) |
| 16:30:52 | × | rburkholder quits (~blurb@96.45.2.121) (Remote host closed the connection) |
| 16:31:09 | → | rburkholder joins (~blurb@96.45.2.121) |
| 16:31:12 | → | justache joins (~justache@user/justache) |
| 16:33:54 | × | kronicmage quits (user93427@neotame.csclub.uwaterloo.ca) (Ping timeout: 246 seconds) |
| 16:36:22 | → | kronicmage joins (user90047@neotame.csclub.uwaterloo.ca) |
| 16:40:20 | × | `2jt quits (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 256 seconds) |
| 16:41:04 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 16:46:53 | × | zeenk quits (~zeenk@2a02:2f04:a208:3600::7fe) (Quit: Konversation terminated!) |
| 16:47:43 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 16:55:08 | → | blueonyx_ joins (~blueonyx@user/blueonyx) |
| 16:56:15 | × | blueonyx quits (~blueonyx@user/blueonyx) (Ping timeout: 260 seconds) |
| 16:56:53 | × | blueonyx_ quits (~blueonyx@user/blueonyx) (Client Quit) |
| 16:57:04 | → | blueonyx joins (~blueonyx@user/blueonyx) |
| 16:57:46 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 16:59:27 | × | bjourne quits (~bjourne@2001:6b0:1:1140:42bf:ff4:f8fa:50e5) (Quit: Konversation terminated!) |
| 16:59:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 17:02:41 | × | lambdap237 quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap237) |
| 17:03:01 | → | lambdap237 joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 17:06:03 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:65cf:cc10:c4dc:168) (Quit: WeeChat 2.8) |
| 17:06:33 | → | Techcable joins (~Techcable@user/Techcable) |
| 17:09:29 | <probie> | I think you can emulate it with pattern synonyms |
| 17:12:33 | × | nschoe quits (~q@2a01:e0a:8e:a190:c3cc:9b76:de4b:1492) (Quit: Switching off) |
| 17:19:43 | × | finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer) |
| 17:20:41 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Remote host closed the connection) |
| 17:21:24 | <Xeroine> | Here http://felsin9.de/nnis/ghc-vis/#introduction this "at" function to access the nth element of that infinite list but I don't understand why that function is used instead of !! and if there's any difference and why is there a 0 in the function declaration? |
| 17:21:37 | <Xeroine> | function is used to access* |
| 17:21:56 | → | jinsun joins (~jinsun@user/jinsun) |
| 17:24:52 | × | blueonyx quits (~blueonyx@user/blueonyx) (Ping timeout: 268 seconds) |
| 17:27:56 | <mauke> | Xeroine: the function is equivalent to !! (but with arguments swapped) |
| 17:28:15 | <mauke> | it's probably defined like this to make it explicit what's going on |
| 17:29:21 | <mauke> | the 0 is for pattern matching: to check whether the first argument is 0 |
| 17:30:10 | <Xeroine> | oh right |
| 17:30:20 | <Xeroine> | that was pretty obvious =D sry |
| 17:32:06 | → | Guest|74 joins (~Guest|74@65-23-213-182.prtc.net) |
| 17:32:40 | × | Guest|74 quits (~Guest|74@65-23-213-182.prtc.net) (Client Quit) |
| 17:36:25 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 17:39:03 | × | acidjnk quits (~acidjnk@p200300d6e7137a305cc03b10fd7a2523.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 17:39:23 | → | acidjnk joins (~acidjnk@p200300d6e7137a305cc03b10fd7a2523.dip0.t-ipconnect.de) |
| 17:40:32 | <tomsmeding> | dminuoso: cool, so just one parser implementation now? :) |
| 17:41:38 | → | goepsilongo joins (~goepsilon@2603-7000-ab00-00e5-392a-bca4-733f-bcd4.res6.spectrum.com) |
| 17:44:32 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 17:46:04 | × | shapr quits (~user@68.54.166.125) (Remote host closed the connection) |
| 17:46:23 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 17:50:11 | → | titibandit joins (~titibandi@xdsl-87-78-52-100.nc.de) |
| 17:50:57 | × | razetime quits (~quassel@117.193.0.17) (Remote host closed the connection) |
| 17:53:08 | money | is now known as Guest417 |
| 17:58:29 | × | titibandit quits (~titibandi@xdsl-87-78-52-100.nc.de) (Remote host closed the connection) |
| 18:04:22 | → | nate4 joins (~nate@98.45.169.16) |
| 18:09:24 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 18:09:53 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:18:08 | → | DDR joins (~DDR@2604:3d08:4c7f:8250:1acb:505b:bbc9:304c) |
| 18:21:31 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:21:50 | × | DDR quits (~DDR@2604:3d08:4c7f:8250:1acb:505b:bbc9:304c) (Remote host closed the connection) |
| 18:23:08 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 18:23:10 | × | beteigeuze quits (~Thunderbi@a79-169-109-107.cpe.netcabo.pt) (Ping timeout: 260 seconds) |
| 18:27:25 | → | zeenk joins (~zeenk@2a02:2f04:a208:3600::7fe) |
| 18:27:42 | × | chomwitt quits (~chomwitt@athedsl-351939.home.otenet.gr) (Read error: Connection reset by peer) |
| 18:28:35 | → | Feuermagier_ joins (~Feuermagi@2a02:2488:4211:3400:6419:933b:46e0:8942) |
| 18:30:59 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 260 seconds) |
| 18:31:59 | → | mixfix41 joins (~sdeny9ee@user/mixfix41) |
| 18:37:02 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Quit: ZNC - https://znc.in) |
| 18:37:38 | × | mixfix41 quits (~sdeny9ee@user/mixfix41) (Ping timeout: 256 seconds) |
| 18:38:23 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 18:38:52 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 18:40:34 | → | roconnor joins (~quassel@coq/roconnor) |
| 18:41:30 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:44:31 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 18:45:50 | × | Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:6419:933b:46e0:8942) (Ping timeout: 240 seconds) |
| 18:46:56 | <roconnor> | Is there a way to create a Nix derivation to build a project using "cabal build" instead of "Setup build"? In particular I want to use "cabal haddock" because "Setup haddock" is broken for Backpack. |
| 18:47:41 | × | mzan quits (~quassel@mail.asterisell.com) (Quit: No Ping reply in 180 seconds.) |
| 18:49:06 | → | mzan joins (~quassel@mail.asterisell.com) |
| 18:49:06 | <geekosaur> | suspect the derivation would have to use either vendored deps or cabal.freeze or both |
| 18:49:39 | → | systemhalted joins (~systemhal@130.51.137.77) |
| 18:50:39 | × | systemhalted quits (~systemhal@130.51.137.77) (Remote host closed the connection) |
| 18:51:42 | × | ec quits (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
| 18:52:14 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 18:52:55 | × | hgolden quits (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
| 18:53:36 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:54:01 | <davean> | haskell.nix has a thing to extract the deps from the cabal file using the solver |
| 18:54:45 | × | stefan-_ quits (~cri@42dots.de) (Remote host closed the connection) |
| 18:55:33 | → | stefan-_ joins (~cri@42dots.de) |
| 18:56:17 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 18:58:51 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 18:59:55 | × | shof quits (~shof@user/shof) (Ping timeout: 248 seconds) |
| 19:00:43 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 19:01:24 | → | mixfix41 joins (~sdeny9ee@user/mixfix41) |
| 19:02:37 | × | epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:04:16 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:05:27 | → | kaskal joins (~kaskal@213-147-167-253.nat.highway.webapn.at) |
| 19:05:31 | <Athas> | Is there a way to specify a minimum GHC version that will make Cabal emit a user-comprehensible error when the minimum is not met? |
| 19:05:53 | → | AdonisExberger joins (~Adonis-Ex@176.54.36.182) |
| 19:05:55 | × | AdonisExberger quits (~Adonis-Ex@176.54.36.182) (Excess Flood) |
| 19:06:17 | → | AdonisExberger joins (~Adonis-Ex@176.54.36.182) |
| 19:06:29 | <davean> | Athas: I mean, effectively the base dependency does that. There is also a field for listing the GHC versions that should work. |
| 19:06:29 | → | bjobjo joins (~bjobjo@user/bjobjo) |
| 19:07:18 | <davean> | (the "compiler" field) |
| 19:07:29 | <geekosaur> | base dep doesn't tell you "your ghc is too old" though |
| 19:07:47 | <davean> | geekosaur: No, it EFFECTIVELY tells you that, it depends on what you consider comprehensible |
| 19:08:02 | → | chomwitt joins (~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) |
| 19:08:02 | <davean> | it tells anyone with a passing familiarity with haskell that, but it doesn't say it outright |
| 19:08:14 | <Athas> | davean: it's for people who are not Haskell programmers. |
| 19:08:14 | <davean> | the tested-with field is often used and makes it pretty clear but doesn't emit a message. |
| 19:08:28 | <Athas> | Even I have to look up a GHC:base mapping table every time to figure out what the actual requirement is. |
| 19:08:51 | <davean> | so I don't think there is anything that strictly does what you want. |
| 19:08:55 | <Athas> | I get error reports like this one: https://github.com/diku-dk/futhark/issues/1763 |
| 19:09:05 | <Athas> | Alright, I think I will create an issue on the Cabal issue tracker about this. |
| 19:09:23 | <Athas> | While not terribly principled, I think this should be solved simply by special-casing the error message for 'base' version bounds. |
| 19:10:07 | <davean> | Athas: you can do a conditional on the compiler versions |
| 19:10:48 | <davean> | So you could hack it in the meantime by depending on an unsatisfiable "ghc-version-too-old" package |
| 19:10:53 | <davean> | (when the impl is too old) |
| 19:11:05 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:11:16 | <davean> | It would be a hack |
| 19:11:21 | Guest417 | is now known as money |
| 19:13:00 | <roconnor> | I admit I'm totally lost when it comes to cabal, but cabal build seems to work for me right now without a cabal update. |
| 19:14:41 | <davean> | Athas: if impl(ghc < 9.0): build-depends: new-enough-ghc == 0 |
| 19:14:47 | <davean> | Athas: I don't know how you feel about hacks :-p |
| 19:14:56 | <davean> | roconnor: what are you lost about? |
| 19:15:10 | <monochrom> | ghcup list has a ghc<->base mapping |
| 19:15:13 | <davean> | cabal update just gets you new information about what packages are available. |
| 19:15:26 | <tomsmeding> | monochrom++ |
| 19:15:33 | <roconnor> | mostly about how much cabal depends on hackage when building sthings. |
| 19:15:57 | <tomsmeding> | that saves a lot of looking up that same page on the ghc wiki again and again |
| 19:16:32 | <davean> | roconnor: it depends on hackage to download the packages, it depends on hackage to get a list of what is available when you run update. |
| 19:16:37 | <davean> | roconnor: total list, we're done. |
| 19:17:02 | <davean> | (you can also request it interact with hackage with cabal upload, but it doesn't "depend" in that case IMO and thats not building) |
| 19:17:16 | → | hgolden joins (~hgolden@cpe-172-251-233-141.socal.res.rr.com) |
| 19:17:43 | <roconnor> | "we're done"? |
| 19:19:59 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 19:20:33 | × | lisq quits (~quassel@lis.moe) (Quit: No Ping reply in 180 seconds.) |
| 19:20:34 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 19:20:43 | <davean> | roconnor: There is nothing else to list |
| 19:21:23 | <davean> | We've completely explored the dependencies cabal has on hackage for building packages |
| 19:21:53 | → | lisq joins (~quassel@lis.moe) |
| 19:22:18 | <davean> | I guess I can add to the first, it only downloads if it hasn't downloaded it already or the cache has been cleared since it downloaded it |
| 19:22:30 | <roconnor> | ls |
| 19:22:32 | → | dequbed joins (~dequbed@banana-new.kilobyte22.de) |
| 19:22:39 | <roconnor> | sorry. |
| 19:22:46 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 19:23:12 | <davean> | roconnor: basicly in principle cabal doesn't depend on hackage at all. Its just that hackage is where it usually gets package data from. |
| 19:24:03 | <davean> | You can infact point it at a local directory instead for example. |
| 19:24:06 | <geekosaur> | hypothetically any package system could set up its own hackage-server, point cabal at it, and thereby integrate cabal directly into its build system |
| 19:24:34 | <davean> | geekosaur: huh what? No? cabal very explicitely is about Haskell |
| 19:24:44 | <geekosaur> | that's not what I meant |
| 19:25:10 | <geekosaur> | I meant it could use a private "hackage" with only the (Haskell) packages for that distro |
| 19:25:10 | <monochrom> | pretty sure geekosaur means Haskell too. |
| 19:25:22 | <geekosaur> | in the versions that distro packages |
| 19:25:46 | → | systemhalted joins (~systemhal@130.51.137.77) |
| 19:26:00 | <monochrom> | My meta-level comment is that there seems to be a lot of "I need to educate all you people" today. |
| 19:26:08 | <geekosaur> | it's just easier for them to go the Setup route instead of building a private hackage server |
| 19:26:14 | <davean> | setting up alternative package ecosystems for haskell is perfectly standard. You don't need to use hackage at all. |
| 19:26:50 | <davean> | I think the most common is a network share |
| 19:27:16 | <geekosaur> | lots of companies use their own hackages of approved packages+versions |
| 19:27:17 | <roconnor> | It seems like cabal build with locally installed packages (ghc-pkg list) if they are available. |
| 19:27:27 | <geekosaur> | whether as a server or as a directory |
| 19:27:29 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:27:32 | <roconnor> | no hackage needed. |
| 19:30:40 | × | systemhalted quits (~systemhal@130.51.137.77) (Ping timeout: 268 seconds) |
| 19:31:01 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 19:32:34 | <davean> | roconnor: right so cabal never needs hackage if you have already downloaded the package tarballs. What is already installed somewhere isn't really a "thing" to cabal past the base set of packages that come with the compiler (and not all of them) |
| 19:37:35 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 260 seconds) |
| 19:38:51 | → | `2jt joins (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) |
| 19:43:22 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 19:43:57 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:45:12 | → | libertyprime joins (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) |
| 19:48:42 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:50:09 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 19:51:06 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 19:51:10 | <EvanR> | speaking of which, is the arch linux situation resolved yet, or was there ever one or |
| 19:52:31 | <davean> | No, its not resolved. They want the thing they want and what they want doesn't make much sense. |
| 19:56:51 | <roconnor> | I think to register a package I need to run cabal install, but cabal install seems to want to rebuild my package (and it's failing due to some issue with my C dependencies that isn't a problem with cabal build). |
| 19:58:25 | <davean> | you don't really install packages |
| 19:58:43 | <roconnor> | how do I register cabal built packages with ghc? |
| 19:58:59 | <davean> | you can but you almost definately don't want to |
| 19:59:08 | <sclv> | `setup.hs install` |
| 19:59:19 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 19:59:28 | <sclv> | if you're using the setup path |
| 19:59:56 | <roconnor> | sclv: I'm trying to use cabal instead of setup becuase Setup.hs haddock is broken with backpack projects. |
| 20:00:13 | <sclv> | does v1-build work? |
| 20:00:22 | <davean> | That won't affect cabal build for other project for example though, about the only thing it will affect is bare "ghci" |
| 20:00:50 | <roconnor> | right, bare ghci. |
| 20:00:56 | <sclv> | if its just v2-build then registering v2-build built packages in the standard package db will be rough, and i'm not sure even possible :-/ |
| 20:01:43 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 20:01:50 | <sclv> | v2-install just puts the package in the store and then modifies the global package environment file, it doesn't register it in the ghc pkgdb |
| 20:01:55 | <roconnor> | sclv: I have cabal 3.8.1.0 I don't know if build is doing a v1-build or a v2-build. v1-build maybe? |
| 20:02:01 | <davean> | v2 |
| 20:02:02 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 20:02:03 | <sclv> | that's going to be v2-build by default |
| 20:02:06 | <davean> | v1 is basicly gone |
| 20:02:14 | <sclv> | you can explicitly say v1-build and v1-install and it will do it the v1 way |
| 20:02:29 | <roconnor> | I see. it was using dist instead of new-dist so I thought it would be v1. |
| 20:04:00 | <roconnor> | sclv: really, v2 doesn't support package registration? |
| 20:04:21 | <davean> | roconnor: its against the design but I think it does? I think you need like --lib and ... |
| 20:04:24 | <davean> | soemthing else |
| 20:04:26 | <sclv> | no. it only registers packages in the "store" which is not a normal package database |
| 20:04:28 | <davean> | but it is very much against the design |
| 20:04:52 | <davean> | --package-env ? |
| 20:05:03 | <sclv> | you can try to use ghc-pkg by hand to register the artifacts it has thus built into another package database but... errr.. good luck |
| 20:05:37 | <roconnor> | I mean, all my dependencies are registered. It feels weird that cabal v2 doesn't support registring newly build stuff. |
| 20:05:56 | <davean> | roconnor: it is supposed to create consistent enviroments |
| 20:06:00 | <tomsmeding> | roconnor: wait, it was using 'dist'? v2 commands should definitely use dist-newstyle by default |
| 20:06:01 | <davean> | you can create consistent enviroments with ti |
| 20:06:41 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 20:07:05 | <roconnor> | tomsmeding: Oh it seems I was misreading it. |
| 20:07:21 | <tomsmeding> | roconnor: why do you want to register a package? Is the purpose it being available in plain ghci? Or is the purpose it being available in other packages? Or something else? |
| 20:07:21 | <davean> | roconnor: Why not create a package-env that is how you want it to be? |
| 20:08:06 | <tomsmeding> | (And what do you want to happen when you "register" two different versions of the same package?) |
| 20:08:31 | <roconnor> | tomsmeding: What I'd like to do is build a nix expression that builds with cabal instead of setup because setup haddock is broken for backpack builds (and I'm not optimisitic it will be fixed). |
| 20:08:50 | <davean> | roconnor: ok, but what your proposing is like the opposite of that |
| 20:08:58 | <tomsmeding> | roconnor: is this for an executable or a haskell library? |
| 20:09:01 | <davean> | I pointed you at haskell.nxi above |
| 20:09:09 | <roconnor> | tomsmeding: both. |
| 20:09:14 | <davean> | *haskellnix |
| 20:09:21 | <davean> | *haskell.nix god damn my typing |
| 20:09:54 | <tomsmeding> | hm, ok, you'll need a nix expert, not me; hopefully my questions and your answers were useful for the other people in the conversation :) |
| 20:10:05 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 20:10:17 | <roconnor> | davean: Okay I'll take a closer look. I thought because cabal build was so easy to use from the command line, I could whip up a simple nix expression. |
| 20:10:39 | <davean> | roconnor: you'd have to extract the solver generally speaking, and you can do that. But what you want is NOT registration |
| 20:12:08 | <sclv> | i think that building it with cabal v1-build is likely fine. the only problem is if you need to pass in special hardcoded paths relative to the store, because cabal currently doesn't let you do that (i have a patch in the works but it hasn't landed yet) |
| 20:12:36 | <davean> | sclv: well there is also the purity thing with nix expressions |
| 20:12:51 | <c_wraith> | sclv: did you see that my doc patch for internal libraries was accepted with minimal fuss? |
| 20:12:51 | <roconnor> | cabal v1-haddock is just as broken as setup haddock, which probably isn't too surprising. |
| 20:12:53 | <sclv> | if you assume all your deps are already available, which nix should handle for you, you're ok |
| 20:13:00 | <sclv> | c_wraith: great :-) |
| 20:13:08 | <davean> | sclv: I mean getting the registration out of the nix expression |
| 20:13:17 | <roconnor> | davean: I was looking at the default install phase of Nix @ https://github.com/NixOS/nixpkgs/blob/ba90bab628277d977d3a381e91d4ce0af4ea4f91/pkgs/development/haskell-modules/generic-builder.nix#L502-L506 |
| 20:13:28 | <c_wraith> | Now (well, after the next update) the docs will actually explain what I was doing wrong! |
| 20:13:30 | <roconnor> | it runs Setup register --gen-pkg-config |
| 20:13:35 | <sclv> | davean: i don't understand what you mean -- the artifact will be in a consistent place in dist-newstyle |
| 20:13:59 | <davean> | roconnor: Note that that VERY SPECIFICLY isn't doing a straight install |
| 20:14:17 | <davean> | sclv: I mean that having the registration become relivent outside the nix expression takes setup |
| 20:14:28 | <sclv> | i think setup.hs register is very much a thin wrapper around ghc-pkg and the latter could suffice |
| 20:14:43 | <davean> | sclv: except nix expression builds are isolated from the system |
| 20:14:49 | <davean> | sclv: so nothing will see what it does |
| 20:14:54 | <roconnor> | Though I guess Setup register --gen-pkg-config=... is maybe kinda not a registration. |
| 20:15:10 | <roconnor> | sclv: that would make sense. |
| 20:15:10 | <davean> | roconnor: local packageConfFile="$packageConfDir/${pname}-${version}.conf" |
| 20:15:20 | <davean> | Its making specific stuff for that exact package-version |
| 20:15:27 | <davean> | other stuff gets that file searched |
| 20:15:32 | <davean> | its NOT doing a global install |
| 20:15:36 | <davean> | its making a very specific install |
| 20:16:13 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 20:16:51 | <davean> | if it worked on the *global* database, from the perspective of the nix derivation, there would be *no way to combine nix derivations to get a set of registrations* |
| 20:17:51 | <davean> | from the man page of cabal: |
| 20:17:54 | <davean> | --gen-pkg-config [PKG] |
| 20:17:55 | <davean> | instead of registering, generate a package registration file/directoryyy |
| 20:18:26 | <davean> | We're effectively getting a file SOMETHING ELSE can refer to to make an envirment that includes it |
| 20:18:43 | <sclv> | ah gotcha! |
| 20:18:46 | <davean> | which is very specificly why I was saying I thought you didn't want what you were asking for at the top |
| 20:18:51 | <sclv> | idk if there's a v2 version of that |
| 20:19:15 | <roconnor> | there didn't seem to be any v2 versions of copy and register. |
| 20:19:50 | <davean> | Don't quote me on this, but I think register might just work with v2-built libraries |
| 20:20:10 | <davean> | The registration stuff is the same |
| 20:21:05 | <davean> | sclv: Sorry I wasn't explaining it great |
| 20:22:16 | → | systemhalted joins (~systemhal@130.51.137.77) |
| 20:25:36 | <roconnor> | wow, using cabal v1-register does seem to be promising. Using a depricated feature is a bit unnerving, but perhaps it is good enough for now. |
| 20:26:11 | <roconnor> | OTOH maybe I should be looking at haskell.nix |
| 20:26:13 | <sclv> | if it actually works, we arguably should just keep it around since we don't have a replacement, and its not clear if having one makes sense |
| 20:26:21 | × | systemhalted quits (~systemhal@130.51.137.77) (Read error: Connection reset by peer) |
| 20:26:31 | <dminuoso> | tomsmeding: well no, stateful still needs to be duplicated sadlz. |
| 20:26:46 | <dminuoso> | tomsmeding: but at least for both basic and stateful, we can have a single implementation indeed. |
| 20:27:40 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 20:28:13 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 20:28:21 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Remote host closed the connection) |
| 20:29:29 | <davean> | roconnor: right, it SHOULD work, you know, in principal. |
| 20:29:38 | → | InstX1 joins (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
| 20:31:20 | <davean> | roconnor: you should look at haskell.nix, mostly it has the production grade version of what we've talked about. OTOH, now you know how this ACTUALLY works, so you can fix things properly. |
| 20:31:35 | <davean> | roconnor: and you are on a valuable but less trod pathway |
| 20:31:39 | <davean> | so I'm glad you're using it! |
| 20:31:43 | <roconnor> | does haskell.nix use cabal build? |
| 20:32:22 | <tomsmeding> | dminuoso: oh right, you need stateful still because an STRef state wouldn't backtrack? |
| 20:32:57 | <roconnor> | https://github.com/input-output-hk/haskell.nix/blob/d82e4c0e249e99259c083863e26a35509283f250/builder/haddock-builder.nix#L108 doesn't look promising. |
| 20:33:04 | <dminuoso> | tomsmeding: For one that, and also an unboxed state is likely going to be faster than an STRef |
| 20:33:19 | <tomsmeding> | right |
| 20:33:27 | <dminuoso> | But I have my doubts |
| 20:33:27 | <roconnor> | I think haskell.nix still uses Setup.hs |
| 20:33:42 | <dminuoso> | Like you have pointed out, a single Int# worth of state is not enough for parsing whitespace sensitive things. |
| 20:33:55 | <dminuoso> | At least not for reasonable inputs in programming languages |
| 20:34:39 | × | InstX1 quits (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 260 seconds) |
| 20:34:45 | <dminuoso> | So I dont know how useful it truly is, to me it smells like a lot of baggage dragging along for no real world use |
| 20:34:56 | <roconnor> | All right, I think I'll attempt to make a custom nix derivation using cabal build and cabal v1-register with lots of flags and see how far I can make it. |
| 20:35:09 | <dminuoso> | If you are *that* desperate for cpu cycles you're probably better off writing some cbits |
| 20:35:22 | <tomsmeding> | dminuoso: yeah I think so |
| 20:35:24 | <davean> | roconnor: No ,but it sets up stuff correctly - like generating the dependencies with cabal |
| 20:35:41 | <davean> | roconnor: so its just the build stuff that is a problem in it |
| 20:36:02 | <dminuoso> | tomsmeding: Either way, if we have `State# s` threading through the pure parser, I dont have to care about it. :P |
| 20:36:06 | <davean> | roconnor: you'd just have to override buildPhase I think |
| 20:36:18 | <dminuoso> | (but like you pointed out, backtracking is still a problem) |
| 20:36:18 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 20:36:39 | <dminuoso> | But that we could possibly work around |
| 20:36:40 | <tomsmeding> | dminuoso: yeah a backtracking state is essential for parser state :p |
| 20:36:47 | <tomsmeding> | like whitespace parsing |
| 20:36:57 | <dminuoso> | well, if you cut early before state changes occur its not a big deal |
| 20:37:15 | <dminuoso> | s/cut/backtrack/ |
| 20:37:17 | <tomsmeding> | maybe, but I wouldn't like to have to watch for that |
| 20:37:30 | <dminuoso> | maybe there is a way to do something akin to `bracket` but for backtracking |
| 20:38:06 | <dminuoso> | The only alternative is to thread boxed state through, but duplicating every parser a third time.. I think backpack might be more interesting at that point. |
| 20:38:29 | <tomsmeding> | dminuoso: the hack in the ghc grammar to properly parse layout springs to mind, where I believe there's some long distance backtracking going on (but I may be misremembering) |
| 20:38:36 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 20:39:13 | <dminuoso> | tomsmeding: I mean realistically you will want to cut early *anyway* |
| 20:39:19 | <dminuoso> | because it makes for much better diagnostics |
| 20:39:20 | <tomsmeding> | dminuoso: probably naive suggestion, but it isn't possible to make the additional field a, you know, type parameter? |
| 20:39:28 | <tomsmeding> | and {-# SPECIALIZE #-} the hell out of it |
| 20:39:42 | <tomsmeding> | sure |
| 20:40:21 | <tomsmeding> | but if I'm sure to cut that early always, I can really just rewrite my parser to not backtrack at all |
| 20:40:41 | <dminuoso> | well no there is good reasons not to do that |
| 20:40:42 | <tomsmeding> | because all the backtracking will be extremely local |
| 20:40:43 | <dminuoso> | consider: |
| 20:40:53 | <dminuoso> | say you want to branch behavior based on a keyword |
| 20:41:25 | <tomsmeding> | or perhaps better formulated, not backtrack _in the parser framework_ at all |
| 20:41:55 | <dminuoso> | https://gist.github.com/dminuoso/a73383874e06061c3526049997472f79 |
| 20:42:02 | → | pavonia joins (~user@user/siracusa) |
| 20:42:32 | <dminuoso> | So you can simply `many topStanza` |
| 20:42:53 | <dminuoso> | Of course you can rewrite topStanza as a recursive loop, but you will lose tons of expressivity |
| 20:42:59 | <dminuoso> | And yet this cuts early after just one token |
| 20:43:21 | <tomsmeding> | it will cut after just one token, but before or after the state update? |
| 20:43:24 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 260 seconds) |
| 20:43:30 | <tomsmeding> | indentation updates can happen after every token |
| 20:43:35 | <dminuoso> | Well in this case there is no state update, because its really just the switch |
| 20:43:39 | <dminuoso> | Mmm |
| 20:43:43 | <tomsmeding> | if I parse 'let', I now need to update my state because I'm starting a new layout block |
| 20:43:44 | <dminuoso> | I see what you're getting at |
| 20:43:49 | <tomsmeding> | okay 'let' is a bad example |
| 20:43:53 | <tomsmeding> | the first token after the 'let', rather |
| 20:44:11 | <dminuoso> | Know what really sucks? |
| 20:44:19 | <tomsmeding> | you can architect this to work, but I don't want to need to |
| 20:44:24 | <dminuoso> | That you cant just do boxed/unboxed-polymorphic code. |
| 20:44:33 | <dminuoso> | If we could, this would be entirely trivial |
| 20:44:35 | <tomsmeding> | if I need to think about this, I'd rather just not just parser backtracking at all :p |
| 20:44:40 | <dminuoso> | since you could just set s ~ (##) for non-stateful and be done. |
| 20:44:40 | <tomsmeding> | more transparent |
| 20:44:51 | <dminuoso> | or s ~ Int#, or s ~ YourThing |
| 20:44:52 | <tomsmeding> | hmm |
| 20:45:10 | <tomsmeding> | isn't the thing that you can't make an unboxed field polymorphic? |
| 20:45:33 | <dminuoso> | no you can make it polymorphic, but you can no longer provide binding sites in things like pattern matches |
| 20:45:35 | <tomsmeding> | because different unboxed types have different representations in the heap block |
| 20:45:42 | <dminuoso> | right |
| 20:45:45 | <dminuoso> | roughly that |
| 20:45:45 | <tomsmeding> | how does that even work? :') |
| 20:45:50 | → | euandreh2 joins (~Thunderbi@189.40.77.30) |
| 20:46:07 | <tomsmeding> | how can a data type have a polymorphic unboxed field where the size of that field is potentially even runtime-dependent |
| 20:46:28 | <dminuoso> | Ah no you cant have that |
| 20:46:39 | <dminuoso> | I phrased it poorly, you can have it as a type (say phantom) |
| 20:46:55 | <tomsmeding> | oh right you can have a phantom type variable of unboxed type, sure |
| 20:47:03 | <dminuoso> | Proxy (TYPE r) |
| 20:47:10 | <tomsmeding> | but for phantom type variables levity polymorphism is a thing I thought |
| 20:47:17 | <tomsmeding> | but proxies don't get us anything here :p |
| 20:47:17 | <dminuoso> | Yup |
| 20:47:24 | × | euandreh quits (~Thunderbi@179.214.113.107) (Ping timeout: 256 seconds) |
| 20:47:25 | euandreh2 | is now known as euandreh |
| 20:47:27 | <dminuoso> | To be fair |
| 20:47:31 | <dminuoso> | 21:45:35 tomsmeding | because different unboxed types have different representations in the heap block |
| 20:47:38 | <dminuoso> | I dont think this is a fundamental problem |
| 20:47:46 | <dminuoso> | Its merely that GHC wants to know it fairly early |
| 20:47:58 | <tomsmeding> | one could write a runtime system that can handle that |
| 20:48:02 | <dminuoso> | In principle GHC could just figure out the layout once you instantiate it at a given type |
| 20:48:21 | <tomsmeding> | or, hm |
| 20:48:35 | <dminuoso> | Im not saying it can be easily done, but its definitely not a fundamental problem |
| 20:48:48 | <tomsmeding> | actually indeed, if the unboxed polymorphic type parameters are all monomorphic, you should be able to do all the usual things to a heap object |
| 20:49:09 | <tomsmeding> | one just has to reject higher-rank types with explicitly polymorphic unboxed type variables |
| 20:49:12 | <dminuoso> | tomsmeding: the real problem is still polymorphic code. |
| 20:49:16 | <dminuoso> | not just higher rank |
| 20:49:19 | <dminuoso> | even rank 1 |
| 20:49:29 | <tomsmeding> | inline all the things |
| 20:49:32 | <tomsmeding> | not fundamental |
| 20:49:33 | <dminuoso> | Consider something as mundane as: |
| 20:49:45 | <tomsmeding> | super inconvenient and probably non-optimal, sure |
| 20:49:56 | <tomsmeding> | but at least you can SPECIALIZE your way out of that |
| 20:50:07 | <dminuoso> | `foo :: Maybe (a :: TYPE r) -> ...` |
| 20:50:16 | <dminuoso> | and export that in a module |
| 20:50:20 | <dminuoso> | GHC must provide code that works for that. |
| 20:50:37 | <tomsmeding> | ghc could just not, right? Only provide an inlineable Core snippet |
| 20:50:56 | <tomsmeding> | but not sure whether this is a useful discussion to have, since ghc doesn't |
| 20:51:24 | <dminuoso> | I think backpack would be a solution to all of this |
| 20:51:39 | tomsmeding | gets nervous |
| 20:51:41 | <dminuoso> | tomsmeding: or something more tight as SPECIALIZE |
| 20:52:05 | <dminuoso> | Something like SPECIALIZE_EXACTLY, where code is instantiated for each pragma, and only exactly that. |
| 20:52:17 | <tomsmeding> | and no polymorphic code generated? |
| 20:52:19 | <dminuoso> | And if you try and run it with something else, get a bottom thrown in your face |
| 20:52:22 | <dminuoso> | Right |
| 20:52:27 | <tomsmeding> | right |
| 20:52:29 | <dminuoso> | (Or well I guess GHC could catch that) |
| 20:52:44 | <tomsmeding> | that's what I was trying to suggest above |
| 20:52:52 | <dminuoso> | Mmm |
| 20:52:54 | <tomsmeding> | well, not really |
| 20:52:56 | <dminuoso> | Couldnt we use a typeclass for this? |
| 20:53:02 | → | EvanR_ joins (~EvanR@user/evanr) |
| 20:53:02 | <dminuoso> | with an associated type synonym? |
| 20:53:06 | <dminuoso> | something along the lines of |
| 20:54:29 | × | `2jt quits (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 20:55:20 | <dminuoso> | class Thing a where type TYP a :: Type; po :: (a :: TYP a) -> Int -> Int |
| 20:55:31 | <dminuoso> | % :set -XTypeFamilies |
| 20:55:31 | <yahb2> | <no output> |
| 20:55:37 | <dminuoso> | % :set -XPolyKinds |
| 20:55:37 | <yahb2> | <no output> |
| 20:55:40 | <dminuoso> | % class Thing a where type TYP a :: Type; po :: (a :: TYP a) -> Int -> Int |
| 20:55:40 | <yahb2> | <interactive>:150:49: error: ; • Expected a type, but ‘a :: TYP a’ has kind ‘TYP a’ ; • In the type signature: po :: (a :: TYP a) -> Int -> Int ; In the class declaration for ‘Thing’ |
| 20:55:42 | <dminuoso> | Mmmm |
| 20:55:47 | <dminuoso> | % :set -XTypeInType |
| 20:55:47 | <yahb2> | <no output> |
| 20:55:50 | <dminuoso> | % class Thing a where type TYP a :: Type; po :: (a :: TYP a) -> Int -> Int |
| 20:55:50 | <yahb2> | <interactive>:154:49: error: ; • Expected a type, but ‘a :: TYP a’ has kind ‘TYP a’ ; • In the type signature: po :: (a :: TYP a) -> Int -> Int ; In the class declaration for ‘Thing’ |
| 20:55:54 | × | EvanR quits (~EvanR@user/evanr) (Ping timeout: 256 seconds) |
| 20:55:58 | <dminuoso> | Oh right, I remember that extension doesnt do anything |
| 20:56:12 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 20:56:44 | <dminuoso> | % class Thing a r where type TYP a :: TYPE r; po :: (a :: TYP a) -> Int -> Int |
| 20:56:45 | <yahb2> | <interactive>:156:53: error: ; • Expected a type, but ‘a :: TYP a’ has kind ‘TYP a’ ; • In the type signature: po :: (a :: TYP a) -> Int -> Int ; In the class declaration for ‘Thing’ |
| 20:59:26 | <tomsmeding> | dminuoso: I think all actual function argument types must have kind either LiftedType or UnliftedType |
| 20:59:47 | <tomsmeding> | since this might be anything (depending on the instance), including other kinds that are nonsensical in that position, ghc rejects it? |
| 21:00:21 | <tomsmeding> | % class ThingNotRelly a where type TYP a :: Type; po :: (a :: UnliftedType) -> Int -> Int |
| 21:00:21 | <yahb2> | <no output> |
| 21:00:25 | <tomsmeding> | that works fine, for example |
| 21:00:42 | <tomsmeding> | % class ThingNotRelly a where type TYP a :: Type; po :: (a :: (UnliftedType :: Type)) -> Int -> Int |
| 21:00:42 | <yahb2> | <no output> |
| 21:00:45 | <tomsmeding> | look at that |
| 21:01:00 | <tomsmeding> | oh s/Relly/Really/ |
| 21:01:55 | <tomsmeding> | % :k (Type :: (Type :: (Type :: (Type :: Type)))) |
| 21:01:55 | <yahb2> | (Type :: (Type :: (Type :: (Type :: Type)))) :: Type |
| 21:02:35 | <dminuoso> | oh hold on, we dont even need a method. |
| 21:02:42 | <dminuoso> | % class Thing a r where type TYP a :: TYPE r |
| 21:02:42 | <yahb2> | <no output> |
| 21:02:59 | <dminuoso> | % instance Thing Int LiftedRep |
| 21:03:00 | <yahb2> | <interactive>:166:1: warning: [-Wmissing-methods] ; • No explicit associated type or default declaration for ‘TYP’ ; • In the instance declaration for ‘Thing Int LiftedRep’ |
| 21:03:11 | <dminuoso> | Mmm, maybe even wiuthout the synonym |
| 21:03:22 | <dminuoso> | % class Thing a r | a -> r |
| 21:03:23 | <yahb2> | <interactive>:168:1: error: ; • Fundeps in class ‘Thing’ ; (Enable FunctionalDependencies to allow fundeps) ; • In the class declaration for ‘Thing’ |
| 21:03:30 | <dminuoso> | % :set -XFunctionalDependencies |
| 21:03:30 | <yahb2> | <no output> |
| 21:03:33 | <dminuoso> | % class Thing a r | a -> r |
| 21:03:33 | <yahb2> | <no output> |
| 21:03:45 | <dminuoso> | % instance Thing Int (TYPE LiftedRep) |
| 21:03:45 | <yahb2> | <no output> |
| 21:03:56 | <dminuoso> | % import GHC.Int |
| 21:03:56 | <yahb2> | <no output> |
| 21:04:05 | <dminuoso> | % :set -XMagicHash |
| 21:04:05 | <yahb2> | <no output> |
| 21:04:06 | <dminuoso> | % instance Thing Int# (TYPE UnliftedRep) |
| 21:04:07 | <yahb2> | <no output> |
| 21:04:24 | <dminuoso> | % f :: Thing a b => (a :: b) -> Int; f = undefined |
| 21:04:24 | <yahb2> | <interactive>:182:20: error: ; • Expected a type, but ‘a :: b’ has kind ‘b1’ ; ‘b1’ is a rigid type variable bound by ; the type signature for ‘f’ ; at <interactive>:182:1... |
| 21:04:31 | <dminuoso> | tomsmeding: Gah I want this. :( |
| 21:04:49 | <tomsmeding> | isn't this the precise same issue as with the 'po' method? |
| 21:04:54 | <tomsmeding> | the type class is open |
| 21:05:21 | <tomsmeding> | someone might write an instance 'instance Thing Double Bool' and what would f do |
| 21:05:43 | <dminuoso> | Not mind. |
| 21:05:51 | <dminuoso> | But you couldnt instantiate f at those. |
| 21:05:58 | <dminuoso> | at least thats my expectancy |
| 21:06:13 | <tomsmeding> | what if you're in a polymorphic context ;) |
| 21:06:27 | <tomsmeding> | what would the dictionary even contain here |
| 21:06:30 | <dminuoso> | uh okay. |
| 21:06:51 | <dminuoso> | maybe tyfams can help here? |
| 21:07:25 | <tomsmeding> | fundamentally you need >=two different generated assembly versions for f |
| 21:07:35 | <tomsmeding> | one for lifted, and one for each unlifted type |
| 21:07:41 | <dminuoso> | Yeah I get what you're saying. |
| 21:07:46 | <tomsmeding> | some type level thing isn't going to do that |
| 21:08:00 | <tomsmeding> | no matter how much we'd want that :p |
| 21:08:04 | <dminuoso> | I expect to find something that type checks, and then magically conjures up differnet machine code out of thin air |
| 21:08:17 | <dminuoso> | because clearly if it type checks, its gotta do the right thing |
| 21:08:21 | <tomsmeding> | who wants a JITted haskell |
| 21:09:45 | <tomsmeding> | dminuoso: this though https://github.com/ekmett/unboxed/blob/main/internal/Unboxed/Internal/Class.hs |
| 21:10:14 | <dminuoso> | huh |
| 21:10:23 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
| 21:10:44 | <tomsmeding> | I was looking through this repo while we were discussing because I was pretty sure this kind of magic was in there |
| 21:10:56 | <dminuoso> | I actually do know this heh |
| 21:11:30 | <tomsmeding> | oh hey |
| 21:11:39 | <dminuoso> | that FunctorRep typeclass looks interesting |
| 21:11:46 | <tomsmeding> | isn't the point here that you cannot do (a :: k) but you can do (a :: TYPE k) |
| 21:11:50 | <dminuoso> | Its sort of what I was trying to build |
| 21:12:03 | <tomsmeding> | because the types that hold values are precisely those that are of the form TYPE r |
| 21:12:24 | <dminuoso> | Ill have to do some thinking how this could be plugged into flatparse |
| 21:12:27 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 21:12:54 | <dminuoso> | the main problem is, you would have to write *all* parser combinators as part of a singular typeclass |
| 21:12:58 | <dminuoso> | because they all go like |
| 21:13:27 | <tomsmeding> | all the basic ones, in any case |
| 21:13:31 | <dminuoso> | word8 = Parser $ \fp r eob s n -> ... |
| 21:13:34 | <tomsmeding> | or also derived ones? |
| 21:13:59 | <dminuoso> | Which means every single combinator must live in this typeclass, because of the binding site of `n` |
| 21:14:08 | <dminuoso> | even derived ones. |
| 21:14:12 | <dminuoso> | so its actually fixewd |
| 21:14:16 | <dminuoso> | (well you could subclass I suppose) |
| 21:14:39 | <tomsmeding> | % class Thing r (a :: TYPE r) where po :: a -> Int -> Int |
| 21:14:39 | <yahb2> | <no output> |
| 21:14:43 | <tomsmeding> | just for completeness |
| 21:14:57 | <tomsmeding> | note that the type parameters of Thing cannot be swapped! |
| 21:15:00 | <dminuoso> | % instance Thing LiftedRep Int |
| 21:15:01 | <yahb2> | <interactive>:186:10: warning: [-Wmissing-methods] ; • No explicit implementation for ; ‘po’ ; • In the instance declaration for ‘Thing LiftedRep Int’ |
| 21:15:03 | <dminuoso> | % instance Thing LiftedRep Int# |
| 21:15:03 | <yahb2> | <interactive>:188:26: error: ; • Expecting a lifted type, but ‘Int#’ is unlifted ; • In the second argument of ‘Thing’, namely ‘Int#’ ; In the instance declaration for ‘Thing LiftedRe... |
| 21:15:05 | <dminuoso> | Nice |
| 21:15:26 | <tomsmeding> | % instance Thing UnliftedRep Int# |
| 21:15:26 | <yahb2> | <interactive>:190:28: error: ; • Couldn't match kind ‘'IntRep’ with ‘'BoxedRep 'Unlifted’ ; Expected kind ‘TYPE UnliftedRep’, ; but ‘Int#’ has kind ‘TYPE 'IntRep’ ; • In the s... |
| 21:15:34 | <tomsmeding> | % instance Thing IntRep Int# |
| 21:15:34 | <yahb2> | <interactive>:192:10: warning: [-Wmissing-methods] ; • No explicit implementation for ; ‘po’ ; • In the instance declaration for ‘Thing 'IntRep Int#’ |
| 21:15:39 | <tomsmeding> | there we go |
| 21:15:55 | <dminuoso> | Maybe.. |
| 21:15:57 | <dminuoso> | Mmm. |
| 21:16:26 | <dminuoso> | I have a bunch of really poor ideas |
| 21:16:45 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 21:16:51 | <dminuoso> | Thinking whether we could just pass a Word# through, and unsafeCoerce# it into back |
| 21:16:57 | <dminuoso> | And get polymorphism this way |
| 21:17:02 | <tomsmeding> | into back? |
| 21:17:05 | <dminuoso> | or hold on! |
| 21:17:08 | <tomsmeding> | into what, a boxed pointer? |
| 21:17:11 | <dminuoso> | Yes. |
| 21:17:13 | <tomsmeding> | that ain't gonna fly with the gc |
| 21:17:18 | <dminuoso> | I know, hence "poor ideas" |
| 21:17:23 | <tomsmeding> | ::p |
| 21:17:25 | <tomsmeding> | * :p |
| 21:17:45 | <dminuoso> | well or we just remand the user only supply pinned objects. |
| 21:17:48 | <dminuoso> | :p |
| 21:17:53 | <dminuoso> | "if you dont, this will crash very horribly" |
| 21:18:30 | <tomsmeding> | doesn't pinning objects have a performance penalty? |
| 21:19:08 | <geekosaur> | just a GC penalty I think |
| 21:19:09 | <dminuoso> | can you please not shoot down an idea that actually work with performance worries? |
| 21:19:11 | <dminuoso> | :p |
| 21:19:19 | <tomsmeding> | lol |
| 21:19:24 | <money> | Okay |
| 21:19:27 | <geekosaur> | since GC can't use memory optimally any more |
| 21:19:34 | <tomsmeding> | ah |
| 21:21:01 | <dminuoso> | tomsmeding: Ultimately this problem arises because in monadic parsers there is no barrier between the grammatic parsing and the parser action. |
| 21:21:27 | <dminuoso> | If we did this in a traditional parser generator like happy, the backtracking happens on the BNF specification, but not after monadic actions occur. |
| 21:21:47 | <tomsmeding> | right |
| 21:22:28 | <dminuoso> | I mean it is cute that with a `ParserT (State Int)` you get to freely intermingle them |
| 21:23:26 | <dminuoso> | Mmm Ill get some rest and think about it tomorrow. Good night |
| 21:24:05 | <tomsmeding> | good night :) |
| 21:26:52 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 21:26:53 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Remote host closed the connection) |
| 21:33:28 | → | xilo joins (~yourname@84.32.165.17) |
| 21:34:16 | <tomsmeding> | dminuoso: seems to work https://paste.tomsmeding.com/ySfezf4q |
| 21:36:29 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 21:36:49 | → | gmg joins (~user@user/gehmehgeh) |
| 21:39:44 | × | AdonisExberger quits (~Adonis-Ex@176.54.36.182) (Quit: Going offline, see ya! (www.adiirc.com)) |
| 21:40:15 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 21:43:16 | <Xeroine> | Data constructors and values are interchangeable/the same thing, right? Is that the case always? |
| 21:43:33 | → | irrgit__ joins (~irrgit@89.47.234.74) |
| 21:44:58 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 21:45:04 | <geekosaur> | if you find yourself playing with Core at some point you'll discover that partially applied data constructors are handled a little differently, but in surface Haskell they are indistinguishable |
| 21:46:01 | <EvanR_> | Xeroine, hold the phone |
| 21:46:08 | <c_wraith> | Data constructors are values, but not all values are data constructors |
| 21:46:12 | EvanR_ | is now known as EvanR |
| 21:46:14 | <EvanR> | yeah, that |
| 21:46:32 | <EvanR> | functions don't have a data constructor in haskell |
| 21:46:54 | × | irrgit_ quits (~irrgit@89.47.234.74) (Ping timeout: 256 seconds) |
| 21:47:18 | <geekosaur> | also underneath a literal number isn't a data constructor, it's application of a function. but haskell tries hard to pretend they are |
| 21:47:49 | → | irrgit_ joins (~irrgit@89.47.234.74) |
| 21:48:56 | <Xeroine> | geekosaur: isn't a literal number just a nullary data constructor which is a constant which is a value? |
| 21:48:58 | <c_wraith> | I'd even argue that `Just' is a data constructor, but `Just ()` isn't. Data constructors are things that can be atoms of a pattern match. |
| 21:49:22 | <geekosaur> | Xeroine, no. literal numbers are handled specially |
| 21:49:33 | <geekosaur> | :t 5 |
| 21:49:34 | <lambdabot> | Num p => p |
| 21:49:44 | × | irrgit__ quits (~irrgit@89.47.234.74) (Ping timeout: 256 seconds) |
| 21:50:09 | <Xeroine> | it has a Num class type constraint, does that mean it's not a data constructor? |
| 21:50:19 | <geekosaur> | underneath, this is compiled as `fromInteger <hardcoded Integer literal>` |
| 21:50:46 | <geekosaur> | floating point literals do something similar but using `fromRational` |
| 21:50:51 | <geekosaur> | :t 5.0 |
| 21:50:52 | <lambdabot> | Fractional p => p |
| 21:50:56 | <Xeroine> | oh right I've heard of fromInteger but didn't read much what it does |
| 21:52:34 | <geekosaur> | that said, a Char literal is compiled to `C# <ordinal of character>#` so it is a normal data constructor |
| 21:55:47 | <geekosaur> | (the #s there require the MagicHash extension, otherwise # is an ordinary operator character) |
| 21:58:00 | <Xeroine> | what does the :% operator do? it's used a lot in https://hackage.haskell.org/package/base-4.9.0.0/docs/src/GHC.Real.html#fromIntegral and in the fromInteger definition as well |
| 21:58:48 | <mauke> | data Ratio a = !a :% !a deriving (Eq) |
| 21:58:51 | <geekosaur> | it's the raw constructor for a Rational |
| 21:58:53 | <mauke> | data constructor |
| 21:59:00 | <EvanR> | think of Functional p => p as like actually a function taking a dictionary, handled behind the scenes |
| 21:59:21 | <EvanR> | nothing happens until something provides the implementation of Functional p |
| 21:59:28 | <EvanR> | er Fractional |
| 22:03:22 | <EvanR> | for instance, how to convert 5.0 to p |
| 22:05:53 | → | nate4 joins (~nate@98.45.169.16) |
| 22:09:23 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 22:10:10 | <Xeroine> | geekosaur: does raw mean it's somehow special? I saw "data Ratio a = !a :% !a deriving (Eq)" as well but I don't understand :% in that context either |
| 22:10:42 | × | nate4 quits (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
| 22:11:06 | <geekosaur> | that just defines :% as an infix data constructor (all infix data constructors must start with a colon) |
| 22:11:40 | <geekosaur> | it's "raw" because Ratio wants to have normalized values, whereas a data constructor takes what it's given |
| 22:12:18 | <geekosaur> | so we actually construct Rationals with % instead of :%, and % normalizes the values before using :% to create the actual value |
| 22:12:32 | <geekosaur> | (% is therefore called a "smart constructor") |
| 22:12:32 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) (Remote host closed the connection) |
| 22:12:38 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Client Quit) |
| 22:12:58 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 22:13:29 | × | mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 268 seconds) |
| 22:14:24 | <Xeroine> | ah okay |
| 22:14:40 | <geekosaur> | the "must start with a colon" thing is because of pattern matching, which has to tell the difference between constructors and variables. for normal constructors it uses case, which is why all normal data constructors start with uppercase |
| 22:14:56 | <geekosaur> | but there's no such thing as an "uppercase symbol", so the prefix colon is used instead |
| 22:15:44 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:89a4:6d1:4909:326f) |
| 22:17:56 | × | michalz quits (~michalz@185.246.207.203) (Remote host closed the connection) |
| 22:20:54 | × | chomwitt quits (~chomwitt@2a02:587:7a0a:c00:1ac0:4dff:fedb:a3f1) (Ping timeout: 256 seconds) |
| 22:22:32 | → | chromoblob joins (~user@37.113.164.122) |
| 22:27:03 | × | euandreh quits (~Thunderbi@189.40.77.30) (Ping timeout: 268 seconds) |
| 22:27:09 | → | euandreh2 joins (~Thunderbi@179.214.113.107) |
| 22:28:50 | × | accord quits (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 22:29:26 | euandreh2 | is now known as euandreh |
| 22:30:58 | × | libertyprime quits (~libertypr@118-92-78-165.dsl.dyn.ihug.co.nz) (Quit: leaving) |
| 22:32:35 | × | chromoblob quits (~user@37.113.164.122) (Ping timeout: 268 seconds) |
| 22:33:56 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 22:38:15 | → | Guest99 joins (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) |
| 22:38:27 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:38:50 | <Guest99> | Hi. |
| 22:40:38 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:41:59 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 22:46:27 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1) |
| 22:47:34 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 22:48:20 | <sclv> | let me mention because someone asked about arch and dynamic stuff earlier -- this pending pr will hopefully make the dynamic-only story supported a bit better in cabal, although i still don't like that story :-P https://github.com/haskell/cabal/pull/8461 |
| 22:48:23 | × | Guest99 quits (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) (Quit: Client closed) |
| 22:48:26 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 22:49:22 | → | Guest99 joins (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) |
| 22:50:34 | → | titibandit joins (~titibandi@xdsl-87-78-52-100.nc.de) |
| 22:50:45 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 22:50:52 | <sclv> | EvanR: ^^ |
| 22:51:47 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:54:34 | <Guest99> | I'm learning Agda by trying to imitate the Haskell code from the book "Discrete Mathematics Using a Computer". I'm trying to implement list comprehension in Agda and I would like to find the source code for the Haskell (..) operator. I haven't been able to find it anywhere. Not Hoogle, not Google, not the GHC docs, not in the Haskell docs! I'm sure |
| 22:54:34 | <Guest99> | I'm just missing something obvious. Would you please be so kind as to point me to the source code for the (..) operator, i.e., [0..3] returns [1,2,3] ? Thanks! |
| 22:55:17 | <geekosaur> | it's not an operator, it's special syntax. [x .. y] expands to `enumFromTo x y` |
| 22:55:17 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 22:56:02 | <geekosaur> | `[x, y .. z]` is `enumFromThenTo x y z` |
| 22:56:16 | <geekosaur> | `[x ..]` is `enumFrom x` |
| 22:56:59 | × | Guest99 quits (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) (Quit: Client closed) |
| 22:57:23 | <geekosaur> | all the list-associated syntax in Haskell is hardwired into the compiler; a list "natively" uses the (:) constructor and `[]` for end-of-list |
| 22:57:40 | <geekosaur> | didn't stick around long, did they? sigh |
| 22:58:25 | → | Guest99 joins (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) |
| 23:01:00 | <Guest99> | @geekosaur I knew I was missing the obvious! 🙄 Thank you! 👍 |
| 23:01:01 | <lambdabot> | Unknown command, try @list |
| 23:02:29 | × | titibandit quits (~titibandi@xdsl-87-78-52-100.nc.de) (Quit: Leaving.) |
| 23:02:55 | × | Guest99 quits (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) (Client Quit) |
| 23:03:05 | → | Guest99 joins (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) |
| 23:03:07 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:03:08 | <roconnor> | sclv: davean: I was wrong v1-register requires dist to be build, i.e. v1-build to have run. |
| 23:04:38 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 23:04:51 | <roconnor> | and even if it did build, it registers the target install location, but there is no command to move a build from dist-newstyle to the install location (AFAIK). |
| 23:11:48 | × | tomku quits (~tomku@user/tomku) (Ping timeout: 248 seconds) |
| 23:14:57 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 23:21:50 | × | Kaiepi quits (~Kaiepi@108.175.84.104) (Ping timeout: 240 seconds) |
| 23:23:54 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:27:00 | → | titibandit joins (~titibandi@xdsl-87-78-52-100.nc.de) |
| 23:28:25 | → | elevenkb joins (~elevenkb@105.184.125.168) |
| 23:38:20 | → | tomku joins (~tomku@user/tomku) |
| 23:38:42 | → | poscat0x04 joins (~poscat@2408:8206:4823:fd6f:98ab:5c38:136c:5932) |
| 23:39:48 | × | poscat quits (~poscat@114.245.106.84) (Ping timeout: 260 seconds) |
| 23:40:45 | <roconnor> | and running ghc-pkg register by hand doesn't seem possible because I need to generateRegistrationInfo first. |
| 23:40:58 | × | Guest99 quits (~Guest99@2607:fb91:30b:a443:3fd:394e:ecd:5968) (Ping timeout: 260 seconds) |
| 23:41:54 | × | m5zs7k quits (aquares@web10.mydevil.net) (Ping timeout: 260 seconds) |
| 23:42:31 | → | m5zs7k joins (aquares@web10.mydevil.net) |
| 23:42:59 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:43:02 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:44:54 | <roconnor> | I guess registering packages wtih cabal v2 just isn't going to be possible. I don't quite understand why the new cabal is deficient in this way. |
| 23:45:30 | <roconnor> | I guess I just don't understand how it is supposed to be used. |
| 23:45:36 | <sclv> | the intention is that everyone who needs it can use the setup.hs workflow |
| 23:45:59 | <sclv> | personally i don't know if i agree with that intention, but that's the reasoning |
| 23:46:18 | <roconnor> | oh I see. |
| 23:46:20 | <sclv> | but that certainly underlines that the setup.hs haddock path with backpack _must_ be fixed |
| 23:46:59 | <roconnor> | yeah, I was under the impression that it would simply never be fixed because it is a depricated build method. |
| 23:47:06 | <sclv> | and also i'm extremely open to trying to improve the v2 story with stuff like registration -- as i mentioned earlier i did get in a patch that helped with some v2 build stuff already for package managers dealing with v2-built _executables_ |
| 23:47:10 | <roconnor> | but it sounds like it isn't depricated. |
| 23:47:22 | <sclv> | setup.hs is not at all deprecated -- its the "raw truth" underlying cabal v1 and v2 both |
| 23:47:31 | <sclv> | its only cabal v1 which is deprecated |
| 23:48:08 | <roconnor> | I'm a bit surprised that cabal v2-haddock works so well with setup haddock being broken. |
| 23:48:12 | <sclv> | my view is that v2-build should also allow access to low level stuff like generating conf files, etc. however other people have argued the other way |
| 23:49:13 | <roconnor> | All right. I think next week I'll go back to using setup to build but see if I can replace haddockPhase with a call to cabal haddock. |
| 23:49:29 | <sclv> | fgaz' comments here express the view i'm trying to summarize https://github.com/haskell/cabal/issues/3586#issuecomment-1266463088 |
| 23:49:36 | <sclv> | sorry this is so painful for you! |
| 23:50:00 | <roconnor> | I kinda chalk it up to using backpack in the first place. |
| 23:50:08 | <sclv> | is there a ticket filed against the cabal repo for Cabal haddock not working with backpack? |
| 23:50:09 | <roconnor> | It is just too new. |
| 23:50:15 | × | acidjnk quits (~acidjnk@p200300d6e7137a305cc03b10fd7a2523.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 23:50:29 | <sclv> | its sadly not that new, just hasn't had enough adapters yet. we need people on the bleeding edge otherwise things will never get fixed |
| 23:50:40 | <geekosaur> | ^ |
| 23:50:51 | <geekosaur> | it's older than, say, linear haskell |
| 23:50:56 | <geekosaur> | but people are using that |
| 23:50:58 | <sclv> | if there's no ticket for the underlying issue you'd like to get fixed, please please file one! |
| 23:51:10 | <roconnor> | So I was following up on my Aug 6th comments in https://github.com/haskell/cabal/issues/7987 |
| 23:51:33 | <roconnor> | Yes I sould say that issue is the issue. |
| 23:51:37 | <geekosaur> | sadly there's something of a doc shortage re backpack, plus stack doesn't support it yet which locks out a goodly chunk of the potential userbase |
| 23:51:48 | <roconnor> | I guess I haven't tried ghc 9.4. |
| 23:52:43 | <sclv> | ok thanks for the link roconnor. i added some attention flags and milestoned it to try to keep it in the air |
| 23:52:56 | <roconnor> | I can give ghc 9.4 a try next week, but I would guess it is still broken. |
| 23:53:33 | <roconnor> | btw, the haddock generated files have been broken for a while. Now it is also crashing. |
| 23:53:49 | <roconnor> | but the cabal haddock generated files seem just perfect! |
| 23:53:59 | <sclv> | that doesn't mean someone will get to it anytime soon, but at least its something we can try to get eyes on |
| 23:54:59 | <sclv> | i think what's hapening is v2-haddock already has to have a better sense of directory structure etc because it already handles multiple components (packages). the underlying setup.hs mechanism has this hard one-component logic built in. but that's just a wild ass guess |
| 23:59:51 | × | zeenk quits (~zeenk@2a02:2f04:a208:3600::7fe) (Quit: Konversation terminated!) |
All times are in UTC on 2022-11-18.