# https://docs.racket-lang.org/scribble/getting-started.html

#lang scribble/base

@title{On the Cookie-Eating Habits of Mice}

If you give a mouse a cookie, he's going to ask for a glass of milk.

Scala 书籍

  1. Tour of Scala: https://docs.scala-lang.org/tour/tour-of-scala.html

  2. Scala 3 Book: https://docs.scala-lang.org/scala3/book/introduction.html

安装 Scala

  1. https://scala-lang.org/download/

  2. 配置镜像源:

    . Coursier: https://github.com/lqhuang/dotfiles/tree/master/coursier

    . Maven: https://github.com/lqhuang/dotfiles/tree/master/mvn

    . SBT: https://github.com/lqhuang/dotfiles/tree/master/sbt

Scala 生态

  1. Typesafe: https://akka.io / https://pekko.apache.org , akka / pekko, play

  2. Typelevel: https://typelevel.org/ , cats, cats-effect, circe, http4s, blaze, doobie, eff

  3. ZIO: https://zio.dev , zio

  4. Lihaoyi: https://github.com/com-lihaoyi , os-lib, upickle, cask, mainargs

  5. Twitter: https://opensource.twitter.dev/projects/ , finagle, finatra, finch

  6. SoftwareMill: https://github.com/softwaremill , tapir, sttp, ox, macwire

  7. Airframe: https://wvlet.org/airframe , airframe

  8. Kyo: https://getkyo.io/ , kyo

  9. Scalameta: https://scalameta.org , metals, scalafmt, munit, scalameta

Scala 项目模版

  1. https://github.com/scala/scala3.g8

  2. https://github.com/typelevel/typelevel.g8

  3. https://github.com/typelevel/ce3.g8

  4. https://github.com/softwaremill/sbt-softwaremill

Scala 常用工具和库

  1. 构建工具:

    1. SBT: https://www.scala-sbt.org

    2. Mill: https://mill-build.org/

  2. LSP server: http://scalameta.org/metals/

  3. BSP server: https://scalacenter.github.io/bloop/

  4. CLI: https://scala-cli.virtuslab.org (Scala 3.5.0 用 scala-cli 1.4.0 替代了官方的 Scala runner)

  5. Toolkit library

    1. Scala Toolkit: https://docs.scala-lang.org/toolkit/introduction.html Munit, OS-Lib, uPickle, sttp

    2. Typelevel Toolkit: https://typelevel.org/toolkit/ Cats, Cats-Effect, Fs2, Http4s, Circe

  6. Awesome libraries: https://index.scala-lang.org/awesome / https://github.com/lauris/awesome-scala / https://github.com/stkeky/best-of-scala

    1. Unit test: Munit, uTest, ScalaTest, Specs2

    2. File system: better-files, OS-Lib

    3. JSON: Jsoniter-Scala, Circe, uPickle

    4. HTTP client: sttp

    5. HTTP API: Tapir, endpoints4s, Cask, Airframe-http, Smithy4s

    6. GraphQL: Caliban, Sangria

    7. SQL client: ZIO-Quill, ScalaSql, Doobie, Slick, ScalikeJDBC, Anorm

    8. Configuration: PureConfig

    9. Command line options: mainargs, case-app, scallop

    10. Logging: scala-logging, log4s

    11. Dependency Injection: cats-effect, ZIO, MacWire, AirFrame, Distage,Scaldi

    12. Direct style Scala: Ox, Gears, Kyo

Scala worksheet

https://docs.scala-lang.org/scala3/book/tools-worksheets.html 加强版的 REPL,在 IDEA 和 VS Code 中实时显示代码执行结果。

Scala 标准库

https://www.scala-lang.org/api/3.5.0/index.html

  • scala.collection

  • scala.concurrent

  • scala.util

  • scala.util.matching

  • scala.*

  • scala.Predef.*