Logs: freenode/#haskell
| 2020-10-20 19:19:16 | <merijn> | monochrom: Ok, so the disagreement (seems?) to be whether "foldMapM :: (Foldable t, Applicative f, Monoid r) => (a -> f r) -> t a -> f r" admits an implementation other than "\f -> getAlt . foldMap (Alt . f)" |
| 2020-10-20 19:19:24 | × | ggole quits (~ggole@2001:8003:8119:7200:9458:d2e2:e6f8:6e99) (Quit: Leaving) |
| 2020-10-20 19:19:40 | <phadej> | :t \f -> fmap fold . traverse f . toList |
| 2020-10-20 19:19:41 | <monochrom> | s/implementation/expectation/ |
| 2020-10-20 19:19:42 | <lambdabot> | error: |
| 2020-10-20 19:19:42 | <lambdabot> | Ambiguous occurrence ‘toList’ |
| 2020-10-20 19:19:42 | <lambdabot> | It could refer to |
| 2020-10-20 19:19:46 | <phadej> | :t \f -> fmap fold . traverse f . Data.Foldable.toList |
| 2020-10-20 19:19:48 | <lambdabot> | (Monoid b, Applicative f, Foldable t) => (a -> f b) -> t a -> f b |
| 2020-10-20 19:20:33 | <phadej> | I guess that's the same |
| 2020-10-20 19:20:41 | <merijn> | monochrom: Do you agree that "\f -> getAlt . foldMap (Alt . f)" always has the same result, regardless of any reassociating that foldMap happens to do? |
| 2020-10-20 19:21:55 | <phadej> | no that's different. Alt would have Alternative somewhere |
| 2020-10-20 19:22:03 | <phadej> | :t \f -> getAlt . foldMap (Alt . f) |
| 2020-10-20 19:22:05 | <lambdabot> | forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Alt f a1)) => (a2 -> f a1) -> t a2 -> f a1 |
| 2020-10-20 19:22:06 | <merijn> | oh, wait |
| 2020-10-20 19:22:08 | <merijn> | I mean Ap |
| 2020-10-20 19:22:16 | <merijn> | my bad |
| 2020-10-20 19:22:23 | <merijn> | That's what I get for writing form memory |
| 2020-10-20 19:22:23 | <phadej> | :t \f -> getAp . foldMap (Ap . f) |
| 2020-10-20 19:22:24 | <lambdabot> | forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1 |
| 2020-10-20 19:22:49 | <phadej> | :t \f xs -> getAp (foldMap (Ap . f) xs) |
| 2020-10-20 19:22:50 | <lambdabot> | forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1 |
| 2020-10-20 19:23:04 | <phadej> | silly lambdabot, can you disable PolyKinds |
| 2020-10-20 19:23:20 | <merijn> | % :t \f -> getAp . foldMap (Ap . f) |
| 2020-10-20 19:23:20 | <yahb> | merijn: ; <interactive>:1:2: warning: [-Wname-shadowing] This binding for `f' shadows the existing binding defined at <interactive>:91:1; forall k (t :: * -> *) (f :: k -> *) (a1 :: k) a2. (Foldable t, Monoid (Ap f a1)) => (a2 -> f a1) -> t a2 -> f a1 |
| 2020-10-20 19:23:25 | <merijn> | bah |
| 2020-10-20 19:23:37 | <merijn> | % :seti -XNoPolyKinds |
| 2020-10-20 19:23:37 | <yahb> | merijn: |
| 2020-10-20 19:23:39 | <merijn> | % :t \f -> getAp . foldMap (Ap . f) |
| 2020-10-20 19:23:40 | <yahb> | merijn: ; <interactive>:1:2: warning: [-Wname-shadowing] This binding for `f' shadows the existing binding defined at <interactive>:91:1; (Foldable t, Applicative f, Monoid a1) => (a2 -> f a1) -> t a2 -> f a1 |
| 2020-10-20 19:24:42 | × | kuribas quits (~user@ptr-25vy0iajfrrz51ad66r.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 2020-10-20 19:25:11 | × | tnm quits (~tnm@dslb-084-056-234-071.084.056.pools.vodafone-ip.de) (Quit: leaving) |
| 2020-10-20 19:25:58 | → | falafel joins (~falafel@71-34-132-121.clsp.qwest.net) |
| 2020-10-20 19:25:59 | → | Will36 joins (56be05c9@host86-190-5-201.range86-190.btcentralplus.com) |
| 2020-10-20 19:27:52 | → | thrig1 joins (~thrig@178.162.209.171) |
| 2020-10-20 19:28:09 | × | frdg quits (47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net) (Remote host closed the connection) |
| 2020-10-20 19:28:26 | → | britva joins (~britva@31-10-157-156.cgn.dynamic.upc.ch) |
| 2020-10-20 19:33:50 | → | jkachmar joins (uid226591@gateway/web/irccloud.com/x-zlznzlpgujapddpg) |
| 2020-10-20 19:35:25 | → | irc_user joins (uid423822@gateway/web/irccloud.com/x-jjpkvgqppresuvbx) |
| 2020-10-20 19:35:55 | ← | jkachmar parts (uid226591@gateway/web/irccloud.com/x-zlznzlpgujapddpg) () |
| 2020-10-20 19:37:30 | → | knupfer joins (~Thunderbi@i59F7FF6F.versanet.de) |
| 2020-10-20 19:37:36 | × | Franciman quits (~francesco@host-82-48-166-25.retail.telecomitalia.it) (Quit: Leaving) |
| 2020-10-20 19:38:21 | → | ph88 joins (~ph88@ip5f5af0cc.dynamic.kabel-deutschland.de) |
| 2020-10-20 19:39:15 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2020-10-20 19:40:22 | → | Guest_85 joins (bc4a58f5@188.74.88.245) |
| 2020-10-20 19:41:12 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-10-20 19:41:13 | <Guest_85> | can't install it on my ubuntu subsystem on my windows 10 machine |
| 2020-10-20 19:41:17 | <Guest_85> | bruh |
| 2020-10-20 19:41:40 | × | Guest_85 quits (bc4a58f5@188.74.88.245) (Remote host closed the connection) |
| 2020-10-20 19:41:50 | → | shafox joins (~shafox@106.51.234.111) |
| 2020-10-20 19:44:43 | → | ensyde joins (~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) |
| 2020-10-20 19:46:02 | <dsal> | Oh man. I hope whoever that is manages to get it installed. |
| 2020-10-20 19:46:27 | <koz_> | Whatever 'it' was. |
| 2020-10-20 19:47:16 | → | nineonin_ joins (~textual@216.81.48.202) |
| 2020-10-20 19:47:19 | <monochrom> | People who only understand the simpleton boolean "it works / it doesn't work" shouldn't be in programming in the first place. |
| 2020-10-20 19:47:31 | mrbentarikau | is now known as caubert |
| 2020-10-20 19:47:44 | × | falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Remote host closed the connection) |
| 2020-10-20 19:48:10 | → | falafel joins (~falafel@71-34-132-121.clsp.qwest.net) |
| 2020-10-20 19:49:33 | × | ensyde quits (~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) (Ping timeout: 260 seconds) |
| 2020-10-20 19:54:24 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-10-20 19:54:44 | × | falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Remote host closed the connection) |
| 2020-10-20 19:55:14 | → | falafel joins (~falafel@71-34-132-121.clsp.qwest.net) |
| 2020-10-20 19:57:53 | <dminuoso> | monochrom: That sounds rather simpletony boolean. |
| 2020-10-20 19:58:02 | → | leah2 joins (~leah@vuxu.org) |
| 2020-10-20 19:58:14 | <monochrom> | haha |
| 2020-10-20 20:01:28 | → | rprije joins (~rprije@110-175-117-18.tpgi.com.au) |
| 2020-10-20 20:10:48 | → | ensyde joins (~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) |
| 2020-10-20 20:12:25 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-10-20 20:14:07 | × | thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2020-10-20 20:14:35 | → | thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) |
| 2020-10-20 20:15:17 | <tomsmeding> | I have a function that, when I run it and measure its execution time using Criterion.Measurement.measure, alternatingly takes ~0.53 and ~0.62 seconds |
| 2020-10-20 20:15:31 | <tomsmeding> | seeing those timings made me do a double take |
| 2020-10-20 20:15:37 | × | ensyde quits (~ensyde@2600:1702:2e30:1a40:c919:4da8:ba88:82fd) (Ping timeout: 272 seconds) |
| 2020-10-20 20:16:18 | <tomsmeding> | fortunately I know the cause, and the cause is unsurprisingly GC; passing +RTS -c reduces the difference to ~0.60 vs ~0.61 (though it still oscillates!) |
| 2020-10-20 20:16:25 | × | falafel quits (~falafel@71-34-132-121.clsp.qwest.net) (Ping timeout: 264 seconds) |
| 2020-10-20 20:17:00 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2020-10-20 20:17:27 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 2020-10-20 20:17:40 | × | cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 258 seconds) |
| 2020-10-20 20:17:53 | <koz_> | Is there a pre-rolled instance of Arbitrary for Scientific out there? |
| 2020-10-20 20:19:52 | × | thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-10-20 20:20:25 | → | falafel joins (~falafel@71-34-132-121.clsp.qwest.net) |
| 2020-10-20 20:20:58 | hackage | dsv 1.0.0.0 - DSV (delimiter-separated values) https://hackage.haskell.org/package/dsv-1.0.0.0 (chris_martin) |
| 2020-10-20 20:23:45 | <dminuoso> | tomsmeding: That difference seems well within margin of errors, induced by things like TLB flushes on preemption, cache evictions from other threads. |
| 2020-10-20 20:24:14 | <tomsmeding> | dminuoso: also if it's fully reproducible on an intel i7 laptop as well as an amd threadripper server? |
| 2020-10-20 20:24:25 | <dminuoso> | The difference between 0.60 and 0.61? |
| 2020-10-20 20:24:27 | <dminuoso> | Id say yes. |
| 2020-10-20 20:24:32 | <dminuoso> | Or is it still alternatingly? |
| 2020-10-20 20:24:33 | <tomsmeding> | oh that one, sure |
| 2020-10-20 20:24:37 | <tomsmeding> | still alternating |
| 2020-10-20 20:24:39 | <tomsmeding> | :p |
| 2020-10-20 20:24:43 | <tomsmeding> | that's what makes it interesting |
| 2020-10-20 20:24:54 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2020-10-20 20:25:16 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 2020-10-20 20:25:36 | <dminuoso> | Curious though, in the degenerate case, the GC takes that much time? |
| 2020-10-20 20:25:42 | <tomsmeding> | oh correction: the +RTS -c doesn't help om the AMD, only on the intel |
| 2020-10-20 20:25:57 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-98-110.w86-212.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 2020-10-20 20:26:44 | <tomsmeding> | on intel, Criterion.Measurement.measure reports an 'measGcCpuSeconds' of alternatingly about 3.6e-2 and about 7.2e-2 |
| 2020-10-20 20:27:32 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 2020-10-20 20:28:07 | <dminuoso> | tomsmeding: I wonder, could the alternating behavior happen because of some oscillating swapping? |
| 2020-10-20 20:28:22 | <dminuoso> | (swapping in the sense of swap memory) |
All times are in UTC.