A simple function that nicely formats arrays of bytes. Useful in FSI or logging. byte array -> string seq Inspired by http://fssnip.net/hq, but optimized to become O(n).
3 people like thisPosted: 11 years ago by Vasily Kirichenko
One of the main features of Hopac - selective synchronization using "alternatives". In this snippet we download three web pages in parallel and the one that finishes first "wins" (or the timeout alternative becomes available for picking). What's nice in this solution is that the other two downloading jobs are cancelled immediately when the winner/timeout is available (i.e. an implicitly provided to the Asyncs CancellationTokens are cancelled). Alts is highly composable and, for example, the whole Alt.choose [ ... ] thing could be nested in another Alt.choose or combined with <|> or <&> operators with another Alt and so on.
3 people like thisPosted: 9 years ago by Vasily Kirichenko
https://github.com/tpetricek/FSharp.Joinads/blob/master/src/Joins/Samples.fs#L60 ported to Hopac.
1 people like thisPosted: 9 years ago by Vasily Kirichenko
Generic operator that introduces a convenient syntax for "posting" messages into any agent that has Post member. Specifically, it's useful for the standard MailboxProcessor and the AutoCancelAgent (from FSharpx library).
4 people like thisPosted: 11 years ago by Vasily Kirichenko
Joinads example from here https://github.com/tpetricek/FSharp.Joinads/blob/master/README.markdown translated to Hopac. No language extension needed, the code is equally compact and arguably more readable.
2 people like thisPosted: 9 years ago by Vasily Kirichenko
This is "Parallel tree processing" example from http://tryjoinads.org/ ported straitforwardly to Hopac.
3 people like thisPosted: 9 years ago by Vasily Kirichenko