Tag: scala
All the articles with the tag "scala".
Compilers are hard
Writing (something like) a compiler is hard. Here I explore what some of the difficulties are, and provide some strategies to ensure you still maintain quality.
Scala, React, and SSR (part 2)
GraalVM lets us perform SSR but it's unfortunately still not fast enough yet. Luckily there's a way to have our cake and eat it too.
Scala, React, and SSR (part 1)
In the JS world, React devs can render their pages on the server side for a better user experience. Here's how to do in the Scala world.
Enforcing rules at compile-time: an example
Using a type-level Option encoding and @implicitNotFound in Scala to enforce React lifecycle method ordering rules at compile time in scalajs-react.
Practical Awesome Recursion - Ch 02: Catamorphisms
Chapter 2 of the Practical Awesome Recursion series in Scala: catamorphisms, F-algebras, performance optimization, and composable file system queries.
Practical Awesome Recursion - Ch 01: Fixpoints
Chapter 1 of the Practical Awesome Recursion series in Scala: preparing recursive data types with type parameters, Functor instances, and Fix.
Dependently-Typed Functions
How to implement exhaustive dependently-typed methods and first-class dependently-typed function values in Scala using path-dependent types and higher-kinded folds.
Testing Scala.JS on Firefox & Chrome from SBT
How to integrate scala-js-env-selenium into an SBT project to run Scala.JS unit tests headlessly on real Firefox and Chrome browsers without recompiling.
Zero-overhead Recursive ADT Coproducts
Modeling zero-overhead, sealed, recursive ADT coproducts in Scala using path-dependent types and trait composition, compared against inheritance hacks and Shapeless.
An Example of Functional Programming
A practical, beginner-friendly walkthrough of functional programming in Scala, incrementally building a composable user-data validation library across five evolving requirements.