Logs on 2024-11-01 (liberachat/#haskell)
| 00:03:56 | → | son0p joins (~ff@190.254.147.212) |
| 00:13:53 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:14:40 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 00:14:46 | × | acidjnk_new quits (~acidjnk@p200300d6e7283f63e05ee1ad1cad2e54.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 00:19:04 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 00:21:21 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 00:25:21 | × | Tuplanolla quits (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:27:08 | × | son0p quits (~ff@190.254.147.212) (Remote host closed the connection) |
| 00:27:36 | × | xff0x quits (~xff0x@2405:6580:b080:900:394c:a0ff:7b90:1a8c) (Ping timeout: 276 seconds) |
| 00:29:07 | × | Nixkernal quits (~Nixkernal@90.74.198.178.dynamic.cust.swisscom.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 00:29:44 | → | son0p joins (~ff@190.254.147.212) |
| 00:32:09 | → | acidjnk_new joins (~acidjnk@p200300d6e7283f63a42f1e536c595cb6.dip0.t-ipconnect.de) |
| 00:32:25 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:36:03 | × | Square2 quits (~Square4@user/square) (Ping timeout: 276 seconds) |
| 00:36:09 | → | Square joins (~Square@user/square) |
| 00:36:52 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
| 00:47:47 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 00:47:51 | × | sprotte24_ quits (~sprotte24@p200300d16f105500d15704183d531f13.dip0.t-ipconnect.de) (Quit: Leaving) |
| 00:54:39 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 00:55:33 | × | acidjnk_new quits (~acidjnk@p200300d6e7283f63a42f1e536c595cb6.dip0.t-ipconnect.de) (Ping timeout: 276 seconds) |
| 00:55:51 | × | euleritian quits (~euleritia@176.2.142.161) (Remote host closed the connection) |
| 00:56:09 | → | euleritian joins (~euleritia@176.2.142.161) |
| 00:59:30 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:04:15 | × | Square quits (~Square@user/square) (Ping timeout: 244 seconds) |
| 01:04:39 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 01:07:22 | <haskellbridge> | <zwro> is (pure@IO . ($!!)) the same as (evaluate . force) ? |
| 01:13:07 | <haskellbridge> | <zwro> * (pure @IO . ($!!)) equivalent to |
| 01:13:33 | → | xff0x joins (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) |
| 01:14:32 | <dolio> | No. |
| 01:15:02 | × | son0p quits (~ff@190.254.147.212) (Remote host closed the connection) |
| 01:15:08 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:15:11 | <EvanR> | :t force |
| 01:15:12 | <lambdabot> | NFData a => a -> a |
| 01:16:00 | <EvanR> | force evaluates to normal form, $! doesn't |
| 01:16:17 | <dolio> | ($!!) does, but they're still not equivalent. |
| 01:16:32 | <EvanR> | $!! wasn't a typo, dang |
| 01:16:50 | <EvanR> | :t ($!!) |
| 01:16:52 | <lambdabot> | NFData a => (a -> b) -> a -> b |
| 01:16:57 | <int-e> | but the type is all wrong |
| 01:17:14 | <int-e> | pure . <anything> won't force its argment |
| 01:18:28 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 01:19:44 | × | spew quits (~spew@201.141.99.170) (Quit: party time) |
| 01:20:01 | <int-e> | (pure $!!) is still not equivalent though. |
| 01:20:08 | <dolio> | Right. :) |
| 01:20:43 | <int-e> | compare (evaluate undefined :: IO ()) `seq` () and (pure $! undefined :: IO ()) `seq` () |
| 01:22:12 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 01:32:07 | <EvanR> | > pure $! undefined :: IO () |
| 01:32:08 | <lambdabot> | <IO ()> |
| 01:32:25 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 01:32:45 | <EvanR> | % pure $! undefined :: IO () |
| 01:32:45 | <yahb2> | *** Exception: Prelude.undefined ; CallStack (from HasCallStack): ; undefined, called at <interactive>:27:9 in interactive:Ghci5 |
| 01:32:54 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:32:59 | <EvanR> | % (pure $! undefined :: IO ()) `seq` () |
| 01:32:59 | <yahb2> | *** Exception: Prelude.undefined ; CallStack (from HasCallStack): ; undefined, called at <interactive>:29:10 in interactive:Ghci5 |
| 01:33:12 | <EvanR> | sus |
| 01:37:44 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 01:39:21 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 260 seconds) |
| 01:41:32 | → | gmg joins (~user@user/gehmehgeh) |
| 01:43:19 | → | califax joins (~califax@user/califx) |
| 01:48:21 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 01:52:40 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 02:00:07 | × | mantraofpie quits (~mantraofp@user/mantraofpie) (Remote host closed the connection) |
| 02:00:07 | × | chiselfuse quits (~chiselfus@user/chiselfuse) (Remote host closed the connection) |
| 02:00:27 | → | mantraofpie joins (~mantraofp@user/mantraofpie) |
| 02:00:48 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 02:00:55 | → | chiselfuse joins (~chiselfus@user/chiselfuse) |
| 02:01:33 | → | gmg joins (~user@user/gehmehgeh) |
| 02:03:39 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 02:03:44 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:04:07 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 02:08:46 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 02:16:55 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:5054:ee1b:c12f:dd7d) |
| 02:17:15 | k_hachig_ | is now known as k_hachig |
| 02:19:06 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:22:00 | × | Natch quits (~natch@c-92-34-7-158.bbcust.telenor.se) (Ping timeout: 252 seconds) |
| 02:23:57 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 02:24:58 | → | weary-traveler joins (~user@user/user363627) |
| 02:34:29 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:36:43 | × | Axman6 quits (~Axman6@user/axman6) (Remote host closed the connection) |
| 02:36:58 | → | Axman6 joins (~Axman6@user/axman6) |
| 02:40:47 | → | lol_ joins (~lol@2603:3016:1e01:b9c0:c43d:6fb:2607:cd8b) |
| 02:41:26 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 02:44:43 | × | jcolanternpenter quits (~lol@2603:3016:1e01:b9c0:d0c3:d4d0:7258:5a99) (Ping timeout: 252 seconds) |
| 02:52:30 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 02:57:18 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 03:07:53 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:12:14 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 03:18:42 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Remote host closed the connection) |
| 03:22:46 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:24:16 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Ping timeout: 244 seconds) |
| 03:27:29 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 03:32:15 | → | Axma54801 joins (~Axman6@user/axman6) |
| 03:33:00 | × | Axman6 quits (~Axman6@user/axman6) (Ping timeout: 248 seconds) |
| 03:36:27 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 03:37:14 | × | habib quits (~habib@185.195.232.169) (Ping timeout: 260 seconds) |
| 03:38:10 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:38:53 | → | Axman6 joins (~Axman6@user/axman6) |
| 03:40:49 | → | Axma74595 joins (~Axman6@user/axman6) |
| 03:40:51 | × | Axma54801 quits (~Axman6@user/axman6) (Ping timeout: 250 seconds) |
| 03:41:05 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 255 seconds) |
| 03:43:04 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 03:43:27 | × | Axman6 quits (~Axman6@user/axman6) (Ping timeout: 250 seconds) |
| 03:53:32 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 03:56:18 | → | alphabitserial joins (~alphabits@user/alphabitserial) |
| 03:58:21 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 03:58:21 | × | td_ quits (~td@i53870906.versanet.de) (Ping timeout: 252 seconds) |
| 04:00:02 | → | td_ joins (~td@i5387091D.versanet.de) |
| 04:06:14 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 04:06:39 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 04:08:55 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:13:52 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
| 04:22:50 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 04:24:56 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:29:55 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 04:40:20 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:41:58 | × | alphabitserial quits (~alphabits@user/alphabitserial) (Quit: goodnight!) |
| 04:45:39 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 04:54:08 | → | libertyprime joins (~libertypr@118-92-73-199.dsl.dyn.ihug.co.nz) |
| 04:55:41 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 04:55:51 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 05:00:24 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 05:00:24 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 05:18:04 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:23:12 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 05:24:42 | × | alp quits (~alp@2001:861:e3d6:8f80:b811:e433:6175:d950) (Ping timeout: 252 seconds) |
| 05:26:05 | × | bliminse quits (~bliminse@user/bliminse) (Quit: leaving) |
| 05:28:57 | → | rvalue- joins (~rvalue@user/rvalue) |
| 05:29:22 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 248 seconds) |
| 05:33:36 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:33:41 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 248 seconds) |
| 05:34:45 | rvalue- | is now known as rvalue |
| 05:35:35 | Axma74595 | is now known as Axman6 |
| 05:36:45 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 05:38:09 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 05:41:53 | → | bliminse joins (~bliminse@user/bliminse) |
| 05:44:46 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 252 seconds) |
| 05:48:57 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 05:50:00 | × | k_hachig quits (~k_hachig@2607:fea8:351d:ef0:5054:ee1b:c12f:dd7d) (Ping timeout: 276 seconds) |
| 05:53:32 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 05:56:44 | → | misterfish joins (~misterfis@84.53.85.146) |
| 06:01:45 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:68da:2df0:a70f:fa91) |
| 06:05:40 | → | benkard joins (~mulk@pd95146e9.dip0.t-ipconnect.de) |
| 06:06:32 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:07:33 | × | mulk quits (~mulk@pd95146e9.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 06:07:34 | benkard | is now known as mulk |
| 06:07:35 | → | poscat joins (~poscat@user/poscat) |
| 06:07:45 | × | poscat0x04 quits (~poscat@user/poscat) (Ping timeout: 246 seconds) |
| 06:08:19 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:68da:2df0:a70f:fa91) (Ping timeout: 260 seconds) |
| 06:11:24 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 06:16:00 | × | tcard_ quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Quit: Leaving) |
| 06:21:56 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:32:21 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 06:35:09 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 260 seconds) |
| 06:37:06 | → | tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
| 06:41:53 | → | Natch joins (~natch@c-92-34-7-158.bbcust.telenor.se) |
| 06:43:17 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 06:47:50 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 06:58:40 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:00:00 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 07:00:42 | → | caconym joins (~caconym@user/caconym) |
| 07:04:09 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 07:04:29 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 07:05:47 | × | JamesMowery43 quits (~JamesMowe@ip98-167-207-182.ph.ph.cox.net) (Quit: Ping timeout (120 seconds)) |
| 07:08:56 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 07:09:34 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 07:16:21 | × | mulk quits (~mulk@pd95146e9.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 07:20:18 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:21:47 | → | alp joins (~alp@2001:861:e3d6:8f80:ad12:d0e9:d071:fba7) |
| 07:22:52 | → | mulk joins (~mulk@pd95146e9.dip0.t-ipconnect.de) |
| 07:25:33 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 07:28:30 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:32:19 | × | Miroboru quits (~myrvoll@178-164-114.82.3p.ntebredband.no) (Quit: Lost terminal) |
| 07:35:40 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:40:16 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 07:40:28 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 07:44:57 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 07:44:59 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 07:46:09 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 265 seconds) |
| 07:47:53 | Lord_of_Life_ | is now known as Lord_of_Life |
| 07:49:05 | × | tzh quits (~tzh@c-76-115-131-146.hsd1.or.comcast.net) (Quit: zzz) |
| 07:51:04 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 07:56:06 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 07:56:56 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:03:16 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 08:08:27 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 08:09:33 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 08:15:02 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 08:18:14 | → | misterfish joins (~misterfis@84.53.85.146) |
| 08:18:37 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 08:20:14 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:23:42 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 08:25:30 | × | Leary quits (~Leary@user/Leary/x-0910699) (Remote host closed the connection) |
| 08:25:44 | → | Leary joins (~Leary@user/Leary/x-0910699) |
| 08:26:52 | → | ljdarj joins (~Thunderbi@user/ljdarj) |
| 08:26:56 | × | ljdarj quits (~Thunderbi@user/ljdarj) (Client Quit) |
| 08:29:37 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 08:33:37 | → | acidjnk_new joins (~acidjnk@p200300d6e7283f30213745c1d38acbc7.dip0.t-ipconnect.de) |
| 08:34:01 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 08:39:00 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 08:40:57 | → | CiaoSen joins (~Jura@2a05:5800:487:0:ca4b:d6ff:fec1:99da) |
| 08:44:31 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 08:49:22 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 08:50:12 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 08:51:53 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 265 seconds) |
| 08:54:34 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 08:56:19 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 09:00:17 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 09:01:27 | × | troydm quits (~troydm@user/troydm) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) |
| 09:08:33 | → | Miroboru joins (~myrvoll@178-164-114.82.3p.ntebredband.no) |
| 09:16:06 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 09:22:16 | → | Square2 joins (~Square4@user/square) |
| 09:27:16 | <tomsmeding> | my experience with this stuff is that IO seems to be strict in all your tests, but it fails if you actually want to use that for code correctness |
| 09:27:19 | <tomsmeding> | so use evaluate and be safe |
| 09:34:05 | <c_wraith> | evaluate isn't magic. the documentation explains what does and why. |
| 09:35:43 | <tomsmeding> | right. In practice, though, not using `evaluate` comes to bite me not in the presence of exceptions but when benchmarking |
| 09:36:10 | <tomsmeding> | if you want to benchmark an IO operation and are doing the timing manually for some reason, please, use `evaluate`. Using `return $! _` or something similar _will not work properly_ |
| 09:36:15 | <tomsmeding> | it will work sometimes |
| 09:49:12 | × | xff0x quits (~xff0x@fsb6a9491c.tkyc517.ap.nuro.jp) (Ping timeout: 276 seconds) |
| 09:59:52 | × | driib318 quits (~driib@vmi931078.contaboserver.net) (Quit: The Lounge - https://thelounge.chat) |
| 10:00:32 | → | driib318 joins (~driib@vmi931078.contaboserver.net) |
| 10:09:52 | × | libertyprime quits (~libertypr@118-92-73-199.dsl.dyn.ihug.co.nz) (Ping timeout: 252 seconds) |
| 10:12:00 | × | Natch quits (~natch@c-92-34-7-158.bbcust.telenor.se) (Ping timeout: 272 seconds) |
| 10:14:14 | → | zmt00 joins (~zmt00@user/zmt00) |
| 10:15:22 | → | zmt01 joins (~zmt00@user/zmt00) |
| 10:16:18 | × | swamp_ quits (~zmt00@user/zmt00) (Ping timeout: 248 seconds) |
| 10:16:19 | → | lxsameer joins (~lxsameer@Serene/lxsameer) |
| 10:16:45 | × | ubert quits (~Thunderbi@178.115.51.39.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 10:18:30 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 10:19:45 | × | zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 276 seconds) |
| 10:21:49 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
| 10:22:06 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 10:22:45 | → | absence joins (torgeihe@hildring.pvv.ntnu.no) |
| 10:25:15 | <absence> | Is it possible to pass an implicit parameter explicitly, without creating a binding in the calling scope? |
| 10:25:37 | <mauke> | why without creating a binding? |
| 10:25:38 | <tomsmeding> | you can create the binding locally |
| 10:25:46 | <tomsmeding> | `let ?param = _ in f x y z` |
| 10:26:19 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 10:26:55 | <absence> | mauke: Less clutter, and clearer intent. |
| 10:27:12 | <tomsmeding> | using a let-binding is the only way to set implicit parameters |
| 10:27:26 | <absence> | I see, thanks! |
| 10:32:18 | → | chele joins (~chele@user/chele) |
| 10:32:58 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 252 seconds) |
| 10:50:41 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 10:56:29 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 260 seconds) |
| 11:01:23 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
| 11:12:28 | → | sprotte24 joins (~sprotte24@p200300d16f13bb00e9ebafc1049584f7.dip0.t-ipconnect.de) |
| 11:15:11 | <sprotte24> | Hi |
| 11:15:21 | <Rembane> | Hi sprotte24 ! |
| 11:15:35 | <sprotte24> | I want to write a Haskell program |
| 11:15:47 | <sprotte24> | Hi, Rembane |
| 11:15:51 | <mauke> | what's it do? |
| 11:16:19 | <Hecate> | rembaaaaaaane |
| 11:16:25 | <Hecate> | what's uuuuup |
| 11:16:28 | <sprotte24> | The Haskell programm has to compute the nearest Power of two for a given n. |
| 11:16:34 | <Hecate> | sprotte24: nice |
| 11:16:37 | <sprotte24> | Example: |
| 11:16:42 | <mauke> | oh, is this homework? |
| 11:17:21 | <sprotte24> | n= 9 nearest Power is 16 |
| 11:17:35 | <mauke> | I'd say it's 8 |
| 11:17:41 | <sprotte24> | Yes. kome work |
| 11:18:03 | <Hecate> | mauke: maybe they have to round to the highest power of 2 |
| 11:18:15 | <mauke> | yeah, that actually makes things easier |
| 11:18:22 | <Rembane> | Hecate: Suuuuuuuuuuuuuuuuuup! :D |
| 11:18:23 | <sprotte24> | The restriction: using binary is forbidden. |
| 11:18:33 | <mauke> | define "using binary" |
| 11:18:38 | <mauke> | like bit shifts? |
| 11:18:46 | <Hecate> | damnit I was about to suggest that hahahaha |
| 11:19:23 | <Hecate> | Rembane: I'm not doing too bad! Still at Chalmers? |
| 11:20:15 | <sprotte24> | ok. if I use binary number, the Powers of 2 have the format 1, 10 100 1000 and so on |
| 11:20:20 | <mauke> | :t head . dropWhile (< ?n) . iterate (2 *) $ 1 |
| 11:20:21 | <lambdabot> | (Ord c, ?n::c, Num c) => c |
| 11:20:29 | <Rembane> | Hecate: Still at Chalmers! I'll be done any day now. :D |
| 11:21:21 | <sprotte24> | I am not allowed to use a list |
| 11:21:33 | <Hecate> | Rembane: lovely. :) Say hi to Andreas Abel from me if you meet him |
| 11:21:45 | <Rembane> | Hecate: Sure thing! :D |
| 11:22:40 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 11:22:41 | <sprotte24> | I have to test whether nearestPowerOfTwo n >= 2^k |
| 11:23:36 | → | misterfish joins (~misterfis@31-161-39-137.biz.kpn.net) |
| 11:24:01 | <sprotte24> | One Problem: my input parameter is n and I have to increment k until the condition is satisfied |
| 11:24:24 | <mauke> | ah, the slow way |
| 11:24:30 | → | weary-traveler joins (~user@user/user363627) |
| 11:24:42 | <mauke> | where are you stuck? |
| 11:24:51 | <sprotte24> | I suppose I need a local variaable for k? |
| 11:25:44 | <sprotte24> | I plan to build an recursive solution? |
| 11:26:15 | <mauke> | yeah, if you want to emulate a loop in functional code, it's always going to be a recursive function |
| 11:26:32 | <mauke> | (or a data structure like a list, but you're not allowed to do that, apparently) |
| 11:26:33 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Ping timeout: 265 seconds) |
| 11:26:55 | <mauke> | any "loop variable" that changes in the loop is going to become a function parameter |
| 11:27:34 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 11:28:06 | <sprotte24> | In my recursive loop I have to Test an to increment the Power index. |
| 11:28:49 | <sprotte24> | I had a solution, but that solution used 2 parameters n and k. |
| 11:29:05 | <sprotte24> | I show it, one moment please |
| 11:30:05 | <Hecate> | sprotte24: don't hesitate to use play.haskell.org ! |
| 11:31:08 | <sprotte24> | -- 3.3 next power2 |
| 11:31:08 | <sprotte24> | roundUpToPower2 :: Int -> Int -> Int |
| 11:31:08 | <sprotte24> | roundUpToPower2 n k = if n == 1 then 1 |
| 11:31:08 | <sprotte24> | else if (nthPowerTwo k) >= n then (nthPowerTwo k) |
| 11:31:08 | <sprotte24> | else roundUpToPower2 n (k + 1) |
| 11:31:08 | <sprotte24> | roundUpToPowerTwo :: Int -> Int |
| 11:31:10 | <sprotte24> | roundUpToPowerTwo n = roundUpToPower2 n 1 |
| 11:31:43 | <sprotte24> | -- 3.1 nthPowerTwo |
| 11:31:43 | <sprotte24> | nthPowerTwo :: Int -> Int |
| 11:31:43 | <sprotte24> | nthPowerTwo n = if n==0 then 1 else 2*nthPowerTwo(n-1) |
| 11:31:50 | <mauke> | plase don't paste into IRC |
| 11:31:58 | <mauke> | use a paste site like https://paste.tomsmeding.com to show code |
| 11:32:24 | <sprotte24> | ok |
| 11:33:05 | <mauke> | (and give us the link) |
| 11:34:23 | <mauke> | anyway, that looks like it would work |
| 11:34:55 | <mauke> | nthPowerTwo k could be replaced by 2 ^ k |
| 11:36:43 | <sprotte24> | We should not use the power function directly |
| 11:37:07 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 11:37:47 | <sprotte24> | or I use a function double |
| 11:40:17 | <sprotte24> | Two ways: double the base 2 (1 2 4 8 ...) or increment the exponent of 2 |
| 11:40:22 | → | rvalue- joins (~rvalue@user/rvalue) |
| 11:40:47 | × | rvalue quits (~rvalue@user/rvalue) (Ping timeout: 244 seconds) |
| 11:43:24 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 11:47:32 | <sprotte24> | I have to leave home in 5 minutes and could contine in the later afternoon with my problem. |
| 11:48:16 | rvalue- | is now known as rvalue |
| 11:48:25 | <mauke> | did you have a question? |
| 11:49:17 | <sprotte24> | my problem was the nearest power of 2 |
| 11:51:03 | → | Square joins (~Square@user/square) |
| 11:51:58 | CatGPT | is now known as catties |
| 11:52:08 | <sprotte24> | bye |
| 11:52:14 | × | sprotte24 quits (~sprotte24@p200300d16f13bb00e9ebafc1049584f7.dip0.t-ipconnect.de) (Quit: Leaving) |
| 11:55:18 | × | Square2 quits (~Square4@user/square) (Ping timeout: 276 seconds) |
| 11:56:49 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 11:57:37 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 11:58:53 | × | weary-traveler quits (~user@user/user363627) (Remote host closed the connection) |
| 12:02:04 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 12:02:29 | × | CiaoSen quits (~Jura@2a05:5800:487:0:ca4b:d6ff:fec1:99da) (Ping timeout: 244 seconds) |
| 12:02:37 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 12:05:52 | × | turlando quits (~turlando@user/turlando) () |
| 12:06:03 | <Square> | If you want to extend your build environemnt with a local package repository, what's your choices? |
| 12:06:18 | <Square> | local as organization wide. |
| 12:07:13 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds) |
| 12:09:50 | <Square> | I see cabal has means to configure more repositories. But what software does it use? |
| 12:12:04 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) |
| 12:12:25 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 12:14:58 | → | xff0x joins (~xff0x@2405:6580:b080:900:26bf:a0f9:b4d:93d8) |
| 12:29:49 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Read error: Connection reset by peer) |
| 12:38:37 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 12:45:25 | <haskellbridge> | <zwro> i'm still having trouble understanding the difference between (evaluate . force) and (pure @IO . ($!!)) |
| 12:51:19 | <mauke> | same, but I think the semantics of the latter depend on how IO is implemented |
| 12:51:26 | × | euleritian quits (~euleritia@176.2.142.161) (Ping timeout: 255 seconds) |
| 12:53:29 | <mauke> | > evalState (do error "bang"; pure 2) () |
| 12:53:31 | <lambdabot> | 2 |
| 12:54:16 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 12:55:39 | → | euleritian joins (~euleritia@176.2.67.66) |
| 12:57:35 | <tomsmeding> | Square: https://cabal.readthedocs.io/en/3.4/cabal-project.html#cfg-field-active-repositories may be relevant, but I've never used it |
| 12:58:16 | <tomsmeding> | oh there is more text in the latest version https://cabal.readthedocs.io/en/stable/cabal-project-description-file.html#cfg-field-active-repositories |
| 12:59:00 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 13:00:47 | <Square> | tomsmeding, yeah i found those settings too. But what software do you use to run a repo? A company hackage if you will. |
| 13:01:37 | <tomsmeding> | Square: you might want to steal stuff from how head.hackage is implemented https://ghc.gitlab.haskell.org/head.hackage/ |
| 13:05:01 | <Leary> | Square: https://hackage.haskell.org/ says "Hackage-server is on github [...]. Developer documentation is on in the github README, includig a quick guide to running your own server instance, and mirroring the central server." |
| 13:05:20 | <Square> | Gotcha. Thanks |
| 13:06:27 | <tomsmeding> | (it's nice how that head.hackage page shows how to add a 'repository' stanza to cabal.project.local, but then the cabal documentation is completely silent about such a stanza existing.) |
| 13:08:00 | → | Guest77 joins (~Guest77@2402:a00:401:f093:da9e:f3ff:fe4b:8a8b) |
| 13:12:25 | <mauke> | are codes like "Cabal-4345" documented anywhere? |
| 13:15:44 | × | Xe quits (~cadey@perl/impostor/xe) (Quit: WeeChat 4.4.2) |
| 13:15:53 | <haskellbridge> | <zwro> mauke: that makes sense. i suspect GHC might optimize to the same core implementation but i need to test it |
| 13:18:05 | × | Guest77 quits (~Guest77@2402:a00:401:f093:da9e:f3ff:fe4b:8a8b) (Quit: Client closed) |
| 13:18:45 | <haskellbridge> | <zwro> benchmarks for trivial cases show no discernible difference |
| 13:18:48 | × | mulk quits (~mulk@pd95146e9.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 13:18:50 | <merijn> | mauke: They should be, that's the point ;) |
| 13:19:16 | <merijn> | Square: It uses "hackage" |
| 13:19:46 | <merijn> | Square: You can set up your own internal Hackage and Hoogle and have cabal fallback to the regular public one (if desired) |
| 13:20:10 | → | slac68956 joins (~slack1256@179.60.70.224) |
| 13:21:15 | → | mulk joins (~mulk@pd95146e9.dip0.t-ipconnect.de) |
| 13:21:30 | <Square> | merijn, yeah. Seems to be it. I was thinking there were different options. But excellent if hackage availble. |
| 13:21:40 | → | Xe joins (~cadey@perl/impostor/xe) |
| 13:21:41 | <Square> | is available* |
| 13:22:03 | × | slack1256 quits (~slack1256@2803:c600:5111:8696:d97c:cbc8:139:bdb3) (Ping timeout: 244 seconds) |
| 13:23:10 | <merijn> | Square: I think it can use "dumb" disk repos too so you could have a shared network filesystem or something and use that |
| 13:23:30 | <merijn> | but if you run hackage you get the benefits of hyperlinked browsable docs for internal libs for free |
| 13:23:57 | → | Square2 joins (~Square4@user/square) |
| 13:24:02 | <mauke> | merijn: I'll take that as a "no" |
| 13:24:17 | <mauke> | nothing in the manual, nothing on the website, nothing in a google search |
| 13:24:29 | <merijn> | mauke: Hecate was leading something on error codes in GHC |
| 13:24:47 | <merijn> | I'm assuming cabal codes are extension of that |
| 13:25:01 | <yushyin> | the error message index website? yes, but it is incomplete |
| 13:25:04 | <merijn> | mauke: https://discourse.haskell.org/t/announcing-the-haskell-error-index/5195 |
| 13:25:12 | <yushyin> | https://errors.haskell.org/cabal/ |
| 13:26:11 | <mauke> | nothing there either |
| 13:26:27 | <merijn> | I see some CABAL-xxx codes there |
| 13:26:43 | <mauke> | hah: "So far, 1 Cabal errors and warnings are documented here." |
| 13:26:48 | <mauke> | 1 whole errors |
| 13:26:48 | <merijn> | nice :) |
| 13:27:20 | <merijn> | mauke: Work in progress ;) |
| 13:27:32 | <merijn> | Step one is *having* unique codes, step two is documenting them ;) |
| 13:30:08 | <mauke> | how do I tell cabal what C compiler to use? |
| 13:30:33 | <merijn> | mauke: You can't tell cabal, you need to tell GHC |
| 13:30:47 | <merijn> | mauke: Cabal just invokes GHC on C files, which determines what C compiler to call |
| 13:30:58 | <merijn> | I think there was either a config file or GHC flag to tell it to use something else |
| 13:31:01 | <mauke> | no, cabal is doing something stupid |
| 13:31:05 | <mauke> | and I can't figure out what |
| 13:31:13 | <yushyin> | 4345 is the missing deps on foreign libs error, no? this is one of the more murky errors |
| 13:31:35 | <merijn> | mauke: Error? And I assume you mean actual C and not secretly C++? |
| 13:31:46 | <mauke> | Missing (or bad) header file: wcalc.h |
| 13:32:01 | <mauke> | the fun part is that it only happens on 'cabal install'. 'cabal build' is fine with it |
| 13:32:09 | <merijn> | mauke: Ah, that sounds more like wrong include dirs than wrong compiler, no? |
| 13:32:20 | <mauke> | oh, the compiler is fine |
| 13:32:33 | <merijn> | mauke: Is the cabal file public? |
| 13:32:44 | <mauke> | but I can't get it to tell me wtf it's doing, so my plan is to configure a fake compiler that just dumps what's going on |
| 13:32:52 | <merijn> | ooh |
| 13:32:57 | <merijn> | I think I know :D |
| 13:33:05 | <merijn> | But lemme check the cabal file first |
| 13:33:24 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 13:33:48 | <mauke> | merijn: https://paste.tomsmeding.com/uNvsLOb0 |
| 13:33:53 | <merijn> | mauke: First clue is: "build works, install fails". install *always* builds an sdist *first* and THEN installs from that. To protect against broken sdists |
| 13:34:05 | <merijn> | mauke: So most likely your sdist is fucked and not including the header |
| 13:34:29 | <mauke> | I wish it would stop building an sdist. all I want is an executable |
| 13:35:06 | <merijn> | mauke: Yeah, I think the problem is that `includes` doesn't include your headers in the sdist |
| 13:35:21 | <merijn> | mauke: My C shipping projects explicitly list headers under `extra-source-files` |
| 13:36:05 | <merijn> | mauke: https://github.com/merijn/Belewitte/blob/ed95965077ee0a55c9a206b75445ddf93723916b/benchmark-analysis/benchmark-analysis.cabal#L32 |
| 13:36:28 | <merijn> | C-sources get included, `includes` does not (since it might contain generated/system/whatever stuff) |
| 13:39:24 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 260 seconds) |
| 13:40:26 | <mauke> | merijn: thank you! |
| 13:43:34 | <mauke> | wow, this is stupid. extra-source-files (where I specify my headers) can only be set at the global level, but it supports wildcards. c-sources (where I specify my c files) can only be set at the stanza level, but wildcards are not supported. |
| 13:43:34 | ← | L29Ah parts (~L29Ah@wikipedia/L29Ah) () |
| 13:44:42 | <mauke> | so for a simple directory with C code, I have to set 4 separate cabal fields, 3 of them in a stanza and 1 at package level |
| 13:47:41 | <mauke> | argh, and in the end I don't even get the executable I wanted :-( |
| 13:47:43 | <mauke> | it's just a symlink |
| 13:47:59 | ghoulpine | is now known as vulpine |
| 13:48:14 | <mauke> | is there a way to make cabal install a real exectuable file instead of just a link? |
| 13:49:03 | <mauke> | ... this whole system doesn't seem to be designed for publishing applications |
| 13:51:46 | <merijn> | mauke: yes |
| 13:51:56 | <merijn> | There's a flag, forget the exact name |
| 13:53:15 | <merijn> | mauke: install-method |
| 13:53:28 | <merijn> | has a copy or symlink config |
| 13:54:10 | <merijn> | mauke: tbf, it is in fact, not designed for publishing applications. It's designed to be scripted/used by systems that build/publish applications :p |
| 13:55:06 | <merijn> | mauke: These are the config options you want: https://github.com/merijn/dotfiles/blob/0ea230e8ebf303749d547692cbb139f1399f1cd2/install/cabal/config#L116-L117 |
| 13:55:16 | <mauke> | ah, I see it. command-line only |
| 13:55:18 | <mauke> | merijn++ |
| 13:56:17 | <merijn> | mauke: All the stuff you want for packaging is there, but the defaults are mostly set up for interactive development |
| 13:57:05 | <merijn> | Under the assumption that anyone who cares about packaging/publishing will write a script with the right config/flags once and use that |
| 13:58:10 | <mauke> | merijn: do you also happen to know why executable stripping doesn't work? |
| 13:58:51 | <merijn> | It should? |
| 13:58:59 | <mauke> | the documentation says executable-stripping: True is the default, but tmp/preflex: ELF 64-bit LSB executable, x86-64, [...] with debug_info, not stripped |
| 13:59:41 | <merijn> | hmm |
| 14:00:31 | <mauke> | works in cabal.project, though |
| 14:00:59 | <merijn> | did you just enable it? |
| 14:01:34 | <merijn> | mauke: I don't think it will rebuild previously installs after you change the global config (whereas changes to cabal.project *WILL* force a rebuild) |
| 14:01:39 | <merijn> | not sure about that, though |
| 14:02:05 | <merijn> | mauke: Also, if you're building executables for publishing: is `split-sections` on? |
| 14:02:39 | <merijn> | That will *massively* shrink your executable size (although it will mean having to rebuild the world :p) |
| 14:02:50 | <mauke> | if I delete tmp, comment out 'exectuable-stripping: True' in cabal.project, and rerun 'cabal install', I get a non-stripped file |
| 14:04:38 | <merijn> | split-sections causes GHC to put every top level export into it's own linker section, so that any moderately modern linker can include only the (transitive) symbols you actually use. Instead of linking every transitive dependency even if you don't use them |
| 14:05:03 | <mauke> | wasn't on before. rebuilding world now ... :-) |
| 14:05:18 | <merijn> | So it can (theoretically) lob off entire sections of your dependency graph if you use only a fraction of libraries with big dependency lists |
| 14:06:03 | <merijn> | I think I'd something like a 20x reduction in final binary size |
| 14:06:53 | <mauke> | ah, building 'encoding' now. that always takes forever |
| 14:07:09 | <tomsmeding> | mauke: "I just want an executable" `cp $(cabal list-bin yourexename) wherever` |
| 14:07:12 | <merijn> | anyway, gotta get back to work |
| 14:07:26 | <merijn> | tomsmeding: I mean, --install-method=copy --install-dir=foo does the same |
| 14:07:36 | <tomsmeding> | except it goes through sdist |
| 14:07:49 | <merijn> | tomsmeding: Which means it detects broken cabal configs ;) |
| 14:07:54 | <tomsmeding> | (not saying that's a bad thing) |
| 14:07:55 | <merijn> | Which is good TM |
| 14:07:58 | <tomsmeding> | right |
| 14:08:50 | <mauke> | "broken" is debatable |
| 14:09:24 | <mauke> | given that it works fine as long as you don't sdist, which I have no intention of ever doing |
| 14:11:49 | <mauke> | final tally: |
| 14:12:04 | <mauke> | cabal install with default options: 25M |
| 14:12:20 | <merijn> | mauke: I also have this neat lazy people trick for testing "in-development" executables https://github.com/NLeSC-AAA2/etherpacket/blob/master/EtherPacket |
| 14:12:31 | <mauke> | cabal install with 'executable-stripping: True' in project file: 16M |
| 14:12:42 | <mauke> | cabal install with split sections: 18M |
| 14:12:54 | <mauke> | cabal install with split sections and explicit executable-stripping: 11M |
| 14:13:10 | <merijn> | I dunno if adding library-stripping also work? |
| 14:13:51 | <mauke> | wow, that scriptpath thing looks ... overengineered |
| 14:14:44 | <merijn> | mauke: It's mostly "I was running on some stupidly broken machines" engineered |
| 14:14:50 | <mauke> | ah, it's just a realpath reimplementation |
| 14:14:54 | <mauke> | I see |
| 14:14:55 | <merijn> | basically |
| 14:15:17 | <merijn> | You can ignore that part on sane machine ;) |
| 14:15:40 | <mauke> | "running on stupid machines" is very valid |
| 14:16:23 | <mauke> | right now I'm using docker "backwards" in that I have a custom build container just for creating CentOS 7 binaries |
| 14:16:32 | <mauke> | which I then copy out to the host system |
| 14:17:12 | <merijn> | Using docker the "right" way is for people who don't know how to build/package their own stuff :p |
| 14:19:29 | × | vgtw quits (~vgtw@user/vgtw) (Ping timeout: 248 seconds) |
| 14:19:39 | <merijn> | Docker makes sense when you remember that lots of ecosystems (looking at you npm, typescript, python, etc.) don't have a sane boundary to distinguish "necessary at build/packaging" from "necessary at runtime". And while I share your annoyance of "I need to set 4 fields in .cabal to packabe my headers" is annoying. I find the clear distinction between "what is sdist, what is build time, and what is |
| 14:19:45 | <merijn> | runtime" to be one of the things preserving my sanity |
| 14:20:00 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 14:21:46 | <mauke> | I don't have generated files, so for me it's all "sdist" in a sense |
| 14:22:44 | → | tired joins (~tired@user/tired) |
| 14:22:46 | <mauke> | technically I could probably just delete the header files because I'm pretty sure ghc doesn't care anyway |
| 14:23:23 | <mauke> | oh hello, executable stripping works if I turn it on in ~/.cabal/config |
| 14:24:06 | <merijn> | \o/ |
| 14:24:36 | <merijn> | mauke: GHC can automatically check whether your declared types match the headers |
| 14:24:45 | <merijn> | Which can be helpful for your sanity |
| 14:25:03 | <merijn> | Not to mention GHC being able to use CPP macros as values |
| 14:25:55 | <mauke> | define "can" |
| 14:26:44 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 14:27:29 | <mauke> | tomsmeding: the cp $(cabal list-bin yourexename) wherever method gives me a non-stripped executable |
| 14:27:48 | <merijn> | mauke: "can" for the type checking, you mean? |
| 14:28:10 | <mauke> | er, yes |
| 14:28:11 | → | vgtw joins (~vgtw@user/vgtw) |
| 14:29:07 | <merijn> | mauke: It's been awhile, but iirc if you mention the header file on the foreign import it will check that the Haskell type you declare for it corresponds to the C type |
| 14:29:10 | <merijn> | mauke: https://github.com/merijn/Belewitte/blob/ed95965077ee0a55c9a206b75445ddf93723916b/benchmark-analysis/ffi-core/SQLiteExts.hs#L152-L160 |
| 14:29:22 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:29:33 | <merijn> | (modulo marshalling as defined in the FFI part of the standard) |
| 14:29:50 | <mauke> | for ccall? are you sure? |
| 14:30:05 | <mauke> | I know capi does weird things |
| 14:30:37 | <merijn> | I thought it did |
| 14:30:54 | <merijn> | capi is very different, since it generates stubs instead of calling directly from Haskell |
| 14:31:16 | <merijn> | mauke: capi is nice for some things, though. Since it lets you foreign import CPP macros as values: https://github.com/merijn/Belewitte/blob/ed95965077ee0a55c9a206b75445ddf93723916b/benchmark-analysis/ffi-core/SQLiteExts.hs#L132-L136 |
| 14:31:19 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 260 seconds) |
| 14:31:20 | × | Square2 quits (~Square4@user/square) (Ping timeout: 255 seconds) |
| 14:32:11 | <mauke> | I thought capi was what you were talking about when you mentioned CPP macros and checking against headers |
| 14:32:13 | <merijn> | I'd prefer ccall where possible, but capi is a huge win. I think capi also lets you reference Ptr to variables directly (as opposed to only functions) |
| 14:32:37 | <mauke> | importing addresses of variables is in the base FFI |
| 14:32:42 | <merijn> | mauke: CPP macros is capi only (but you can use both at the same time). The type checking I *thought* it also did for ccall |
| 14:33:09 | <merijn> | (IFF you declare the header at the import) but that might be a lie |
| 14:33:18 | <merijn> | can't check right now, since I have no GHC install on this machine |
| 14:34:44 | <merijn> | mauke: There was a case where the import of a variable was ambiguous compared to a function returning a pointer |
| 14:34:49 | <merijn> | or something |
| 14:34:52 | <merijn> | It's been a long time xD |
| 14:36:01 | <mauke> | huh. foreign import capi "pi.h value pi" c_pi :: CDouble |
| 14:36:18 | <mauke> | is documented as letting you refer to const double pi = 3.14; |
| 14:36:30 | <mauke> | but that's unsound, since the value of pi can change over time |
| 14:37:03 | <EvanR> | how does const double pi change over time |
| 14:37:10 | <merijn> | EvanR: Because const means nothing |
| 14:37:18 | <mauke> | const means read-only, not constant |
| 14:37:18 | <merijn> | mauke: tbf, it's actually sound |
| 14:37:31 | <merijn> | mauke: because modifying pi is UB |
| 14:37:33 | <EvanR> | in C, that's a const double, it's not changing |
| 14:37:49 | <EvanR> | unless you break everything, which you can do in haskell also |
| 14:38:08 | <merijn> | EvanR: C programmers regularly break everything :p |
| 14:38:12 | <mauke> | hold on, I need to check my standards |
| 14:38:14 | <EvanR> | sure |
| 14:38:22 | <mauke> | I know 'const volatile foo' is explicitly permmitted |
| 14:38:29 | <EvanR> | but like, I can write to any object in haskell too |
| 14:39:05 | <EvanR> | you can say that values in haskell change over time |
| 14:39:21 | <merijn> | mauke: Sure, but you're not permitted to write to that |
| 14:39:26 | × | vgtw quits (~vgtw@user/vgtw) (Ping timeout: 255 seconds) |
| 14:39:34 | <merijn> | mauke: Pretty sure const *is* "modification = UB" |
| 14:39:59 | <merijn> | mauke: Which of course in embedded doesn't prevent an address from changing in memory mapped IO |
| 14:40:09 | <merijn> | (or on non-embedded I suppose) |
| 14:40:10 | <EvanR> | "const means nothing" is just false |
| 14:40:26 | <EvanR> | unless nothing means anything, which I guess is one way to look at things |
| 14:40:31 | → | vgtw joins (~vgtw@user/vgtw) |
| 14:41:58 | <mauke> | EvanR: you're right, I misremembered |
| 14:42:29 | <mauke> | the presence of the initializer makes it a definition, and modifying an object whose definition includes 'const' is UB |
| 14:42:54 | <EvanR> | now while c_pi doesn't change over time, some people still think c changes over time (c being the speed of light) |
| 14:43:08 | <EvanR> | einstein forgot to put const |
| 14:43:42 | <mauke> | merijn: the 'const volatile' thing can't be written by the program, but it may still change (memory-mapped timer or something) |
| 14:45:08 | <merijn> | mauke: tbf, nothing about capi promises to obey the C standard ;) |
| 14:45:55 | <merijn> | It just says "I will convert this to a pure value", and it's up to you to not do stupid shit |
| 14:46:32 | <EvanR> | we choose when and what abstract world to live in |
| 14:46:43 | <EvanR> | whether it's formalized somewhere |
| 14:50:04 | × | tabemann quits (~tabemann@2600:1700:7990:24e0:cb63:a13b:e8da:1b84) (Remote host closed the connection) |
| 14:50:24 | → | tabemann joins (~tabemann@2600:1700:7990:24e0:141f:cdda:2f28:e1cc) |
| 14:53:31 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 15:00:10 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 272 seconds) |
| 15:10:15 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 15:12:17 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 15:13:42 | → | CiaoSen joins (~Jura@2a05:5800:487:0:ca4b:d6ff:fec1:99da) |
| 15:13:50 | × | misterfish quits (~misterfis@31-161-39-137.biz.kpn.net) (Ping timeout: 252 seconds) |
| 15:15:30 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 276 seconds) |
| 15:16:09 | × | AlexZenon quits (~alzenon@178.34.150.252) (Ping timeout: 276 seconds) |
| 15:19:42 | Shelob | is now known as She |
| 15:21:13 | ghoulguy | is now known as glguy |
| 15:21:56 | → | AlexZenon joins (~alzenon@178.34.150.252) |
| 15:22:36 | → | econo_ joins (uid147250@id-147250.tinside.irccloud.com) |
| 15:24:16 | × | rvalue quits (~rvalue@user/rvalue) (Read error: Connection reset by peer) |
| 15:24:48 | → | rvalue joins (~rvalue@user/rvalue) |
| 15:25:41 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:29:10 | × | alp quits (~alp@2001:861:e3d6:8f80:ad12:d0e9:d071:fba7) (Remote host closed the connection) |
| 15:29:59 | → | alp joins (~alp@2001:861:e3d6:8f80:394e:fa36:1a51:e8c1) |
| 15:30:42 | × | dostoyevsky2 quits (~sck@user/dostoyevsky2) (Ping timeout: 252 seconds) |
| 15:31:42 | × | alp quits (~alp@2001:861:e3d6:8f80:394e:fa36:1a51:e8c1) (Remote host closed the connection) |
| 15:32:31 | → | alp joins (~alp@2001:861:e3d6:8f80:d0dc:c5e7:387e:3419) |
| 15:32:39 | → | dostoyevsky2 joins (~sck@user/dostoyevsky2) |
| 15:34:13 | × | alp quits (~alp@2001:861:e3d6:8f80:d0dc:c5e7:387e:3419) (Remote host closed the connection) |
| 15:42:53 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 15:56:08 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:55ab:e185:7f81:54a4) (Quit: WeeChat 4.2.2) |
| 16:04:56 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 255 seconds) |
| 16:05:47 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 16:10:26 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 248 seconds) |
| 16:16:09 | × | euleritian quits (~euleritia@176.2.67.66) (Ping timeout: 260 seconds) |
| 16:20:45 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 16:23:12 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:28:08 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Read error: Connection reset by peer) |
| 16:28:15 | → | comerijn joins (~merijn@77.242.116.146) |
| 16:31:16 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 16:32:15 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 16:32:55 | k_hachig_ | is now known as k_hachig |
| 16:33:19 | × | haskellbridge quits (~hackager@syn-024-093-192-219.res.spectrum.com) (Remote host closed the connection) |
| 16:35:29 | × | CiaoSen quits (~Jura@2a05:5800:487:0:ca4b:d6ff:fec1:99da) (Ping timeout: 248 seconds) |
| 16:46:13 | × | cptaffe quits (~cptaffe@user/cptaffe) (Ping timeout: 252 seconds) |
| 16:46:51 | → | cptaffe joins (~cptaffe@user/cptaffe) |
| 16:47:41 | × | mulk quits (~mulk@pd95146e9.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 16:49:32 | → | mulk joins (~mulk@pd95146e9.dip0.t-ipconnect.de) |
| 16:58:10 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 17:00:31 | → | haskellbridge joins (~hackager@syn-024-093-192-219.res.spectrum.com) |
| 17:00:31 | ChanServ | sets mode +v haskellbridge |
| 17:03:02 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 272 seconds) |
| 17:04:05 | → | alp joins (~alp@2001:861:e3d6:8f80:897b:546a:473c:28dc) |
| 17:08:51 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 17:10:21 | → | Natch joins (~natch@c-92-34-7-158.bbcust.telenor.se) |
| 17:12:30 | × | comerijn quits (~merijn@77.242.116.146) (Ping timeout: 276 seconds) |
| 17:13:51 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 17:21:44 | → | ubert joins (~Thunderbi@178.115.51.39.wireless.dyn.drei.com) |
| 17:24:02 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 17:29:05 | → | sprotte24 joins (~sprotte24@134.245.44.89) |
| 17:29:14 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 17:29:48 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 17:30:58 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
| 17:33:27 | × | Square quits (~Square@user/square) (Ping timeout: 252 seconds) |
| 17:35:02 | × | tired quits (~tired@user/tired) (Remote host closed the connection) |
| 17:36:19 | → | tired joins (~tired@user/tired) |
| 17:41:37 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Ping timeout: 248 seconds) |
| 17:42:30 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 17:46:17 | → | libertyprime joins (~libertypr@118-92-73-199.dsl.dyn.ihug.co.nz) |
| 17:48:12 | × | tired quits (~tired@user/tired) (Quit: /) |
| 17:48:29 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 17:52:41 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 17:57:37 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 17:59:37 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 18:00:24 | × | nurupo quits (~nurupo.ga@user/nurupo) (Quit: nurupo.ga) |
| 18:00:41 | → | nurupo joins (~nurupo.ga@user/nurupo) |
| 18:02:03 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 18:18:05 | × | youthlic quits (~Thunderbi@user/youthlic) (Remote host closed the connection) |
| 18:20:44 | → | youthlic joins (~Thunderbi@user/youthlic) |
| 18:24:30 | → | SlackCoder joins (~SlackCode@161.199.135.130) |
| 18:27:25 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 18:27:37 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 18:28:09 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 18:32:55 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 18:35:20 | × | sawilagar quits (~sawilagar@user/sawilagar) (Remote host closed the connection) |
| 18:35:36 | → | gawen joins (~gawen@user/gawen) |
| 18:35:53 | → | sawilagar joins (~sawilagar@user/sawilagar) |
| 18:40:09 | × | euphores quits (~SASL_euph@user/euphores) (Quit: Leaving.) |
| 18:45:20 | → | euphores joins (~SASL_euph@user/euphores) |
| 18:45:59 | × | Nachtgespenst quits (~user@user/siracusa) (Quit: Bye!) |
| 18:48:07 | → | JuanDaugherty joins (~juan@user/JuanDaugherty) |
| 18:50:22 | × | gawen quits (~gawen@user/gawen) (Quit: cya) |
| 18:51:43 | × | GdeVolpiano quits (~GdeVolpia@user/GdeVolpiano) (Read error: Connection reset by peer) |
| 18:53:10 | × | sawilagar quits (~sawilagar@user/sawilagar) (Read error: Connection reset by peer) |
| 18:54:11 | × | stiell_ quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 260 seconds) |
| 18:55:24 | → | misterfish joins (~misterfis@84.53.85.146) |
| 18:57:22 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 18:58:33 | → | gawen joins (~gawen@user/gawen) |
| 19:00:02 | × | caconym quits (~caconym@user/caconym) (Quit: bye) |
| 19:00:39 | → | caconym joins (~caconym@user/caconym) |
| 19:02:09 | → | michalz joins (~michalz@185.246.207.193) |
| 19:04:00 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 19:06:41 | → | stiell_ joins (~stiell@gateway/tor-sasl/stiell) |
| 19:09:09 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 19:10:38 | → | ash3en joins (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) |
| 19:12:27 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 246 seconds) |
| 19:14:46 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 19:15:17 | → | euleritian joins (~euleritia@dynamic-176-002-141-094.176.2.pool.telefonica.de) |
| 19:24:43 | → | Everything joins (~Everythin@195.138.86.118) |
| 19:24:55 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 19:26:45 | × | SlackCoder quits (~SlackCode@161.199.135.130) (Quit: Leaving) |
| 19:29:02 | × | Digit quits (~user@user/digit) (Ping timeout: 252 seconds) |
| 19:34:31 | × | Everything quits (~Everythin@195.138.86.118) (Ping timeout: 252 seconds) |
| 19:35:18 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 19:35:21 | → | Everything joins (~Everythin@94.153.29.90) |
| 19:35:58 | → | troydm joins (~troydm@user/troydm) |
| 19:38:35 | × | troydm quits (~troydm@user/troydm) (Client Quit) |
| 19:38:51 | → | troydm joins (~troydm@user/troydm) |
| 19:39:39 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 19:40:22 | → | machinedgod joins (~machinedg@d108-173-18-100.abhsia.telus.net) |
| 19:43:14 | → | Digit joins (~user@user/digit) |
| 19:49:09 | <zzz> | ok can anyone help me make sense of these results? https://paste.jrvieira.com/1730490476766 |
| 19:49:24 | <zzz> | i'm trying to learn about seq/deepseq |
| 19:50:06 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Remote host closed the connection) |
| 19:50:33 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 19:51:00 | <zzz> | my initial doubts are 1. why is force more expensive 2. why is rnf that optimized? |
| 19:51:30 | <zzz> | (3. and why is force not optimized at all) |
| 19:53:01 | <zzz> | (...compared to the others) |
| 19:55:03 | <EvanR> | :t rnf |
| 19:55:04 | <lambdabot> | NFData a => a -> () |
| 19:55:06 | <EvanR> | :force |
| 19:55:06 | <Leary> | zzz: At a guess: the first two can evaluate streamingly, but the version with force has to hold onto the whole thing, doing allocation and/or suffering under GC. |
| 19:55:14 | <EvanR> | :t force |
| 19:55:15 | <lambdabot> | NFData a => a -> a |
| 19:55:40 | <EvanR> | since you don't use the result of rnf for anything, would the optimizer just discard it entirely |
| 19:55:52 | <tomsmeding> | EvanR: it's passed to evaluate |
| 19:55:59 | <EvanR> | oh |
| 19:56:15 | <zzz> | yes, if i didn't use evaluate it would be discarded |
| 19:57:33 | → | tired joins (~tired@user/tired) |
| 19:59:49 | <zzz> | these were compiled with -O2 btw |
| 20:01:01 | <tomsmeding> | zzz: highly suggestive is that System timing for the 'force' variants |
| 20:01:07 | <tomsmeding> | that indeed points to lots of memory IO |
| 20:01:25 | <tomsmeding> | perhaps even swapping; did you check that it all fits in RAM? |
| 20:03:38 | <tomsmeding> | zzz: my cpu is clearly faster than yours, but I get different relative results too https://paste.tomsmeding.com/1fnOybw3 |
| 20:04:55 | <tomsmeding> | `./test 3 +RTS -s` confirms that GC is the issue with the third version, look at that productivity number |
| 20:05:08 | <zzz> | tomsmeding: good catch |
| 20:05:21 | <tomsmeding> | maximum residency for `./test 1` and `./test 2` is <40kb |
| 20:05:33 | <tomsmeding> | so Leary: good guess |
| 20:06:16 | <tomsmeding> | so I can't reproduce the difference between deepseq and rnf |
| 20:06:55 | × | ash3en quits (~Thunderbi@2a03:7846:b6eb:101:93ac:a90a:da67:f207) (Quit: ash3en) |
| 20:07:10 | <tomsmeding> | zzz: if I run with ghc 9.10 instead of 9.4 then all three run fast |
| 20:07:19 | <tomsmeding> | on -O2 |
| 20:08:11 | <tomsmeding> | scratch that, was testing the wrong thing, ghc version is irrelevant |
| 20:08:46 | <zzz> | i'm using 9.10.1 |
| 20:08:53 | <zzz> | ah ok |
| 20:09:44 | <EvanR> | force x = x `deepseq` x = rnf x `seq` x. So 'evaluate'ing force something involves evaluating something to some extent twice |
| 20:09:59 | <tomsmeding> | 'evaluate' only does WHNF |
| 20:10:13 | <EvanR> | sure but it means you have to still have it when it's time to do that |
| 20:10:23 | <EvanR> | meanwhile it's being deepseqqed |
| 20:10:34 | <tomsmeding> | that's... a fair point: you have to hold on to the root of the data structure to WHNF it |
| 20:10:38 | <tomsmeding> | hence the memory use |
| 20:10:48 | <tomsmeding> | zzz: that's version 3 explained |
| 20:11:00 | <tomsmeding> | zzz: can you reproduce the difference between 1 and 2 with my code? |
| 20:11:12 | <monochrom> | Nah the extra seq is at worst just an extra check "oh this is already a value, moving on". |
| 20:11:34 | <tomsmeding> | monochrom: sure, but does not keep a reference to the value? |
| 20:11:44 | <EvanR> | yes it's cheap but you can't have discarded the entire thing prior to the simple check |
| 20:11:56 | <monochrom> | "foo seq bar" returns a pointer to bar but not foo. |
| 20:11:59 | <tomsmeding> | mind that this is evaluate, hence seq#, not seq -- not sure if that matters |
| 20:12:11 | <EvanR> | foo and bar are the same object in this case |
| 20:12:25 | <monochrom> | OK OK this one is "... seq x" so yeah you're right. |
| 20:12:56 | <tomsmeding> | monochrom: and if it really doesn't matter, then how do you explain 'evaluate (force x) >> pure ()' taking more than 4x as long as 'evaluate (rnf x)' and thrashing the GC meanwhile? :p |
| 20:13:27 | <EvanR> | it's a situation like this that I half expect ghc to pull some kind of magic and be efficient regardless of common sense |
| 20:13:34 | <tomsmeding> | we're talking maximum residency of 2 GB and productivity of <25%, versus maximum residency of 40KB and productivity >99% |
| 20:13:38 | <EvanR> | like scanl with tuples |
| 20:13:46 | <dolio> | evaluate returns the value it evaluates, too. |
| 20:15:30 | <monochrom> | GHC out-smarts common sense in some cases and defies common senses in some others. Also people hold opposite "common" senses. |
| 20:16:46 | <monochrom> | Stepping back a step, people even hold opposite opinions on whether you should let GHC optimize or you should distrust GHC and optimize by hand. |
| 20:17:35 | <haskellbridge> | <zwro> "the problem with common sense is that it's not common at all" — someone |
| 20:18:41 | <zzz> | tomsmeding: |
| 20:18:56 | <zzz> | Benchmark 1: ./hs/test 1 |
| 20:18:56 | <zzz> | Time (mean ± σ): 4.171 s ± 0.038 s [User: 4.115 s, System: 0.051 s] |
| 20:18:59 | <zzz> | Range (min … max): 4.106 s … 4.249 s 10 runs |
| 20:19:01 | <zzz> | |
| 20:19:04 | <zzz> | Benchmark 2: ./hs/test 2 |
| 20:19:06 | <zzz> | Time (mean ± σ): 4.208 s ± 0.048 s [User: 4.195 s, System: 0.006 s] |
| 20:19:09 | <zzz> | Range (min … max): 4.137 s … 4.276 s 10 runs |
| 20:19:12 | <zzz> | |
| 20:19:44 | <tomsmeding> | okay so they are at least the same but 1. why are they slower than your code, and 2. what CPU is that, I know mine is fairly fast but _this_ fast? |
| 20:20:03 | <tomsmeding> | my CPU is like 7x as fast as yours? That feels unlikely |
| 20:20:19 | <dolio> | I don't know about that. |
| 20:20:45 | <tomsmeding> | zzz: if it's a laptop, are you sure it's not throttling? Is the power cable attached? If it's intel, is turbo boost enabled and does the cpu reach similar frequencies for both tests? |
| 20:21:08 | <zzz> | tomsmeding: old hp laptop, core i5 7th gen |
| 20:21:18 | <tomsmeding> | what model number? |
| 20:21:24 | <dolio> | I was helping someone out a week or so ago, and they were doing something on their laptop, and my 10 year old desktop might have been that much faster when I tried it. |
| 20:21:36 | <tomsmeding> | O.o |
| 20:21:52 | <monochrom> | I was hoping "brand new laptop using the brand new intel lake cpus so yeah it's a well-known regression" >:)\ |
| 20:22:23 | <zzz> | tomsmeding: not sure, it's not mine. sec |
| 20:22:54 | <zzz> | HP ProBook 440 G4 |
| 20:23:36 | <EvanR> | "did you check if it's plugged in" |
| 20:23:38 | <tomsmeding> | that can still mean various CPUs it seems |
| 20:24:12 | <zzz> | plugged in, not sure if it's throttling |
| 20:24:20 | <zzz> | 4 cores |
| 20:24:26 | <tomsmeding> | but yeah with a CPU of that class I would not expect a 7x difference, but I guess it could be |
| 20:24:48 | <monochrom> | OK now I'm hoping "oh it only has 0.5GB RAM so yeah it's thrashing" |
| 20:24:54 | <EvanR> | intel celery |
| 20:25:06 | <tomsmeding> | monochrom: that would be for case 3 only |
| 20:25:10 | <tomsmeding> | case 1 and 2 run lean |
| 20:25:47 | <zzz> | tomsmeding: i don't understand why in your test the difference between deepseq and rnf disappears |
| 20:26:18 | <monochrom> | What if the web browser already eats up 0.4999GB and the OS eats up the rest :) |
| 20:26:57 | <monochrom> | OK I'll stop until I think up a better joke! |
| 20:27:47 | <zzz> | monochrom: 8GB Ram :) |
| 20:28:08 | <tomsmeding> | zzz: if I compile your code as-is (but do put it all in one file), I get similar timings too |
| 20:28:26 | <tomsmeding> | are you perhaps testing one version with it all in one file and one version split over multiple files? |
| 20:28:52 | <monochrom> | That is strange. |
| 20:29:12 | <zzz> | tomsmeding: oh, i did that so i could easily share it. i ran separate files |
| 20:29:28 | <tomsmeding> | zzz: https://paste.tomsmeding.com/WGmJJRuD |
| 20:29:29 | <zzz> | one file for each version |
| 20:29:56 | <zzz> | i consistently get better results for compiled rnf |
| 20:30:17 | <tomsmeding> | can you try my last paste? |
| 20:30:41 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
| 20:30:48 | → | todi joins (~todi@p57803331.dip0.t-ipconnect.de) |
| 20:31:02 | <zzz> | y |
| 20:32:48 | → | GdeVolpiano joins (~GdeVolpia@user/GdeVolpiano) |
| 20:37:36 | <zzz> | https://paste.jrvieira.com/1730493448663 |
| 20:38:03 | zzz | confused |
| 20:39:22 | <tomsmeding> | can you reproduce your original measurements :p |
| 20:39:31 | <zzz> | yes |
| 20:39:41 | <zzz> | ok wait. trying one thing |
| 20:40:04 | <tomsmeding> | perhaps ghc is less eager to inline across modules, and in one stuff gets inlined and in the other it doesn't? |
| 20:40:50 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 20:41:27 | <zzz> | ok this is weird. let me doublecheck something |
| 20:41:51 | <tomsmeding> | zzz: what is also confusing is how this one takes 1.3 seconds (which is about 2x as slow as my machine, which is quite to be expected given the cpu freq + age difference), but the previous one with the \case was 7x as slow as my machine |
| 20:41:56 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 20:42:19 | <tomsmeding> | they are within 5% of each other on my machine |
| 20:43:52 | <zzz> | ok now i'm getting similar results |
| 20:44:10 | <tomsmeding> | (my CPU is 3 generations newer (10th gen) and runs at ~160% the frequency (it maxes at 5GHz); together that neatly explains mine being 2x as fast as yours) |
| 20:45:00 | <zzz> | i need to go grab something to eat. in the meantime i will leave hyperfine running |
| 20:45:46 | <tomsmeding> | the measurements are quite reliable here, individual executions differ maybe 5%; but the differences we're looking at are 100% or more, so hyperfine is a luxury :p |
| 20:49:08 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 20:52:56 | → | euandreh joins (~Thunderbi@2804:d59:891b:2c00:896a:156a:7a25:3f91) |
| 20:56:06 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 20:58:27 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection) |
| 20:58:38 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 20:58:49 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 20:59:57 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:03:10 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 21:04:20 | → | hgolden__ joins (~hgolden@static-198-44-129-83.cust.tzulo.com) |
| 21:06:43 | → | Tuplanolla joins (~Tuplanoll@91-159-69-59.elisa-laajakaista.fi) |
| 21:06:56 | × | hgolden_ quits (~hgolden@static-198-44-129-51.cust.tzulo.com) (Ping timeout: 252 seconds) |
| 21:08:00 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 21:10:08 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:14:37 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 21:25:31 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:29:47 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 244 seconds) |
| 21:29:54 | × | lxsameer quits (~lxsameer@Serene/lxsameer) (Ping timeout: 276 seconds) |
| 21:30:43 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 21:35:27 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 21:39:44 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:40:52 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 21:41:28 | × | michalz quits (~michalz@185.246.207.193) (Remote host closed the connection) |
| 21:41:35 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:45:26 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 21:46:30 | × | k_hachig quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Ping timeout: 260 seconds) |
| 21:48:29 | → | k_hachig_ joins (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) |
| 21:49:56 | × | Everything quits (~Everythin@94.153.29.90) (Quit: leaving) |
| 21:56:17 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:00:49 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 248 seconds) |
| 22:03:24 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:04:27 | → | sprotte24_ joins (~sprotte24@p200300d16f13bb00e504a10a2d09d14b.dip0.t-ipconnect.de) |
| 22:08:17 | × | sprotte24 quits (~sprotte24@134.245.44.89) (Ping timeout: 248 seconds) |
| 22:08:58 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 22:09:54 | <zzz> | tomsmeding: i'm getting consistent results now https://paste.jrvieira.com/1730498979640 |
| 22:10:40 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 22:11:08 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:11:53 | × | sprotte24_ quits (~sprotte24@p200300d16f13bb00e504a10a2d09d14b.dip0.t-ipconnect.de) (Quit: Leaving) |
| 22:13:07 | <tomsmeding> | zzz: what was wrong before? |
| 22:15:08 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 252 seconds) |
| 22:16:03 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds) |
| 22:17:10 | × | k_hachig_ quits (~k_hachig@2607:fea8:351d:ef0:901a:fefb:e87f:78b3) (Quit: WeeChat 4.4.2) |
| 22:18:49 | → | sadmax joins (~user@64.130.91.66) |
| 22:21:36 | × | peterbecich quits (~Thunderbi@syn-047-229-123-186.res.spectrum.com) (Ping timeout: 272 seconds) |
| 22:26:31 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:27:36 | × | JuanDaugherty quits (~juan@user/JuanDaugherty) (Quit: JuanDaugherty) |
| 22:28:44 | → | Nachtgespenst joins (~user@user/siracusa) |
| 22:29:12 | × | misterfish quits (~misterfis@84.53.85.146) (Ping timeout: 272 seconds) |
| 22:33:44 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds) |
| 22:36:24 | <zzz> | i was not cleaning up memory from 'runghc ss-force.hs' which ran before './ss' |
| 22:36:44 | <zzz> | so my compiled deepseq test times were inflated |
| 22:37:57 | <zzz> | thanks for your help, i have little practice with benchmarking |
| 22:41:03 | <zzz> | Leary: ty also. i did learn something |
| 22:44:35 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 22:49:14 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 22:54:42 | × | euandreh quits (~Thunderbi@2804:d59:891b:2c00:896a:156a:7a25:3f91) (Quit: euandreh) |
| 22:55:13 | → | euandreh joins (~Thunderbi@2804:d59:891b:2c00:896a:156a:7a25:3f91) |
| 23:02:21 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:10:36 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 23:12:09 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:16:39 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
| 23:25:58 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 23:27:31 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:28:05 | × | machinedgod quits (~machinedg@d108-173-18-100.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 23:30:35 | × | morb quits (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 23:30:48 | × | euandreh quits (~Thunderbi@2804:d59:891b:2c00:896a:156a:7a25:3f91) (Quit: euandreh) |
| 23:32:02 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds) |
| 23:42:54 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:47:44 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 272 seconds) |
| 23:48:54 | → | peterbecich joins (~Thunderbi@syn-047-229-123-186.res.spectrum.com) |
| 23:55:16 | → | merijn joins (~merijn@128-137-045-062.dynamic.caiway.nl) |
| 23:58:34 | → | morb joins (~morb@pool-108-41-100-120.nycmny.fios.verizon.net) |
| 23:59:38 | × | merijn quits (~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds) |
All times are in UTC on 2024-11-01.