Functional languages provide you with the ability to concisely define the intension of a program, without low-level issues getting in the way.
This can be clearly seen when implementing the Quick sort algorithm.
Often referred to as ‘partition-exchange’ sort, this divide and conquer algorithm recursively divides a list into two sub-lists, based on a chosen pivot element.
Since having the opportunity to discuss web application security (part 1, part 2) recently on the podcast, I thought it was a good time to have a deeper look into SSL/TLS (Transport Layer Security).
There are plenty of good resources online discussing the technical side of the topic, however, at a high-level point-to-point encryption and server identification are the two problems it attempts to solve.
A combinator is a type of higher-order function that can be used to express functions without the explicit use of variables.
A fixed point is a value that is unchanged by a function, satisfying the equation which can be found here.
Using the Y-combinator allows us to essentially convert non-recursive code into a recursive counterpart (without directly using named recursion or iteration).
To work it’s magic the recursive function is computed as the fixed point of the non-recursive function.
I have been a big fan of Arch Linux (inc. it’s philosophy) and the Awesome Window Manager for just under a year now.
I recently went through the process of a clean installation on my laptop and thought I would jot down some installation notes for future reference.
Some background information on my 64bit setup, I currently use Intel HD Graphics 4000 and a Western Digital 4K Advanced Format Hard Drive.
Having spent some significant time with more functional-oriented languages such as Scala, I have been keen to explore and take advantage of some of these concepts in my current day-to-day language (PHP).
Delving into the subject however seems to highlight some confusion between the to two discussed concepts.
An anonymous function (aka. lambda) originating from the Lambda calculus, is a function that has no assigned name and can be considered a value in itself.
Functions of this category are first-class value types, on par with integers, booleans etc, allowing you to pass them as arguments or returned by functions (aka. higher-order functions).
A closure on the other hand is a function that captures the state of the surrounding context/environment upon definition, retaining these references even if the variable falls out of lexical scope.
Both do not depend on the other on an implementation level, however, you typically see the two used in conjunction.