## Regular Expressions From Scratch, Part Four: The Kleene Closure of a Language

Languages are sets, so we can take any two languages (over the same alphabet) and take their union to form a new language. Just as a reminder: Definition 7: The union of two sets L and K is the set with all the members found in either, and is written L ∪ K. We’re going…

## Regular Expressions From Scratch, Part Three: Concatenation

You probably intuitively understood concatenation already, but let me define it anyway. Definition 5: The concatenation of two strings w and u (over the same alphabet) makes a string consisting of the sequence of every element in w followed by every element in u. We write concatenations the same way as before: all run together….

## Regular Expressions From Scratch, Part Two: Some Examples of Languages

Let’s look at some sample languages to get a sense of just how flexible languages can be. For example, here are some languages over the alphabet S = {0, 1} L1 = all members of S*, period — the language where every string is in the language L2 = all members of S* such that…

## Regular Expressions From Scratch, Part One: Defining Terms

Over the years that I’ve been writing this blog some of the most positive feedback I’ve received has been for those entries where I’ve explored fundamental concepts in computer science. I thought that I might take that to its logical extreme, and do a series on what exactly a “regular expression” is. Most script developers…

## Why are base class calls from anonymous delegates nonverifiable?

I’m still learning my way around the C# codebase – heck, I’m still learning my way around the Jscript codebase and I’ve been working on it for nine years, not nine weeks. Here’s something I stumbled across while refactoring the anonymous method binding code last week that I thought might be interesting to you folks….

## Why Can’t I Access A Protected Member From A Derived Class?

A question I got recently was about access to protected methods from a derived class. Clearly that’s what “protected” means – that you can access it from a derived class. In that case, why doesn’t this work? class Ungulate {  protected void Eat() { /* whatever */ }} class Giraffe : Ungulate {  public static…

## How to make little girls scream like… well, like little girls

[No technology today, so if you’re only here for the witty banter about programming languages, skip this one.] Leah and I spent the week before Halloween volunteering at Nightmare At Beaver Lake, a haunted-house-style attraction that runs along the trails in Beaver Lake Park, just on the other side of Lake Sammamish from Microsoft’s main…