Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Tony Hoare's CSP Paper Implemented in Go (godoc.org)
103 points by geetarista on April 8, 2013 | hide | past | favorite | 8 comments


Why not close the channel instead of sending 0? You can detect a closed channel with the "x, ok := <-y" form.


Author 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.


I emailed these to him. I'll let HN know if he has an interesting reply.


Now I will finally read the paper.


I 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=...

[2] - http://manticore.cs.uchicago.edu/


I 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.


No, 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.


Agree. 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: