Logs: liberachat/#haskell
| 2021-08-25 04:51:51 | × | res0nat0r8 quits (~Fletch@dia.whatbox.ca) (Quit: Ping timeout (120 seconds)) |
| 2021-08-25 04:51:53 | <dsal> | I'd probably even take a step back and say "wait, are you sure you want to use forkIO at all?" but at the very least, you don't need to reinvent things. |
| 2021-08-25 04:52:05 | → | res0nat0r8 joins (~Fletch@dia.whatbox.ca) |
| 2021-08-25 04:53:20 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 2021-08-25 04:53:57 | → | hololeap joins (~hololeap@user/hololeap) |
| 2021-08-25 04:54:35 | <aegon> | the library i'm working with is formed around running all your computation within a lambda provided to withContext, that lambda needs to be in IO so I'm using withRunInIO then the standard forkIO and inside using run |
| 2021-08-25 04:55:09 | <aegon> | unfortunatly this x -> IO a pattern is all around this library so pretty much every thread has to do the same thing and then use run inside |
| 2021-08-25 04:56:20 | <aegon> | actually i can clean up a lot of these. This is my mess. I formed a bunch of helper functions against IO that i could instead form against MonadIO |
| 2021-08-25 04:56:34 | <dsal> | There are probably a few other ways to do this. I don't have enough context, but I don't understand what `forkIO` has to do with anything. |
| 2021-08-25 04:57:13 | <aegon> | I'm running a zeromq server and Main fork's different threads for different sockets |
| 2021-08-25 04:57:46 | <aegon> | is it a mistake / needless mess to mix MonadUnliftIO and MonadIO |
| 2021-08-25 04:58:03 | <dsal> | MonadUnliftIO is MonadIO |
| 2021-08-25 04:58:12 | <dsal> | It just has more requirements. |
| 2021-08-25 04:58:44 | <aegon> | welll, that fixes that |
| 2021-08-25 04:59:11 | <dsal> | I had a similar thing I was working on and at that API barrier, I did a single unliftio thing. I don't know why you'd need more than one. The primary thing it's doing is passing your context in and out. |
| 2021-08-25 04:59:35 | <aegon> | so i shoudl prefer to constrain to MonadIO where possible and only use MonadUnliftIO constriants where I need to run monad computations within an IO action |
| 2021-08-25 05:00:19 | <aegon> | let me put together a paste I'm probably missing someting |
| 2021-08-25 05:00:44 | <aegon> | but I think i can do withRunInIO once but then i have to call run often |
| 2021-08-25 05:00:49 | <dsal> | If you're making a library, MonadIO is OK. MonadIO is snoymanesque religious territory. It works OK in my own stuff, but I don't know that I'd force it on others. |
| 2021-08-25 05:00:54 | <aegon> | this is going to be a somewhat contrived paste |
| 2021-08-25 05:01:09 | <dsal> | Occasionally people do things that aren't somewhat contrived here. heh |
| 2021-08-25 05:03:07 | × | cheater quits (~Username@user/cheater) (Ping timeout: 240 seconds) |
| 2021-08-25 05:04:08 | × | CannabisIndica quits (~herb@user/mesaboogie) (Ping timeout: 268 seconds) |
| 2021-08-25 05:10:15 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 250 seconds) |
| 2021-08-25 05:10:48 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 05:14:38 | × | venue quits (~venue@user/venue) (Quit: adios) |
| 2021-08-25 05:14:40 | <aegon> | dsal: :P, ok here it is https://paste.tomsmeding.com/WkjoePQS |
| 2021-08-25 05:15:02 | <aegon> | thats not so bad as theres only one run but that run gets called every "tick" |
| 2021-08-25 05:15:25 | <aegon> | so if it's expensive thats adding a lot of overhead if were talking about a tick every 10 ms |
| 2021-08-25 05:15:42 | <aegon> | darn, i left an extra do in there :X |
| 2021-08-25 05:15:48 | <dsal> | A few :) |
| 2021-08-25 05:16:04 | <aegon> | and i used a reserved word as a variable, i definitely wrote that in the paste form <_< , >_> |
| 2021-08-25 05:16:25 | → | cheater joins (~Username@user/cheater) |
| 2021-08-25 05:16:46 | <aegon> | but thats the jist of it, i need to run this inner loop logic in IO but it needs my monad stack |
| 2021-08-25 05:16:53 | <aegon> | so i end up calling run really frequently |
| 2021-08-25 05:17:27 | <aegon> | so I'm just wondering what the perf implications of that are, is it a lazy pattern match each time on the stack, or should i not be worried and just "run" with it |
| 2021-08-25 05:19:39 | × | Nosrep quits (~archbox@user/nosrep) (Ping timeout: 258 seconds) |
| 2021-08-25 05:21:17 | → | Nosrep joins (~archbox@user/nosrep) |
| 2021-08-25 05:23:16 | <dsal> | I don't know. perf implications are things profiling tells you. |
| 2021-08-25 05:23:51 | <aegon> | well, i guess also if theres no way around it its just how it is |
| 2021-08-25 05:23:59 | <dsal> | I had a bad performance regression in one of my programs recently. I tried guessing what it was, but just did a profiling build and ran it and found a really dumb bug I wrote in an area I wouldn't've guessed. |
| 2021-08-25 05:24:32 | <dsal> | There are always ways, but worrying about performance before you measure it may not be the best idea. |
| 2021-08-25 05:25:20 | <aegon> | I'm maybe too worried about monad stack performance. I got scared by this page https://wiki.haskell.org/Performance/Monads |
| 2021-08-25 05:26:52 | <dsal> | Just measure. If this isn't a cost center, then don't worry about it. |
| 2021-08-25 05:27:40 | <aegon> | your right. I'm worried about optimizing maybe a non-issue |
| 2021-08-25 05:28:33 | → | CnnibisIndica joins (~herb@user/mesaboogie) |
| 2021-08-25 05:32:19 | × | falafel quits (~falafel@2601:280:4e00:9970:889a:3513:448f:30e9) (Remote host closed the connection) |
| 2021-08-25 05:32:43 | → | falafel joins (~falafel@2601:280:4e00:9970:889a:3513:448f:30e9) |
| 2021-08-25 05:35:43 | → | sab- joins (~shawna@76.14.56.206) |
| 2021-08-25 05:36:07 | × | sab- quits (~shawna@76.14.56.206) (Remote host closed the connection) |
| 2021-08-25 05:38:18 | → | sab- joins (~shawna@76.14.56.206) |
| 2021-08-25 05:38:24 | × | sab- quits (~shawna@76.14.56.206) (Remote host closed the connection) |
| 2021-08-25 05:38:29 | → | qbt joins (~edun@user/edun) |
| 2021-08-25 05:38:53 | → | sab- joins (~shawna@76.14.56.206) |
| 2021-08-25 05:39:03 | × | sab- quits (~shawna@76.14.56.206) (Remote host closed the connection) |
| 2021-08-25 05:39:51 | → | sabra joins (~shawna@76.14.56.206) |
| 2021-08-25 05:40:53 | × | sabra quits (~shawna@76.14.56.206) (Remote host closed the connection) |
| 2021-08-25 05:41:14 | → | sabhrd33 joins (~shawna@76.14.56.206) |
| 2021-08-25 05:43:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-25 05:44:53 | → | kenran joins (~kenran@b2b-37-24-119-190.unitymedia.biz) |
| 2021-08-25 05:45:47 | × | falafel quits (~falafel@2601:280:4e00:9970:889a:3513:448f:30e9) (Ping timeout: 250 seconds) |
| 2021-08-25 05:47:10 | → | acidjnk_new3 joins (~acidjnk@p200300d0c72b9534e4a445cd6b407eb5.dip0.t-ipconnect.de) |
| 2021-08-25 05:55:45 | × | acidjnk_new3 quits (~acidjnk@p200300d0c72b9534e4a445cd6b407eb5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 2021-08-25 06:00:31 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 250 seconds) |
| 2021-08-25 06:01:24 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 06:04:29 | × | zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection) |
| 2021-08-25 06:14:47 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 240 seconds) |
| 2021-08-25 06:15:37 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 06:18:09 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds) |
| 2021-08-25 06:18:40 | → | zaquest joins (~notzaques@5.128.210.178) |
| 2021-08-25 06:20:01 | × | xff0x quits (~xff0x@2001:1a81:536c:3300:eddd:cb7:2ef2:f526) (Ping timeout: 250 seconds) |
| 2021-08-25 06:21:08 | → | xff0x joins (~xff0x@2001:1a81:536c:3300:2715:adb6:6b2e:5e0d) |
| 2021-08-25 06:26:20 | → | lortabac joins (~lortabac@151.53.202.164) |
| 2021-08-25 06:26:47 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 240 seconds) |
| 2021-08-25 06:27:45 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 06:29:17 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 2021-08-25 06:30:17 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2021-08-25 06:34:53 | × | echoreply quits (~echoreply@45.32.163.16) (Quit: WeeChat 2.8) |
| 2021-08-25 06:35:23 | → | echoreply joins (~echoreply@45.32.163.16) |
| 2021-08-25 06:36:09 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3ab-85.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 2021-08-25 06:36:27 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 240 seconds) |
| 2021-08-25 06:36:37 | → | Vajb joins (~Vajb@2001:999:252:4e3c:27f9:d93:655e:583) |
| 2021-08-25 06:36:41 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 06:40:10 | → | sjb0 joins (~stephen@1.145.57.172) |
| 2021-08-25 06:46:24 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 2021-08-25 06:48:33 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 2021-08-25 06:51:25 | → | reumeth joins (~reumeth@user/reumeth) |
| 2021-08-25 06:51:28 | → | vysn joins (~vysn@user/vysn) |
| 2021-08-25 06:57:07 | × | azeem quits (~azeem@176.201.15.223) (Ping timeout: 240 seconds) |
| 2021-08-25 06:57:44 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 2021-08-25 06:57:45 | → | acidjnk_new3 joins (~acidjnk@p200300d0c72b9534e4a445cd6b407eb5.dip0.t-ipconnect.de) |
| 2021-08-25 06:58:05 | → | azeem joins (~azeem@176.201.15.223) |
| 2021-08-25 06:58:46 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Client Quit) |
| 2021-08-25 07:00:46 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 2021-08-25 07:03:09 | → | d0ku joins (~d0ku@178.43.56.75.ipv4.supernova.orange.pl) |
| 2021-08-25 07:06:22 | ← | gauss parts (~gauss@139.180.175.160) (Leaving) |
| 2021-08-25 07:06:54 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 2021-08-25 07:08:03 | <siers> | what's the I# in "data Int = I# Int#"? |
| 2021-08-25 07:08:35 | <tomsmeding> | just a data constructor |
| 2021-08-25 07:08:53 | <tomsmeding> | the # doesn't actually mean anything, it's part of the name just like ' can be |
All times are in UTC.