Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,987 events total
2021-08-03 20:50:40 <ixlun> Hmmm. so it's more that `Traversable` isn't about being able to 'iterate' over the structure, it's more that you can change the underlying data to any arbitrary type?
2021-08-03 20:50:57 × acidjnk_new quits (~acidjnk@p200300d0c72b95287d3c8ae91691b72a.dip0.t-ipconnect.de) (Ping timeout: 258 seconds)
2021-08-03 20:51:19 <davean> ixlun: iterating over it is what foldable does
2021-08-03 20:54:01 acidjnk_new joins (~acidjnk@p200300d0c72b95281da3f9599f9b27a2.dip0.t-ipconnect.de)
2021-08-03 20:54:20 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
2021-08-03 20:54:25 <Boarders> with megaparsec what is an easy way to parse: ``` [some text here] ```?
2021-08-03 20:54:36 <Boarders> sorry I meant to include the \`\`\`
2021-08-03 20:55:10 × MQ-17J quits (~MQ-17J@8.6.144.192) (Ping timeout: 258 seconds)
2021-08-03 20:55:31 obs\ joins (~obscur1ty@102.44.48.121)
2021-08-03 20:55:31 × obs\ quits (~obscur1ty@102.44.48.121) (Changing host)
2021-08-03 20:55:31 obs\ joins (~obscur1ty@user/obs/x-5924898)
2021-08-03 20:55:42 × obs\ quits (~obscur1ty@user/obs/x-5924898) (Remote host closed the connection)
2021-08-03 20:55:57 obs\ joins (~obscur1ty@102.44.48.121)
2021-08-03 20:55:57 × obs\ quits (~obscur1ty@102.44.48.121) (Changing host)
2021-08-03 20:55:57 obs\ joins (~obscur1ty@user/obs/x-5924898)
2021-08-03 20:56:06 <ixlun> davean: right, so `Traversable` is really the combination of two other classes, `Foldable` to iterate over the data strrcutre and `Functor` to allow a mapping for each element over the structure?
2021-08-03 20:56:58 × acidjnk_new3 quits (~acidjnk@p200300d0c72b95281da3f9599f9b27a2.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2021-08-03 20:58:05 Null_A joins (~null_a@2601:645:8700:2290:7da4:a1bb:6c20:daba)
2021-08-03 20:58:15 <davean> ixlun: I mean ... no? It requires both of those, but it gives more than those alone
2021-08-03 20:58:27 <davean> Its on top of those two
2021-08-03 20:58:28 <Boarders> different version of my question: in megaparsec how do I take all text before a given keyword?
2021-08-03 20:58:58 <geekosaur> manyTill?
2021-08-03 20:59:15 infinity0 joins (~infinity0@occupy.ecodis.net)
2021-08-03 21:01:19 <ixlun> Hmm, okay - looks like I need to do some more reading. Thanks davean
2021-08-03 21:03:00 <davean> ixlun: sequenceA :: Applicative f => t (f a) -> f (t a)
2021-08-03 21:03:07 <davean> thats more powerful than Foldable and Functor together
2021-08-03 21:03:08 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
2021-08-03 21:03:17 <davean> neither allows you to rotate the types
2021-08-03 21:05:50 <ixlun> Right, I think I get it now! I use this pattern a lot: `sequence $ map print [1,2,3]`. Actually I could use traverse instead?
2021-08-03 21:06:11 <ixlun> and if `[]` isn't `Traversable`, I couldn't use `sequence`.
2021-08-03 21:09:40 × mastarija quits (~mastarija@78-3-212-215.adsl.net.t-com.hr) (Read error: Connection reset by peer)
2021-08-03 21:10:47 <tomsmeding> Boarders: string "```" >> manyTill anyChar (string "```")
2021-08-03 21:11:06 <tomsmeding> with parsec you'd need try () around those `string` calls
2021-08-03 21:11:28 <tomsmeding> (as geekosaur said)
2021-08-03 21:12:04 × son0p quits (~ff@181.136.122.143) (Ping timeout: 272 seconds)
2021-08-03 21:12:40 ahri joins (~ahri@109.70.150.160)
2021-08-03 21:13:20 × Core9863 quits (~agua_pesa@2804:14c:8793:8e2f:48b4:3d09:2f3b:552b) (Ping timeout: 272 seconds)
2021-08-03 21:14:30 <ahri> I'm trying to pass my program "+RTS -K1K" to be able to control the stack size, but it doesn't seem like it honours that setting - I can control (and exhaust) the heap size via -M and -A, but "-K_" doesn't even error, and I don't get stack overflows for valid configs
2021-08-03 21:14:43 <ahri> am I doing it wrong?
2021-08-03 21:15:06 × neceve quits (~quassel@2a02:c7f:607e:d600:f762:20dd:304e:4b1f) (Ping timeout: 258 seconds)
2021-08-03 21:15:32 <sm> ahri: that's more of a suggestion than a command - it's not a hard limit - also 1K sounds unreasonably small
2021-08-03 21:16:11 <ahri> I'm trying to make it unreasonably small, per https://neilmitchell.blogspot.com/2015/09/detecting-space-leaks.html
2021-08-03 21:16:13 <sm> oh sorry, maybe not for -K. I was thinking of -M
2021-08-03 21:17:01 <ahri> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/runtime_control.html makes it sound like a command, it says it will emit StackOverflows
2021-08-03 21:17:02 <geekosaur> try using the GHCRTS environment variable instead, especially if you're runniing via stack or cabal which may be eating the parameter
2021-08-03 21:17:27 <sm> right, I was just going to link that. Strange
2021-08-03 21:17:55 <ahri> when I used the env var it seems like stack was being influenced by it, but I'll have another go
2021-08-03 21:18:16 agua_pesada joins (~agua_pesa@191.177.175.57)
2021-08-03 21:18:43 Kaipi joins (~Kaiepi@156.34.44.192)
2021-08-03 21:18:45 <geekosaur> yes, every haskell program would be influenced by the envar
2021-08-03 21:19:00 × Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-08-03 21:19:41 <geekosaur> but you need to use --RTS early on to force stack to pass on the +RTS to the child process
2021-08-03 21:19:53 <geekosaur> stack --RTS exec ... +RTS ...
2021-08-03 21:20:08 <ahri> ahhh, yes, that makes sense
2021-08-03 21:21:35 <sm> --RTS, interesting. I always do "stack exec -- ...", maybe that would also have solved it ?
2021-08-03 21:22:04 <geekosaur> II don't think -- applies to the RTS params, but maybe
2021-08-03 21:22:28 <geekosaur> they're read too soon by the RTS
2021-08-03 21:22:52 <tomsmeding> in my experience, using -- works fine
2021-08-03 21:23:03 <tomsmeding> perhaps stack has a C wrapper that eats some parameters?
2021-08-03 21:25:58 <sm> yeah -- always worked for me
2021-08-03 21:28:01 <ahri> I just tried this to take stack out of the equation: `stack exec --profile which server` +RTS -K_ -RTS
2021-08-03 21:28:54 <ahri> it still doesn't care that the -K_ is invalid, and giving it a probably valid param like -K1B doesn't error with a StackOverflow
2021-08-03 21:31:42 <ahri> the binary was compiled with "-Wall -Werror -O2 -static -optc-static -optl-static -optl-pthread -rtsopts"
2021-08-03 21:32:06 <ahri> would this preclude the use of -K?
2021-08-03 21:33:06 × oxide quits (~lambda@user/oxide) (Quit: oxide)
2021-08-03 21:40:18 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-03 21:42:45 × agua_pesada quits (~agua_pesa@191.177.175.57) (Read error: Connection reset by peer)
2021-08-03 21:43:26 × mikoto-chan quits (~mikoto-ch@ip-193-121-10-50.dsl.scarlet.be) (Ping timeout: 252 seconds)
2021-08-03 21:43:32 dunj3 joins (~dunj3@2001:981:9d95:1:886d:656c:9636:23f4)
2021-08-03 21:44:26 <sm> ahri: what ghc version ? I wonder if you need -rtsopts=all now, https://downloads.haskell.org/ghc/latest/docs/html/users_guide/phases.html#ghc-flag--rtsopts[=⟨none|some|all|ignore|ignoreAll⟩]
2021-08-03 21:44:28 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
2021-08-03 21:45:03 <sm> (that doc confuses me)
2021-08-03 21:45:22 <sm> probably not
2021-08-03 21:45:55 <ahri> I'm on 8.4.4
2021-08-03 21:46:22 <sm> run your executable with +RTS --help and see if -K is listed ?
2021-08-03 21:46:37 ubert joins (~Thunderbi@91.141.44.204.wireless.dyn.drei.com)
2021-08-03 21:46:40 <ahri> I'll have a go with -rtsopts=all, and --help
2021-08-03 21:47:09 × arkho quits (~ccc@dynamic-acs-24-112-153-241.zoominternet.net) (Remote host closed the connection)
2021-08-03 21:47:36 arkho joins (~ccc@dynamic-acs-24-112-153-241.zoominternet.net)
2021-08-03 21:47:44 × arkho quits (~ccc@dynamic-acs-24-112-153-241.zoominternet.net) (Remote host closed the connection)
2021-08-03 21:48:09 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
2021-08-03 21:49:35 <ahri> --help does like -K, and even having recompiled with -rtsopts=all it doesn't care what I pass to -K :( -Kplsdie is as acceptable as -K1k
2021-08-03 21:49:59 <ahri> *does list -K
2021-08-03 21:50:49 <sm> confirmed here, -K ignores a junk argument
2021-08-03 21:51:04 <sm> perhaps #ghc or their issue tracker knows more
2021-08-03 21:52:37 <ahri> hehe, ok, I'll pursue this more tomorrow, gonna call it a night for now :) thank you for your help
2021-08-03 21:52:44 <sm> good luck!
2021-08-03 21:54:05 × ahri quits (~ahri@109.70.150.160) (Quit: zzz)
2021-08-03 21:54:15 <sm> (FWIW, this does give a stack overflow: stack path +RTS -K1k)
2021-08-03 21:54:23 arkho joins (~ccc@dynamic-acs-24-112-153-241.zoominternet.net)
2021-08-03 21:54:47 Erutuon joins (~Erutuon@user/erutuon)
2021-08-03 21:58:05 × ubert quits (~Thunderbi@91.141.44.204.wireless.dyn.drei.com) (Quit: ubert)
2021-08-03 22:03:01 × drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Ping timeout: 258 seconds)
2021-08-03 22:09:46 wrengr joins (~wrengr@56.4.82.34.bc.googleusercontent.com)
2021-08-03 22:10:41 × yoctocell quits (~user@h87-96-130-155.cust.a3fiber.se) (Ping timeout: 258 seconds)
2021-08-03 22:13:10 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
2021-08-03 22:14:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-08-03 22:14:54 × wrengr quits (~wrengr@56.4.82.34.bc.googleusercontent.com) (Quit: leaving)
2021-08-03 22:15:12 wrengr joins (~wrengr@56.4.82.34.bc.googleusercontent.com)
2021-08-03 22:15:22 ubert joins (~Thunderbi@91.141.44.204.wireless.dyn.drei.com)

All times are in UTC.