Logs: freenode/#haskell
| 2021-04-19 21:26:13 | <ski> | no |
| 2021-04-19 21:26:28 | <guy9> | I have a question about installing a package with cabal |
| 2021-04-19 21:26:34 | <guy9> | is this the right place to ask |
| 2021-04-19 21:26:47 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 2021-04-19 21:26:56 | <ski> | yes, this is an appropriate channel for such a question |
| 2021-04-19 21:27:07 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 2021-04-19 21:27:07 | <guy9> | okay, thanks |
| 2021-04-19 21:27:12 | <ski> | (try asking, and someone might take it up and try to answer) |
| 2021-04-19 21:27:46 | × | fiedlr_ quits (~fiedlr@83.148.33.254) (Read error: Connection reset by peer) |
| 2021-04-19 21:28:28 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 2021-04-19 21:28:59 | <guy9> | I had installed a package using cabal previously and it had worked just fine. I have no idea what I could have done differently this time around, but the package fails to install. It seems like there is a constraint for cabal versions >=1.7 && <1.25 |
| 2021-04-19 21:29:17 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 268 seconds) |
| 2021-04-19 21:29:21 | → | fiedlr joins (~fiedlr@83.148.33.254) |
| 2021-04-19 21:29:21 | <guy9> | checking the .cabal file of the package shows no such constraint, though |
| 2021-04-19 21:29:38 | → | slack1256 joins (~slack1256@200-112-79-98.baf.movistar.cl) |
| 2021-04-19 21:31:10 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-04-19 21:31:18 | <slack1256> | On `Katip` given the `MonadIO` constaint on the class, how could a define a dummy unefectful instance for testing? |
| 2021-04-19 21:31:21 | <geekosaur> | that means it found an old option in the cabal file that is no longer supported by modern cabal |
| 2021-04-19 21:31:57 | <geekosaur> | I should say Cabal, the library, rather than cabal the program |
| 2021-04-19 21:32:34 | <geekosaur> | so what has changed is Cabal and cabal-install are probably version 3.x instead of 1.x |
| 2021-04-19 21:32:44 | <guy9> | it seems like it is trying to use cabal-install version 3.2.1, though when I do cabal --version it says I have 3.4.0 |
| 2021-04-19 21:34:36 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 2021-04-19 21:35:00 | <monochrom> | It is a really tall order to write your own uneffectful instance of MonadIO. |
| 2021-04-19 21:36:13 | <guy9> | I have a feeling that reinstalling cabal may be something to try |
| 2021-04-19 21:36:33 | <guy9> | although I think I've been unsuccessful ateven that so far |
| 2021-04-19 21:37:01 | <sclv> | guy9 i would check for a package environment file |
| 2021-04-19 21:37:39 | <monochrom> | I would think it is more worth your time to allow IO to happen, but run your exe in a container or virtual machine, complete with various redirection and emulation techniques at that level, if you're trying to achieve mock testing. |
| 2021-04-19 21:38:08 | <guy9> | I'm not even sure when to look to be honest |
| 2021-04-19 21:38:21 | <guy9> | or what exactly I would be looking for |
| 2021-04-19 21:39:22 | × | fiedlr quits (~fiedlr@83.148.33.254) (Read error: Connection reset by peer) |
| 2021-04-19 21:39:57 | <slack1256> | monochrom: Mmmm that also seems like a tall order. But at least is more "honest". |
| 2021-04-19 21:40:56 | → | tatsumaru joins (~tatsumaru@85.196.189.103) |
| 2021-04-19 21:41:23 | × | {abby} quits (~{abby}@unaffiliated/demhydraz) (Quit: Ping timeout (120 seconds)) |
| 2021-04-19 21:41:33 | → | fiedlr joins (~fiedlr@83.148.33.254) |
| 2021-04-19 21:41:34 | → | st8less joins (~st8less@2603:a060:11fd:0:f652:5ff0:83f7:3be7) |
| 2021-04-19 21:41:41 | → | {abby} joins (~{abby}@unaffiliated/demhydraz) |
| 2021-04-19 21:41:55 | → | ludi49 joins (~hryhorij@ip595.t15.ds.pwr.wroc.pl) |
| 2021-04-19 21:42:02 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2021-04-19 21:42:05 | <tatsumaru> | hey guys, new to haskell, is haskell good for the implementation of complex systems concepts such as ant colony optimization algorithms and adaptive networks etc? |
| 2021-04-19 21:42:08 | → | zeenk joins (~zeenk@2a02:2f04:a10b:af00:91ba:3645:1cdb:9a75) |
| 2021-04-19 21:43:09 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 240 seconds) |
| 2021-04-19 21:44:37 | <dmj`> | might be a dumb question, but can someone explain to me why these two stable names are not equal? |
| 2021-04-19 21:44:37 | <dmj`> | (==) <$> (makeStableName $! m) <*> (makeStableName (let !x = m in x) |
| 2021-04-19 21:44:43 | <guy9> | I see one big place where I was going wrong |
| 2021-04-19 21:44:48 | <guy9> | I'm pretty new to this |
| 2021-04-19 21:44:57 | <sm[m]> | tatsumaru: |
| 2021-04-19 21:44:58 | <monochrom> | slack1256, both are tall orders, but I say that mocking MonadIO is taller because IO is not a free monad, it's opague, if I give you "foo :: IO Int" you can't examine foo to even begin to mock it, not to mention IRL I give you "foo :: IO X" for a type X you've never seen before. Whereas, in docker or a VM at least you can use stdio redirection, fake files, etc. |
| 2021-04-19 21:44:58 | <sm[m]> | yes |
| 2021-04-19 21:44:59 | <guy9> | I was trying to diagnose several errors at once |
| 2021-04-19 21:45:36 | <tatsumaru> | sm[m]: can you briefly elaborate please, why do you think so |
| 2021-04-19 21:46:39 | <sm[m]> | tatsumaru: it is an expressive language with good support for abstraction and modelling with types, so can be good for complex/unclear domains |
| 2021-04-19 21:46:59 | <sm[m]> | also it's quite fast, which can be useful |
| 2021-04-19 21:47:10 | <ski> | dmj` : `let !x = m in x' is equal to `m' |
| 2021-04-19 21:47:14 | <slack1256> | monochrom++ |
| 2021-04-19 21:47:16 | <guy9> | geekosaur, do you think I should try to install a 1.x version of cabal and try that way? |
| 2021-04-19 21:47:22 | <tatsumaru> | sm[m] "fast" as in good for number crunching? |
| 2021-04-19 21:47:42 | × | Lycurgus quits (~niemand@98.4.118.65) (Quit: Exeunt) |
| 2021-04-19 21:48:19 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 2021-04-19 21:48:31 | <geekosaur> | guy9, that's not really recommended either, cabal 3 changed things for good reason. (look up "cabal hell" sometime, although it was really ghc's fault) |
| 2021-04-19 21:48:54 | <dmj`> | ski: yea but its forced |
| 2021-04-19 21:48:55 | <sm[m]> | generally fast. It's not the best for number crunching, not the worst. It's among the best for knowing that you're crunching the right numbers though |
| 2021-04-19 21:49:03 | <sclv> | guy9 what package? Is it in hackage? |
| 2021-04-19 21:49:08 | <dmj`> | ski: StableNames will check pointer equality |
| 2021-04-19 21:49:20 | <tatsumaru> | sm[m] i see, thank you |
| 2021-04-19 21:49:28 | <guy9> | I am definitely learning the meaning of cabal hell |
| 2021-04-19 21:49:35 | <dmj`> | ski: I think the let is performing an allocation and its pointer differs |
| 2021-04-19 21:49:37 | × | __minoru__shirae quits (~shiraeesh@5.101.59.44) (Ping timeout: 260 seconds) |
| 2021-04-19 21:49:38 | <guy9> | sclv it's Euterpea |
| 2021-04-19 21:49:55 | <guy9> | yes it's in Hackage |
| 2021-04-19 21:49:55 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 2021-04-19 21:51:04 | <sclv> | yeah its got busts because it needs to be updated https://matrix.hackage.haskell.org/#/package/Euterpea/2.0.7/ghc-8.10.1@1591706735 |
| 2021-04-19 21:51:25 | <sm[m]> | guy9: general info: you may not be doing anything differently.. cabal's installations depend on the current state of hackage and of your local machine, by default |
| 2021-04-19 21:51:41 | <guy9> | does that mean there's not much I can do and it's not my fault? |
| 2021-04-19 21:52:01 | <sclv> | its not your fault, but that doesn't mean it can't be fixed |
| 2021-04-19 21:52:32 | <ski> | dmj` : `makeStableName $! m' should be equal to `let !x = m in makeStableName x'. `do !x <- return m; makeStableName x' / `makeStableName =<< evaluate m' is slightly different, only forcing when the action is executed (rather than merely forced) |
| 2021-04-19 21:52:48 | → | mikoto-chan joins (~anass@gateway/tor-sasl/mikoto-chan) |
| 2021-04-19 21:52:53 | <dmj`> | ski: (\f v -> let !v = x in f v) should be equivalent to (\f v -> f $! v) |
| 2021-04-19 21:53:07 | <sclv> | you can `cabal unpack` the package, then apply instructions here, then install it from the unpacked source, for example https://github.com/Euterpea/Euterpea2/issues/35 |
| 2021-04-19 21:53:24 | <ski> | dmj` : yes. but `f (let !v = x in f v)' is different |
| 2021-04-19 21:53:49 | <sclv> | that ticket also suggests just calling `v1-install` may work but idk if thats true |
| 2021-04-19 21:54:11 | <guy9> | wow |
| 2021-04-19 21:54:13 | <guy9> | that worked |
| 2021-04-19 21:54:17 | <guy9> | you are a wizard |
| 2021-04-19 21:54:33 | <guy9> | thanks for showing me all of this stuff |
| 2021-04-19 21:54:38 | <dmj`> | ski: how does (\f v -> f (let !v = m in v)) not equal (\f v -> let !v = m in f v) |
| 2021-04-19 21:54:42 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2021-04-19 21:54:46 | <guy9> | I'm super new to this and there is so much to learn |
| 2021-04-19 21:55:06 | <ski> | dmj` : the former won't force `m', unless `f' is strict. the latter will |
| 2021-04-19 21:55:14 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 2021-04-19 21:55:22 | <guy9> | okay v1 failed somewhere else but I know I'm going in the right direction |
| 2021-04-19 21:55:29 | <dmj`> | ski: so makeStableName isn't strict then |
| 2021-04-19 21:55:31 | <sclv> | guy9: glad it worked! its just me digging into their issue tracker to see if it was fixed :-) |
| 2021-04-19 21:55:51 | <sclv> | you could also just try to clone the repo, which is reputedly more up too date than the hackage release |
| 2021-04-19 21:55:55 | <guy9> | honestly I didn't even know there were issue trackers |
| 2021-04-19 21:55:55 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 2021-04-19 21:56:08 | <guy9> | I have tried cloning it and it fails at the same place |
| 2021-04-19 21:56:27 | <sclv> | sadly it seems relatively unmaintained :-/ |
| 2021-04-19 21:56:43 | <sclv> | donya is very nice but she's more a musician than a hacker |
| 2021-04-19 21:56:55 | <sclv> | (i saw her perform and it was brilliant!) |
| 2021-04-19 21:57:23 | <sclv> | with paul hudak's group, a lot of the stuff he worked on is maintained only partially as labors of love |
All times are in UTC.