Logs: freenode/#haskell
| 2020-09-21 20:36:13 | × | mmohammadi9812 quits (~mmohammad@2.178.188.114) (Quit: I quit (╯°□°)╯︵ ┻━┻) |
| 2020-09-21 20:37:28 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-21 20:39:11 | × | Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 258 seconds) |
| 2020-09-21 20:39:12 | → | russruss83 joins (~russruss@my.russellmcc.com) |
| 2020-09-21 20:41:03 | × | NinjaTrappeur quits (~ninja@unaffiliated/ninjatrappeur) (Quit: WeeChat 2.8) |
| 2020-09-21 20:41:27 | → | thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) |
| 2020-09-21 20:41:41 | → | Kaivo joins (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) |
| 2020-09-21 20:41:56 | → | NinjaTrappeur joins (~ninja@unaffiliated/ninjatrappeur) |
| 2020-09-21 20:42:12 | × | russruss8 quits (~russruss@my.russellmcc.com) (Ping timeout: 260 seconds) |
| 2020-09-21 20:42:13 | russruss83 | is now known as russruss8 |
| 2020-09-21 20:42:42 | × | lazerpants quits (c59d003d@197.157.0.61) (Remote host closed the connection) |
| 2020-09-21 20:45:56 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 2020-09-21 20:46:02 | × | John20 quits (~John@82.46.59.122) (Ping timeout: 272 seconds) |
| 2020-09-21 20:47:11 | × | juuandyy quits (~juuandyy@90.166.144.65) (Quit: Konversation terminated!) |
| 2020-09-21 20:48:31 | → | aarvar joins (~foewfoiew@50.35.43.33) |
| 2020-09-21 20:49:47 | × | thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
| 2020-09-21 20:50:11 | × | Dolly quits (585fd1fd@ti0203q160-5312.bb.online.no) (Remote host closed the connection) |
| 2020-09-21 20:50:36 | × | DavidEichmann quits (~david@43.240.198.146.dyn.plus.net) (Ping timeout: 260 seconds) |
| 2020-09-21 20:51:33 | → | falafel joins (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) |
| 2020-09-21 20:52:28 | × | ryansmccoy quits (~ryansmcco@193.37.254.27) (Ping timeout: 260 seconds) |
| 2020-09-21 20:53:20 | → | ryansmccoy joins (~ryansmcco@156.96.151.132) |
| 2020-09-21 20:53:43 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-21 20:55:20 | → | averell joins (~averell@unaffiliated/averell) |
| 2020-09-21 20:55:33 | → | dirediresalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 2020-09-21 20:56:12 | × | carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 260 seconds) |
| 2020-09-21 20:57:08 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Ping timeout: 260 seconds) |
| 2020-09-21 20:58:19 | → | carlomagno joins (~cararell@inet-hqmc02-o.oracle.com) |
| 2020-09-21 20:58:32 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 2020-09-21 20:58:59 | → | xerox__ joins (~xerox@unaffiliated/xerox) |
| 2020-09-21 21:00:00 | × | glguy quits (x@freenode/staff/haskell.developer.glguy) (Quit: Quit) |
| 2020-09-21 21:00:02 | × | adaminsull quits (~adaminsul@84.39.117.57) () |
| 2020-09-21 21:00:13 | → | glguy joins (x@freenode/staff/haskell.developer.glguy) |
| 2020-09-21 21:00:26 | → | adamwespiser joins (~adam_wesp@209.6.42.110) |
| 2020-09-21 21:01:26 | × | ystael quits (~ystael@116.sub-174-196-195.myvzw.com) (Ping timeout: 265 seconds) |
| 2020-09-21 21:02:03 | × | adamwespiser quits (~adam_wesp@209.6.42.110) (Remote host closed the connection) |
| 2020-09-21 21:02:21 | → | worc3131 joins (~quassel@2a02:c7f:c026:9500:7d0b:65d0:38a4:4786) |
| 2020-09-21 21:02:24 | × | gmt quits (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 265 seconds) |
| 2020-09-21 21:02:55 | × | ahmr88 quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Remote host closed the connection) |
| 2020-09-21 21:03:01 | × | alp quits (~alp@2a01:e0a:58b:4920:24b6:1e8a:d1c8:1f2e) (Ping timeout: 272 seconds) |
| 2020-09-21 21:03:11 | → | gmind[m] joins (gmindmatri@gateway/shell/matrix.org/x-xbxgoalkishimjic) |
| 2020-09-21 21:05:15 | × | fendor quits (~fendor@77.119.128.64.wireless.dyn.drei.com) (Read error: Connection reset by peer) |
| 2020-09-21 21:05:28 | hackage | ormolu 0.1.3.0 - A formatter for Haskell source code https://hackage.haskell.org/package/ormolu-0.1.3.0 (mrkkrp) |
| 2020-09-21 21:06:10 | → | alx741 joins (~alx741@186.178.110.130) |
| 2020-09-21 21:07:03 | → | Bill--Door joins (550112fd@253.18.1.85.dynamic.wline.res.cust.swisscom.ch) |
| 2020-09-21 21:07:12 | → | ahmr88 joins (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) |
| 2020-09-21 21:08:19 | → | fendor joins (~fendor@77.119.128.64.wireless.dyn.drei.com) |
| 2020-09-21 21:09:47 | <Bill--Door> | How come the example in Control-Concurrent-STM-TChan doesn't type check? I don't quite understand how TChan works: |
| 2020-09-21 21:10:13 | <merijn> | Which example? |
| 2020-09-21 21:10:52 | <Bill--Door> | From what I've gathered in the docs, I want to use `newBroadcastTChanIO` and duplicate that for reads, but there's no `*IO` variant of `dupTChan`.. |
| 2020-09-21 21:10:54 | <glguy> | http://hackage.haskell.org/package/stm-2.5.0.0/docs/Control-Concurrent-STM-TChan.html#v:newBroadcastTChan |
| 2020-09-21 21:11:11 | <glguy> | Use 'atomically' to turn STM into IO |
| 2020-09-21 21:11:14 | <Bill--Door> | Yeah, that one. |
| 2020-09-21 21:11:28 | <merijn> | oh, hah |
| 2020-09-21 21:11:31 | <glguy> | You'll rarely use the IO variants; they exist for some special cases |
| 2020-09-21 21:11:34 | <Bill--Door> | But then I always get `thread blocked indefinitely in an STM transaction`, tried that too |
| 2020-09-21 21:11:39 | <merijn> | someone fucked up and missed an "atomically" in the example |
| 2020-09-21 21:11:50 | <merijn> | Bill--Door: That means there's someone reading but no one can ever write |
| 2020-09-21 21:11:56 | <Bill--Door> | So, I am doing it right oof |
| 2020-09-21 21:11:57 | <merijn> | (or vice versa) |
| 2020-09-21 21:12:39 | <Bill--Door> | Wait, will the reader not be blocked & wait until the write happens? |
| 2020-09-21 21:12:54 | × | worc3131 quits (~quassel@2a02:c7f:c026:9500:7d0b:65d0:38a4:4786) (Remote host closed the connection) |
| 2020-09-21 21:13:05 | <glguy> | The example exists as a demonstration of what *not* to do |
| 2020-09-21 21:13:18 | <glguy> | a little less surprising that they didn't actually try to use it |
| 2020-09-21 21:13:39 | <merijn> | Bill--Door: "thread blocked indefinitely" means "a thread blocked trying to read from a channel, but no thread can ever write to it because there are no other references" |
| 2020-09-21 21:14:00 | <merijn> | i.e., "you wrote deadlocking code, but luckily we detected it" |
| 2020-09-21 21:14:15 | <Bill--Door> | I'm not sure this is dead-locking: pastebin.com/fYq4B8XW |
| 2020-09-21 21:14:30 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-21 21:15:21 | <Bill--Door> | Everyone has a neighbour and writes there, reads what they got and so on. Somehow it deadlocks, it should work? |
| 2020-09-21 21:15:31 | × | cosimone_ quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.) |
| 2020-09-21 21:15:57 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) |
| 2020-09-21 21:17:12 | → | rprije joins (~rprije@27.143.220.203.dial.dynamic.acc01-myal-dub.comindico.com.au) |
| 2020-09-21 21:17:22 | <merijn> | Bill--Door: Eh, you never store 'c' and thus can't ever write to it |
| 2020-09-21 21:17:25 | → | alp joins (~alp@2a01:e0a:58b:4920:154c:81bf:aad9:3bc2) |
| 2020-09-21 21:17:39 | <glguy> | merijn: The c's are stored in chans |
| 2020-09-21 21:17:39 | <merijn> | oh wait, the net does |
| 2020-09-21 21:17:42 | <glguy> | which get put into net |
| 2020-09-21 21:18:08 | <glguy> | though I still don't see why broadcast chans are being used at all yet |
| 2020-09-21 21:18:32 | <glguy> | any chance this is related to AoC? |
| 2020-09-21 21:18:35 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
| 2020-09-21 21:18:40 | <Bill--Door> | I do the `inbound <- atomically $ dupTChan c` and use `inbound` instead, like that example does |
| 2020-09-21 21:18:50 | <merijn> | Where are they read, though? |
| 2020-09-21 21:18:52 | <glguy> | Bill--Door: The example is showing you what not to do |
| 2020-09-21 21:19:26 | <Bill--Door> | But even when I change to using `c` and `newTChanIO` which apparently leads to memory-leaks, it doesn't change |
| 2020-09-21 21:19:32 | <glguy> | if you have one reader and one writer you don't need a broadcast chan |
| 2020-09-21 21:19:44 | <glguy> | I mean: |
| 2020-09-21 21:19:53 | <Bill--Door> | There might be multiple writers but single readers |
| 2020-09-21 21:19:55 | <glguy> | if you have one reader (doesn't matter how many writters) |
| 2020-09-21 21:20:03 | <glguy> | then you don't need a broadcast chan |
| 2020-09-21 21:20:19 | <merijn> | glguy: If you never have 0 readers you don't need a broadcast chan |
| 2020-09-21 21:20:26 | <merijn> | That's the real thing |
| 2020-09-21 21:20:38 | <glguy> | the code never actually forks off all the listeners |
| 2020-09-21 21:21:42 | <Bill--Door> | Oh, so I just use `c` from `newTChanIO`, but it still locks: pastebin.com/T2CBXMaM |
| 2020-09-21 21:22:08 | <glguy> | You'll need to fork a thread per participant |
| 2020-09-21 21:22:51 | <Bill--Door> | Oooh, crap |
| 2020-09-21 21:23:07 | <Bill--Door> | I've been staring at this for way too long... thanks so much! |
| 2020-09-21 21:23:44 | × | darjeeling_ quits (~darjeelin@122.245.219.58) (Ping timeout: 260 seconds) |
| 2020-09-21 21:23:45 | × | carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 240 seconds) |
| 2020-09-21 21:24:55 | <glguy> | Bill--Door: Is this homework? online challenge problem? something you're just making up? |
| 2020-09-21 21:25:16 | → | carlomagno joins (~cararell@inet-hqmc02-o.oracle.com) |
| 2020-09-21 21:26:04 | <Bill--Door> | Just making sth. up, why? |
All times are in UTC.