photo of a man programming

Scala’s Fold, FoldLeft, and FoldRight Functions: A Comprehensive Guide

Reading Time: 3 minutes Functional programming is becoming increasingly popular and widely used in today’s programming world. And Scala is a language that fully supports functional programming. One of the most valuable functions in Scala is the fold function, which is available in three forms: fold, foldLeft, and foldRight. This blog post will explore these three functions and understand how they work. Fold The fold function takes an initial Continue Reading

man in white shirt using macbook pro

Concept of UDF in Spark: User-Defined Function

Reading Time: 3 minutes As we all know, Spark contains a whole variety of inbuilt functions through which you can do any sort of transformation in your data frame and achieve your desired output, but sometimes you may find that you don’t require them. Then What? In that case, you can define your own function, known as UDFs (User Defined Functions) which makes it possible to write your own Continue Reading

photo of a man programming

Connect Scala

Reading Time: 8 minutes In this blog, we will implement an application using Connect Lib and gRPC. First, we will understand what Connect Library is and its basic example followed by the types of protocols in connect Scala. Finally, we will see the steps needed to implement the application using Connect in Scala and in that section we will see what is gRPC, what is gRPC gateway, and how Continue Reading

woman sitting in front laptop

How to develop Event Driven Application using ZIO Actors

Reading Time: 5 minutes What is ZIO : ZIO is a cutting-edge framework for creating cloud-native JVM applications. ZIO enables developers to construct best-practice applications that are extremely scalable, tested, robust, resilient, resource-safe, efficient, and observable thanks to its user-friendly yet strong functional core. Difference between Akka and ZIO : Akka and ZIO are both the libraries in Scala for building concurrent, scalable, and fault-tolerant applications. Akka is a Continue Reading

close up shot of keyboard buttons

http4s – Dig Deeper

Reading Time: 3 minutes Our previous blog on http4s gives us an introduction to the library to create HTTP routes, servers and clients. Using the library’s support for various libraries like Ember, Blaze, we can create any type of server and/or client. The library also provides for other libraries for easy encoding/decoding of request and response body using circe, scala-xml, and fs2-data. Ultimately, the heart of the library lies Continue Reading

ZIO Streaming Applications, Transformation, and Error Handling

Reading Time: 4 minutes Introduction to Streaming Why do we really need streaming? We can understand the same with the following example. Suppose we have a list of integers and we want to get all the prime numbers and do some further computation on that. In the typical application, we will use ZIO.foreachParN But when we are using the above method we will have two problems:- One Is High Continue Reading

close up photo of gray laptop

Should implicit classes always extend AnyVal in Scala?

Reading Time: 3 minutes What are implicit classes? Implicit classes are a feature that allow you to extend the functionality of existing types by adding new methods. They are defined using the implicit keyword and have a single constructor parameter. We can use these class as if they belong to the original type without having to perform explicit type conversion. Implicit classes are particularly useful for adding utility methods Continue Reading

men working on a computer

How to use ZLayer in ZIO

Reading Time: 5 minutes What is ZIO: ZIO is a library for Scala programming language that provides a pure, composable, and type-safe approach to error handling and asynchronous programming. ZIO provides a lot of tools for developers to write applications in a clean, concise, and functional manner. Zlayer is a module in ZIO that provides abstractions for building and composing modular applications. In this blog, we’ll explore the basics Continue Reading

woman holding macbook

How Scala met Dotty?

Reading Time: 2 minutes It all began in 2012 when the first commit for Scala 3 was made and it was decided to base Scala 3 on DOT. What is DOT? Before we go further into the story, let’s get to know about DOT. DOT, an abbreviation for Dependent Object Types, is a new type-theoretic calculus which models path-dependent types, abstract type members, and it creates a mixture of Continue Reading

person using silver macbook pro

Scala 3: A Look at its Improved Syntax

Reading Time: 3 minutes Scala 3 is a remodel/refit for the scala language. It attracts developers due to its improved features such as simpler syntax, better type inference, improved error messages, and enhanced support for functional programming. In this article, we will compare the syntactical enhancement of Scala 2 & Scala 3. How indentation will help developers to write code efficiently and effortlessly. Control Structures Scala 3 has a Continue Reading

yellow bokeh photo

Vector Vs List in Scala

Reading Time: 5 minutes Introduction In this article, we will compare the List and Vector data structures in Scala and analyze the pros and cons of using them in different use cases. As we all know List is the most popular data structure in scala and quite simply the most beginner friendly of Scala Collections. But is it the obvious choice for all if not most cases? Let us Continue Reading

Working on report

Stripe Payment Gateway Integration in Scala

Reading Time: 3 minutes Introduction In modern day there are a lot of companies implementing digital payment systems on their website to make easy and secure payment processes for customers.There are a lot of payment methods available. Here is the list of payment methods: As an organization you need to be careful while choosing your payment gateway. There are some factors before choosing the correct option. Here is the Continue Reading

How To Perform Operations on ZIO Fibers

Reading Time: 3 minutes In this blog post, we will discuss ZIO fibers and how we can use them. We will also get a quick overview of operations on ZIO fibers. Concurrency in ZIO ZIO is a highly concurrent framework powered by fibers, which are lightweight virtual threads that enable huge scalability when compared to threads, reinforced with resource-safe cancellation, which supports several features in ZIO. This robust concurrency Continue Reading