Lachlan O'Dealachlan.hashnode.dev·Jan 7, 2024Using a C library from Scala NativeI've recently been experimenting with Scala Native. The goal I've been working towards is to make the libuv library usable from Scala Native. libuv is a C library for asynchronous I/O that is at the core of Node.js. There is a lot of work left to be ...209 readsscala-native
Hans L'Hoesthans.lhoest.eu·Dec 4, 2023FizzBuzz fun: Exploring Functional Programming Design Patterns : MonoidsIn this post, we will continue from where we left off in a previous article in this series, "FizzBuzz Fun in Scala: Combining Functions," and explore where further abstraction leads us in terms of functional programming design patterns. Our goal is t...FizzBuzz Fun in ScalaScala
Hans L'Hoesthans.lhoest.eu·Dec 1, 2023Simplifying if-complexity in FizzBuzzIn this series, I've mentioned that using an if-expression in the FizzBuzz problem can be more error-prone and complex compared to functional approaches. In this brief article, I'll demonstrate why that's the case. Let's start with a simple working i...FizzBuzz Fun in ScalaScala
Hans L'Hoesthans.lhoest.eu·Nov 30, 2023FizzBuzz fun in Scala: Combining functionsEvery implementation of FizzBuzz in this series, at its core, has relied on an infinitely counting lazy list. This modelling is logical, as the game can theoretically be played indefinitely. In this post, we will explore the possibility of defining a...FizzBuzz Fun in ScalaScala-Basics
Hans L'Hoesthans.lhoest.eu·Nov 29, 2023Fizzbuzz fun in Scala: A straightforward implementationIn previous articles of this series, I examined various implementations and meanwhile experimented with others at different levels of abstraction. However, before delving into those, I wanted to present what I believe to be the most straightforward a...FizzBuzz Fun in ScalaScala-Basics
Bondarenkov-bondarenko.hashnode.dev·Nov 18, 2023Writing simple validator with Scala 3In my previous article we discussed some approaches to validating using Cats and Scala 3 mirror types. In this article I shed light on how to write a simple validation library using Scala 3 metaprogramming. Let's say we have a case class Planet : cas...152 readsScala
Eason Dudoofin.hashnode.dev·Feb 21, 2023An incomplete guide to Scala 3 macros and Multi-stage programmingMacros, a form of metaprogramming,or more precisely Multi-stage programming, is a way to modify code as data during compile time. Thanks to this technique, programmers now have the power close to the compiler (although you can't change the syntax arb...2.1K readsscalaScala
Yadukrishnanyadukrishnan.live·Nov 6, 2022Tuple Improvements in Scala 3Scala 3's enhanced Tuple datatype enables element access by position, supports tuples comprising beyond 22 elements, and introduces supplementary methods and combinators, ultimately improving user experience. Introduction Tuple is a special type of ...681 readsScala
Yadukrishnanyadukrishnan.live·Oct 24, 2022Compile Time Error Generation using inline in Scala 31. Introduction As most of you already know, Scala 3 has completely redesigned the language and also brought in a lot of new features. As part of it, Scala 3 has implemented meta programming from scratch. Scala 3 has simplified a lot of common meta p...1.2K readsScala