Re: Confused again by core.async
I think the problem is in your service function, notice how you are reading data from a channel then writing data to that same channel, within the same process? Try fixing that and see where it gets you. Timothy On Tue, Jul 23, 2013 at 11:25 PM, Alan Shaw noden...@gmail.com wrote: Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Confused again by core.async
I do not think that is the problem. In fact I believe that reading a request from a channel and writing the response to the same channel is the canonical service pattern in Go. I have added a test-service function that works as expected, and a test-fan-in-2 function that fails in a slightly different way. My fan-in function is copied from David Nolen so I have some confidence in that... -A On Wednesday, July 24, 2013 5:28:31 AM UTC-7, tbc++ wrote: I think the problem is in your service function, notice how you are reading data from a channel then writing data to that same channel, within the same process? Try fixing that and see where it gets you. Timothy On Tue, Jul 23, 2013 at 11:25 PM, Alan Shaw node...@gmail.comjavascript: wrote: Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Confused again by core.async
Take a look at your code again, service is reading a value from a, modifying it, and sticking it back into a. You also have a put process putting values into a, and fan-in taking values from a. So what is keeping values from flowing from your put process directly to fan-in, skipping service completely? It's a race-condition... Timothy On Wed, Jul 24, 2013 at 12:41 PM, nodename noden...@gmail.com wrote: I do not think that is the problem. In fact I believe that reading a request from a channel and writing the response to the same channel is the canonical service pattern in Go. I have added a test-service function that works as expected, and a test-fan-in-2 function that fails in a slightly different way. My fan-in function is copied from David Nolen so I have some confidence in that... -A On Wednesday, July 24, 2013 5:28:31 AM UTC-7, tbc++ wrote: I think the problem is in your service function, notice how you are reading data from a channel then writing data to that same channel, within the same process? Try fixing that and see where it gets you. Timothy On Tue, Jul 23, 2013 at 11:25 PM, Alan Shaw node...@gmail.com wrote: Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/**async-plgd/blob/master/src/** hoare/problem.cljhttps://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@**googlegroups.com For more options, visit this group at http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Confused again by core.async
Well that makes sense and you've proved that you're right https://gist.github.com/halgari/6073419 so I am having a paradigm shift. Thanks! -A On Wednesday, July 24, 2013 11:47:29 AM UTC-7, tbc++ wrote: Take a look at your code again, service is reading a value from a, modifying it, and sticking it back into a. You also have a put process putting values into a, and fan-in taking values from a. So what is keeping values from flowing from your put process directly to fan-in, skipping service completely? It's a race-condition... Timothy On Wed, Jul 24, 2013 at 12:41 PM, nodename node...@gmail.comjavascript: wrote: I do not think that is the problem. In fact I believe that reading a request from a channel and writing the response to the same channel is the canonical service pattern in Go. I have added a test-service function that works as expected, and a test-fan-in-2 function that fails in a slightly different way. My fan-in function is copied from David Nolen so I have some confidence in that... -A On Wednesday, July 24, 2013 5:28:31 AM UTC-7, tbc++ wrote: I think the problem is in your service function, notice how you are reading data from a channel then writing data to that same channel, within the same process? Try fixing that and see where it gets you. Timothy On Tue, Jul 23, 2013 at 11:25 PM, Alan Shaw node...@gmail.com wrote: Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/**async-plgd/blob/master/src/** hoare/problem.cljhttps://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@**googlegroups.com For more options, visit this group at http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Confused again by core.async
I have removed the problem.clj file referenced in the original post, and I have incorporated Timothy's corrections into the Hoare CSP examples: https://github.com/nodename/async-plgd/blob/master/src/hoare/subroutines.clj On Wednesday, July 24, 2013 12:17:01 PM UTC-7, nodename wrote: Well that makes sense and you've proved that you're right https://gist.github.com/halgari/6073419 so I am having a paradigm shift. Thanks! -A On Wednesday, July 24, 2013 11:47:29 AM UTC-7, tbc++ wrote: Take a look at your code again, service is reading a value from a, modifying it, and sticking it back into a. You also have a put process putting values into a, and fan-in taking values from a. So what is keeping values from flowing from your put process directly to fan-in, skipping service completely? It's a race-condition... Timothy On Wed, Jul 24, 2013 at 12:41 PM, nodename node...@gmail.com wrote: I do not think that is the problem. In fact I believe that reading a request from a channel and writing the response to the same channel is the canonical service pattern in Go. I have added a test-service function that works as expected, and a test-fan-in-2 function that fails in a slightly different way. My fan-in function is copied from David Nolen so I have some confidence in that... -A On Wednesday, July 24, 2013 5:28:31 AM UTC-7, tbc++ wrote: I think the problem is in your service function, notice how you are reading data from a channel then writing data to that same channel, within the same process? Try fixing that and see where it gets you. Timothy On Tue, Jul 23, 2013 at 11:25 PM, Alan Shaw node...@gmail.com wrote: Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/**async-plgd/blob/master/src/** hoare/problem.cljhttps://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@**googlegroups.com For more options, visit this group at http://groups.google.com/**group/clojure?hl=enhttp://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@**googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- “One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.” (Robert Firth) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Confused again by core.async
Hi, I hope I can get a lightbulb on what's happening here: https://github.com/nodename/async-plgd/blob/master/src/hoare/problem.clj Testing fan-in on a pair of processes and getting nutty results. Thanks, -A -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.