Logs: freenode/#haskell
| 2021-05-12 09:57:35 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
| 2021-05-12 09:57:39 | <maerwald> | "It would be nice if your function works"? |
| 2021-05-12 09:58:07 | <merijn> | maerwald: The problem is that people don't agree on what "works" means |
| 2021-05-12 09:58:13 | <nshepperd2> | parametricity of mzero tells you that '(v >> mzero) >>= f = v >> mzero' |
| 2021-05-12 09:58:20 | <maerwald> | I think... if an instance has *additional* laws, it can document them in the instance |
| 2021-05-12 09:58:31 | <nshepperd2> | which is what 'can't recover' means in practice |
| 2021-05-12 09:59:21 | <ski> | "because mzero didn't do any side-effect" -- `mzero' by definition expresses a non-trivial effect (the absence of an answer) |
| 2021-05-12 10:00:20 | <maerwald> | so mzero just means "there is failure" |
| 2021-05-12 10:00:28 | <nshepperd2> | (as long as >>= doesn't do anything which would already violate the monad laws, probably) |
| 2021-05-12 10:00:29 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 2021-05-12 10:00:53 | <tdammers> | kuribas: laws are recommendations already. the compiler can't enforce them, your code will still compile and run if you violate them, it will just be inconsistent, surprising, unpredictable, or otherwise act strange |
| 2021-05-12 10:01:42 | <maerwald> | well, then the laws are not violated if you think of it only in terms of equational reasoning without program execution |
| 2021-05-12 10:02:37 | <nshepperd2> | '(v >> mzero) >>= f = v >> mzero' would probably be a better law than 'v >> mzero = mzero' at least |
| 2021-05-12 10:02:53 | <kuribas> | agreed |
| 2021-05-12 10:03:47 | × | chomwitt quits (~alexander@2a02:587:dc0a:2700:39fb:67a3:1f47:16d) (Ping timeout: 260 seconds) |
| 2021-05-12 10:03:54 | <dminuoso> | MonadZero, the typeclass with laws nobody can agree on. |
| 2021-05-12 10:03:54 | <ski> | that already holds by associativity, and right absorption |
| 2021-05-12 10:04:03 | <dminuoso> | Err MonadPlus. |
| 2021-05-12 10:04:20 | <nshepperd2> | oh yeah so it does |
| 2021-05-12 10:04:54 | <nshepperd2> | the law is just unnecessary as i thought then |
| 2021-05-12 10:05:19 | <ski> | @wiki MonadPlus |
| 2021-05-12 10:05:19 | <lambdabot> | https://wiki.haskell.org/MonadPlus |
| 2021-05-12 10:05:21 | <ski> | @wiki MonadPlus_reform_proposal |
| 2021-05-12 10:05:21 | <lambdabot> | https://wiki.haskell.org/MonadPlus_reform_proposal |
| 2021-05-12 10:05:42 | → | TimesUp joins (57010b6e@host-87-1-11-110.retail.telecomitalia.it) |
| 2021-05-12 10:06:44 | <maerwald> | " IO is not even in MonadPlus," |
| 2021-05-12 10:08:46 | × | jgt_ quits (~jgt@92-247-237-116.spectrumnet.bg) (Ping timeout: 240 seconds) |
| 2021-05-12 10:10:52 | → | stree joins (~stree@68.36.8.116) |
| 2021-05-12 10:12:11 | <ski> | well, i'm not convinced it should be |
| 2021-05-12 10:12:20 | → | jgt_ joins (~jgt@92-247-237-116.spectrumnet.bg) |
| 2021-05-12 10:13:13 | <nshepperd2> | IO is in MonadPlus now |
| 2021-05-12 10:13:19 | <ski> | i know |
| 2021-05-12 10:13:43 | <nshepperd2> | ofc these same issues apply to ExceptT over anything as well |
| 2021-05-12 10:15:44 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
| 2021-05-12 10:16:59 | → | ukari joins (~ukari@unaffiliated/ukari) |
| 2021-05-12 10:17:36 | → | undvrainbowvita8 joins (~egp_@128-71-13-3.broadband.corbina.ru) |
| 2021-05-12 10:19:15 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-05-12 10:21:01 | → | ddellacosta joins (~ddellacos@86.106.143.33) |
| 2021-05-12 10:22:34 | <maerwald> | we could start a "Class law task force" :p |
| 2021-05-12 10:22:50 | <maerwald> | put it on HF tech track |
| 2021-05-12 10:23:29 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
| 2021-05-12 10:25:46 | × | ddellacosta quits (~ddellacos@86.106.143.33) (Ping timeout: 252 seconds) |
| 2021-05-12 10:30:20 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 2021-05-12 10:30:31 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-05-12 10:30:58 | → | pjb joins (~pjb@2a01cb04063ec50081adf5bfe676b3d2.ipv6.abo.wanadoo.fr) |
| 2021-05-12 10:32:18 | → | mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl) |
| 2021-05-12 10:32:18 | × | mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
| 2021-05-12 10:32:18 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 2021-05-12 10:34:12 | × | plutoniix quits (~q@184.82.203.254) (Quit: Leaving) |
| 2021-05-12 10:34:33 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-05-12 10:35:42 | × | Guest234 quits (~textual@2603-7000-3040-0000-010d-5dbc-e6e6-cd09.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-05-12 10:36:37 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 265 seconds) |
| 2021-05-12 10:39:18 | <siers> | I'm trying ghc -threaded && ./ +RTS -N8, but with ghc -threaded -O I don't see CPU high usage any more |
| 2021-05-12 10:39:44 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-05-12 10:40:24 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 2021-05-12 10:44:11 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 2021-05-12 10:44:38 | × | pmj quits (~pmj@p4fe156fa.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 2021-05-12 10:50:35 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-05-12 10:51:06 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2021-05-12 10:51:09 | → | lemmih joins (~lemmih@2406:3003:2072:44:defd:a00a:733d:f00a) |
| 2021-05-12 10:55:06 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 2021-05-12 10:55:08 | → | ddellacosta joins (~ddellacos@86.106.143.202) |
| 2021-05-12 10:55:52 | <siers> | for this cycle wasting program http://sprunge.us/ubbaBZ |
| 2021-05-12 10:57:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-12 10:58:43 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 2021-05-12 10:59:08 | Alleria | is now known as Guest9827 |
| 2021-05-12 10:59:28 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 2021-05-12 10:59:41 | × | ddellacosta quits (~ddellacos@86.106.143.202) (Ping timeout: 240 seconds) |
| 2021-05-12 10:59:48 | <tomsmeding> | siers: what do you see instead? |
| 2021-05-12 11:00:52 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2021-05-12 11:01:20 | → | vgtw_ joins (~vgtw@gateway/tor-sasl/vgtw) |
| 2021-05-12 11:01:52 | <tomsmeding> | okay I see the same, it uses one core only |
| 2021-05-12 11:01:57 | × | vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Ping timeout: 240 seconds) |
| 2021-05-12 11:01:58 | vgtw_ | is now known as vgtw |
| 2021-05-12 11:02:02 | → | puke joins (~vroom@217.138.252.196) |
| 2021-05-12 11:02:19 | × | vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection) |
| 2021-05-12 11:02:33 | → | vgtw joins (~vgtw@gateway/tor-sasl/vgtw) |
| 2021-05-12 11:02:41 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-05-12 11:03:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-12 11:03:49 | × | dcoutts_ quits (~duncan@94.186.125.91.dyn.plus.net) (Read error: Connection reset by peer) |
| 2021-05-12 11:03:50 | <siers> | yup |
| 2021-05-12 11:04:03 | → | dcoutts_ joins (~duncan@94.186.125.91.dyn.plus.net) |
| 2021-05-12 11:05:42 | × | Xnuk quits (~xnuk@45.76.202.58) (Remote host closed the connection) |
| 2021-05-12 11:06:01 | → | Xnuk joins (~xnuk@vultr.xnu.kr) |
| 2021-05-12 11:08:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-05-12 11:09:24 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-12 11:12:08 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-05-12 11:14:26 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 2021-05-12 11:14:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-12 11:15:19 | <tomsmeding> | I think the problem is that your cycle-spinning function does not perform any allocations, so there are no points where the scheduler can step in and yield the computation to a different thread |
| 2021-05-12 11:15:54 | <tomsmeding> | this is not based on any knowledge of the RTS internals, but in the past I've played briefly with these parallel combinators and found out that stuff starts acting very strangely when your worker computations perform no allocations |
| 2021-05-12 11:16:12 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2021-05-12 11:16:28 | <tomsmeding> | for example: adding {-# NOINLINE tl #-} fixes the behaviour with -O |
| 2021-05-12 11:19:46 | <siers> | ok, new wasting algo: http://sprunge.us/icSqSP |
| 2021-05-12 11:19:51 | <siers> | this one works as expected |
| 2021-05-12 11:20:00 | <tomsmeding> | siers: this does work for me https://paste.tomsmeding.com/LXrSEv3l |
| 2021-05-12 11:20:04 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-05-12 11:20:14 | <tomsmeding> | lol or that |
| 2021-05-12 11:21:00 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-05-12 11:21:06 | <siers> | :) ok, main point is we know why |
All times are in UTC.