Logs: freenode/#haskell
| 2020-10-15 14:58:05 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 2020-10-15 14:58:14 | → | poljar joins (~poljar@93-139-70-179.adsl.net.t-com.hr) |
| 2020-10-15 14:59:29 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-15 15:00:01 | × | doomas quits (~doomas@94.229.74.91) () |
| 2020-10-15 15:03:19 | × | carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Remote host closed the connection) |
| 2020-10-15 15:03:23 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 2020-10-15 15:04:31 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2020-10-15 15:04:31 | <dminuoso> | lens/optics question: I have some [(10,Just "abc"), (20, Just "cde"), (30, Nothing)] -- is there a way to take some `each . _Just . each` and combine it with the Int in the tuple as its "Ix"? |
| 2020-10-15 15:05:17 | <phadej> | what you mean by combine |
| 2020-10-15 15:05:39 | × | xff0x quits (~fox@217.110.198.158) (Ping timeout: 260 seconds) |
| 2020-10-15 15:05:51 | <dminuoso> | So I want to fold over each character, while having access to the number. |
| 2020-10-15 15:05:52 | → | w1gz[m] joins (w1gzmatrix@gateway/shell/matrix.org/x-ymbhwxurjlfoxjnq) |
| 2020-10-15 15:05:53 | <dminuoso> | Sort of like |
| 2020-10-15 15:06:05 | <dminuoso> | Fold [(Int, Maybe String)] (Int, Char) |
| 2020-10-15 15:06:07 | <phadej> | :t <. |
| 2020-10-15 15:06:09 | <lambdabot> | error: parse error on input ‘<.’ |
| 2020-10-15 15:06:13 | <phadej> | :t (<.) |
| 2020-10-15 15:06:16 | <lambdabot> | Indexable i p => (Indexed i s t -> r) -> ((a -> b) -> s -> t) -> p a b -> r |
| 2020-10-15 15:06:22 | <phadej> | lookup it on lens docs |
| 2020-10-15 15:06:43 | <dminuoso> | phadej: That's spot on! Thanks. :) |
| 2020-10-15 15:07:02 | w1gz[m] | is now known as wi[m] |
| 2020-10-15 15:07:20 | → | xff0x joins (~fox@217.110.198.158) |
| 2020-10-15 15:09:30 | → | ixlun joins (~matthew@213.205.241.94) |
| 2020-10-15 15:10:18 | × | kenran quits (~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 256 seconds) |
| 2020-10-15 15:10:55 | × | djellemah quits (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54) (Ping timeout: 240 seconds) |
| 2020-10-15 15:12:30 | <ixlun> | Ugh, got disconnected... did my previous question get through? |
| 2020-10-15 15:13:43 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 2020-10-15 15:13:59 | → | nineonine joins (~nineonine@216-19-190-182.dyn.novuscom.net) |
| 2020-10-15 15:14:05 | <monochrom> | I think no. |
| 2020-10-15 15:14:07 | <tomsmeding> | ixlun: https://ircbrowse.tomsmeding.com/browse/haskell?events_page=656 |
| 2020-10-15 15:14:55 | → | dansho joins (~dansho@ip68-108-167-185.lv.lv.cox.net) |
| 2020-10-15 15:15:51 | <ixlun> | Ah, I shall ask again in that case: I was just wondering if anyone knew if there was a way to kill a haskell thread off that was in the middle of a long pure computation? |
| 2020-10-15 15:16:03 | <merijn> | ixlun: Did you create the thread? |
| 2020-10-15 15:16:09 | <ixlun> | Yes |
| 2020-10-15 15:16:14 | <ixlun> | I've tried killThread |
| 2020-10-15 15:16:23 | <merijn> | That doesn't work? |
| 2020-10-15 15:16:43 | <ixlun> | It does but after a significant delay |
| 2020-10-15 15:16:48 | → | bitmagie joins (~Thunderbi@200116b806495000583b859276a8aad8.dip.versatel-1u1.de) |
| 2020-10-15 15:17:13 | <ixlun> | (although what is strange is that the whole program terminates with SIGKILL) |
| 2020-10-15 15:17:18 | <merijn> | I dunno when async exceptions are checked/handled. Naively I'd guess like pre-emption at GC time |
| 2020-10-15 15:17:43 | <ixlun> | I was wondering if they could only |
| 2020-10-15 15:17:59 | <ixlun> | only be handled in between IO actions |
| 2020-10-15 15:18:12 | <merijn> | So if you have a tight pure loop that doesn't allocate much, that could take some time |
| 2020-10-15 15:18:18 | × | nineonine quits (~nineonine@216-19-190-182.dyn.novuscom.net) (Ping timeout: 256 seconds) |
| 2020-10-15 15:18:21 | <ixlun> | My only other thought was to pepper my pure computation with `yield' but I don't really like that solution |
| 2020-10-15 15:18:31 | <monochrom> | No other way. Short story: Think of cooperative multitasking but automatic insertion of yield points at heap allocation points. |
| 2020-10-15 15:18:36 | <merijn> | ixlun: Oh, wait |
| 2020-10-15 15:18:42 | <merijn> | ixlun: Is this the single-threaded runtime? |
| 2020-10-15 15:18:45 | <ixlun> | Yes |
| 2020-10-15 15:18:52 | <merijn> | Try the multithreaded one |
| 2020-10-15 15:18:54 | × | knupfer1 quits (~Thunderbi@mue-88-130-61-082.dsl.tropolys.de) (Quit: knupfer1) |
| 2020-10-15 15:19:00 | → | knupfer joins (~Thunderbi@200116b82c60f7003cd017e9657aa011.dip.versatel-1u1.de) |
| 2020-10-15 15:19:06 | <Ariakenom> | async exceptions are checked when allocating |
| 2020-10-15 15:19:13 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-15 15:19:15 | <ixlun> | How do I do that, use forkOS rather than forkIO? |
| 2020-10-15 15:19:16 | × | knupfer quits (~Thunderbi@200116b82c60f7003cd017e9657aa011.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:19:17 | <merijn> | Sounds like the 1 thread is taking a long time to yield, so the killThread just doesn't get thrown until way later :p |
| 2020-10-15 15:19:24 | <merijn> | ixlun: No, it's a compiletime flag |
| 2020-10-15 15:19:26 | → | knupfer joins (~Thunderbi@200116b82c60f7009c37b4c844721161.dip.versatel-1u1.de) |
| 2020-10-15 15:19:30 | <monochrom> | No, use "ghc ... -threaded ..." |
| 2020-10-15 15:19:32 | <merijn> | ixlun: Use "ghc -threaded" |
| 2020-10-15 15:19:41 | × | knupfer quits (~Thunderbi@200116b82c60f7009c37b4c844721161.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:19:45 | <merijn> | (and run with "+RTS -N2") |
| 2020-10-15 15:19:51 | <monochrom> | forkOS is an orthogonal concern. |
| 2020-10-15 15:19:51 | → | knupfer joins (~Thunderbi@200116b82c60f7003045c598d524f05b.dip.versatel-1u1.de) |
| 2020-10-15 15:19:59 | × | knupfer quits (~Thunderbi@200116b82c60f7003045c598d524f05b.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:20:08 | → | knupfer joins (~Thunderbi@200116b82c60f7003045c598d524f05b.dip.versatel-1u1.de) |
| 2020-10-15 15:20:14 | × | knupfer quits (~Thunderbi@200116b82c60f7003045c598d524f05b.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:20:19 | <merijn> | ixlun: The default runtime only runs one OS thread of Haskell code, regardless of how many forkIO threads you have |
| 2020-10-15 15:20:23 | → | knupfer joins (~Thunderbi@200116b82c60f700c426196ed47f12f7.dip.versatel-1u1.de) |
| 2020-10-15 15:20:40 | <merijn> | ixlun: -threaded lets you use multiple OS threads in parallel to run forkIO threads simultaneously |
| 2020-10-15 15:20:59 | <merijn> | (if you use "+RTS -N2" to actually run it with 2 OS threads, that is) |
| 2020-10-15 15:21:00 | × | knupfer quits (~Thunderbi@200116b82c60f700c426196ed47f12f7.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:21:00 | <Ariakenom> | with -fno-omit-yields the checks are more often. every function call perhaps |
| 2020-10-15 15:21:03 | <Ariakenom> | https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/using-optimisation.html#ghc-flag--fomit-yields |
| 2020-10-15 15:21:08 | → | knupfer joins (~Thunderbi@200116b82c60f700c426196ed47f12f7.dip.versatel-1u1.de) |
| 2020-10-15 15:21:22 | → | acidjnk_new joins (~acidjnk@200116b8676f9500dd470071dd3fdc09.dip.versatel-1u1.de) |
| 2020-10-15 15:21:28 | × | knupfer quits (~Thunderbi@200116b82c60f700c426196ed47f12f7.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:21:41 | → | knupfer joins (~Thunderbi@200116b82c60f700cd92708e2a651f21.dip.versatel-1u1.de) |
| 2020-10-15 15:21:46 | → | djellemah joins (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54) |
| 2020-10-15 15:21:57 | → | UpstreamSalmon joins (uid12077@gateway/web/irccloud.com/x-zuuxycbtcmkanyjf) |
| 2020-10-15 15:22:54 | → | snakemas1 joins (~snakemast@213.100.206.23) |
| 2020-10-15 15:22:59 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 2020-10-15 15:23:01 | × | knupfer quits (~Thunderbi@200116b82c60f700cd92708e2a651f21.dip.versatel-1u1.de) (Read error: Connection reset by peer) |
| 2020-10-15 15:23:13 | → | knupfer joins (~Thunderbi@200116b82c60f700f44d5e777945b361.dip.versatel-1u1.de) |
| 2020-10-15 15:23:16 | × | knupfer quits (~Thunderbi@200116b82c60f700f44d5e777945b361.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:23:47 | → | knupfer joins (~Thunderbi@200116b82c60f700005600c5dd5502a6.dip.versatel-1u1.de) |
| 2020-10-15 15:24:01 | × | knupfer quits (~Thunderbi@200116b82c60f700005600c5dd5502a6.dip.versatel-1u1.de) (Client Quit) |
| 2020-10-15 15:24:12 | → | knupfer joins (~Thunderbi@200116b82c60f700005600c5dd5502a6.dip.versatel-1u1.de) |
| 2020-10-15 15:24:16 | → | kenran joins (~maier@b2b-37-24-119-190.unitymedia.biz) |
| 2020-10-15 15:24:20 | <hyperisco> | I need to take template files, instantiate variables, and evaluate… any template language with conditionals will do. Suggestions? |
| 2020-10-15 15:24:38 | → | chris joins (~chris@81.96.113.213) |
| 2020-10-15 15:25:02 | chris | is now known as Guest95313 |
| 2020-10-15 15:25:15 | <ixlun> | Hmm, both of those solutions didn't seem to work unfortunetly :-( |
| 2020-10-15 15:25:51 | <hyperisco> | https://hackage.haskell.org/package/doctemplates looks promising |
| 2020-10-15 15:26:01 | <tomsmeding> | hyperisco: mustache has is-not-null conditionals |
| 2020-10-15 15:26:30 | <hyperisco> | am looking for equality at least on integers |
| 2020-10-15 15:26:34 | × | bitmagie quits (~Thunderbi@200116b806495000583b859276a8aad8.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2020-10-15 15:26:51 | <hyperisco> | well I guess I can do is-not-null and just set variables carefully :P |
| 2020-10-15 15:26:55 | × | Achylles quits (~Achylles@191.17.181.222) (Remote host closed the connection) |
All times are in UTC.