Language-ramblings
Shell power and simplicity
Sometimes we overlook the power of the shell, because the terminal context in which it's used is seen as outdated. That's far from the truth; in fact I think it would be a shame to lose sight of some...
read postThe Observer's Book of JS Style
In the 1970's I had a book which I cherished: The Observer's Book of Commercial Vehicles. It was pocket-sized & well thumbed, and listed various vans and trucks. I could identify a Volvo F88...
read postES6, reduce and pipe
In learning about functional programming, one thing that's worked for me is to take my time, and not rush over fundamental concepts. In fact, like a good beer or whisky, a fundamental concept is...
read postThe beauty of recursion and list machinery
There are beautiful patterns inherent in the use of recursion that I've seen in my attempts to reboot my brain with a new, more functionally focused way of thinking about programming. This post...
read postExcluding with vim's wildignore
I found it more difficult than usual to get the wildignore setting working properly in vim, so I thought I'd document it here. The wildignore setting is used in conjunction with the path and other...
read postF3C Parts 9 and 10 - Functors
FunFunFunction Videos: Functors - FunFunFunction #10 and Functors: I was WRONG! - FunFunFunction #11 (yes, the sequence numbers are a bit mixed up, don't worry though) (This post is part of the F3C...
read postF3C Part 8 - Promises
FunFunFunction Video: Promises - Part 8 of Functional Programming in JavaScript (This post is part of the F3C series) This video episode was recorded over a year ago. Since that time, a native...
read postF3C Part 7 - Recursion
FunFunFunction Video: Recursion - Part 7 of Functional Programming in JavaScript (This post is part of the F3C series) "Recursion is when a function calls itself, until it doesn't" --...
read postF3C Part 6 - Currying
FunFunFunction Video: Currying - Part 6 of Functional Programming in JavaScript (This post is part of the F3C series) The "what" part of currying is quite straightforward. The...
read postF3C - A FunFunFunction Companion Series
I came across a great YouTube video series on functional programming. It's by Mattias P Johansson ("MPJ" for short), whose YouTube channel is funfunfunction. Before you do anything else,...
read postF3C Part 5 - Closures
FunFunFunction Video: Closures - Part 5 of Functional Programming in JavaScript (This post is part of the F3C series) Functions have a signature (the parameters) and the body. The body is defined in a...
read postF3C Part 4 - Reduce advanced
FunFunFunction Video: Reduce advanced - Part 4 of Functional Programming in JavaScript (This post is part of the F3C series) Reduce is powerful, much more than its siblings. You can use it not only to...
read postF3C Part 3 - Reduce basics
FunFunFunction Video: Reduce basics - Part 4 of Functional Programming in JavaScript (This post is part of the F3C series) Higher-order functions map, filter and reject perform list transformations,...
read postF3C Part 2 - Map
FunFunFunction Video: Map - Part 2 of Functional Programming in JavaScript (This post is part of the F3C series) Moving on from the higher-order function filter in the previous video, another...
read postF3C Part 1 - Higher-order functions
FunFunFunction Video: Higher Order Functions - Part 1 of Functional Programming in JavaScript (This post is part of the F3C series) Functional programming makes you a better programmer because you're...
read postFOFP 2.1 A look at filter
Part of the Fundamentals of Functional Programming document. Prev: FOFP 1.5 Creating functions We've already seen our first higher-order function, map, in action. A close sibling is filter. filter has...
read postFOFP Fundamentals of functional programming
This document is for me to use during, and to distribute after, a lecture at Manchester's Xaverian College, where I'm very honoured to be able to help introduce some core concepts in functional...
read postFOFP 1.5 Creating functions
Part of the Fundamentals of Functional Programming document. Prev: FOFP 1.4 A different approach with map In our previous example, we defined a helper function square and used it like this: function...
read postFOFP 1.4 A different approach with map
Part of the Fundamentals of Functional Programming document. Prev: FOFP 1.3 Some basic list processing In our second attempt at basic list processing, we used the Array object's push function. There...
read postFOFP 1.3 Some basic list processing
Part of the Fundamentals of Functional Programming document. Prev: FOFP 1.2 Trying things out Let's explore the difference between imperative and functional programming approaches with the simple...
read postFOFP 1.2 Trying things out
Part of the Fundamentals of Functional Programming document. Prev: FOFP 1.1 Introduction To start exploring some of the fundamental concepts of functional programming, you don't need anything more...
read postFOFP 1.1 Introduction
Part of the Fundamentals of Functional Programming document. This document introduces some fundamental building blocks in the functional programming world. A definition Just so we start out on the...
read postLanguage minutiae and learning to SWIM
Further to Enlightenment in action, here's a tiny bit more light that I discovered on my journey up to Newcastle this morning. I solved 4Clojure puzzle 100 (Least Common Multiple) with this code: (fn...
read postFinding a wonderland number
I came across a simple puzzle this evening, on Wonderland Clojure Katas. My brain is half dead from starting work extra early and slogging through the day, but I wanted to include a tiny bit of...
read postEnlightenment in action
One of the ideas that Clojure embraces is this Perlism: It is better to have 100 functions operate on one data structure than 10 functions on 10 data structure This makes a lot of sense. But it also...
read post4Clojure Puzzle 66
In my quest to teach myself more Clojure, I'm solving puzzles. Puzzles from websites such as Project Euler and Advent of Code. More recently I've been plugging away at puzzles on 4Clojure. One of the...
read postBuilding blocks of language, structure and thought
As I travel on my path to perhaps what I deem as some sort of enlightenment, back in time via Clojure to one of the great ancestors of language, structure and computational thought (Lisp), I continue...
read postMy journey to Clojure
I'm learning Clojure. Slowly, but hopefully surely. Clojure is a Lisp, which I like saying, because it makes me sound as though I know what I'm talking about and that my language experience is as old...
read post