Writing about the greenest things

Parser Combinators

Estimated reading time: 18m 21s

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.

Read more...

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

Embracing Nondeterminism Part III: Imperative Computation

Estimated reading time: 21m 28s

Remember functors and applicatives? In my last post Embracing Nondeterminism Part II: Permitting or Halting Computation 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.

Read more...

The Set Function

Estimated reading time: 2m 58s

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 A => Boolean. In this post I will explore the usage of combinators to build a Set from elementary functions alone.

Read more...

Embracing Nondeterminism Part II: Permitting or Halting Computation

Embracing Nondeterminism Part II: Permitting or Halting Computation

Estimated reading time: 32m 7s

Remember functors? Recall from my last post, Embracing Nondeterminism Part I: Contexts and Effects, 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.

Read more...

Embracing Nondeterminism Part I: Contexts and Effects

Embracing Nondeterminism Part I: Contexts and Effects

Estimated reading time: 45m 2s

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?

Read more...

View all posts