strymonas/strymonas-scala
{ "createdAt": "2020-05-05T19:14:19Z", "defaultBranch": "master", "description": "Fast streams for Scala 3", "fullName": "strymonas/strymonas-scala", "homepage": "", "language": "Scala", "name": "strymonas-scala", "pushedAt": "2025-02-08T16:12:41Z", "stargazersCount": 56, "topics": [ "functional-programming", "scala", "scala3", "stream" ], "updatedAt": "2025-09-08T08:19:44Z", "url": "https://github.com/strymonas/strymonas-scala"}strymonas is a library providing fast-streams for Scala 3 through multi-stage programming and partial evaluation.
How to Use
Section titled “How to Use”libraryDependencies += "io.github.strymonas" %% "strymonas" % "0.1.0"import scala.quoted.staging._import strymonas._import strymonas.Code.given
given Code.Compiler = Compiler.make(getClass.getClassLoader)given raw: Raw = Raw(Code)
val t = run { // Construct a streaming pipeline here Cooked.of_int_array(Array(1,2,3,4,5,6,7,8,9,10)).fold(0, (_+_))}
println(t)Construct a streaming pipeline using the Cooked Object (defined in [Stream.scala]!(src/main/scala/strymonas/Stream.scala)).[^1] Then, invoke the pipeline with scala.quoted.staging.run.
Refer to the [examples directory]!(examples) for more details.
[^1] !: If you are familiar with machine learning frameworks, you can think of this as an analogy to a Static Computational Graph.
How to Build
Section titled “How to Build”strymonas is built with SBT 1.7.1 or later.
- Use
sbt compileto build the project from the source - Use
sbt testto run the tests - Use
sbt bench/jmh:runto run the benchmarks
Prepare Environment
Section titled “Prepare Environment”# 1. Install SBT: https://docs.scala-lang.org/getting-started/index.html, https://get-coursier.io/docs/cli-overview## macOS Case:brew install coursier && coursier setup # Maybe `source ~/.profile` or `reboot` is required
## Linux Case:curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && ./cs setupsource ~/.profile # or reboot
# 2. Clone this repogit clone git@github.com:strymonas/strymonas-scala.gitcd strymonas-scala
# 3. Compile via SBTsbt compile
# (4. Clean compilation artifacts as needed)sbt cleanrm -rf target/ project/target/ project/project/Contributors
Section titled “Contributors”- Oleg Kiselyov (okmij.org)
- Aggelos Biboudis (@biboudis)
- Nick Palladinos (@palladin)
- Yannis Smaragdakis (yanniss)
- Nicolas Stucki (@nicolasstucki)
- Tomoaki Kobayashi (@moatom)
Credits
Section titled “Credits”strymonas has its origins in a paper published by Oleg Kiselyov (okmij.org), Aggelos Biboudis (@biboudis), Nick Palladinos (@palladin) and Yannis Smaragdakis (site) and this repo has its aim into making this library available for Scala 3.
The initial prototypes (that correspond directly to the paper, were developed for Scala/LMS and OCaml/BER MetaOCaml) and the initial commit for the Scala 3 port is based on the case study presented for the paper published by Nicolas Stucki @nicolasstucki.