4 ms·
For those that are interested in libraries like these, OCaml has an implementation that written by Jane Street called Pipes[0]. It's been around for years, help
by seliopou 11y ago
For those that are interested in libraries like these, OCaml has an implementation that written by Jane Street called Pipes[0]. It's been around for years, helps trade billions of dollars a day, is written in a language that actually has parametric polymorphism, and a configurable notion of "pushback". I've written about it before[1].
[0]: https://ocaml.janestreet.com/ocaml-core/111.28.00/doc/async_kernel/#Pipe https://ocaml.janestreet.com/ocaml-core/111.28.00/doc/async_...
[1]: https://news.ycombinator.com/threads?id=seliopou&next=9809300 https://news.ycombinator.com/threads?id=seliopou&next=980930...
- samuell 11y agoThanks much for the links! What do you mean with "pushback"? Is it the same as "back-pressure"? (If so, Go has "implicit backpressure" in its bounded buffers on the channels ... although I don't think it is changeable at runtime, unless you replace the channel ... but not 100% sure ...)
- PopsiclePete 11y agoA lot of cool concepts come from languages like OCaml and Haskell. But for better or worse, we live in a world where simple languages rule the day (C++ being one notable exception), and if we get lucky, we get some of cool OCaml/Forth/Haskell/LISP/Erlang features to play with, in our simple little worlds with our simple little toy languages like Java and C# and Go and Javascript... it's sad in a way, but it's reality. I'd much rather write F# (basically .NET-hosted OCaml) than C#, but no luck finding gainful employment with that...
- samuell 11y agoBtw, I should also give a shoutout to Vladimir Vivien's Automi library, also posted on the GopherAcademy blog some days ago: https://blog.gopheracademy.com/advent-2015/automi-stream-processing-over-go-channels https://blog.gopheracademy.com/advent-2015/automi-stream-pro... It takes an interesting, slightly different approach, in my view especially for slightly lower-level operations compared to the "scipipe" pattern above. For example, it looks like something I'd use for implementing the internals of components in my pattern.