Logs: freenode/#haskell
| 2021-03-10 12:15:13 | <maerwald> | ADG1089__: because it creates an sdist first, unpacks it in tmp and then builds it there |
| 2021-03-10 12:15:24 | <ADG1089__> | It is using -w ghc-8.10.4 -O1 but in cabal I mentioned -O2 -fllvm. Also it is installing all executables even though i specificed the name |
| 2021-03-10 12:15:38 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:8ce3:ab05:2761:c61a) (Ping timeout: 264 seconds) |
| 2021-03-10 12:15:49 | <maerwald> | pass it as command line arguments instead, that should work |
| 2021-03-10 12:16:05 | <ADG1089__> | merijn: yeah, I see it doing something in ./sdist/<project-anme>-<porject version>.tar.gz |
| 2021-03-10 12:16:14 | <merijn> | Are you sure "cabal install <executable>" isn't just installing an entirely unrelated package? |
| 2021-03-10 12:16:43 | <ADG1089__> | maerwald: giving the flags again? isn't that redundant since I already mentioned in cabal file? |
| 2021-03-10 12:16:47 | <merijn> | Are executables even a valid target for install |
| 2021-03-10 12:17:12 | <merijn> | ADG1089__: Pastebin your cabal file, command and build output |
| 2021-03-10 12:17:35 | <merijn> | maerwald: Your comment does not apply to his question |
| 2021-03-10 12:17:49 | <merijn> | maerwald: You are referring to cabal.project, he was referring to a regular cabal file |
| 2021-03-10 12:18:11 | <maerwald> | oh right |
| 2021-03-10 12:19:24 | <ADG1089__> | merijn: cabal file: https://paste.tomsmeding.com/HbsivGIx command execution: https://paste.tomsmeding.com/TAyrSZFu |
| 2021-03-10 12:21:20 | → | APugNamedPugsley joins (~13052@2601:58a:8300:f6a0:58b8:b5d0:d1ef:978a) |
| 2021-03-10 12:22:08 | × | danvet_ quits (~danvet@212-51-149-181.fiber7.init7.net) (Ping timeout: 245 seconds) |
| 2021-03-10 12:22:49 | <merijn> | ADG1089__: The build profile just refers to the default cabal configuration for optimisation, though. It doesn't inspect ghc-options to see if you pass -O2 there |
| 2021-03-10 12:23:34 | <ADG1089__> | merijn: what do you suggest, I do to include those flags? |
| 2021-03-10 12:24:04 | <merijn> | ADG1089__: My point is that it likely *is* compiling with -O2 |
| 2021-03-10 12:24:22 | <merijn> | but that's just not reported in the build profile, because it's not part of the build profile |
| 2021-03-10 12:24:25 | <hololeap> | i've got an abstraction in mind and i'm looking for a way to translate it to a monad transformer stack. a good example is iptables. there is a list of filters and each one can choose to consume a packet and/or pass it down the line |
| 2021-03-10 12:24:30 | × | joseph2 quits (~joseph@cpe-24-208-140-96.insight.res.rr.com) (Quit: WeeChat 2.8) |
| 2021-03-10 12:24:41 | <merijn> | I suspect that if you run cabal -v3 and look at the *actual* GHC invocation it *will* have -O2 |
| 2021-03-10 12:26:32 | <hololeap> | would this just be a `traverse` over some short-circuiting monad like Either? |
| 2021-03-10 12:27:17 | <hololeap> | actually, no it would probably be a foldM |
| 2021-03-10 12:28:26 | <hololeap> | % :t foldM @(Either String) |
| 2021-03-10 12:28:27 | <yahb> | hololeap: Monad m => (b -> a -> m b) -> b -> Either String a -> m b |
| 2021-03-10 12:28:27 | × | xff0x quits (~xff0x@2001:1a81:539a:e500:a3f:28c8:6043:6a40) (Remote host closed the connection) |
| 2021-03-10 12:28:44 | <hololeap> | % :t foldM @[] @(Either String) |
| 2021-03-10 12:28:44 | → | xff0x joins (~xff0x@2001:1a81:539a:e500:2099:b14:f0f8:3b67) |
| 2021-03-10 12:28:44 | <yahb> | hololeap: (b -> a -> Either String b) -> b -> [a] -> Either String b |
| 2021-03-10 12:28:48 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 260 seconds) |
| 2021-03-10 12:29:19 | <hololeap> | % :t foldM @[] @(MaybeT _) |
| 2021-03-10 12:29:19 | <yahb> | hololeap: ; <interactive>:1:13: error:; Not in scope: type constructor or class `MaybeT'; Perhaps you meant `Maybe' (imported from Prelude) |
| 2021-03-10 12:30:15 | <hololeap> | % import Contol.Monad.Trans.Maybe |
| 2021-03-10 12:30:15 | <yahb> | hololeap: ; <no location info>: error:; Could not find module `Contol.Monad.Trans.Maybe'; Perhaps you meant; Control.Monad.Trans.Maybe (from transformers-0.5.6.2); Control.Monad.Trans.Free (from free-5.1.6); Control.Monad.Trans.State (from transformers-0.5.6.2) |
| 2021-03-10 12:30:28 | <hololeap> | % import Control.Monad.Trans.Maybe |
| 2021-03-10 12:30:28 | <yahb> | hololeap: |
| 2021-03-10 12:30:30 | <hololeap> | % :t foldM @[] @(MaybeT _) |
| 2021-03-10 12:30:30 | <yahb> | hololeap: Monad w => (b -> a -> MaybeT w b) -> b -> [a] -> MaybeT w b |
| 2021-03-10 12:30:48 | <merijn> | hololeap: Use pm? |
| 2021-03-10 12:31:17 | <ADG1089__> | merijn: no I don't think it's invoking those flags as i see in -v3. And I still don't know why it is installing all executables |
| 2021-03-10 12:31:39 | <merijn> | ADG1089__: Because there is no "install executable" command |
| 2021-03-10 12:31:45 | <merijn> | ADG1089__: There is only "install package" |
| 2021-03-10 12:32:02 | <hololeap> | merijn: sorry, didn't mean to be so loud |
| 2021-03-10 12:33:36 | <ADG1089__> | merijn: that's a bummer, I'll have to find a way to install specific executables from my cabal file into that directly with flags from cabal file |
| 2021-03-10 12:33:54 | <ADG1089__> | probably I'll find something in the docs |
| 2021-03-10 12:34:29 | <merijn> | ADG1089__: Why do you want to install said executables? If you just wanna run them you can just use "cabal run" |
| 2021-03-10 12:35:47 | × | apoc quits (~apoc@49.12.13.193) (Ping timeout: 260 seconds) |
| 2021-03-10 12:35:49 | <ADG1089__> | merijn: I want to time those "time ./bin/problem719" but "cabal run problem719" adds 3-4 secs. I tried using criterion but it would require me to modify all my code to be compatible with it's whnf parameter which doesn't accept constants. |
| 2021-03-10 12:36:02 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Remote host closed the connection) |
| 2021-03-10 12:36:18 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 2021-03-10 12:36:24 | <merijn> | If you don't care about accuracy too much you can try |
| 2021-03-10 12:36:27 | <merijn> | @hackage timeit |
| 2021-03-10 12:36:27 | <lambdabot> | https://hackage.haskell.org/package/timeit |
| 2021-03-10 12:38:51 | <ADG1089__> | merijn: this seems like a good bet. Let me check if it accurate atleast upto .01 sec |
| 2021-03-10 12:39:09 | <merijn> | depends how you define accurate |
| 2021-03-10 12:39:13 | × | gitgood quits (~gitgood@82-132-217-185.dab.02.net) (Read error: Connection reset by peer) |
| 2021-03-10 12:39:19 | <merijn> | it's certainly *precise* up to 0.01 second |
| 2021-03-10 12:39:32 | → | gitgood joins (~gitgood@82-132-217-185.dab.02.net) |
| 2021-03-10 12:39:33 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 264 seconds) |
| 2021-03-10 12:39:45 | <merijn> | It *might* be accurate up to that time too, since that's rather slow |
| 2021-03-10 12:40:02 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 260 seconds) |
| 2021-03-10 12:40:13 | <merijn> | Mind you, it only tracks CPU time, not wall clock |
| 2021-03-10 12:41:20 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 2021-03-10 12:41:36 | → | LKoen joins (~LKoen@194.250.88.92.rev.sfr.net) |
| 2021-03-10 12:42:04 | × | LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Remote host closed the connection) |
| 2021-03-10 12:42:19 | → | LKoen joins (~LKoen@194.250.88.92.rev.sfr.net) |
| 2021-03-10 12:43:28 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 2021-03-10 12:43:29 | × | desperek_ quits (~draco@87-206-9-185.dynamic.chello.pl) (Quit: mew wew) |
| 2021-03-10 12:43:41 | → | mananamenos_ joins (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) |
| 2021-03-10 12:43:59 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 2021-03-10 12:44:28 | <ADG1089__> | merijn: All my programs as mostly cpu-bound so almost no IO |
| 2021-03-10 12:45:16 | <ADG1089__> | plus i can use sed to do `s/main =/main = timeIt ./` |
| 2021-03-10 12:45:34 | → | apoc joins (~apoc@49.12.13.193) |
| 2021-03-10 12:45:40 | × | mananamenos quits (~mananamen@193.red-88-11-66.dynamicip.rima-tde.net) (Ping timeout: 276 seconds) |
| 2021-03-10 12:46:25 | → | ADG1089 joins (~adg1089@223.226.235.12) |
| 2021-03-10 12:46:28 | <ADG1089> | . |
| 2021-03-10 12:46:35 | × | ADG1089__ quits (~aditya@223.226.235.12) (Remote host closed the connection) |
| 2021-03-10 12:47:36 | → | cheater joins (~user@unaffiliated/cheater) |
| 2021-03-10 12:48:14 | <zq> | what exactly is a raw monad? |
| 2021-03-10 12:48:24 | <zq> | ie https://hackage.haskell.org/package/shake-0.19.4/docs/src/Development.Shake.Internal.Core.Monad.html#RAW |
| 2021-03-10 12:48:33 | <zq> | wondering if this is a standard concept? |
| 2021-03-10 12:49:16 | <zq> | is this some kind of free monad + interpreter? |
| 2021-03-10 12:50:11 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Remote host closed the connection) |
| 2021-03-10 12:50:27 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 2021-03-10 12:52:57 | → | Alleria joins (~textual@mskresolve-a.mskcc.org) |
| 2021-03-10 12:53:20 | Alleria | is now known as Guest34870 |
| 2021-03-10 12:54:08 | → | timCF joins (~i.tkachuk@m91-129-99-43.cust.tele2.ee) |
| 2021-03-10 12:54:42 | → | ADG1089_ joins (~adg1089@171.76.180.62) |
| 2021-03-10 12:55:20 | × | gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 268 seconds) |
| 2021-03-10 12:56:36 | <timCF> | Hello! Is it possible to put any constraint to type/kind paramters in forall expression? For example `forall a b m.` where I want `b` to be one of few possible types/kinds? |
| 2021-03-10 12:57:10 | × | ADG1089 quits (~adg1089@223.226.235.12) (Ping timeout: 272 seconds) |
| 2021-03-10 12:57:20 | <merijn> | timCF: You can use typefamilies + constraintkinds for nearly arbitrary restrictions |
| 2021-03-10 12:57:42 | <merijn> | timCF: See, for example: https://gist.github.com/merijn/6130082 |
| 2021-03-10 12:58:09 | <merijn> | timCF: Which allows any type that is not ()/Int |
| 2021-03-10 12:58:29 | → | Yumasi joins (~guillaume@2a01cb0506313c00e14be01ac4a050f7.ipv6.abo.wanadoo.fr) |
| 2021-03-10 12:59:50 | → | dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
| 2021-03-10 13:01:01 | <timCF> | merijn: looks very cool) Thanks! |
| 2021-03-10 13:01:39 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 2021-03-10 13:02:12 | × | ssedov quits (~stas@2a00:13c0:63:7195::beef) (Read error: Connection reset by peer) |
All times are in UTC.