Scala Cosmos

Scala Cosmos Scala Cosmos Scala Cosmos

An example Scala 3 application to show the new features introduced by the language.

See also the post that describes Scala 3 features implemented in the application deeper.

Features shown:

  • Givens in multiple cases.
  • New enums, parametrized and not, also used to define ADT.
  • Extension methods.
  • Opaque type aliases to keep domain values.
  • Automatic type class derivation for response JSON encoding.
  • Implicit conversions in a new Scala 3 way.
  • AkkaHttp as a Scala 2 integration example.
  • Scala 3 test framework usage with givens profits.
  • The new way to define program entry point with @main annotation.
  • Union and intersection types.

Source code at GitHub

Easylog

Easylog Easylog

This library allows to simplify logging for Android applications. It wraps default Log functionality and adds ability to log to permanent memory.

Features:

  • Annotation based logger injection.
  • Automatic tag generation with class name.
  • Logging to a common or a logger specific file.
  • Easy configuration and integration for Java and Kotlin.

Source code at GitHub

Scala 3 Macros

Scala 3 Macros Scala 3 Macros Scala 3 Macros

Scala 3 macros examples.

See also the post that describes features implemented in the project deeper.

Features:

  • Introduction to Scala 3 macros.
  • Practical example to create type safe prepared statements.
  • Type matching.

Source code at GitHub

Air quality sensor

Scala Cosmos Scala Cosmos

Software to handle Plantower PMS5003 air quality sensor for Arduino. It is written with use of C++ and applied in a small project.

Beside the sensor handling more hardware is handled in the code. You can use it in own projects or treat as an example to learn.

Source code at GitHub