2022-12-01 00:00:41 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-12-01 00:01:07 +0100 | <pavonia> | The famous off-by-4-billion-error |
2022-12-01 00:01:30 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2022-12-01 00:05:18 +0100 | fostyr | (~fostyr@2607:fea8:c1e2:100::f7a3) |
2022-12-01 00:05:56 +0100 | fostyr | (~fostyr@2607:fea8:c1e2:100::f7a3) (Client Quit) |
2022-12-01 00:07:02 +0100 | <dminuoso> | sammelweis: Look into https://hackage.haskell.org/package/validated-literals |
2022-12-01 00:09:55 +0100 | beteigeuze | (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
2022-12-01 00:10:21 +0100 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
2022-12-01 00:11:39 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
2022-12-01 00:13:10 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2022-12-01 00:14:00 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 00:16:42 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2022-12-01 00:17:03 +0100 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-12-01 00:23:54 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 00:28:43 +0100 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
2022-12-01 00:30:33 +0100 | Neuromancer | (~Neuromanc@user/neuromancer) (Ping timeout: 260 seconds) |
2022-12-01 00:31:55 +0100 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
2022-12-01 00:36:11 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 00:39:12 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 00:40:49 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 260 seconds) |
2022-12-01 00:42:04 +0100 | zant | (~zant@62.214.20.26) |
2022-12-01 00:42:39 +0100 | dora | (~dora@2a02:a31d:a23f:6080:4001:81e:31d1:48bc) |
2022-12-01 00:44:51 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:9d12:9fcd:7976:e137) (Ping timeout: 252 seconds) |
2022-12-01 00:45:45 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-12-01 00:47:00 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 260 seconds) |
2022-12-01 00:49:57 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 00:51:30 +0100 | ub | (~Thunderbi@p200300ecdf264e704707c189dcb0868f.dip0.t-ipconnect.de) |
2022-12-01 00:51:30 +0100 | ubert | (~Thunderbi@p200300ecdf264ec09cb76a5007726dbb.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 00:51:30 +0100 | ub | ubert |
2022-12-01 00:51:48 +0100 | waleee | (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 248 seconds) |
2022-12-01 00:54:13 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-12-01 00:55:10 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
2022-12-01 01:01:58 +0100 | LemanR | (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
2022-12-01 01:02:43 +0100 | causal | (~user@50.35.83.177) |
2022-12-01 01:04:08 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 246 seconds) |
2022-12-01 01:06:08 +0100 | dora | (~dora@2a02:a31d:a23f:6080:4001:81e:31d1:48bc) (Quit: Ping timeout (120 seconds)) |
2022-12-01 01:08:22 +0100 | oldsk00l | (~znc@ec2-3-75-221-101.eu-central-1.compute.amazonaws.com) (Remote host closed the connection) |
2022-12-01 01:10:52 +0100 | zzz | yin |
2022-12-01 01:14:13 +0100 | dora | (~dora@2a02:a31d:a23f:6080:4001:81e:31d1:48bc) |
2022-12-01 01:17:19 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 01:21:20 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 246 seconds) |
2022-12-01 01:24:26 +0100 | tv | (~tv@user/tv) (Ping timeout: 268 seconds) |
2022-12-01 01:28:53 +0100 | dora | (~dora@2a02:a31d:a23f:6080:4001:81e:31d1:48bc) (Ping timeout: 260 seconds) |
2022-12-01 01:29:02 +0100 | <talismanick> | Are there mature libraries for constraint-based GUI layout? |
2022-12-01 01:35:24 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 01:36:57 +0100 | brettgilio | (a35ba67324@2604:bf00:561:2000::260) (Remote host closed the connection) |
2022-12-01 01:37:40 +0100 | tv | (~tv@user/tv) |
2022-12-01 01:39:42 +0100 | <Guest75> | I'm a beginner anyway, but what does that mean constraint-based (in a sense of UI)? Is that something automated? |
2022-12-01 01:39:51 +0100 | acidjnk | (~acidjnk@p200300d6e7137a610c26e0714ef85554.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-12-01 01:41:05 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-01 01:44:10 +0100 | <hpc> | it's kind of like css, you say what things are next to each other, what things can be in what size ranges, etc |
2022-12-01 01:44:21 +0100 | <hpc> | and everything's position gets calculated based on those constraints, window size, dpi, etc |
2022-12-01 01:48:43 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
2022-12-01 01:51:20 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 01:55:25 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 01:56:18 +0100 | Guest75 | (~Guest75@178.141.153.191) (Ping timeout: 260 seconds) |
2022-12-01 01:57:14 +0100 | tv | (~tv@user/tv) (Ping timeout: 256 seconds) |
2022-12-01 01:57:38 +0100 | tv | (~tv@user/tv) |
2022-12-01 02:05:56 +0100 | ryanbooker | (uid4340@id-4340.hampstead.irccloud.com) |
2022-12-01 02:06:43 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2022-12-01 02:09:18 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 02:11:06 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-12-01 02:13:40 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-01 02:13:40 +0100 | Kaipei | (~Kaiepi@108.175.84.104) (Ping timeout: 256 seconds) |
2022-12-01 02:14:44 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
2022-12-01 02:16:14 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-01 02:16:14 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-01 02:16:15 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-01 02:16:20 +0100 | wroathe | (~wroathe@user/wroathe) (Client Quit) |
2022-12-01 02:16:37 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-01 02:16:38 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-01 02:16:38 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-01 02:17:13 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-12-01 02:17:25 +0100 | wroathe | (~wroathe@user/wroathe) (Client Quit) |
2022-12-01 02:17:41 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-01 02:17:41 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-01 02:17:41 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-01 02:17:43 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 02:20:28 +0100 | razetime | (~quassel@49.207.211.219) |
2022-12-01 02:24:38 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
2022-12-01 02:25:28 +0100 | xff0x | (~xff0x@2405:6580:b080:900:71e1:3426:76c:30b0) (Ping timeout: 260 seconds) |
2022-12-01 02:26:42 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::fc20) (Ping timeout: 256 seconds) |
2022-12-01 02:27:33 +0100 | off^ | (~off@76.145.185.103) |
2022-12-01 02:43:26 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 02:45:22 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::fc20) |
2022-12-01 02:47:47 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 246 seconds) |
2022-12-01 02:59:47 +0100 | king_gs | (~Thunderbi@187.201.63.8) |
2022-12-01 03:07:07 +0100 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2022-12-01 03:09:26 +0100 | Lumia | (~Lumia@user/Lumia) |
2022-12-01 03:11:59 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:d078:9921:dcf:5e81) |
2022-12-01 03:14:27 +0100 | Lumia | (~Lumia@user/Lumia) (Ping timeout: 260 seconds) |
2022-12-01 03:16:17 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:d078:9921:dcf:5e81) (Ping timeout: 252 seconds) |
2022-12-01 03:16:56 +0100 | Lumia | (~Lumia@user/Lumia) |
2022-12-01 03:16:57 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
2022-12-01 03:16:59 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 03:17:17 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2022-12-01 03:19:13 +0100 | beteigeuze | (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 252 seconds) |
2022-12-01 03:19:43 +0100 | fr33domlover | (~fr33domlo@towards.vision) (Ping timeout: 260 seconds) |
2022-12-01 03:20:57 +0100 | dextaa | (~DV@user/dextaa) (Quit: Ping timeout (120 seconds)) |
2022-12-01 03:21:21 +0100 | dextaa | (~DV@user/dextaa) |
2022-12-01 03:21:38 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 03:23:07 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-01 03:25:11 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 260 seconds) |
2022-12-01 03:27:46 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-01 03:27:47 +0100 | king_gs | (~Thunderbi@187.201.63.8) (Read error: Connection reset by peer) |
2022-12-01 03:28:01 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-01 03:28:04 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
2022-12-01 03:28:12 +0100 | king_gs | (~Thunderbi@2806:103e:29:86f9:15db:b0e0:45d5:32a8) |
2022-12-01 03:39:09 +0100 | xacktm | (~xacktm@user/xacktm) (Quit: fBNC - https://bnc4free.com) |
2022-12-01 03:39:12 +0100 | andreas303 | (andreas303@ip227.orange.bnc4free.com) (Quit: fBNC - https://bnc4free.com) |
2022-12-01 03:41:26 +0100 | Lumia | (~Lumia@user/Lumia) (Quit: ,-) |
2022-12-01 03:47:19 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-12-01 03:47:51 +0100 | mmhat | (~mmh@p200300f1c72545c1ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1) |
2022-12-01 03:55:31 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
2022-12-01 03:59:09 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
2022-12-01 04:00:33 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 04:01:24 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 04:01:33 +0100 | mvk | (~mvk@2607:fea8:5ce3:8500::efb) |
2022-12-01 04:01:49 +0100 | mvk | (~mvk@2607:fea8:5ce3:8500::efb) (Client Quit) |
2022-12-01 04:01:52 +0100 | talismanick | (~user@76.133.152.122) (Remote host closed the connection) |
2022-12-01 04:04:10 +0100 | king_gs | (~Thunderbi@2806:103e:29:86f9:15db:b0e0:45d5:32a8) (Ping timeout: 256 seconds) |
2022-12-01 04:07:32 +0100 | mixfix41 | (~sdenynine@user/mixfix41) (Ping timeout: 246 seconds) |
2022-12-01 04:07:54 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 04:08:23 +0100 | xacktm | (~xacktm@user/xacktm) |
2022-12-01 04:08:29 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 04:11:14 +0100 | andreas303 | (andreas303@ip227.orange.bnc4free.com) |
2022-12-01 04:12:40 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-12-01 04:19:19 +0100 | gentauro | (~gentauro@user/gentauro) (Ping timeout: 265 seconds) |
2022-12-01 04:19:57 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-01 04:21:40 +0100 | talismanick | (~talismani@76.133.152.122) |
2022-12-01 04:21:47 +0100 | foul_owl | (~kerry@157.97.134.156) (Ping timeout: 264 seconds) |
2022-12-01 04:25:44 +0100 | gentauro | (~gentauro@user/gentauro) |
2022-12-01 04:26:16 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 04:27:02 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2022-12-01 04:32:50 +0100 | fr33domlover | (~fr33domlo@towards.vision) |
2022-12-01 04:36:47 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-01 04:37:27 +0100 | foul_owl | (~kerry@174-21-75-230.tukw.qwest.net) |
2022-12-01 04:37:32 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-01 04:37:33 +0100 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) |
2022-12-01 04:44:06 +0100 | Kaipei | (~Kaiepi@108.175.84.104) |
2022-12-01 04:45:56 +0100 | andreas303 | (andreas303@ip227.orange.bnc4free.com) (Quit: fBNC - https://bnc4free.com) |
2022-12-01 04:46:19 +0100 | king_gs | (~Thunderbi@187.201.63.8) |
2022-12-01 04:46:23 +0100 | xacktm | (~xacktm@user/xacktm) (Ping timeout: 260 seconds) |
2022-12-01 04:50:24 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-01 04:50:55 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 04:51:48 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 04:53:29 +0100 | td_ | (~td@83.135.9.45) (Ping timeout: 268 seconds) |
2022-12-01 04:54:43 +0100 | td_ | (~td@83.135.9.43) |
2022-12-01 04:58:05 +0100 | <freeside> | thanks for all the help yesterday troubleshooting the cabal situation. I still don't know why stack recommended 3.8.1.0 when it should have recommended 3.6.3.0 for LTS 20.2. |
2022-12-01 04:58:18 +0100 | <freeside> | Anyway, I have it working now, with extra-deps pinned to 3.6.3.0. |
2022-12-01 05:07:36 +0100 | <Clinton[m]> | does anyone here use HLS with VSCode and know how to see/dump a Template Haskell splice? It seems like HLS has the feature but I don't know how to use it in VSCode: https://github.com/haskell/haskell-language-server/blob/master/docs/features.md |
2022-12-01 05:08:50 +0100 | <maerwald[m]> | Clinton: it's a code action |
2022-12-01 05:08:56 +0100 | rnat | (uid73555@id-73555.lymington.irccloud.com) |
2022-12-01 05:08:58 +0100 | <maerwald[m]> | refactor.rewrite |
2022-12-01 05:12:16 +0100 | <Clinton[m]> | hrmmm weird I'm not getting the little lightbulb popup when I hover over the splice |
2022-12-01 05:13:36 +0100 | xacktm | (~xacktm@user/xacktm) |
2022-12-01 05:14:24 +0100 | king_gs | (~Thunderbi@187.201.63.8) (Ping timeout: 260 seconds) |
2022-12-01 05:15:57 +0100 | Sauvin | (~sauvin@user/Sauvin) (Quit: Leaving) |
2022-12-01 05:16:46 +0100 | andreas303 | (andreas303@ip227.orange.bnc4free.com) |
2022-12-01 05:17:24 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:d078:9921:dcf:5e81) |
2022-12-01 05:19:23 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 268 seconds) |
2022-12-01 05:25:43 +0100 | <freeside> | say, given that LTS20.2 uses ghc 9.2.5, would it be fair to assume that HLS support for 9.2.5 is in the works, or should I try to build it myself? I see HLS officially supports 9.2.3 and 9.2.4 so by induction it will support 9.2.5 |
2022-12-01 05:26:20 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
2022-12-01 05:30:01 +0100 | <maerwald[m]> | freeside: https://www.haskell.org/ghcup/guide/#hls |
2022-12-01 05:30:09 +0100 | <albet70> | if there is f :: (String -> IO ()) -> (String -> IO ()) -> IO (), how turn it to ContT? |
2022-12-01 05:30:29 +0100 | quazimodo | (~quazimodo@122-199-39-221.ip4.superloop.com) |
2022-12-01 05:31:36 +0100 | <quazimodo> | i'm having trouble understanding how oop's dependency injection relates to functional languages. Some of the things i've read may say 'fp languages dont need it because they're free of sideeffects' |
2022-12-01 05:31:54 +0100 | <quazimodo> | but that's not strictly true is it, wouldn't a function that does io to a database ultimately do that while being tested? |
2022-12-01 05:31:56 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 246 seconds) |
2022-12-01 05:32:15 +0100 | <quazimodo> | or am I naive and there's an easy answer i've missed |
2022-12-01 05:34:54 +0100 | <freeside> | maerwald[m]: I am trying the ghcup compile hls on a number of different platforms, because even the example invocations give me a BuildFailed with complaints about "after searching the rest of the dependency tree exhaustively..." |
2022-12-01 05:36:02 +0100 | segfaultfizzbuzz | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 268 seconds) |
2022-12-01 05:36:32 +0100 | <freeside> | even `ghcup compile hls --version 1.8.0.0 --ghc 9.2.4` doesn't work for me ... i'm going to try on intel instead of M1 in case it has something to do with that. |
2022-12-01 05:36:39 +0100 | Sauvin | (~sauvin@user/Sauvin) |
2022-12-01 05:37:34 +0100 | <EvanR> | quazimodo, dependency injection falls into a big set of concepts in OOP that in FP become "just pass in an argument" |
2022-12-01 05:37:50 +0100 | <EvanR> | or just use a function |
2022-12-01 05:38:01 +0100 | <EvanR> | that takes the dependency as input |
2022-12-01 05:39:27 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-01 05:40:00 +0100 | <monochrom> | Yeah "free of side effects" has nothing to do with it. However, "parameters can be functions too!" is the one. |
2022-12-01 05:40:25 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-01 05:40:57 +0100 | <EvanR> | sometimes "the return value can be a function" is key |
2022-12-01 05:41:23 +0100 | <EvanR> | a function which holds the dependency, like a database connection, in the closure |
2022-12-01 05:41:55 +0100 | <jackdk> | quazimodo: In addition to EvanR's point, the argument that you "just pass in" could be a collection of functions that perform the effect you're interested in, rather than a `Handle` or `Connection` or whatever. There is also a lot of research into "effect systems", where you "interpret" some "effect" in one of several different ways. But that uses some pretty advanced features and I'd recommend learning the base language first. |
2022-12-01 05:42:09 +0100 | <monochrom> | Many objects are just glorified bundles of glorified functions (rebranded to "methods"), so in FP just remove the Object Obfuscation Pomposity (OOP) and call it a bundle of functions. |
2022-12-01 05:42:10 +0100 | <quazimodo> | EvanR: i guess in an oop env such as a .net c# app a lot of dependencies are 'auto injected'; you might be deep down some rabbit hole of function calls & will receive the thing you wanted without having to actually drill that argument down |
2022-12-01 05:43:05 +0100 | <jackdk> | You often see a similar effect performed using the ReaderT monad transformer, which also relieves you from manually passing an arg around |
2022-12-01 05:43:25 +0100 | <quazimodo> | i kinda had a feeling it would be something like this |
2022-12-01 05:44:28 +0100 | <freeside> | "dependency injection" sounds to me like a euphemism for "tramp data" :D |
2022-12-01 05:44:34 +0100 | <quazimodo> | monochrom: yeah i'm not a fan of the growing set of concepts in oop world that are just sensible abstractions |
2022-12-01 05:45:16 +0100 | <quazimodo> | EvanR: returning functions can be one way to do it, sure |
2022-12-01 05:46:24 +0100 | <EvanR> | we have crazy ways to pass in an argument too |
2022-12-01 05:46:28 +0100 | <EvanR> | like reflection xD |
2022-12-01 05:46:57 +0100 | <jackdk> | And to think that I felt bad talking about effect systems! |
2022-12-01 05:48:10 +0100 | <quazimodo> | I get away with 'denpendency injection' in typescript (i don't use the oop features there) by declaring a 'container' module that i populate at the start of the program, or mock at the start of a test, which contains namespaced dependencies |
2022-12-01 05:48:52 +0100 | <quazimodo> | the rest of my code has a hard dependency to the 'container', it's not passed down and can't be overridden somewhere down a call stack but it suffices, mostly |
2022-12-01 05:49:19 +0100 | Guest51 | (~Guest51@2603-8000-0401-65cc-a9de-aba7-6e60-1564.res6.spectrum.com) |
2022-12-01 05:50:25 +0100 | <EvanR> | it kind of sounds like dependency injection was invented in order to stop saying "globals bad" too many times |
2022-12-01 05:50:43 +0100 | <EvanR> | or to rename the use of globals so it didn't seem bad |
2022-12-01 05:52:58 +0100 | Vajb | (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer) |
2022-12-01 05:53:50 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) |
2022-12-01 05:58:47 +0100 | leifmetcalf5 | (~leifmetca@210.54.33.112) |
2022-12-01 06:00:25 +0100 | <albet70> | how to solve passing two continuations to one ContT? |
2022-12-01 06:01:23 +0100 | <albet70> | inside ContT to decide using which one continuation |
2022-12-01 06:02:33 +0100 | foul_owl | (~kerry@174-21-75-230.tukw.qwest.net) (Ping timeout: 268 seconds) |
2022-12-01 06:02:34 +0100 | leifmetcalf5 | (~leifmetca@210.54.33.112) (Client Quit) |
2022-12-01 06:14:42 +0100 | iqubic | (~user@2601:602:9502:c70:8e55:bd2f:72d2:8b70) |
2022-12-01 06:16:22 +0100 | foul_owl | (~kerry@193.29.61.77) |
2022-12-01 06:22:33 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 06:25:05 +0100 | ryanbooker | (uid4340@id-4340.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 06:29:20 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-12-01 06:29:53 +0100 | Vajb | (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) |
2022-12-01 06:31:05 +0100 | <Clinton[m]> | can't work out how to expand Template Haskell splices inline in VSCode with HLS 1.7.0.0 on GHC 9.2.2, but is there anyway to dump the splices as part of a cabal build? --ghc-options=-ddump-splices doesn't seem to produce any splice files in the build directory. |
2022-12-01 06:34:09 +0100 | <EvanR> | albet70, well it's like passing two IO actions to one race :: IO a -> IO a -> IO a |
2022-12-01 06:34:23 +0100 | <EvanR> | race can use the two actions however it wants, internally |
2022-12-01 06:37:26 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-12-01 06:38:41 +0100 | <albet70> | EvanR , how to fit ContT? |
2022-12-01 06:39:31 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2022-12-01 06:39:32 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2022-12-01 06:40:03 +0100 | <EvanR> | is the type you want like ContT m a -> ContT m a -> ContT m a? |
2022-12-01 06:40:08 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 246 seconds) |
2022-12-01 06:40:08 +0100 | <albet70> | if there is only one continuation, so f :: (String -> IO ()) -> IO () can be ContT () IO String |
2022-12-01 06:40:49 +0100 | Lord_of_Life_ | Lord_of_Life |
2022-12-01 06:41:26 +0100 | <albet70> | but now are two continuations, type K = String -> IO (), f :: K -> K -> IO () |
2022-12-01 06:41:40 +0100 | <quazimodo> | would you expect vscode to understand that the variable hazard in `var hazard = await _hazardRepository.FirstOrDefaultAsync((Guid)input.Id)` should be of type Hazard if _hazardRepository is of type IRepository<Hazard, Guid>? |
2022-12-01 06:41:47 +0100 | <quazimodo> | ah crap wrong channel, my bad |
2022-12-01 06:42:09 +0100 | <albet70> | EvanR , yes, how to turn this f to that? |
2022-12-01 06:53:51 +0100 | <freeside> | https://en.wikibooks.org/wiki/Haskell/Continuation_passing_style#Example:_coroutines |
2022-12-01 06:54:00 +0100 | king_gs | (~Thunderbi@187.201.63.8) |
2022-12-01 06:55:38 +0100 | iteratee_ | (~kyle@162.218.222.107) |
2022-12-01 06:55:46 +0100 | qhong_ | (~qhong@rescomp-21-400677.stanford.edu) |
2022-12-01 06:55:48 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
2022-12-01 06:55:49 +0100 | jinsun__ | (~jinsun@user/jinsun) |
2022-12-01 06:55:49 +0100 | jinsun | (~jinsun@user/jinsun) (Killed (calcium.libera.chat (Nickname regained by services))) |
2022-12-01 06:55:49 +0100 | jinsun__ | jinsun |
2022-12-01 06:56:15 +0100 | haritz | (~hrtz@user/haritz) (Ping timeout: 260 seconds) |
2022-12-01 06:56:17 +0100 | poljar1 | (~poljar@93-139-1-236.adsl.net.t-com.hr) |
2022-12-01 06:56:26 +0100 | Bocaneri | (~sauvin@user/Sauvin) |
2022-12-01 06:56:34 +0100 | <albet70> | f :: (String -> IO ()) -> ContT () IO String |
2022-12-01 06:56:45 +0100 | Katarushisu3 | (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) |
2022-12-01 06:56:50 +0100 | Bocaneri | Guest7570 |
2022-12-01 06:57:50 +0100 | shriekingnoise_ | (~shrieking@186.137.167.202) |
2022-12-01 06:58:10 +0100 | justache- | (~justache@user/justache) |
2022-12-01 06:58:15 +0100 | glguy_ | (~glguy@libera/staff-emeritus/glguy) |
2022-12-01 06:58:19 +0100 | bollu6 | (~bollu@159.65.151.13) |
2022-12-01 06:58:26 +0100 | red-snail1 | (~snail@static.151.210.203.116.clients.your-server.de) |
2022-12-01 06:58:29 +0100 | maerwald_ | (~maerwald@mail.hasufell.de) |
2022-12-01 06:59:14 +0100 | pieguy128_ | (~pieguy128@bras-base-mtrlpq5031w-grc-50-65-93-192-212.dsl.bell.ca) |
2022-12-01 06:59:17 +0100 | Philonous_ | (~Philonous@user/philonous) |
2022-12-01 06:59:22 +0100 | quintasan_ | (~quassel@quintasan.pl) |
2022-12-01 06:59:31 +0100 | wagle_ | (~wagle@quassel.wagle.io) |
2022-12-01 06:59:51 +0100 | np | (~nerdypepp@user/nerdypepper) |
2022-12-01 07:00:15 +0100 | cstml_ | (cstml@tilde.club) |
2022-12-01 07:00:24 +0100 | maxfan8_ | (~max@2a01:4f8:192:5356::2) |
2022-12-01 07:00:26 +0100 | ridcully | (~ridcully@p508acd69.dip0.t-ipconnect.de) |
2022-12-01 07:00:32 +0100 | cjay- | (cjay@nerdbox.nerd2nerd.org) |
2022-12-01 07:00:36 +0100 | ian_ | (~ian@matrix.chaos.earth.li) |
2022-12-01 07:00:36 +0100 | tomku|two | (~tomku@user/tomku) |
2022-12-01 07:00:54 +0100 | td__ | (~td@83.135.9.43) |
2022-12-01 07:01:00 +0100 | Maeda_ | (~Maeda@91-161-10-149.subs.proxad.net) |
2022-12-01 07:01:19 +0100 | Sauvin | (~sauvin@user/Sauvin) (Killed (NickServ (GHOST command used by Guest7570))) |
2022-12-01 07:01:22 +0100 | remedan | (~remedan@octo.cafe) |
2022-12-01 07:01:25 +0100 | Guest7570 | Sauvin |
2022-12-01 07:01:54 +0100 | fiddlerwoaroof_ | (~fiddlerwo@user/fiddlerwoaroof) |
2022-12-01 07:05:52 +0100 | foul_owl | (~kerry@193.29.61.77) (*.net *.split) |
2022-12-01 07:05:52 +0100 | iqubic | (~user@2601:602:9502:c70:8e55:bd2f:72d2:8b70) (*.net *.split) |
2022-12-01 07:05:52 +0100 | td_ | (~td@83.135.9.43) (*.net *.split) |
2022-12-01 07:05:53 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) (*.net *.split) |
2022-12-01 07:05:53 +0100 | shriekingnoise | (~shrieking@186.137.167.202) (*.net *.split) |
2022-12-01 07:05:53 +0100 | earthy | (~arthurvl@2a02-a469-f5e2-1-ba27-ebff-fea0-40b0.fixed6.kpn.net) (*.net *.split) |
2022-12-01 07:05:53 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (*.net *.split) |
2022-12-01 07:05:53 +0100 | tabaqui | (~root@88.231.62.215) (*.net *.split) |
2022-12-01 07:05:53 +0100 | phma | (phma@2001:5b0:2172:df88:b30a:8f7e:93b0:e277) (*.net *.split) |
2022-12-01 07:05:53 +0100 | sus | (~zeromomen@user/zeromomentum) (*.net *.split) |
2022-12-01 07:05:53 +0100 | Maeda | (~Maeda@91-161-10-149.subs.proxad.net) (*.net *.split) |
2022-12-01 07:05:53 +0100 | ridcully_ | (~ridcully@p508acd69.dip0.t-ipconnect.de) (*.net *.split) |
2022-12-01 07:05:54 +0100 | tinwood | (~tinwood@canonical/tinwood) (*.net *.split) |
2022-12-01 07:05:54 +0100 | wagle | (~wagle@quassel.wagle.io) (*.net *.split) |
2022-12-01 07:05:54 +0100 | nerdypepper | (~nerdypepp@user/nerdypepper) (*.net *.split) |
2022-12-01 07:05:54 +0100 | totbwf | (sid402332@id-402332.uxbridge.irccloud.com) (*.net *.split) |
2022-12-01 07:05:54 +0100 | burakcan- | (burakcank@has.arrived.and.is.ready-to.party) (*.net *.split) |
2022-12-01 07:05:54 +0100 | Fangs | (sid141280@id-141280.hampstead.irccloud.com) (*.net *.split) |
2022-12-01 07:05:54 +0100 | Katarushisu | (~Katarushi@cpc147790-finc20-2-0-cust502.4-2.cable.virginm.net) (*.net *.split) |
2022-12-01 07:05:54 +0100 | nek0 | (~nek0@2a01:4f8:222:2b41::12) (*.net *.split) |
2022-12-01 07:05:54 +0100 | qhong | (~qhong@rescomp-21-400677.stanford.edu) (*.net *.split) |
2022-12-01 07:05:54 +0100 | maerwald | (~maerwald@user/maerwald) (*.net *.split) |
2022-12-01 07:05:54 +0100 | sunarch | (sid526836@user/sunarch) (*.net *.split) |
2022-12-01 07:05:54 +0100 | scav | (sid309693@user/scav) (*.net *.split) |
2022-12-01 07:05:54 +0100 | sclv | (sid39734@haskell/developer/sclv) (*.net *.split) |
2022-12-01 07:05:54 +0100 | teehemkay | (sid14792@id-14792.lymington.irccloud.com) (*.net *.split) |
2022-12-01 07:05:54 +0100 | cjay | (cjay@nerdbox.nerd2nerd.org) (*.net *.split) |
2022-12-01 07:05:54 +0100 | mxs | (~mxs@user/mxs) (*.net *.split) |
2022-12-01 07:05:55 +0100 | idnar | (sid12240@debian/mithrandi) (*.net *.split) |
2022-12-01 07:05:55 +0100 | rune | (sid21167@id-21167.ilkley.irccloud.com) (*.net *.split) |
2022-12-01 07:05:55 +0100 | bollu | (~bollu@159.65.151.13) (*.net *.split) |
2022-12-01 07:05:55 +0100 | pieguy128 | (~pieguy128@bras-base-mtrlpq5031w-grc-50-65-93-192-212.dsl.bell.ca) (*.net *.split) |
2022-12-01 07:05:55 +0100 | tomku | (~tomku@user/tomku) (*.net *.split) |
2022-12-01 07:05:55 +0100 | justache | (~justache@user/justache) (*.net *.split) |
2022-12-01 07:05:55 +0100 | poljar | (~poljar@93-139-1-236.adsl.net.t-com.hr) (*.net *.split) |
2022-12-01 07:05:55 +0100 | Luj3 | (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) (*.net *.split) |
2022-12-01 07:05:55 +0100 | glguy | (~glguy@libera/staff-emeritus/glguy) (*.net *.split) |
2022-12-01 07:05:55 +0100 | maxfan8 | (~max@personal.max.fan) (*.net *.split) |
2022-12-01 07:05:55 +0100 | fiddlerwoaroof | (~fiddlerwo@user/fiddlerwoaroof) (*.net *.split) |
2022-12-01 07:05:55 +0100 | xnbya | (~xnbya@2a01:4f8:c17:cbdd::1) (*.net *.split) |
2022-12-01 07:05:56 +0100 | Philonous | (~Philonous@user/philonous) (*.net *.split) |
2022-12-01 07:05:56 +0100 | red-snail | (~snail@static.151.210.203.116.clients.your-server.de) (*.net *.split) |
2022-12-01 07:05:56 +0100 | iteratee | (~kyle@162.218.222.107) (*.net *.split) |
2022-12-01 07:05:56 +0100 | cstml | (cstml@user/cstml) (*.net *.split) |
2022-12-01 07:05:56 +0100 | remedan_ | (~remedan@octo.cafe) (*.net *.split) |
2022-12-01 07:05:56 +0100 | quintasan | (~quassel@quintasan.pl) (*.net *.split) |
2022-12-01 07:05:56 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) (*.net *.split) |
2022-12-01 07:05:56 +0100 | arahael | (~arahael@193-119-109-208.tpgi.com.au) (*.net *.split) |
2022-12-01 07:05:56 +0100 | arkeet | (arkeet@moriya.ca) (*.net *.split) |
2022-12-01 07:05:56 +0100 | Igloo | (~ian@matrix.chaos.earth.li) (*.net *.split) |
2022-12-01 07:05:56 +0100 | Katarushisu3 | Katarushisu |
2022-12-01 07:05:56 +0100 | bollu6 | bollu |
2022-12-01 07:06:35 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-12-01 07:07:30 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) |
2022-12-01 07:07:30 +0100 | lambdabot | (~lambdabot@silicon.int-e.eu) (Changing host) |
2022-12-01 07:07:30 +0100 | lambdabot | (~lambdabot@haskell/bot/lambdabot) |
2022-12-01 07:10:49 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) |
2022-12-01 07:11:26 +0100 | tabaqui | (~root@88.231.62.215) |
2022-12-01 07:11:45 +0100 | mbuf | (~Shakthi@49.204.116.34) |
2022-12-01 07:12:47 +0100 | arahael | (~arahael@193-119-109-208.tpgi.com.au) |
2022-12-01 07:12:48 +0100 | king_gs | (~Thunderbi@187.201.63.8) (Read error: Connection reset by peer) |
2022-12-01 07:13:30 +0100 | foul_owl | (~kerry@193.29.61.77) |
2022-12-01 07:14:03 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) |
2022-12-01 07:14:04 +0100 | king_gs | (~Thunderbi@2806:103e:29:86f9:15db:b0e0:45d5:32a8) |
2022-12-01 07:28:26 +0100 | rnat | (uid73555@id-73555.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 07:40:55 +0100 | Guest51 | (~Guest51@2603-8000-0401-65cc-a9de-aba7-6e60-1564.res6.spectrum.com) (Quit: Client closed) |
2022-12-01 07:47:16 +0100 | motherfsck | (~motherfsc@user/motherfsck) (Ping timeout: 248 seconds) |
2022-12-01 07:52:49 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 07:53:59 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
2022-12-01 08:00:52 +0100 | mokee | (~mokee@37.228.215.235) |
2022-12-01 08:02:59 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2022-12-01 08:12:05 +0100 | motherfsck | (~motherfsc@user/motherfsck) |
2022-12-01 08:12:47 +0100 | chomwitt | (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) |
2022-12-01 08:18:47 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-01 08:24:13 +0100 | kenran | (~user@user/kenran) |
2022-12-01 08:24:45 +0100 | quazimodo | (~quazimodo@122-199-39-221.ip4.superloop.com) (Remote host closed the connection) |
2022-12-01 08:27:35 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
2022-12-01 08:30:18 +0100 | phma | (~phma@host-67-44-208-217.hnremote.net) |
2022-12-01 08:31:29 +0100 | sus | (zero@user/zeromomentum) |
2022-12-01 08:31:36 +0100 | Luj3 | (~Luj@2a01:e0a:5f9:9681:5880:c9ff:fe9f:3dfb) |
2022-12-01 08:31:36 +0100 | nek0 | (~nek0@2a01:4f8:222:2b41::12) |
2022-12-01 08:32:03 +0100 | burakcan- | (burakcank@has.arrived.and.is.ready-to.party) |
2022-12-01 08:34:15 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 268 seconds) |
2022-12-01 08:34:53 +0100 | iqubic | (~user@2601:602:9502:c70:8e55:bd2f:72d2:8b70) |
2022-12-01 08:34:53 +0100 | earthy | (~arthurvl@2a02-a469-f5e2-1-ba27-ebff-fea0-40b0.fixed6.kpn.net) |
2022-12-01 08:34:53 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2022-12-01 08:34:53 +0100 | tinwood | (~tinwood@canonical/tinwood) |
2022-12-01 08:34:53 +0100 | totbwf | (sid402332@id-402332.uxbridge.irccloud.com) |
2022-12-01 08:34:53 +0100 | Fangs | (sid141280@id-141280.hampstead.irccloud.com) |
2022-12-01 08:34:53 +0100 | sunarch | (sid526836@user/sunarch) |
2022-12-01 08:34:53 +0100 | scav | (sid309693@user/scav) |
2022-12-01 08:34:53 +0100 | sclv | (sid39734@haskell/developer/sclv) |
2022-12-01 08:34:53 +0100 | teehemkay | (sid14792@id-14792.lymington.irccloud.com) |
2022-12-01 08:34:53 +0100 | mxs | (~mxs@user/mxs) |
2022-12-01 08:34:53 +0100 | idnar | (sid12240@debian/mithrandi) |
2022-12-01 08:34:53 +0100 | rune | (sid21167@id-21167.ilkley.irccloud.com) |
2022-12-01 08:34:53 +0100 | xnbya | (~xnbya@2a01:4f8:c17:cbdd::1) |
2022-12-01 08:34:53 +0100 | arkeet | (arkeet@moriya.ca) |
2022-12-01 08:35:42 +0100 | Xeroine | (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
2022-12-01 08:36:21 +0100 | Xeroine | (~Xeroine@user/xeroine) |
2022-12-01 08:38:26 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Ping timeout: 263 seconds) |
2022-12-01 08:38:26 +0100 | sunarch | (sid526836@user/sunarch) (Ping timeout: 263 seconds) |
2022-12-01 08:40:25 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2022-12-01 08:40:39 +0100 | sunarch | (sid526836@user/sunarch) |
2022-12-01 08:45:42 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-01 08:45:58 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) (Ping timeout: 268 seconds) |
2022-12-01 08:52:00 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 08:52:06 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:4131:3f7a:f009:112b) |
2022-12-01 08:55:56 +0100 | kenran | (~user@user/kenran) (Remote host closed the connection) |
2022-12-01 09:00:07 +0100 | wagle_ | wagle |
2022-12-01 09:01:05 +0100 | king_gs | (~Thunderbi@2806:103e:29:86f9:15db:b0e0:45d5:32a8) (Ping timeout: 260 seconds) |
2022-12-01 09:04:00 +0100 | opticblast | (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 260 seconds) |
2022-12-01 09:09:22 +0100 | shriekingnoise_ | (~shrieking@186.137.167.202) (Quit: Quit) |
2022-12-01 09:11:48 +0100 | MajorBiscuit | (~MajorBisc@86-88-79-148.fixed.kpn.net) |
2022-12-01 09:15:19 +0100 | meinside | (uid24933@id-24933.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 09:17:54 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-01 09:24:46 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-12-01 09:26:04 +0100 | coot | (~coot@213.134.171.3) |
2022-12-01 09:29:22 +0100 | gmg | (~user@user/gehmehgeh) |
2022-12-01 09:34:40 +0100 | cfricke | (~cfricke@user/cfricke) |
2022-12-01 09:39:09 +0100 | michalz | (~michalz@185.246.204.65) |
2022-12-01 09:40:39 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-01 09:40:55 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:642f:7baf:af2a:1ea8) |
2022-12-01 09:41:26 +0100 | <dminuoso> | monochrom: What makes these "OOP"/"object"/"method" things special is most of the time subtyping, but because you get a tiny bit of syntax sugar sprinkled ontop, its easy to confuse the definition style (have something called `class` and define a method inside there), invoking it via`a.foo()` being a core theme. |
2022-12-01 09:41:32 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::fc20) (Ping timeout: 252 seconds) |
2022-12-01 09:41:56 +0100 | <dminuoso> | But what's really special and not easy to mimic, is `a.foo()` being resolved depending on the type of a with subtyping. |
2022-12-01 09:43:05 +0100 | <dminuoso> | Even what these langauges consider as `class` has little to do with encapsulation, but mostly just with subtyping relationships. The fact they give some keywords to control encapsulation is nice, but not not important (given how we can achieve encapsulation just the same, by controlling export lists) |
2022-12-01 09:44:20 +0100 | <dminuoso> | So perhaps Java is best called subtyping-oriented, not object-oriented. |
2022-12-01 09:46:44 +0100 | Scraeling | (~Username@223.231.159.119) |
2022-12-01 09:47:02 +0100 | Scraeling | (~Username@223.231.159.119) (Changing host) |
2022-12-01 09:47:02 +0100 | Scraeling | (~Username@user/scraeling) |
2022-12-01 09:49:54 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-12-01 09:51:15 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 09:53:01 +0100 | acidjnk | (~acidjnk@p200300d6e7137a610dc9b14a87dc1f36.dip0.t-ipconnect.de) |
2022-12-01 09:54:12 +0100 | __monty__ | (~toonn@user/toonn) |
2022-12-01 09:55:28 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2022-12-01 09:57:25 +0100 | nschoe | (~q@141.101.51.197) |
2022-12-01 09:58:08 +0100 | Guest75 | (~Guest75@178.141.153.191) (Quit: Client closed) |
2022-12-01 09:58:41 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-01 10:03:55 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:d078:9921:dcf:5e81) (Remote host closed the connection) |
2022-12-01 10:04:52 +0100 | lottaquestions | (~nick@104.221.24.83) |
2022-12-01 10:04:54 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 10:05:16 +0100 | lottaquestions | (~nick@104.221.24.83) (Read error: Connection reset by peer) |
2022-12-01 10:05:39 +0100 | lottaquestions | (~nick@104.221.24.83) |
2022-12-01 10:06:57 +0100 | MajorBiscuit | (~MajorBisc@86-88-79-148.fixed.kpn.net) (Ping timeout: 252 seconds) |
2022-12-01 10:07:22 +0100 | lottaquestions_ | (~nick@104.221.24.83) (Ping timeout: 268 seconds) |
2022-12-01 10:07:34 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection) |
2022-12-01 10:11:02 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 10:11:12 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-01 10:11:19 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection) |
2022-12-01 10:11:26 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) |
2022-12-01 10:13:32 +0100 | chomwitt | (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) (Remote host closed the connection) |
2022-12-01 10:14:09 +0100 | chomwitt | (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) |
2022-12-01 10:20:32 +0100 | ft | (~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving) |
2022-12-01 10:21:15 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 10:22:52 +0100 | mmhat | (~mmh@p200300f1c72545c1ee086bfffe095315.dip0.t-ipconnect.de) |
2022-12-01 10:26:08 +0100 | mmhat | (~mmh@p200300f1c72545c1ee086bfffe095315.dip0.t-ipconnect.de) (Client Quit) |
2022-12-01 10:26:29 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 260 seconds) |
2022-12-01 10:29:34 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds) |
2022-12-01 10:29:34 +0100 | Kaipei | (~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds) |
2022-12-01 10:31:48 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2022-12-01 10:32:23 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-01 10:35:08 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-12-01 10:35:36 +0100 | zant | (~zant@62.214.20.26) |
2022-12-01 10:40:12 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-12-01 10:40:43 +0100 | chele | (~chele@user/chele) |
2022-12-01 10:44:17 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) |
2022-12-01 10:46:01 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2022-12-01 10:47:57 +0100 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-12-01 10:50:28 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds) |
2022-12-01 10:51:05 +0100 | sayola | (~sayola@dslb-088-064-186-217.088.064.pools.vodafone-ip.de) (Read error: Connection reset by peer) |
2022-12-01 10:52:40 +0100 | sayola | (~sayola@dslb-088-064-186-217.088.064.pools.vodafone-ip.de) |
2022-12-01 10:58:55 +0100 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 260 seconds) |
2022-12-01 11:05:45 +0100 | ubert1 | (~Thunderbi@2a02:8109:abc0:6434:1782:c1f:7c60:6e20) |
2022-12-01 11:10:07 +0100 | MajorBiscuit | (~MajorBisc@145.15.244.234) |
2022-12-01 11:14:54 +0100 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds) |
2022-12-01 11:19:19 +0100 | mjacob_ | (~mjacob@adrastea.uberspace.de) (Read error: Connection reset by peer) |
2022-12-01 11:25:05 +0100 | mjacob | (~mjacob@adrastea.uberspace.de) |
2022-12-01 11:25:10 +0100 | Kaipei | (~Kaiepi@108.175.84.104) |
2022-12-01 11:27:10 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-01 11:29:18 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-01 11:32:54 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 11:35:53 +0100 | califax | (~califax@user/califx) (Ping timeout: 255 seconds) |
2022-12-01 11:36:47 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-01 11:36:47 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
2022-12-01 11:37:25 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 260 seconds) |
2022-12-01 11:41:11 +0100 | MajorBiscuit | (~MajorBisc@145.15.244.234) (Ping timeout: 252 seconds) |
2022-12-01 11:42:39 +0100 | califax | (~califax@user/califx) |
2022-12-01 11:44:41 +0100 | <Scraeling> | Is it possible to get the name of the module where a function from another module gets called with templatehaskell? |
2022-12-01 11:44:54 +0100 | <Scraeling> | or in any way |
2022-12-01 11:45:08 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 11:47:21 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-12-01 11:47:50 +0100 | img | (~img@user/img) |
2022-12-01 11:48:15 +0100 | img | (~img@user/img) (Remote host closed the connection) |
2022-12-01 11:50:22 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2022-12-01 11:51:21 +0100 | img | (~img@user/img) |
2022-12-01 11:51:53 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::1a33) |
2022-12-01 11:53:00 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-12-01 11:53:01 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 11:54:26 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004::c32) |
2022-12-01 11:56:14 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 11:59:42 +0100 | mixfix41 | (~sdenynine@user/mixfix41) |
2022-12-01 12:03:14 +0100 | xff0x | (~xff0x@ai071162.d.east.v6connect.net) |
2022-12-01 12:03:21 +0100 | dignissmus | (~sam@user/dignissimus) |
2022-12-01 12:07:16 +0100 | <dignissmus> | I did my advent of code in Haskell and I'm wondering how I'd write it better https://paste.tomsmeding.com/8qvh8M2P |
2022-12-01 12:08:11 +0100 | thyriaen | (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) |
2022-12-01 12:08:16 +0100 | <tomsmeding> | Scraeling: do you mean to get the module where a certain name `f` is defined, or the module(s) where a certain name `f` is _used_? |
2022-12-01 12:08:41 +0100 | <tomsmeding> | the first you can do, the second is fundamentally impossible because you don't know how many other people are using your code as well |
2022-12-01 12:09:28 +0100 | <Scraeling> | Foo.getCallingModule returns Bar when called from module Bar |
2022-12-01 12:09:51 +0100 | <tomsmeding> | oh, you want the current module where the splice is being evaluated? |
2022-12-01 12:09:57 +0100 | <Scraeling> | Yeah |
2022-12-01 12:10:24 +0100 | <tomsmeding> | Scraeling: see the haddocs of https://hackage.haskell.org/package/template-haskell-2.19.0.0/docs/Language-Haskell-TH.html#v:reif… |
2022-12-01 12:10:34 +0100 | califax | (~califax@user/califx) |
2022-12-01 12:10:55 +0100 | <tomsmeding> | (i.e. you want thisModule) |
2022-12-01 12:13:56 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:642f:7baf:af2a:1ea8) (Quit: WeeChat 3.5) |
2022-12-01 12:14:23 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
2022-12-01 12:17:19 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2022-12-01 12:18:10 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-01 12:18:43 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-01 12:18:53 +0100 | MajorBiscuit | (~MajorBisc@ip-185-104-137-32.ptr.icomera.net) |
2022-12-01 12:23:42 +0100 | dignissmus | dignissimus |
2022-12-01 12:25:40 +0100 | <albet70> | there is haskell tutorial for c programmers like https://wiki.haskell.org/Haskell_Tutorial_for_C_Programmers, I wonder if there is c/cpp tutorial for haskell programmers |
2022-12-01 12:26:13 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 12:28:43 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 12:30:24 +0100 | emmanuelux | (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
2022-12-01 12:30:57 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 12:33:07 +0100 | califax | (~califax@user/califx) |
2022-12-01 12:33:36 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2022-12-01 12:37:35 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-01 12:38:43 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-01 12:40:46 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-01 12:42:12 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2022-12-01 12:42:39 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-01 12:45:11 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
2022-12-01 12:48:17 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 12:50:36 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-01 12:51:28 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 12:51:53 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 12:53:25 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2022-12-01 12:53:37 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2022-12-01 12:57:34 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 12:58:04 +0100 | `2jt | (~jtomas@255.red-193-153-6.dynamicip.rima-tde.net) |
2022-12-01 13:00:57 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-01 13:02:32 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 13:03:38 +0100 | perrierjouet | (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1) |
2022-12-01 13:06:27 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 13:07:51 +0100 | perrierjouet | (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
2022-12-01 13:08:12 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 13:08:15 +0100 | `2jt | (~jtomas@255.red-193-153-6.dynamicip.rima-tde.net) (Quit: Leaving) |
2022-12-01 13:11:03 +0100 | <dminuoso> | My tutorial for c/cpp programming for haskell programmers is https://hackage.haskell.org/package/base-4.17.0.0/docs/Foreign.html |
2022-12-01 13:11:39 +0100 | <dminuoso> | In other words: I consider Haskell is a far better C |
2022-12-01 13:13:01 +0100 | califax | (~califax@user/califx) |
2022-12-01 13:17:52 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 13:18:57 +0100 | beteigeuze | (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
2022-12-01 13:18:57 +0100 | noctux | (~noctux@user/noctux) (Read error: Connection reset by peer) |
2022-12-01 13:21:53 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a61a4ce40e1809b5c20.dip0.t-ipconnect.de) |
2022-12-01 13:21:53 +0100 | CiaoSen | (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-12-01 13:22:05 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
2022-12-01 13:22:31 +0100 | acidjnk | (~acidjnk@p200300d6e7137a610dc9b14a87dc1f36.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-12-01 13:23:25 +0100 | alternateved | (~user@staticline-31-183-171-154.toya.net.pl) |
2022-12-01 13:23:33 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 13:24:50 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-01 13:25:04 +0100 | kadoban | (~kadoban@user/kadoban) () |
2022-12-01 13:25:21 +0100 | kadoban | (~kadoban@user/kadoban) |
2022-12-01 13:26:16 +0100 | <chreekat> | <albet70> "there is haskell tutorial for..." <- I thought that was called Rust :P |
2022-12-01 13:26:27 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 13:26:56 +0100 | alternateved | (~user@staticline-31-183-171-154.toya.net.pl) (Remote host closed the connection) |
2022-12-01 13:27:18 +0100 | alternateved | (~user@staticline-31-183-171-154.toya.net.pl) |
2022-12-01 13:27:27 +0100 | califax | (~califax@user/califx) |
2022-12-01 13:28:15 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) |
2022-12-01 13:28:36 +0100 | mauke | (~mauke@user/mauke) (Read error: Connection reset by peer) |
2022-12-01 13:29:17 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 13:30:50 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-01 13:33:19 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-01 13:34:09 +0100 | mauke | (~mauke@user/mauke) |
2022-12-01 13:35:03 +0100 | noctux | (~noctux@user/noctux) |
2022-12-01 13:35:06 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 13:36:11 +0100 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 264 seconds) |
2022-12-01 13:38:12 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Ping timeout: 256 seconds) |
2022-12-01 13:39:32 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 255 seconds) |
2022-12-01 13:48:51 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection) |
2022-12-01 13:48:58 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 256 seconds) |
2022-12-01 13:51:33 +0100 | <mauke> | I love declarative programming https://thedailywtf.com/articles/common-variables |
2022-12-01 13:54:29 +0100 | <dminuoso> | Is there a kind of `for_ \continue thing -> do { when expr continue; ... }`, or do I have to build my own with Cont? |
2022-12-01 13:54:46 +0100 | Guest1499 | (~Guest14@217.64.164.1) |
2022-12-01 13:55:24 +0100 | <mauke> | I'm not aware of anything other than 'when (not expr) ...' |
2022-12-01 13:55:59 +0100 | <dminuoso> | Yeah the more I think, you have to use Cont for this. |
2022-12-01 13:56:13 +0100 | <dminuoso> | Unless there were two explicit continuations |
2022-12-01 13:56:48 +0100 | <dminuoso> | i.e. `forC_ \skip handle thing -> if a then skip else (handle { do ... })` |
2022-12-01 13:58:46 +0100 | <dminuoso> | Or mmm. I think I have an idea. |
2022-12-01 13:59:05 +0100 | Ranhir | (~Ranhir@157.97.53.139) (Read error: Connection reset by peer) |
2022-12-01 13:59:10 +0100 | bravespear|2 | (~Ranhir@157.97.53.139) |
2022-12-01 13:59:23 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 14:00:41 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
2022-12-01 14:00:46 +0100 | <thyriaen> | mauke, made my day |
2022-12-01 14:03:16 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 14:03:57 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
2022-12-01 14:09:52 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 14:10:31 +0100 | <Square> | There is no filter for Maybe hidden somewhere in base? |
2022-12-01 14:11:03 +0100 | <mauke> | :t catMaybes |
2022-12-01 14:11:04 +0100 | <lambdabot> | [Maybe a] -> [a] |
2022-12-01 14:12:10 +0100 | <Square> | thanks |
2022-12-01 14:12:15 +0100 | <mauke> | :t \p m -> do x <- m; guard (p x) |
2022-12-01 14:12:16 +0100 | <lambdabot> | (Monad m, Alternative m) => (t -> Bool) -> m t -> m () |
2022-12-01 14:13:33 +0100 | <chymera> | is there any way to tell ghc to let me use tabs for indentation? |
2022-12-01 14:14:12 +0100 | <mauke> | isn't that the default? |
2022-12-01 14:14:20 +0100 | <mauke> | or have tabs been outlawed now |
2022-12-01 14:14:23 +0100 | <merijn> | chymera: You already can, it just follows the same standard as all unix tools (i.e. tab expands until nearest ttabstop) |
2022-12-01 14:14:44 +0100 | <merijn> | mauke: No, still on by defaulted, but using the old unix interpretation of "nearest multiple of 8 tabstop" |
2022-12-01 14:14:55 +0100 | <merijn> | So they never do what beginners expect :p |
2022-12-01 14:15:03 +0100 | <merijn> | Which is another way of saying: don't use tabs |
2022-12-01 14:15:44 +0100 | off^ | (~off@76.145.185.103) (Remote host closed the connection) |
2022-12-01 14:16:46 +0100 | <merijn> | Square: See also mapMaybe |
2022-12-01 14:16:49 +0100 | <chymera> | merijn: mauke I get warnings like this when compiling https://bpa.st/WT5A |
2022-12-01 14:16:50 +0100 | <merijn> | :t mapMaybe |
2022-12-01 14:16:51 +0100 | <lambdabot> | (a -> Maybe b) -> [a] -> [b] |
2022-12-01 14:17:46 +0100 | <merijn> | chymera: Pretty sure -Wtabs isn't on by default, so you must have enabled it |
2022-12-01 14:18:02 +0100 | <chymera> | is there any way to disable that? I mean it's fine if some people have a strong preference for spaces but my stdout is no place for that :D |
2022-12-01 14:18:14 +0100 | <chymera> | merijn: so -Wtabs is an option which warns on tabs? |
2022-12-01 14:18:15 +0100 | <Square> | merijn, thanks. I always got (>>=), just wondered if there it was hidden in some class instance |
2022-12-01 14:18:17 +0100 | <merijn> | ah, wait |
2022-12-01 14:18:22 +0100 | <merijn> | -Wtabs *is* default |
2022-12-01 14:18:37 +0100 | <merijn> | chymera: Yes |
2022-12-01 14:18:50 +0100 | <mauke> | -Wno-tabs |
2022-12-01 14:19:04 +0100 | <merijn> | Square: It's in Data.Maybe :) |
2022-12-01 14:19:20 +0100 | <merijn> | So is catMaybes |
2022-12-01 14:19:34 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a61a4ce40e1809b5c20.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 14:19:35 +0100 | <merijn> | But 90% of uses of catMaybes should instead replace a map with mapMaybe :p |
2022-12-01 14:19:50 +0100 | <chymera> | ah, so it wants spaces as an input and `-Wno-tabs` simply converts my code to spaces behind the scenes? |
2022-12-01 14:20:07 +0100 | <merijn> | chymera: No, -Wno-tabs literally just disables the warning for tabs |
2022-12-01 14:20:14 +0100 | <chymera> | ah, ok |
2022-12-01 14:20:15 +0100 | <chymera> | cool |
2022-12-01 14:20:20 +0100 | <chymera> | how can I globally set that? |
2022-12-01 14:20:47 +0100 | <mauke> | "global" within what scope? |
2022-12-01 14:21:02 +0100 | <chymera> | either system or user |
2022-12-01 14:21:11 +0100 | <chymera> | preferably system but user is also fine |
2022-12-01 14:22:19 +0100 | <chymera> | I mean I can alias the command, but there must be some nicer way, right? |
2022-12-01 14:22:25 +0100 | <mauke> | not really |
2022-12-01 14:22:29 +0100 | <chymera> | :( |
2022-12-01 14:22:46 +0100 | <merijn> | That depends on how you build stuff |
2022-12-01 14:22:49 +0100 | <mauke> | the best way I can think of is creating a custom ghc script that invokes the real ghc with -Wno-tabs |
2022-12-01 14:22:57 +0100 | <mauke> | and make sure your wrapper appears first in PATH |
2022-12-01 14:23:17 +0100 | MajorBiscuit | (~MajorBisc@ip-185-104-137-32.ptr.icomera.net) (Ping timeout: 268 seconds) |
2022-12-01 14:23:26 +0100 | <merijn> | Well, you could set it in the global ghc-options of ~/.cabal/config, but who knows what possible negative consequences that incurs :p |
2022-12-01 14:23:34 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 14:23:59 +0100 | <mauke> | alternatively, put {-# OPTIONS_GHC -Wno-tabs #-} at the top of every source file |
2022-12-01 14:24:15 +0100 | <chymera> | mauke: yeah, that's what I meant by aliasing |
2022-12-01 14:24:36 +0100 | <chymera> | {-# OPTIONS_GHC -Wno-tabs #-} might actually be best for portability |
2022-12-01 14:24:40 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 14:24:52 +0100 | <merijn> | hmm |
2022-12-01 14:24:53 +0100 | <mauke> | but really, at that point it's easier to :set expandtabs softtabstop=-1 shiftwidth=8 or something |
2022-12-01 14:24:57 +0100 | <chymera> | that way if anybody else contributes they don't get spammed in stdout |
2022-12-01 14:25:18 +0100 | <merijn> | There's no real "Eq a => [a] -> [[a]]" that, basically, consist of repeated applications of span/break, is there? |
2022-12-01 14:25:31 +0100 | shriekingnoise | (~shrieking@186.137.167.202) |
2022-12-01 14:26:57 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-12-01 14:27:48 +0100 | <chymera> | mauke: nah, I actually want the tab chars in my code, it's not just that pressing tab is easer |
2022-12-01 14:28:22 +0100 | <mauke> | why? |
2022-12-01 14:28:34 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-01 14:29:00 +0100 | <mauke> | (Haskell is pretty much the only language where I think physical tabs are inferior) |
2022-12-01 14:29:26 +0100 | <merijn> | Some people like to debug obscure tabstop errors :p |
2022-12-01 14:31:23 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
2022-12-01 14:32:31 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-12-01 14:33:06 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 14:33:26 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2022-12-01 14:33:29 +0100 | <mauke> | the reason is that unlike most other languages, Haskell's syntax is not based on indentation levels, but making things line up with other things |
2022-12-01 14:34:23 +0100 | <mauke> | in other languages I can adjust the width of my tabs and the code will still make sense, whether I use tabstop=3 or tabstop=4 or tabstop=8 or whatever |
2022-12-01 14:34:49 +0100 | <TMA> | mauke: there is a combination, some are based on indentation levels (more indented means "in next level") |
2022-12-01 14:36:50 +0100 | <mauke> | in Haskell, the starting column of a layout block is determined by the horizontal position of the token following the layout keyword (do, where, let, ...) |
2022-12-01 14:37:05 +0100 | <TMA> | I have read a style guide for tabs for levels, spaces for lining up and it produced mixed tab/space sequences ; OTOH it was OK(ish) with any tabstop= setting |
2022-12-01 14:37:05 +0100 | <mauke> | which is not necessarily at the beginning of a line |
2022-12-01 14:37:28 +0100 | opticblast | (~Thunderbi@secure-165.caltech.edu) |
2022-12-01 14:37:39 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Ping timeout: 260 seconds) |
2022-12-01 14:37:46 +0100 | <mauke> | you can do that, but in the end it's a lot of fiddly (and usually blind) work for little benefit |
2022-12-01 14:38:36 +0100 | <mauke> | also, if you apply that rigorously to Haskell, you end up with 0 tabs always because Haskell has no indentation levels, technically :-) |
2022-12-01 14:38:50 +0100 | <merijn> | Yes, every so often some religious prophet/heretic (depending on your point of view) will argue that his divine insight has produced a sane way of "tabs in haskell", they're mostly ignored the way you'd ignore a doomsday street preacher |
2022-12-01 14:40:14 +0100 | <Unhammer> | When using allocaArray on some Storable, is `poke` used to initialise it, or is that purely based on size/alignment? |
2022-12-01 14:40:52 +0100 | <Unhammer> | I now have https://github.com/unhammer/fastText-haskell/blob/arm/Data/FastText/Internal.hsc#L29..L48 but still getting that weird error with the first string having its first chars being strange |
2022-12-01 14:40:54 +0100 | <Unhammer> | HOWEVER |
2022-12-01 14:41:03 +0100 | <Unhammer> | if I try to get a longer array, it works |
2022-12-01 14:41:17 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 14:42:48 +0100 | <albet70> | all functions in haskell are inline functions? |
2022-12-01 14:43:05 +0100 | <mauke> | no |
2022-12-01 14:43:26 +0100 | <albet70> | referential transparency? |
2022-12-01 14:43:46 +0100 | <albet70> | why no? |
2022-12-01 14:44:49 +0100 | <Unhammer> | if I allocaArray 1, I get "\251\alabel__no" as the first string, 2 gives me "\215\NULlabel__no" (and the second is fine __label__da), 3 gives me "\251\alabel__no" again, 4 "\251\alabel__no", 5 and it finally works |
2022-12-01 14:44:56 +0100 | <mauke> | because some of them are defined in other modules |
2022-12-01 14:45:06 +0100 | <Unhammer> | >=5 |
2022-12-01 14:45:09 +0100 | <mauke> | well, and some of them are recursive |
2022-12-01 14:45:16 +0100 | <mauke> | you can't fully inline a recursive function |
2022-12-01 14:45:46 +0100 | <mauke> | Unhammer: do you have a minimal but complete example that demonstrates the problem? |
2022-12-01 14:46:23 +0100 | feliix42 | (~felix@gibbs.uberspace.de) (Read error: Connection reset by peer) |
2022-12-01 14:46:34 +0100 | <albet70> | what about just non-recursive functions in one module are inline functions? |
2022-12-01 14:46:51 +0100 | <albet70> | how about |
2022-12-01 14:46:51 +0100 | AWizzArd_ | (~code@gehrels.uberspace.de) (Read error: Connection reset by peer) |
2022-12-01 14:46:56 +0100 | <mauke> | now it depends on what exactly you mean by "inline function" |
2022-12-01 14:47:05 +0100 | <Unhammer> | mauke, |
2022-12-01 14:47:08 +0100 | <Unhammer> | git clone -barm https://github.com/unhammer/fastText-haskell && cd fastText-haskell && nix-shell --run 'cabal test' |
2022-12-01 14:47:15 +0100 | <Unhammer> | on apple silicon |
2022-12-01 14:47:25 +0100 | <Unhammer> | works fine on linux :( |
2022-12-01 14:47:45 +0100 | <albet70> | mauke, inline function in cpp or kotlin java |
2022-12-01 14:47:53 +0100 | <mauke> | Unhammer: that doesn't sound very minimal |
2022-12-01 14:47:59 +0100 | <mauke> | albet70: cpp doesn't have functions |
2022-12-01 14:48:06 +0100 | <mauke> | I don't know kotlin |
2022-12-01 14:48:21 +0100 | <albet70> | and java? |
2022-12-01 14:49:02 +0100 | <mauke> | I know java basics, but I don't remember its semantics regarding inline |
2022-12-01 14:49:35 +0100 | feliix42 | (~felix@gibbs.uberspace.de) |
2022-12-01 14:49:46 +0100 | <Unhammer> | sorry, I know. I'll keep fiddling with it. Was just hoping someone would shout out "you silly person you've mixed up your flux and fibble I remember struggling with this in kindergarten" |
2022-12-01 14:49:49 +0100 | <mauke> | oh, it doesn't even have an inline keyword |
2022-12-01 14:50:17 +0100 | <merijn> | hmm |
2022-12-01 14:50:22 +0100 | <merijn> | Didn't base get sum' recently? |
2022-12-01 14:50:26 +0100 | <merijn> | I can't find it |
2022-12-01 14:51:28 +0100 | <merijn> | ah, it's just sum was made strict |
2022-12-01 14:51:30 +0100 | <merijn> | Thank god |
2022-12-01 14:52:21 +0100 | AWizzArd | (~code@gehrels.uberspace.de) |
2022-12-01 14:59:07 +0100 | Putonlalla | (~Putonlall@it-cyan.it.jyu.fi) (Ping timeout: 260 seconds) |
2022-12-01 15:01:05 +0100 | <merijn> | Entirely unrelatedly...anyone have any good way of automatically shrinking a bug reproducer in a giant codebase? xD |
2022-12-01 15:01:09 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-01 15:01:11 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2022-12-01 15:01:31 +0100 | ulvarref` | (~user@185.24.53.152) (Ping timeout: 268 seconds) |
2022-12-01 15:02:49 +0100 | <merijn> | If not: Is anyone bored? ;) |
2022-12-01 15:02:59 +0100 | <mauke> | .oO( pour salt on it ) |
2022-12-01 15:03:21 +0100 | <merijn> | mauke: I'm already plenty salty xD |
2022-12-01 15:06:51 +0100 | <dminuoso> | merijn | So they never do what beginners expect :p |
2022-12-01 15:06:58 +0100 | <dminuoso> | That applies to any behavior of tab you can imagine. |
2022-12-01 15:07:03 +0100 | <merijn> | Sure |
2022-12-01 15:08:20 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 248 seconds) |
2022-12-01 15:08:45 +0100 | money | polo |
2022-12-01 15:15:12 +0100 | Putonlalla | (~Putonlall@it-cyan.it.jyu.fi) |
2022-12-01 15:15:20 +0100 | zant | (~zant@62.96.232.178) |
2022-12-01 15:15:28 +0100 | <chymera> | mauke: why are tabs inferior in haskell? |
2022-12-01 15:15:58 +0100 | <mauke> | see my comments from about 50 minutes ago |
2022-12-01 15:16:20 +0100 | <mauke> | actually more like 44 |
2022-12-01 15:17:13 +0100 | Alex_test | (~al_test@178.34.163.118) (Ping timeout: 260 seconds) |
2022-12-01 15:17:16 +0100 | AlexZenon | (~alzenon@178.34.163.118) (Ping timeout: 252 seconds) |
2022-12-01 15:17:46 +0100 | razetime | (~quassel@49.207.211.219) (Remote host closed the connection) |
2022-12-01 15:18:32 +0100 | <chymera> | mauke: oh, hadn't seen that |
2022-12-01 15:18:48 +0100 | <chymera> | mauke: I don't think I understand, though... can you give me an example? |
2022-12-01 15:19:19 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 260 seconds) |
2022-12-01 15:21:07 +0100 | <chymera> | tabs also determine where things are horizontally, no? how is “where things are horizontally” differ from indentation? |
2022-12-01 15:21:39 +0100 | <dminuoso> | mauke: Curious, why do you say cpp has no functions? |
2022-12-01 15:22:22 +0100 | <mauke> | dminuoso: macros are just token replacement |
2022-12-01 15:22:28 +0100 | <mauke> | I don't count that as functions |
2022-12-01 15:22:45 +0100 | <dminuoso> | I think they meant C++ |
2022-12-01 15:23:00 +0100 | <mauke> | yeah, that would make more sense |
2022-12-01 15:23:07 +0100 | Alex_test | (~al_test@178.34.163.118) |
2022-12-01 15:23:52 +0100 | hyiltiz | (~quassel@31.220.5.250) (Ping timeout: 252 seconds) |
2022-12-01 15:24:01 +0100 | Lycurgus | (~juan@user/Lycurgus) |
2022-12-01 15:24:17 +0100 | AlexZenon | (~alzenon@178.34.163.118) |
2022-12-01 15:28:25 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-12-01 15:30:27 +0100 | kmein | (~weechat@user/kmein) (Quit: ciao kakao) |
2022-12-01 15:30:40 +0100 | <dminuoso> | albet70: In Haskell every binding or function is inlinable, in principle even recursive ones (with some practical limitations). It is a result of referential transparency that lets us do this substitution, and its also the core why learning Haskell is relatively simple. |
2022-12-01 15:31:02 +0100 | kmein | (~weechat@user/kmein) |
2022-12-01 15:31:12 +0100 | <dminuoso> | You can always just substitute a thing with its definition (respecting binders, potentially alpha conversions), and get an equivalent program. |
2022-12-01 15:31:33 +0100 | <dminuoso> | However. In practice this wont hold true, because it can have an impact in performance, but that's not a semantic issue. |
2022-12-01 15:32:21 +0100 | <dminuoso> | Also, just because it could be inlined, does not mean it will get inlined. In GHC it is the simplifiers job to figure out whether or ot a function is suitable for inlining (but we do have pragmas to control this, namely INLINE, INLINABLE, OPAQUE and phase control with these). |
2022-12-01 15:34:36 +0100 | <dminuoso> | Recursive functions could in principle be inlined (at least to a degree, say by just unrolling it), and recursive binding groups *are* actually inlined to a degree as well. |
2022-12-01 15:35:29 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 15:35:50 +0100 | dignissimus | (~sam@user/dignissimus) (Quit: WeeChat 3.7.1) |
2022-12-01 15:36:03 +0100 | <dminuoso> | albet70: Note, that in GHC inlining can easily occur across modules as well - even with polymorphism in the way. There's additional GHC options and pragmas to steer this too. |
2022-12-01 15:37:44 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) |
2022-12-01 15:38:07 +0100 | <dminuoso> | See https://wiki.haskell.org/Inlining_and_Specialisation for further details on that subject |
2022-12-01 15:44:39 +0100 | Lycurgus | (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
2022-12-01 15:47:10 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
2022-12-01 15:47:28 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2022-12-01 15:47:28 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
2022-12-01 15:50:16 +0100 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1) |
2022-12-01 15:53:17 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
2022-12-01 15:55:18 +0100 | <Franciman> | dminuoso: can we say it's a whole-program optimisation? |
2022-12-01 15:55:49 +0100 | <dminuoso> | To an extent, sure |
2022-12-01 15:56:11 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 15:59:08 +0100 | irrgit_ | (~irrgit@146.70.27.242) (Read error: Connection reset by peer) |
2022-12-01 16:00:29 +0100 | <Unhammer> | mauke, I found my bug :) I was doing struct.label = str.c_str(); fixed by doing strcpy(struct.label, str.c_str()) |
2022-12-01 16:00:45 +0100 | <merijn> | Unhammer: Classic mistake :p |
2022-12-01 16:02:02 +0100 | <Unhammer> | my C was too ++ |
2022-12-01 16:02:34 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) (Ping timeout: 268 seconds) |
2022-12-01 16:07:38 +0100 | kmein | (~weechat@user/kmein) (Quit: ciao kakao) |
2022-12-01 16:08:47 +0100 | haritz | (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) |
2022-12-01 16:08:47 +0100 | haritz | (~hrtz@2a02:8010:65b5:0:6009:6384:e3cb:2220) (Changing host) |
2022-12-01 16:08:47 +0100 | haritz | (~hrtz@user/haritz) |
2022-12-01 16:09:19 +0100 | zer0bitz_ | (~zer0bitz@196.244.192.58) |
2022-12-01 16:09:47 +0100 | kmein | (~weechat@user/kmein) |
2022-12-01 16:11:28 +0100 | zer0bitz | (~zer0bitz@196.244.192.58) (Ping timeout: 260 seconds) |
2022-12-01 16:12:57 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-01 16:13:30 +0100 | <jjhoo> | Unhammer: is that label an array that has been allocated ie. something like char label[256]? |
2022-12-01 16:15:10 +0100 | CiaoSen | (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 16:18:15 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 16:18:55 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-01 16:18:56 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-01 16:19:39 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-12-01 16:21:47 +0100 | irrgit_ | (~irrgit@176.113.74.138) |
2022-12-01 16:23:18 +0100 | Guest51 | (~Guest51@2603-8000-0401-65cc-6995-00ab-32cc-e090.res6.spectrum.com) |
2022-12-01 16:23:58 +0100 | Guest51 | (~Guest51@2603-8000-0401-65cc-6995-00ab-32cc-e090.res6.spectrum.com) (Client Quit) |
2022-12-01 16:28:01 +0100 | lisbeths | (uid135845@id-135845.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 16:28:45 +0100 | jero98772 | (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
2022-12-01 16:29:21 +0100 | Guest21 | (~Guest21@2a01:e34:ec28:ec0:ade9:5613:646d:9e8f) |
2022-12-01 16:31:14 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-01 16:31:16 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 16:32:50 +0100 | hueso | (~root@user/hueso) (Quit: No Ping reply in 180 seconds.) |
2022-12-01 16:34:00 +0100 | hueso | (~root@user/hueso) |
2022-12-01 16:36:36 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 16:37:11 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-01 16:37:45 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 16:41:35 +0100 | FragByte | (~christian@user/fragbyte) (Ping timeout: 264 seconds) |
2022-12-01 16:41:56 +0100 | FragByte | (~christian@user/fragbyte) |
2022-12-01 16:42:11 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 246 seconds) |
2022-12-01 16:44:55 +0100 | zer0bitz_ | (~zer0bitz@196.244.192.58) (Read error: Connection reset by peer) |
2022-12-01 16:46:08 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2022-12-01 16:46:09 +0100 | causal | (~user@50.35.83.177) (Quit: WeeChat 3.7.1) |
2022-12-01 16:48:14 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
2022-12-01 16:48:33 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2022-12-01 16:51:00 +0100 | Guest75 | (~Guest75@178.141.153.191) (Quit: Client closed) |
2022-12-01 16:53:37 +0100 | alternateved | (~user@staticline-31-183-171-154.toya.net.pl) (Remote host closed the connection) |
2022-12-01 16:57:05 +0100 | <albet70> | wonderful |
2022-12-01 16:59:34 +0100 | segfaultfizzbuzz | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-01 17:01:47 +0100 | FragByte | (~christian@user/fragbyte) (Ping timeout: 248 seconds) |
2022-12-01 17:01:56 +0100 | FragByte_ | (~christian@user/fragbyte) |
2022-12-01 17:02:20 +0100 | FragByte_ | FragByte |
2022-12-01 17:07:50 +0100 | Guest21 | (~Guest21@2a01:e34:ec28:ec0:ade9:5613:646d:9e8f) (Quit: Client closed) |
2022-12-01 17:13:14 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-12-01 17:13:58 +0100 | Lycurgus | (~juan@user/Lycurgus) |
2022-12-01 17:14:14 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 17:17:34 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:4131:3f7a:f009:112b) (Quit: WeeChat 2.8) |
2022-12-01 17:18:41 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::1a33) (Ping timeout: 255 seconds) |
2022-12-01 17:18:48 +0100 | Guest1499 | (~Guest14@217.64.164.1) (Quit: Client closed) |
2022-12-01 17:20:20 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 256 seconds) |
2022-12-01 17:24:28 +0100 | pta2002 | (~pta2002@161.230.90.170) |
2022-12-01 17:27:00 +0100 | <pta2002> | Hello, typical noob AOC question incoming, I'm trying to use parsec to parse a list of numbers separated by newlines, with an empty line between them (overkill ik, but trying to dust off my parsec skills), basically turn "1\n2\n3\n\n3\n4\n5" into [[1,2,3],[3,4,5]], but I can't figure out how to do this properly |
2022-12-01 17:28:01 +0100 | Kaipei | Kaiepi |
2022-12-01 17:28:36 +0100 | <pta2002> | I got the integer parsing and parsing of a single group to work properly (integer = read <$> many1 digit, group = sepBy integer (char '\n')) but now can't figure out how to parse multiple groups, I tried using sepBy group (string "\n\n") but that doesn't work, I guess because the separator is the same, because if I use a diferent character for the group separator it does work |
2022-12-01 17:29:01 +0100 | <merijn> | pta2002: Can you pastebin your parser? |
2022-12-01 17:29:07 +0100 | <pta2002> | sure |
2022-12-01 17:29:27 +0100 | <merijn> | tbh, I don't think parsec has a great "power-to-weight" ratio for the early AoC puzzles |
2022-12-01 17:29:53 +0100 | mbuf | (~Shakthi@49.204.116.34) (Quit: Leaving) |
2022-12-01 17:30:36 +0100 | <pta2002> | yeah it definitely does not, i know I can just do like line <$> splitBy "\n\n" or something like that but wanted to dust off my parsec skills |
2022-12-01 17:31:04 +0100 | <pta2002> | merijn: https://gist.github.com/pta2002/dfe130522335cf395857fba1e1cbca8e |
2022-12-01 17:31:21 +0100 | <pta2002> | i tried using try there but that doesn't work, just results in an empty list if there's more than one group |
2022-12-01 17:31:50 +0100 | <pta2002> | forgot the type definition, but CalorieList is just [[Int]] |
2022-12-01 17:32:13 +0100 | <merijn> | sepBy raises red flags |
2022-12-01 17:32:22 +0100 | <merijn> | It accepts empty sequences |
2022-12-01 17:32:26 +0100 | <merijn> | Which you don't want |
2022-12-01 17:32:36 +0100 | <pta2002> | ooooh, yeah, i want to end if it finds an empty sequence |
2022-12-01 17:32:39 +0100 | <merijn> | You almost certainly want sepBy1 |
2022-12-01 17:32:55 +0100 | <merijn> | Since every sequence is "1 or more" numbers |
2022-12-01 17:33:13 +0100 | <pta2002> | so you mean sepBy1 on group instead? |
2022-12-01 17:33:42 +0100 | <merijn> | "sepBy1 integer" |
2022-12-01 17:33:44 +0100 | <merijn> | also |
2022-12-01 17:33:47 +0100 | <jean-paul[m]> | pta2002: Are you paying attention to what has been consumed and what hasn't been? |
2022-12-01 17:33:51 +0100 | <pta2002> | doesn't work :c keeps complaining about unexpected "\n" |
2022-12-01 17:33:59 +0100 | <merijn> | Your \n\n end in parseList has no try |
2022-12-01 17:34:02 +0100 | <pta2002> | jean-paul[m]: yeah i mean i guess the issue is it's consuming the \n |
2022-12-01 17:34:43 +0100 | <pta2002> | as in, consuming the final \n looking for an extra integer, but it doesn't find it, and just errors out, which is not what i want, just want it to backtrack that one \n |
2022-12-01 17:35:02 +0100 | <merijn> | oh, might be lack of newline at the end of input too |
2022-12-01 17:35:36 +0100 | <pta2002> | tried parsing "1\n2\n\n1\n2" and that with a \n at the end and it doesn't work |
2022-12-01 17:36:29 +0100 | <merijn> | pta2002: Can you include the actual parse logic? |
2022-12-01 17:36:54 +0100 | <pta2002> | just running on ghci rn but it's parse parseList "(unknown)" [the string] |
2022-12-01 17:37:21 +0100 | <merijn> | What does it return when you run "parse group" on that string? |
2022-12-01 17:37:43 +0100 | <pta2002> | unexpected "\n", expecting digit |
2022-12-01 17:39:22 +0100 | <merijn> | Wait, what if you try to use parsec's newline? |
2022-12-01 17:39:27 +0100 | <pta2002> | so tried making group = (try integer) (char '\n') but get the same issue |
2022-12-01 17:39:34 +0100 | <pta2002> | merijn: where? |
2022-12-01 17:39:49 +0100 | <merijn> | instead of 'char "\n"' |
2022-12-01 17:39:55 +0100 | <pta2002> | same thing |
2022-12-01 17:39:56 +0100 | <merijn> | That's a bad habit anyway |
2022-12-01 17:40:00 +0100 | <merijn> | No it's not |
2022-12-01 17:40:14 +0100 | <pta2002> | uh |
2022-12-01 17:40:15 +0100 | <merijn> | \n maps to "platform specific newline representation" in Haskell |
2022-12-01 17:40:33 +0100 | <pta2002> | ah no, i meant same thing as in same output |
2022-12-01 17:40:36 +0100 | <merijn> | Whereas 'char "\n"' will *only* parse actual \n |
2022-12-01 17:40:39 +0100 | <pta2002> | not same thing as in char '\n' is the same as newline |
2022-12-01 17:40:40 +0100 | <merijn> | hmm |
2022-12-01 17:41:43 +0100 | ft | (~ft@p508dbd59.dip0.t-ipconnect.de) |
2022-12-01 17:43:44 +0100 | <merijn> | Can't really try it right now, because I gotta get started on dinner. I'd write a wrapper that inspects the actual ParseError and reports the exact character it fails via https://hackage.haskell.org/package/parsec-3.1.15.1/docs/Text-Parsec.html#v:errorPos |
2022-12-01 17:44:25 +0100 | <pta2002> | alright, thanks for the help |
2022-12-01 17:45:49 +0100 | ubert1 | (~Thunderbi@2a02:8109:abc0:6434:1782:c1f:7c60:6e20) (Remote host closed the connection) |
2022-12-01 17:52:41 +0100 | econo | (uid147250@user/econo) |
2022-12-01 17:53:18 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-12-01 17:53:46 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-12-01 17:53:47 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 17:54:49 +0100 | <pta2002> | ah! got it! |
2022-12-01 17:55:07 +0100 | <pta2002> | I needed to use sepEndBy1 instead of sepBy1 on group |
2022-12-01 17:55:34 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-01 17:55:51 +0100 | dextaa6 | (~DV@user/dextaa) |
2022-12-01 17:56:38 +0100 | pta2002 | (~pta2002@161.230.90.170) (Quit: leaving) |
2022-12-01 17:57:23 +0100 | dextaa | (~DV@user/dextaa) (Ping timeout: 252 seconds) |
2022-12-01 17:57:23 +0100 | dextaa6 | dextaa |
2022-12-01 18:01:51 +0100 | <merijn> | oh, right |
2022-12-01 18:04:32 +0100 | jrm2 | (~jrm@user/jrm) |
2022-12-01 18:04:46 +0100 | jrm | (~jrm@user/jrm) (Read error: Connection reset by peer) |
2022-12-01 18:05:46 +0100 | jrm2 | jrm |
2022-12-01 18:08:11 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 18:16:39 +0100 | mbuf | (~Shakthi@49.204.116.34) |
2022-12-01 18:17:07 +0100 | <Unhammer> | jjhoo, i think so, by allocaArray |
2022-12-01 18:20:58 +0100 | oldsk00l | (~znc@ec2-18-185-101-38.eu-central-1.compute.amazonaws.com) |
2022-12-01 18:21:29 +0100 | califax | (~califax@user/califx) |
2022-12-01 18:21:59 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Quit: No Ping reply in 180 seconds.) |
2022-12-01 18:22:34 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-12-01 18:37:02 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 18:39:35 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-01 18:42:02 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-12-01 18:42:03 +0100 | nschoe | (~q@141.101.51.197) (Quit: Switching off) |
2022-12-01 18:42:44 +0100 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-12-01 18:43:42 +0100 | <seydar> | I did AoC day 1 and I am embarrassed by my code: https://paste.tomsmeding.com/9Uux9WXy |
2022-12-01 18:44:17 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds) |
2022-12-01 18:44:20 +0100 | <seydar> | I would appreciate any feedback on how to accumulate the provisions in a more haskellish manner |
2022-12-01 18:44:58 +0100 | califax | (~califax@user/califx) |
2022-12-01 18:45:02 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-12-01 18:45:58 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-01 18:46:25 +0100 | <darkling> | I can't lay claim to being haskellish, but this was mine: https://github.com/darkling/AoC2022/blob/main/day01/Main.hs |
2022-12-01 18:46:52 +0100 | <darkling> | Read everything in first, then mangle it into shape. |
2022-12-01 18:48:11 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 18:50:02 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-01 18:50:41 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Remote host closed the connection) |
2022-12-01 18:51:01 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) |
2022-12-01 18:52:49 +0100 | <mauke> | I take it this is not the american politician |
2022-12-01 18:53:36 +0100 | <darkling> | No, Advent of Code. |
2022-12-01 18:53:44 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-01 18:54:34 +0100 | <merijn> | darkling: https://github.com/merijn/AdventOfCode/blob/master/Day1.hs |
2022-12-01 18:54:35 +0100 | <seydar> | darkling: ahhh foldr! i'm an IDIOT |
2022-12-01 18:54:57 +0100 | <geekosaur> | do we have a leaderboard yet? |
2022-12-01 18:55:04 +0100 | ChanServ | +o geekosaur |
2022-12-01 18:55:08 +0100 | <merijn> | geekosaur: The old one still works, but might be full |
2022-12-01 18:55:15 +0100 | <merijn> | glguy's leaderboard, that is |
2022-12-01 18:55:31 +0100 | <darkling> | Heh. I'm not playing that game. It's released at 5am my time. :) |
2022-12-01 18:56:03 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 18:56:13 +0100 | <merijn> | I think the most useful trick in my version is: sortOn Down :p |
2022-12-01 18:56:22 +0100 | | https://www.reddit.com/r/haskell | Admin: #haskell-ops | Offtopic: #haskell-offtopic | https://downloads.haskell.org | Paste code/errors: https://paste.tomsmeding.com | Logs: https://ircbrowse.tomsmeding.com/browse/lchaskell | AoC Leaderboard: 43100-84040706 |
2022-12-01 18:56:31 +0100 | geekosaur | -o geekosaur |
2022-12-01 18:56:56 +0100 | <darkling> | Also, the top of the global leaderboard today finished *both* tasks in 53 seconds... I can't compete with that in *any* language I know. :) |
2022-12-01 18:58:10 +0100 | <mauke> | github is being weird |
2022-12-01 18:58:38 +0100 | <mauke> | I tried logging in to AoC with my github account, and the button to do so is labeled "Authorize topaz", but I have no idea what topaz is |
2022-12-01 18:59:25 +0100 | <tomsmeding> | mauke: topaz is the maker of AoC |
2022-12-01 18:59:30 +0100 | <mauke> | oh, it's Eric Wastl's github account name. but the authorization page only lists him by full name |
2022-12-01 18:59:46 +0100 | <mauke> | UX fail |
2022-12-01 19:00:01 +0100 | coot | (~coot@213.134.171.3) (Quit: coot) |
2022-12-01 19:01:27 +0100 | use-value | (~Thunderbi@2a00:23c6:8a03:2f01:75c2:a71f:beaa:29bf) (Quit: use-value) |
2022-12-01 19:02:20 +0100 | pestilence | (~alice@2601:c2:8300:a580:a9bd:4df1:6112:bb69) |
2022-12-01 19:03:05 +0100 | pestilence | (~alice@2601:c2:8300:a580:a9bd:4df1:6112:bb69) (Client Quit) |
2022-12-01 19:03:23 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
2022-12-01 19:03:38 +0100 | Lycurgus | (~juan@user/Lycurgus) (Ping timeout: 252 seconds) |
2022-12-01 19:03:40 +0100 | jinsun__ | (~jinsun@user/jinsun) |
2022-12-01 19:03:40 +0100 | jinsun | Guest9413 |
2022-12-01 19:03:40 +0100 | Guest9413 | (~jinsun@user/jinsun) (Killed (cadmium.libera.chat (Nickname regained by services))) |
2022-12-01 19:03:40 +0100 | jinsun__ | jinsun |
2022-12-01 19:04:28 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de) |
2022-12-01 19:07:39 +0100 | <seydar> | what do I do about hidden packages? I'm trying to use splitOn in Data.List.Split https://paste.tomsmeding.com/ksGCIefo |
2022-12-01 19:07:48 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2022-12-01 19:07:56 +0100 | <iqubic> | Add split to you cabal file, if you have one. |
2022-12-01 19:08:34 +0100 | <seydar> | what if I'm not cool enough to have a cabal file |
2022-12-01 19:08:51 +0100 | <iqubic> | How did you install your libraries? |
2022-12-01 19:08:54 +0100 | moonsheep | (~user@user/moonsheep) |
2022-12-01 19:09:48 +0100 | <geekosaur> | if you're doing things old style then you need to use `-package split` on the ghc command line |
2022-12-01 19:10:03 +0100 | <geekosaur> | but really, switch to using either cabal or stack, your life will be much easier |
2022-12-01 19:10:14 +0100 | <seydar> | damn, so i need to have a cabal file |
2022-12-01 19:10:21 +0100 | <moonsheep> | let me guess: today has been a split-heavy day? |
2022-12-01 19:10:30 +0100 | <moonsheep> | question-wise |
2022-12-01 19:10:47 +0100 | <geekosaur> | personally I'm a cabal type but there's a fair number of stack users here |
2022-12-01 19:10:55 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
2022-12-01 19:10:57 +0100 | <moonsheep> | I couldn't recommend stack enough |
2022-12-01 19:10:58 +0100 | <seydar> | moonsheep: at first I was doing things the amish way, writing haskell the way they did back in the day, but now I'm trying to easy myself into the 21st century |
2022-12-01 19:11:14 +0100 | <moonsheep> | I mentioned that because of advent of code |
2022-12-01 19:11:20 +0100 | <geekosaur> | moonsheep, I haven't looked but AoC just started and I would not be surprised if it called for split |
2022-12-01 19:11:33 +0100 | <moonsheep> | yeah I ended up handrolling split |
2022-12-01 19:11:35 +0100 | <moonsheep> | lost me like 2 minutes |
2022-12-01 19:11:51 +0100 | <moonsheep> | also I should've loaded the input as text, not string that was a pita |
2022-12-01 19:11:52 +0100 | <iqubic> | moonsheep, split is useful for parsing many of the common input formats Eric uses. |
2022-12-01 19:11:56 +0100 | <moonsheep> | yeah |
2022-12-01 19:12:55 +0100 | <mauke> | ok, maybe I'm cheating, but here's my first solution: https://paste.tomsmeding.com/rhxwvtrX |
2022-12-01 19:14:19 +0100 | <iqubic> | I use Megaparsec to parse all of the inputs. |
2022-12-01 19:14:20 +0100 | <iqubic> | https://paste.tomsmeding.com/clH0Wblh |
2022-12-01 19:14:34 +0100 | <moonsheep> | isn't that a bit overkll? |
2022-12-01 19:14:48 +0100 | <moonsheep> | well, except for the days that are about parsing of course (like that network packet one last year) |
2022-12-01 19:15:08 +0100 | <iqubic> | moonsheep, yeah |
2022-12-01 19:15:23 +0100 | <iqubic> | But I like to learn when doing advent of code. |
2022-12-01 19:15:34 +0100 | <moonsheep> | ah |
2022-12-01 19:15:48 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-01 19:15:59 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) |
2022-12-01 19:16:01 +0100 | <darkling> | Me too. I only got to day 3 last year, but that's because I was doing something fairly silly. :) |
2022-12-01 19:16:34 +0100 | <darkling> | (Z80 assembly on a SpecNext) |
2022-12-01 19:17:10 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-01 19:18:24 +0100 | <iqubic> | moonsheep: Do you remember which day the network packet day was? |
2022-12-01 19:19:21 +0100 | <juri_> | hmm. i made a tiny change in my program, in pure haskell, and now get segmentation faults. WTFsprinkles. |
2022-12-01 19:19:29 +0100 | <seydar> | how do you all manage all the days for AoC with cabal? |
2022-12-01 19:19:31 +0100 | justache- | justache |
2022-12-01 19:19:46 +0100 | <iqubic> | Easily... |
2022-12-01 19:20:23 +0100 | <darkling> | I'm just going for one directory a day. Filthy, but expedient. :) |
2022-12-01 19:22:15 +0100 | <seydar> | yeah darkling that's what i'm trying to avoid. certainly expedient, but... the boilerplate required just to get a simple program to run -- and to do it daily? i must be missing something |
2022-12-01 19:22:18 +0100 | califax | (~califax@user/califx) |
2022-12-01 19:22:20 +0100 | <seydar> | maybe i'm just missing a work ethic |
2022-12-01 19:22:37 +0100 | <darkling> | Copy from yesterday... |
2022-12-01 19:23:17 +0100 | <moonsheep> | iqubic: no but probably google does |
2022-12-01 19:23:22 +0100 | <moonsheep> | https://www.google.com/search?q=site%3Aadventofcode.com+packets |
2022-12-01 19:23:26 +0100 | <moonsheep> | https://adventofcode.com/2021/day/16 |
2022-12-01 19:25:06 +0100 | <freeside> | erm. I'm trying to build HLS to match LTS 20.2, but I can't get any `ghcup compile hls` incantation to work, with any combination of versions. Is it me? I'm trying ghcup compile hls -v 1.8.0.0 --ghc 9.2.5 |
2022-12-01 19:25:24 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 19:25:51 +0100 | <yushyin> | i have a common stanza for the days modules and a script to generate stubs for Day01-25 |
2022-12-01 19:26:29 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection) |
2022-12-01 19:26:38 +0100 | <moonsheep> | freeside: I don't think HLS works with GHC 9.2.5 yet |
2022-12-01 19:26:42 +0100 | <moonsheep> | well not sure |
2022-12-01 19:26:46 +0100 | moonsheep | (~user@user/moonsheep) (ERC 5.4 (IRC client for GNU Emacs 28.2)) |
2022-12-01 19:26:56 +0100 | <freeside> | i can't get it to compile even with the versions it's supposed to work with |
2022-12-01 19:28:21 +0100 | <freeside> | like, 9.2.4 is supposed to be hls-powered, according to both ghcup tui and https://haskell-language-server.readthedocs.io/en/latest/support/ghc-version-support.html |
2022-12-01 19:28:27 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::37af) |
2022-12-01 19:29:31 +0100 | <mauke> | my haskell solution: https://paste.tomsmeding.com/Oq7cTCSC |
2022-12-01 19:30:14 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-01 19:30:23 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) (Ping timeout: 260 seconds) |
2022-12-01 19:30:48 +0100 | <freeside> | After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: haskell-language-server, hls-plugin-api, hls-stylish-haskell-plugin, haskell-language-server:stylishhaskell |
2022-12-01 19:32:09 +0100 | <freeside> | seydar: i get all the libraries available by running as a #!stack script, https://github.com/mengwong/adventofcode/blob/bf8eeef5e7f403f01a666341febd43271f63a990/day01/aoc20… |
2022-12-01 19:32:14 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-01 19:32:14 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-01 19:32:14 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-01 19:33:09 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 19:33:10 +0100 | <mauke> | and from there you can get the second solution by adding (sum . take 3 . sortBy (flip compare)) |
2022-12-01 19:34:04 +0100 | hgolden | (~hgolden@cpe-172-251-233-141.socal.res.rr.com) (Remote host closed the connection) |
2022-12-01 19:35:28 +0100 | hgolden | (~hgolden@cpe-172-251-233-141.socal.res.rr.com) |
2022-12-01 19:35:32 +0100 | mbuf | (~Shakthi@49.204.116.34) (Quit: Leaving) |
2022-12-01 19:36:23 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 19:36:41 +0100 | <seydar> | I am so close, but I have a type error: https://paste.tomsmeding.com/qVvN6eKU |
2022-12-01 19:36:49 +0100 | <seydar> | I'm missing something obvious |
2022-12-01 19:36:55 +0100 | <seydar> | Nobody answer, I just realized what I need to do |
2022-12-01 19:37:47 +0100 | zant | (~zant@62.96.232.178) (Ping timeout: 268 seconds) |
2022-12-01 19:37:49 +0100 | <mauke> | environment? what the |
2022-12-01 19:38:29 +0100 | <mauke> | :t maximum |
2022-12-01 19:38:30 +0100 | <lambdabot> | (Foldable t, Ord a) => t a -> a |
2022-12-01 19:39:01 +0100 | <mauke> | > maximum [1, 10, 2, -4, 11, 2] |
2022-12-01 19:39:02 +0100 | <lambdabot> | 11 |
2022-12-01 19:39:10 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
2022-12-01 19:39:15 +0100 | <mauke> | @src print |
2022-12-01 19:39:15 +0100 | <lambdabot> | print x = putStrLn (show x) |
2022-12-01 19:39:39 +0100 | <freeside> | if we are allowed to go OG Unix Hacker, may I submit $ perl -000 -nle 'for (split /\n/) { $sum += $_ }; print $sum; $sum = 0' < input.txt | sort -n | tail -3 | paste -sd+ - | bc |
2022-12-01 19:39:42 +0100 | <freeside> | lol |
2022-12-01 19:40:09 +0100 | <mauke> | freeside: perl -MList::Util=max,sum0 -00 -wE 'say max map sum0(split /\n/), readline' < input |
2022-12-01 19:40:17 +0100 | <Vq> | freeside: I don't think we should be allowed. |
2022-12-01 19:40:19 +0100 | <seydar> | okay now I'm stumped: https://paste.tomsmeding.com/JUO3jSFG |
2022-12-01 19:40:44 +0100 | <freeside> | what's that newfangled List::Util? we didn't have that in my day |
2022-12-01 19:40:45 +0100 | <geekosaur> | freeside, I just got the same error trying to build for 9.2.5. I think that means it just isn't supported yet by some dependency. |
2022-12-01 19:40:51 +0100 | <yushyin> | mauke: you are lukas mai, aren't you? |
2022-12-01 19:41:04 +0100 | <geekosaur> | not sure if there's a way to pass --allow-newer via ghcup compile |
2022-12-01 19:41:08 +0100 | <mauke> | freeside: oh yeah, that's brand new from 2002 |
2022-12-01 19:41:16 +0100 | <freeside> | haha |
2022-12-01 19:41:21 +0100 | <mauke> | yushyin: why? |
2022-12-01 19:41:33 +0100 | <freeside> | part of me wonders if Raku would be able to do it in like 12 characters |
2022-12-01 19:41:38 +0100 | <Vq> | freeside: Is "split /\n/" for emulating awk? |
2022-12-01 19:41:39 +0100 | <yushyin> | mauke: i think i remeber you from #perl on freenode |
2022-12-01 19:42:03 +0100 | <yushyin> | your nick looks familiar |
2022-12-01 19:42:06 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2022-12-01 19:42:16 +0100 | <mauke> | yeah :-) |
2022-12-01 19:42:43 +0100 | <freeside> | geekosaur: i can't even get it to build for 9.2.4 or any other version it's supposed to support, so i feel like something is wrong more generally. |
2022-12-01 19:42:45 +0100 | <mauke> | :t return |
2022-12-01 19:42:45 +0100 | <lambdabot> | Monad m => a -> m a |
2022-12-01 19:42:48 +0100 | <mauke> | seydar: ^ |
2022-12-01 19:43:10 +0100 | <freeside> | Vq: the split /\n/ operates against after the -000 takes effect ... that does the paragraph separation |
2022-12-01 19:43:28 +0100 | <yushyin> | mauke: i used to use some of your perl libraries ;) |
2022-12-01 19:43:38 +0100 | <geekosaur> | I've built hls before so unless this is a 1.8.0.0 bug (last time I did it is 1.7.0.0) I doubt it |
2022-12-01 19:43:43 +0100 | <mauke> | cool |
2022-12-01 19:43:48 +0100 | <freeside> | i shall try 1.7.0.0 |
2022-12-01 19:44:02 +0100 | <geekosaur> | figured out how to pass --allow-newer, seems to be building for me now |
2022-12-01 19:44:16 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2022-12-01 19:44:52 +0100 | <seydar> | mauke: ugh. thank you |
2022-12-01 19:45:07 +0100 | <mauke> | freeside: for the second one, perl -MList::Util=sum0 -00 -wE 'say sum0 +(sort { $b <=> $a } map sum0(split /\n/), readline)[0 .. 2]' < input |
2022-12-01 19:45:13 +0100 | <geekosaur> | bvut it's building a lot of stuff since I switched to cabal HEAD and XDG mode so everything needs to be rebuilt |
2022-12-01 19:45:40 +0100 | <mauke> | seydar: and have a look at 'maximum' and 'print' if you want to shorten your code slightly |
2022-12-01 19:47:36 +0100 | <seydar> | mauke: good catch -- updated those too |
2022-12-01 19:47:51 +0100 | <freeside> | sometimes you just wanna pipe output to sort(1) |
2022-12-01 19:48:37 +0100 | <freeside> | geekosaur: yes, mine is building too now, thank you. https://www.haskell.org/ghcup/guide/#hls seems severely in need of a revision |
2022-12-01 19:49:55 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2022-12-01 19:50:02 +0100 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Quit: leaving) |
2022-12-01 19:52:05 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2022-12-01 19:52:44 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::37af) (Remote host closed the connection) |
2022-12-01 19:57:29 +0100 | king_gs | (~Thunderbi@187.201.158.17) |
2022-12-01 19:57:56 +0100 | king_gs | (~Thunderbi@187.201.158.17) (Client Quit) |
2022-12-01 19:59:30 +0100 | <freeside> | mauke: shrank a little further, perl -MList::Util=sum0 -00 -nE 'say sum0 split' | tail -1 |
2022-12-01 19:59:44 +0100 | <freeside> | er, sort | tail -1 |
2022-12-01 19:59:59 +0100 | opticblast | (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds) |
2022-12-01 20:03:32 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-01 20:05:14 +0100 | <freeside> | oof. Error: cabal: Failed to build primitive-unlifted-1.0.0.0 (which is required by exe:haskell-language-server from haskell-language-server-1.8.0.0 |
2022-12-01 20:05:23 +0100 | <freeside> | does XDG mode help fix that? |
2022-12-01 20:05:36 +0100 | <geekosaur> | XDG just changes paths |
2022-12-01 20:05:41 +0100 | <freeside> | reading |
2022-12-01 20:06:06 +0100 | <freeside> | ok. I'm trying to view the build log but the build log is squished into like 6 lines of blue scroll |
2022-12-01 20:06:07 +0100 | <geekosaur> | I just failed with that one as well 😞 |
2022-12-01 20:07:24 +0100 | <freeside> | ...glad to hear it's not just me... |
2022-12-01 20:08:10 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-01 20:08:32 +0100 | <freeside> | does AoC generate different input data files for different users? |
2022-12-01 20:09:06 +0100 | <freeside> | surely they must |
2022-12-01 20:10:44 +0100 | opticblast | (~Thunderbi@secure-165.caltech.edu) |
2022-12-01 20:10:56 +0100 | <mauke> | last three digits of my second solution: 041 |
2022-12-01 20:11:37 +0100 | <mauke> | first number in input: 7896 |
2022-12-01 20:12:54 +0100 | <freeside> | yeah, everybody gets a different input file, then, so no cheating |
2022-12-01 20:12:59 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-12-01 20:13:07 +0100 | thyriaen | (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Remote host closed the connection) |
2022-12-01 20:13:07 +0100 | <freeside> | my last 3 digits are 172 |
2022-12-01 20:14:10 +0100 | money | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 20:14:20 +0100 | money | Guest499 |
2022-12-01 20:14:32 +0100 | Guest499 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-01 20:15:37 +0100 | <freeside> | heh, matt might went OG Unix too. https://github.com/mattmight/advent-of-code-2022/blob/main/day-1/calorie-count.awk |
2022-12-01 20:17:43 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 20:18:17 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-01 20:18:17 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-01 20:18:17 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-01 20:20:53 +0100 | Lycurgus | (~juan@98.4.112.204) |
2022-12-01 20:20:53 +0100 | Lycurgus | (~juan@98.4.112.204) (Changing host) |
2022-12-01 20:20:53 +0100 | Lycurgus | (~juan@user/Lycurgus) |
2022-12-01 20:23:17 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-12-01 20:24:06 +0100 | <freeside> | well, i'm giving up on HLS for tonight, but this is really unsatisfactory. https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-0.0.7.yaml has a section for 9.2.5 right there. |
2022-12-01 20:24:46 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 20:26:05 +0100 | money | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 20:26:29 +0100 | money | Guest6798 |
2022-12-01 20:28:17 +0100 | zant | (~zant@62.214.20.26) |
2022-12-01 20:28:43 +0100 | biberu | (~biberu@user/biberu) (Read error: Connection reset by peer) |
2022-12-01 20:31:18 +0100 | Guest6798 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Ping timeout: 256 seconds) |
2022-12-01 20:31:53 +0100 | biberu | (~biberu@user/biberu) |
2022-12-01 20:35:28 +0100 | Problem-Haver | (~Problem-H@185.234.165.56) |
2022-12-01 20:35:28 +0100 | Vajb | (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer) |
2022-12-01 20:35:50 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2022-12-01 20:36:11 +0100 | Vajb | (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) |
2022-12-01 20:37:06 +0100 | <geekosaur> | primitive-unlifted sounds like the sort of thing that wouldn't be very portable, tbh |
2022-12-01 20:37:08 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2022-12-01 20:37:11 +0100 | <geekosaur> | probably just have to wait |
2022-12-01 20:38:50 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:7a6d:77a5:de0b:541) |
2022-12-01 20:40:18 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-01 20:40:40 +0100 | freeside_ | (~mengwong@103.252.202.193) |
2022-12-01 20:40:44 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 255 seconds) |
2022-12-01 20:40:54 +0100 | freeside_ | freeside |
2022-12-01 20:41:43 +0100 | <mauke> | if it were portable, you could probably lift it |
2022-12-01 20:45:20 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
2022-12-01 20:46:55 +0100 | Problem-Haver | (~Problem-H@185.234.165.56) (Quit: Client closed) |
2022-12-01 20:46:56 +0100 | king_gs | (~Thunderbi@2806:103e:29:2294:96dc:39a8:1254:6158) |
2022-12-01 20:48:27 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
2022-12-01 20:49:53 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-01 20:52:53 +0100 | L29Ah | (~L29Ah@wikipedia/L29Ah) |
2022-12-01 20:53:39 +0100 | Scraeling | (~Username@user/scraeling) (Quit: Going offline, see ya! (www.adiirc.com)) |
2022-12-01 20:55:01 +0100 | <geekosaur> | fwiw, the log says RuntimeRep(UnliftedRep) is not in GHC.Exts. and in fact there is no such constructor as of 9.2.5, so primitive-unlifted will need some work for 9.2.5 |
2022-12-01 20:56:08 +0100 | <geekosaur> | freeside ^^ |
2022-12-01 20:56:53 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-12-01 20:57:50 +0100 | Lycurgus | (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
2022-12-01 20:58:09 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 20:58:52 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-01 21:00:48 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-01 21:00:48 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-01 21:03:19 +0100 | <freeside> | oy vey |
2022-12-01 21:08:43 +0100 | jmdaemon | (~jmdaemon@user/jmdaemon) |
2022-12-01 21:09:39 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) (Remote host closed the connection) |
2022-12-01 21:14:12 +0100 | <geekosaur> | looks unmaintained, last commit almost a year ago |
2022-12-01 21:15:31 +0100 | EvanR | (~EvanR@user/evanr) (Remote host closed the connection) |
2022-12-01 21:15:47 +0100 | <ChaiTRex> | Is there some way to log the input and output of a GHCi session to a text file? |
2022-12-01 21:15:50 +0100 | EvanR | (~EvanR@user/evanr) |
2022-12-01 21:16:43 +0100 | <geekosaur> | aside from something generic like script? no |
2022-12-01 21:17:12 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-01 21:18:12 +0100 | <ChaiTRex> | OK, thanks. |
2022-12-01 21:21:37 +0100 | <ChaiTRex> | script works nicely. Thanks again. |
2022-12-01 21:27:12 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 21:32:29 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2022-12-01 21:32:35 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-01 21:33:13 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 21:34:10 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2022-12-01 21:34:44 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:7a6d:77a5:de0b:541) (Quit: WeeChat 2.8) |
2022-12-01 21:35:13 +0100 | pavonia | (~user@user/siracusa) |
2022-12-01 21:36:04 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2022-12-01 21:36:38 +0100 | haasn | (~nand@haasn.dev) (Quit: ZNC 1.7.5+deb4 - https://znc.in) |
2022-12-01 21:37:07 +0100 | haasn | (~nand@haasn.dev) |
2022-12-01 21:39:37 +0100 | cjay- | cjay |
2022-12-01 21:41:42 +0100 | <monochrom> | I tell my terminal emulator to have like 1000 lines of scrollback, so I would just need copy-paste. |
2022-12-01 21:42:39 +0100 | <monochrom> | Only once in a while insufficient for two runs of LaTeX on a really large file. :) |
2022-12-01 21:45:08 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) |
2022-12-01 21:48:19 +0100 | eggplantade | (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-12-01 21:55:43 +0100 | mokee | (~mokee@37.228.215.235) (Quit: off) |
2022-12-01 21:57:59 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-12-01 21:58:34 +0100 | irrgit_ | (~irrgit@176.113.74.138) (Ping timeout: 256 seconds) |
2022-12-01 21:59:15 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-12-01 21:59:38 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-01 22:04:14 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-01 22:10:39 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Remote host closed the connection) |
2022-12-01 22:10:57 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2022-12-01 22:14:59 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
2022-12-01 22:17:58 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-01 22:18:57 +0100 | sonny | (~sonny@bras-base-london142vw-grc-28-76-71-155-9.dsl.bell.ca) |
2022-12-01 22:19:06 +0100 | <sonny> | What are interfaces called in haskell? |
2022-12-01 22:19:21 +0100 | <dsal> | What does "interface" mean to you? |
2022-12-01 22:20:34 +0100 | <geekosaur> | I would very strongly suggest you not try to approach Haskell as an object oriented language |
2022-12-01 22:21:33 +0100 | <sonny> | dsal java interface |
2022-12-01 22:21:39 +0100 | <sonny> | geekosaur I'm just curious |
2022-12-01 22:21:47 +0100 | <dminuoso> | sonny: we dont have a directly corresponding mechanism. |
2022-12-01 22:21:55 +0100 | <mauke> | haskell doesn't have java interfaces |
2022-12-01 22:21:57 +0100 | <dsal> | Languages (programming and human) don't always have concepts that map 1:1 between them. |
2022-12-01 22:22:01 +0100 | <dminuoso> | There's two approaches that fit in that general area, which is typeclasses and just data types. |
2022-12-01 22:22:13 +0100 | <mauke> | and existential dread |
2022-12-01 22:22:17 +0100 | <dminuoso> | Typeclasses allow a bit of subtyping in that respect, but they are not commonly used for interface style programming |
2022-12-01 22:22:29 +0100 | <sonny> | eli5 type classes |
2022-12-01 22:22:43 +0100 | <dsal> | I don't know many five year old programmers. |
2022-12-01 22:22:47 +0100 | <dminuoso> | More commonly you would just define a data type say `data Formatter = Formatter { ... }` and include some functions as fields that specify a kind of interface. |
2022-12-01 22:22:59 +0100 | <dminuoso> | And then functions using that interface would just demand a Formatter as an argument `Formatter -> ...` |
2022-12-01 22:23:16 +0100 | <sonny> | I see |
2022-12-01 22:23:32 +0100 | <dsal> | A better approach is "I'm trying to solve a problem and I'm stuck on this part. How should I approach it in Haskell?" |
2022-12-01 22:23:45 +0100 | <sonny> | so I guess the concept is not as important because you can use functions at every level |
2022-12-01 22:24:03 +0100 | <dsal> | The concept isn't important because we're not transliterating java code. |
2022-12-01 22:24:05 +0100 | <sonny> | dsal I'm not solving anything ... just wondering |
2022-12-01 22:24:31 +0100 | <dminuoso> | sonny: typeclasses superficially look like interfaces, in that you can define it and a list of what we call methods (constituents of that interface), and then you can declare an instance of a type for that typeclass (which corresponds to implementing an interface for a given type) |
2022-12-01 22:24:53 +0100 | <dminuoso> | and each instance must then implement each method of that typeclass |
2022-12-01 22:25:01 +0100 | <sonny> | are they like ML modules? |
2022-12-01 22:25:04 +0100 | <dminuoso> | not at all |
2022-12-01 22:25:06 +0100 | <mauke> | if you wanted to learn about type classes by example, I'd probably recommend this order: Show, Eq/Ord, Read/Enum, Bounded, Functor |
2022-12-01 22:25:44 +0100 | <sonny> | dminuoso no because they don't take parameters or do I misunderstand both concepts? |
2022-12-01 22:25:50 +0100 | <Rembane> | sonny: Typeclasses are more like dictionaries/maps with fancy syntax |
2022-12-01 22:25:52 +0100 | <dminuoso> | sonny: oh hold on, I was a bit too hasty, I misread that as ML functor for some reason. |
2022-12-01 22:25:59 +0100 | <Rembane> | sonny: They do ad hoc polymorphism quite well. |
2022-12-01 22:26:11 +0100 | <sonny> | interesting |
2022-12-01 22:26:23 +0100 | <mauke> | Show is conceptually close to a java interface; the others add more and more "exotic" features |
2022-12-01 22:26:24 +0100 | <dminuoso> | sonny: what do you mean by ML module exactly? |
2022-12-01 22:26:28 +0100 | gmg | (~user@user/gehmehgeh) |
2022-12-01 22:26:53 +0100 | codaraxis | (~codaraxis@user/codaraxis) |
2022-12-01 22:26:56 +0100 | <sonny> | I mean it literally, I assumed you'd all be familiar with ML |
2022-12-01 22:27:05 +0100 | <dsal> | Typeclasses are generally used to express *constraints* on things. "I can take any type as long as it knows how to do X." |
2022-12-01 22:27:23 +0100 | codaraxis | (~codaraxis@user/codaraxis) (Remote host closed the connection) |
2022-12-01 22:27:36 +0100 | <sonny> | it'd be hard for me to explain otherwise |
2022-12-01 22:27:39 +0100 | <dminuoso> | sonny: okay then no, they are very much unlike from each other |
2022-12-01 22:27:43 +0100 | <sonny> | ok |
2022-12-01 22:28:06 +0100 | <sonny> | dsal sounds like dependent types |
2022-12-01 22:28:16 +0100 | <dminuoso> | on a superficial level typeclasses and interfaces look very similar. |
2022-12-01 22:28:28 +0100 | <dsal> | Dependent types are another thing. |
2022-12-01 22:28:31 +0100 | <dsal> | :t show |
2022-12-01 22:28:32 +0100 | <lambdabot> | Show a => a -> String |
2022-12-01 22:28:37 +0100 | <mauke> | class Show a where { show :: a -> String } |
2022-12-01 22:28:40 +0100 | <dminuoso> | sonny: but the thing is, we have subtyping wired into that. |
2022-12-01 22:28:42 +0100 | <mauke> | (simplified) |
2022-12-01 22:29:00 +0100 | <dminuoso> | sonny: so we have a typeclass called Eq, whose methods are == and /=, so its the tyepclass of types that can be compared |
2022-12-01 22:29:02 +0100 | <dsal> | `show` can convert any `a` to a `String` as long as the `a` has a `Show` instance. |
2022-12-01 22:29:07 +0100 | <Rembane> | sonny: If you know ML by heart this paper might be helpful: https://people.csail.mit.edu/dnj/teaching/6898/papers/wadler88.pdf |
2022-12-01 22:29:20 +0100 | <dminuoso> | But we also have `class Eq a => Ord a ...` which requires (but also implies) Eq |
2022-12-01 22:29:30 +0100 | <sonny> | not by heart but that does look good, thanks |
2022-12-01 22:29:44 +0100 | <mauke> | ooh, the classics |
2022-12-01 22:31:04 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-01 22:31:12 +0100 | <mauke> | what's the type of (=) in ocaml nowadays? still 'a -> 'a -> bool? |
2022-12-01 22:32:15 +0100 | <dminuoso> | If memory serves right, typeclasses were originally introduced as a way to deal with overloading numbers |
2022-12-01 22:32:48 +0100 | <dsal> | It makes sense that `Num` would be old because it feels like a lot of learning can come from that. |
2022-12-01 22:32:53 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2022-12-01 22:34:41 +0100 | <dminuoso> | Its also curious that Num happens to be one of the things where GHC does not conform to Haskell2010. |
2022-12-01 22:34:55 +0100 | <dminuoso> | Because Haskel2010 mandates class (Eq a, Show a) => Num a |
2022-12-01 22:35:27 +0100 | <Rembane> | dminuoso: Is Num a superclass to Floating? |
2022-12-01 22:35:58 +0100 | <dminuoso> | Yes, via Fractional |
2022-12-01 22:36:43 +0100 | <Rembane> | Cool, then I can't see how Eq could be needed for Num. |
2022-12-01 22:36:59 +0100 | <mauke> | the problem with (Eq a, Show a) => Num a is that it interferes with making every monad an instance of Num |
2022-12-01 22:37:29 +0100 | <geekosaur> | Rembane, mostly so Num literals can be treated as patterns |
2022-12-01 22:37:44 +0100 | <Rembane> | geekosaur: That's a very good reason. |
2022-12-01 22:38:30 +0100 | <mauke> | you can still treat them as patterns (just add an Eq constraint while type checking), no? |
2022-12-01 22:38:50 +0100 | <geekosaur> | yep, but it no longer "just works", you need the constraint |
2022-12-01 22:38:58 +0100 | money | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-01 22:39:22 +0100 | money | Guest5066 |
2022-12-01 22:39:38 +0100 | <mauke> | I mean, you'd desugar 'foo 42' to 'foo x | x == 42' and any relevant constraints fall out automatically |
2022-12-01 22:39:53 +0100 | Guest5066 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-01 22:39:57 +0100 | <mauke> | if you can add (Num a), you can add (Eq a) |
2022-12-01 22:40:39 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
2022-12-01 22:42:01 +0100 | king_gs | (~Thunderbi@2806:103e:29:2294:96dc:39a8:1254:6158) (Ping timeout: 256 seconds) |
2022-12-01 22:44:09 +0100 | jumper149 | (~jumper149@base.felixspringer.xyz) |
2022-12-01 22:44:45 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 22:44:46 +0100 | jumper149 | (~jumper149@base.felixspringer.xyz) (Client Quit) |
2022-12-01 22:45:33 +0100 | jumper149 | (~jumper149@base.felixspringer.xyz) |
2022-12-01 22:46:09 +0100 | jumper149 | (~jumper149@base.felixspringer.xyz) (Client Quit) |
2022-12-01 22:46:13 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-01 22:46:58 +0100 | <rustisafungus> | so this is more of a computational math question so feel free to tell me to take a hike, but i think this has enough of a computer science/research flavor that i thought #haskell was a good place to ask: |
2022-12-01 22:47:06 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-12-01 22:47:41 +0100 | <rustisafungus> | let's say that i am trying to generate samples from a high dimensional distribution, such as a 1 million dimensional distribution |
2022-12-01 22:48:16 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 22:48:19 +0100 | <rustisafungus> | of course, i can generate samples where each dimension is reasonably statistically independent using a prng |
2022-12-01 22:48:25 +0100 | <dminuoso> | mauke: the real problem is that there's some things like infinite sequences you couldnt have a Num instance of |
2022-12-01 22:48:48 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-01 22:48:54 +0100 | <rustisafungus> | my question is this: i would like to generate a "bunch" of other distributions |
2022-12-01 22:49:30 +0100 | <rustisafungus> | that "bunch" need not be a rigorous construct but ought to emphasize varying levels and types of correlations or relationships between my one million dimensions |
2022-12-01 22:51:39 +0100 | <rustisafungus> | so my question is, is there a nice way of generating a "bunch" of distributions? the precise dimension need not be 1 million, it could also be one thousand or somesuch, but it does need to be a fairly substantial number (probably at least 100) |
2022-12-01 22:51:57 +0100 | <rustisafungus> | vaguely speaking this would be like quickcheck for distributions |
2022-12-01 22:51:59 +0100 | sonny | (~sonny@bras-base-london142vw-grc-28-76-71-155-9.dsl.bell.ca) (Quit: Client closed) |
2022-12-01 22:53:02 +0100 | <darkling> | Work out what kind of variations you want to do, and then ring the changes. So, for example, are they linear in each dimension, or do some dimensions have other statistical distributions? |
2022-12-01 22:53:17 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 252 seconds) |
2022-12-01 22:53:29 +0100 | <darkling> | (Say, triangular, bitriangular, binomial, beta distribution...) |
2022-12-01 22:53:30 +0100 | <rustisafungus> | linear would be fairly easy, i could pick a random ellipse or something and sample from that |
2022-12-01 22:53:45 +0100 | <rustisafungus> | but i am thinking "lots of varying and complex relationships" |
2022-12-01 22:54:03 +0100 | <darkling> | Then you can say each dimension has the distribution selected randomly (with some weighting). |
2022-12-01 22:54:08 +0100 | <dminuoso> | geekosaur: I think its not a big downside. It becomes very hard to come up with a way where the lack of Eq will hinder you. |
2022-12-01 22:54:20 +0100 | <dminuoso> | Since you can just add Eq anyway |
2022-12-01 22:54:28 +0100 | <rustisafungus> | as i think about this, i am thinking that perhaps some kind of random graph might be the way to go? |
2022-12-01 22:54:55 +0100 | <rustisafungus> | because i might want there to sometimes be independent dimensions, then some might have correlations between pairs, some triplets, and so on, and some a complex tangling of things |
2022-12-01 22:54:57 +0100 | <darkling> | Similarly, do you want variables correlated pairwise? More variables correlated? Pick the number of correlations and the correlated variables randomly... |
2022-12-01 22:55:23 +0100 | <darkling> | Then pick you rmodel for the correlation: is it exact? exact with errors? |
2022-12-01 22:55:47 +0100 | <rustisafungus> | you make a good point to allow for exact relationships but |
2022-12-01 22:55:49 +0100 | <geekosaur> | dminuoso, I didn't claim it was a big downside, and in fact ghc havoing removed it with little in the way of subsequent update demonstrates it |
2022-12-01 22:55:51 +0100 | <geekosaur> | snot |
2022-12-01 22:55:58 +0100 | <rustisafungus> | mostly i mean noisy relationships |
2022-12-01 22:56:11 +0100 | <darkling> | Basically, first decide what kind of features you want to see, then work out how to generate things with those features. |
2022-12-01 22:56:22 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-01 22:56:23 +0100 | <geekosaur> | *it's not |
2022-12-01 22:56:35 +0100 | <dminuoso> | geekosaur: Absolutely. Im just contemplating about the consequences. |
2022-12-01 22:56:52 +0100 | <geekosaur> | s/update/upset/ |
2022-12-01 22:57:04 +0100 | <geekosaur> | hm, I kinda didn't get that out right 🙂 |
2022-12-01 22:57:12 +0100 | <dminuoso> | The only way this will ever hurt you, is if you are being given a Num as an existential as part of an interface. |
2022-12-01 22:57:45 +0100 | <dminuoso> | Some kind of `f :: (exists e. Num e *> e -> a) -> a` |
2022-12-01 22:58:02 +0100 | sonny | (~sonny@bras-base-london142vw-grc-28-76-71-155-9.dsl.bell.ca) |
2022-12-01 22:58:15 +0100 | <dminuoso> | And you would then have to use this with the intent of using Show or Eq. |
2022-12-01 22:58:17 +0100 | <geekosaur> | someone (Bird?) complained about having to revise a Haskell book on short notice, I think |
2022-12-01 22:58:35 +0100 | <dminuoso> | Oh heh. There's that side of things :) |
2022-12-01 22:58:49 +0100 | <rustisafungus> | darkling: but,... is there a name for what i select and then how i generate the sample? |
2022-12-01 22:59:33 +0100 | <darkling> | Not that I've ever met. When I've needed to do it, I just do it. :) |
2022-12-01 22:59:44 +0100 | <rustisafungus> | darkling: oh, so you've done this before? |
2022-12-01 23:00:07 +0100 | <darkling> | A few times. |
2022-12-01 23:00:42 +0100 | <rustisafungus> | one thing i am puzzled by is that if i have a high dimensional distribution which i specify it might become difficult to sample from |
2022-12-01 23:00:48 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-01 23:00:59 +0100 | <rustisafungus> | so maybe it's better to create a tree and specify some variables which "cause" others...? |
2022-12-01 23:01:27 +0100 | <rustisafungus> | so say, 100 out of the million variables are truly independent, and then i mix and match those plus random noise to make the other variables |
2022-12-01 23:01:56 +0100 | <darkling> | Yeah, there's plenty of approaches you can take. It depends on what you want the data you generate to look like. |
2022-12-01 23:02:03 +0100 | <rustisafungus> | is there a name for this process? |
2022-12-01 23:02:35 +0100 | <darkling> | Like I said, I've not met a name for it. It's not entirely my core skill-set. |
2022-12-01 23:02:54 +0100 | <rustisafungus> | ok |
2022-12-01 23:04:12 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-01 23:05:11 +0100 | <darkling> | I don't think there's a good way of just saying "make me an interesting and varied data set". You have to have a good idea of what properties you want it to have. |
2022-12-01 23:07:37 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-01 23:08:48 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-12-01 23:09:26 +0100 | <monochrom> | "Be the first one to rate it and give it a high-brow name!" |
2022-12-01 23:09:33 +0100 | <rustisafungus> | haha |
2022-12-01 23:13:44 +0100 | <jackdk> | "synthetic data"? |
2022-12-01 23:14:32 +0100 | <rustisafungus> | jackdk: talking to me? |
2022-12-01 23:15:06 +0100 | <jackdk> | nah, darkling . I think I've heard that term bandied about, but very far outside my skillset too |
2022-12-01 23:15:24 +0100 | <monochrom> | But after you strip "I need a sample of a 100-dimension internally-dependent distribution" of the "it's oh so higher-dimensional and oh so internally-dependent" façade, it's just "I need 100 random numbers" and simply known as "probabilistic programming" or even more traditionally "randomized algorithms". |
2022-12-01 23:15:45 +0100 | <rustisafungus> | right, so what i need is something like a "random probabilistic program" |
2022-12-01 23:16:08 +0100 | <rustisafungus> | but it need not be "uniform" in any theoretical sense, just jumbled and varied |
2022-12-01 23:16:18 +0100 | <monochrom> | Consult game programmers. They do that all the time. |
2022-12-01 23:17:05 +0100 | <rustisafungus> | oh, ok,... and... ? what do they do? |
2022-12-01 23:17:09 +0100 | ezzieyguywuf | (~Unknown@user/ezzieyguywuf) |
2022-12-01 23:17:16 +0100 | sonny | (~sonny@bras-base-london142vw-grc-28-76-71-155-9.dsl.bell.ca) () |
2022-12-01 23:17:38 +0100 | <monochrom> | Use PRNG to control NPC actions? |
2022-12-01 23:17:53 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-01 23:18:11 +0100 | <rustisafungus> | right but what i am asking for is more like that the NPCs need to have "random" interactions |
2022-12-01 23:18:22 +0100 | <rustisafungus> | some are part of groups, others are independent, and soforth |
2022-12-01 23:18:29 +0100 | <monochrom> | And the n+1st random number can depend on the previous n random numbers? |
2022-12-01 23:18:39 +0100 | <rustisafungus> | that's one way to do it |
2022-12-01 23:18:44 +0100 | <geekosaur> | that's gonna be less random numbers than a good range of interactions and how to suit them to player responses |
2022-12-01 23:19:13 +0100 | <geekosaur> | which is more of an AI question than a random numbers question |
2022-12-01 23:19:36 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-01 23:19:37 +0100 | <rustisafungus> | i beg to differ, i consider it a "really practical statistics and computing" question |
2022-12-01 23:20:07 +0100 | <rustisafungus> | for example someone might have written xgboost and wants to make "random" relationships between variables to test that xgboost can identify them with reasonable accuracy |
2022-12-01 23:20:13 +0100 | <geekosaur> | what you consider it and what a player faced with your result consider it are likely to differ |
2022-12-01 23:20:49 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) |
2022-12-01 23:21:26 +0100 | <monochrom> | Sure, for an NPC the n+1st random number depends on both the previous n random numbers and a large chunk of the rest of the current game state. Which strengthens my point because it proves that game programmers have already done something even more general and theoretically "harder". |
2022-12-01 23:21:34 +0100 | <darkling> | I guess the procedural generation people probably have some ideas, but without knowing what you're actually intending to do with this output, it's very hard to go any further than "work out what properties you want the output to have", followed by "write something that has those properties" |
2022-12-01 23:21:52 +0100 | <monochrom> | So now if you say you only depend on the previous n random numbers and nothing else, it's comparatively trivia. |
2022-12-01 23:21:54 +0100 | <rustisafungus> | darkling: testing an xgboost implementation would be a great example of what i am doing |
2022-12-01 23:21:57 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-01 23:22:08 +0100 | <rustisafungus> | but that the data must be novel rather than part of an existing dataset |
2022-12-01 23:22:22 +0100 | <monochrom> | It's why I made a stab at "be the first to give it a high-brow name". |
2022-12-01 23:22:32 +0100 | <darkling> | I don't know what xgboost is. |
2022-12-01 23:22:41 +0100 | <darkling> | (And it doesn't really matter that I don't) |
2022-12-01 23:23:08 +0100 | <rustisafungus> | darkling: xgboost is the answer to 80% of prediction problems where a simple linear model is not enough |
2022-12-01 23:23:26 +0100 | <rustisafungus> | it's actually really useful to know about :-) |
2022-12-01 23:23:44 +0100 | <rustisafungus> | for example only recently did uber move away from xgboost for their ML modeling systems |
2022-12-01 23:23:53 +0100 | <rustisafungus> | for important things like predicting arrival times etc |
2022-12-01 23:24:24 +0100 | <ksu> | rustisafungus: whatever you do you are going to barely scratch the problem space, unless it is very symmetric |
2022-12-01 23:25:17 +0100 | <ksu> | and to know what you should do if it is very symmetric you need to analyze its symmetries |
2022-12-01 23:26:38 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-12-01 23:27:35 +0100 | <darkling> | You need to get into specifics at this point rather than just talking about generalised multidimensional distributions. |
2022-12-01 23:29:22 +0100 | <darkling> | Maybe once you've generated a few specific distributions modelling some behaviour you've seen (or, ab initio, have thought up), you can start thinking about the commonalities that you used to generate them. That might lead you to a framework or DSL to specify them to make it easier to generate things in the general case, but start with something conrete. |
2022-12-01 23:30:53 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 268 seconds) |
2022-12-01 23:31:15 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-12-01 23:32:05 +0100 | <darkling> | Anyway, it's at least half-past bedtime. G'night. |
2022-12-01 23:34:08 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-12-01 23:39:01 +0100 | mvk | (~mvk@2607:fea8:5ce3:8500::efb) |
2022-12-01 23:39:12 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-01 23:40:36 +0100 | <rustisafungus> | ksu: care to elaborate? |
2022-12-01 23:40:54 +0100 | abrar | (~abrar@static-108-2-152-54.phlapa.fios.verizon.net) (Quit: WeeChat 3.5) |
2022-12-01 23:40:56 +0100 | mvk | (~mvk@2607:fea8:5ce3:8500::efb) (Client Quit) |
2022-12-01 23:41:25 +0100 | <rustisafungus> | i was thinking about generating "random" sat instances as a method of specifying a high dimensional distribution |
2022-12-01 23:41:40 +0100 | <rustisafungus> | over binary variables in that case |
2022-12-01 23:41:47 +0100 | abrar | (~abrar@static-108-2-152-54.phlapa.fios.verizon.net) |
2022-12-01 23:41:56 +0100 | <rustisafungus> | i'm not quite sure how to sample from that however |
2022-12-01 23:48:46 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-01 23:50:04 +0100 | pwug | (~pwug@user/pwug) (Quit: Leaving) |
2022-12-01 23:51:48 +0100 | <rustisafungus> | so one question is, can i (at least some of the time) map a satisfiability problem onto a fairly efficient map from coin flip outcomes to a specific valid assignment (without rejetion sampling, mcmc etc) |
2022-12-01 23:55:22 +0100 | <monochrom> | What if the satisfiability problem instance is unsatisfiable? |
2022-12-01 23:55:38 +0100 | <rustisafungus> | then you cant sample from it |
2022-12-01 23:56:02 +0100 | <rustisafungus> | invalid distribution because no assignment is satisfactory |
2022-12-01 23:57:27 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2022-12-01 23:57:35 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-01 23:58:58 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |