Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekmett/machines
Networks of composable stream transducers
https://github.com/ekmett/machines
Last synced: 21 days ago
JSON representation
Networks of composable stream transducers
- Host: GitHub
- URL: https://github.com/ekmett/machines
- Owner: ekmett
- License: other
- Created: 2012-08-16T22:31:42.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2023-09-30T13:48:05.000Z (about 1 year ago)
- Last Synced: 2024-05-08T20:16:02.226Z (6 months ago)
- Language: Haskell
- Homepage:
- Size: 541 KB
- Stars: 338
- Watchers: 35
- Forks: 46
- Open Issues: 20
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.markdown
- License: LICENSE
Awesome Lists containing this project
README
machines
========[![Hackage](https://img.shields.io/hackage/v/machines.svg)](https://hackage.haskell.org/package/machines) [![Build Status](https://github.com/ekmett/machines/workflows/Haskell-CI/badge.svg)](https://github.com/ekmett/machines/actions?query=workflow%3AHaskell-CI)
*Ceci n'est pas une pipe*
Machines are demand driven input sources like pipes or conduits, but can support multiple inputs.
You design a `Machine` by writing a `Plan`. You then `construct` the machine.
Simple machines that take one input are called a `Process` and processes form a `Category`. More generally you can attach a
`Process` to the output of any type of `Machine`, yielding a new `Machine`.More complicated machines provide other ways of connecting to them.
Typically the use of machines proceeds by using simple plans into machine `Tee`s and `Wye`s, capping many of the inputs to
those with possibly monadic sources, feeding the rest input (possibly repeatedly) and calling `run` or `runT` to get the
answers out.There is a lot of flexibility when building a machine in choosing between empowering the machine to run its own monadic effects
or delegating that responsibility to a custom driver.A port of this design to scala is available from runarorama/scala-machines
Runar's slides are also available from http://web.archive.org/web/20161029161813/https://dl.dropboxusercontent.com/u/4588997/Machines.pdf
Some worked examples are here https://github.com/alanz/machines-play
Contact Information
-------------------Contributions and bug reports are welcome!
Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net.
-Edward Kmett