Writing about the greenest things
Parser Combinators
Latest Post!
Estimated reading time: 1h 10m 2s
In my post The Set Function I introduced function combinators as a pattern for building complex logic. I added the caveat that combinators should not be used to define sets, which I feel undersells the value of combinators as a general programming pattern. In this post we will explore combinators as an applied solution to a common problem: parsing text.
Tag Cloud
angularjs combinators configuration management contexts design patterns duct tape functional programming hakyll haskell parsing perforce programming scala self host sinatra tinfoil hat yak shave
Previous posts
Imperative Computation in Functional Programming
Estimated reading time: 1h 25m 36s
Remember functors and applicatives? In my last post Enabling Control Flow in Functional Programming we explored how functors and applicatives abstract over desired and undesired cases of contexts in order to express control flow and permit independent computation. In this post we will explore monads and how to leverage their specific abstraction to express imperative control flow.
The Set Function
Estimated reading time: 15m 31s
What is a Set? A Set can tell you whether or not an value is a member of the Set. This means that a Set is merely a function, specifically of type A => Boolean. In this post I will explore the usage of combinators to build a Set from elementary functions alone.
Enabling Control Flow in Functional Programming
Estimated reading time: 2h 13m 19s
Remember functors? Recall from my last post, Contexts and Effects in Functional Programming, they are structures that abstract away complexity imposed by nondeterminism present in contexts that produce some output; contexts such as optionality, network interaction, or validation. When contexts fail to produce some output, they are in their undesired case and no computation may be performed against them. In this post we will explore how to exploit this characteristic to halt computation in order to express control flow.
Contexts and Effects in Functional Programming
Estimated reading time: 1h 49m 52s
Have you ever received an unexpected null reference? Have you ever written a function to validate some input only to have it turn into spaghetti over time? How do you anticipate exceptions and protect against them at runtime?