https://github.com/otobrglez/markov-chains
Markov chain and FP experiments with Scala
https://github.com/otobrglez/markov-chains
functional-programming markov-chain scala twitch
Last synced: 9 months ago
JSON representation
Markov chain and FP experiments with Scala
- Host: GitHub
- URL: https://github.com/otobrglez/markov-chains
- Owner: otobrglez
- Created: 2021-05-21T15:06:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-28T12:26:13.000Z (over 4 years ago)
- Last Synced: 2025-01-06T18:52:35.240Z (10 months ago)
- Topics: functional-programming, markov-chain, scala, twitch
- Language: Scala
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Markov Chains with Scala

Exploring different concepts and playing around with [Markov Chains][mc] and other FP stuff in Scala.
The code was also written as part of my exploration of [Twitch - @otobrglez](https://www.twitch.tv/otobrglez).
## Examples
### [gen1](src/main/scala/com/pinkstack/gen1) - Pulling crypto-currencies and generating names
```bash
$ sbt "runMain com.pinkstack.gen1.SyncCurrenciesApp"
$ sbt "runMain com.pinkstack.gen1.GenerateNameApp"
```
### [gen2](src/main/scala/com/pinkstack/gen2) - Clean and simple FP implementation
```bash
$ sbt "runMain com.pinkstack.gen1.Main"
```
### [gen3](src/main/scala/com/pinkstack/gen3) - Playing with Cats Effect 3
```bash
$ sbt "runMain com.pinkstack.gen3.Main"
```
### [gen4](src/main/scala/com/pinkstack/gen4) - Getting crypto-currencies and syncing them locally in SQLite.
Focus here was elegant usage of [Cats Effect 3][ce3] w/ [Doobie][doobie] and [sttp]
with [IO](https://typelevel.org/cats-effect/docs/2.x/datatypes/io) data type.
```bash
$ sbt "runMain com.pinkstack.gen4.Main"
```
### [gen5](src/main/scala/com/pinkstack/gen5) - Experimenting with Scala Cats [State data type / Monad][cats-state]
```bash
$ sbt "runMain com.pinkstack.gen5.Main"
```
## Resources
- https://en.wikipedia.org/wiki/Markov_chain
- https://brilliant.org/wiki/markov-chains/
- https://towardsdatascience.com/introduction-to-markov-chains-50da3645a50d
[mc]: https://en.wikipedia.org/wiki/Markov_chain
## Author
- [Oto Brglez](https://github.com/otobrglez) / [@otobrglez](https://twitter.com/otobrglez)
[ce3]: https://typelevel.org/cats-effect/
[doobie]: https://tpolecat.github.io/doobie/
[sttp]: https://github.com/softwaremill/sttp
[cats-state]: https://typelevel.org/cats/datatypes/state.html