5 ms·
Tony Hoare's CSP Paper Implemented in Go
- JulianMorrison 14y agoWhy not close the channel instead of sending 0? You can detect a closed channel with the "x, ok := <-y" form.
- thomas11 14y agoAuthor here. Originally I thought it's bad form to close a channel that the client passes in. But you're the second one to point this out and I've come around to seeing it's clearer and more idiomatic. Just pushed the change.
- jgrahamc 14y agoI emailed these to him. I'll let HN know if he has an interesting reply.
- mseepgood 14y agoNow I will finally read the paper.
- burntsushi 14y agoI strongly recommend following that up with John Repy's work, "CML: A higher concurrent language" (1991) [1]. It has an amazingly simple and straight-forward form of compositional concurrency that I would love to see in a language today (Rust?). Repy later went on to start Manticore [2], but it seems stuck in Research Land. Let me know if you need help getting the paper. [1] - http://dl.acm.org.ezproxy.library.tufts.edu/citation.cfm?id=113470 http://dl.acm.org.ezproxy.library.tufts.edu/citation.cfm?id=... [2] - http://manticore.cs.uchicago.edu/ http://manticore.cs.uchicago.edu/
- octo_t 14y agoI really hope this is sarcastic, because CSP is the basis of almost all concurrency (and certainly pretty much every formal model of concurrency). If it needs some implementation in your language du jour before you consider reading it, it seems lacking to me.
- mseepgood 14y agoNo, I always wanted to read the paper, because I know that it's a very influential paper. I actually started reading it once, but I got stuck. Now I read this Go code and immediately understood all of it. So I hope it will help me understand the paper.
- burke 14y agoAgree. I slogged my way through it a while ago, and I wish I had this Go translation at that time to help me along. It is much clearer to me than the notation used in the paper.