Plurrrr

a tumblelog
03 Dec 2019

Building DSLs in Swift

A DSL, short for Domain Specific Language, can be explained as a special kind of API that focuses on providing a simple syntax that's tailored to working within a specific domain. Rather than being complete stand-alone languages - like Swift is - DSLs are often hosted in other languages, and as such, need to use a grammar that's also perfectly valid in their host language.

Source: Building DSLs in Swift, an article by John Sundell.

Principal Components Analysis (PCA) – Better Explained

Principal Components Analysis (PCA) is an algorithm to transform the columns of a dataset into a new set of features called Principal Components. By doing this, a large chunk of the information across the full dataset is effectively compressed in fewer feature columns. This enables dimensionality reduction and ability to visualize the separation of classes or clusters if any.

In this tutorial, I will first implement PCA with scikit-learn, then, I will discuss the step-by-step implementation with code and the complete concept behind the PCA algorithm in an easy to understand manner.

Source: Principal Components Analysis (PCA) - Better Explained. A recommended read.

2019-12-02 What is Functional Programming? and Property Wrappers in Swift 5

What is Functional Programming?

Functional Programming is, like Object Oriented Programming (OOP), a programming paradigm. There isn't a formal agreed-upon definition of what FP entails, but there are two core concepts most people would agree are central to the paradigm:

  1. Avoiding mutating state and side-effects
  2. Using functions as the central building block of programs

Lets discuss each of these in turn.

Source: What is Functional Programming?, an article written by Kjetil Valle.

The Complete Guide to Property Wrappers in Swift 5

Property wrapper is the Swift language feature that allows us to define a custom type, that implements behavior from get and set methods, and reuse it everywhere.

Source: The Complete Guide to Property Wrappers in Swift 5, an article by Vadim Bulavin.