I’m Brent Yorgey. I am an assistant professor in the department of mathematics and computer science at Hendrix College in Conway, Arkansas, USA. My academic/professional interests include functional programming languages (especially Haskell), type systems, category theory, combinatorics, discrete mathematics in general, and computer science and mathematics education. Other interests include music (I am a classical and jazz pianist), Go, bridge, and classical Greek and Hebrew.

### 15 Responses to About me

1. Rory Winston says:

Hi

I’ve been reading your site for a while now, and it’s very interesting. Great job! you may know the answer to a question that I have been wondering about recently, but cant find the answer. Is it possible (I know Haskell doesnt seem to provide a list subtraction operator) to express a statement of infinite lists like:

[1..] – [2..]

Whichshould yield “1” as the answer?

2. Brent says:

Hi Rory,

Haskell does actually provide a list difference operator, it’s called (\\), and can be found in Data.List. For example, [1,2,3,4] \\ [2,3,5] evaluates to [1,4], and [2,2,3] \\ [2,1] evaluates to [2,3]. However, if you try typing [1..] \\ [2..] at the ghci prompt it will sit there forever trying to compute the first value of the result. (\\) can’t deal with infinite lists, since list difference cannot work for infinite lists in general. There’s no way for \\ to know that the lists you gave it happen to have this special structure.

With that said, it should be quite easy to define a new data type which can store this special structure, and a list difference operator (and other operators) which can take advantage of it. For example, something like

data NewList a = Normal [a] | Infinite a | Range a a

Then you could define

listDiff :: (Eq a, Succ a) => NewList a -> NewList a -> NewList a

such that listDiff (Infinite 1) (Infinite 2) evaluated to (Range 1 1) or something like that.

Let me also take this opportunity to point out that the #haskell IRC channel on freenode.net is a fun place full of helpful people (strange, I know!) and you might enjoy hanging out there and asking any more questions you might have.

3. harfga says:

Brent,

I was surprised to stumble on this post because I’ve been thinking this problem recently. I wrote up my thoughts last night and posted them here:

http://techguyinmidtown.com/2008/04/30/differences-and-intersections-on-infinite-lists/

4. Brent says:

harfga: Cool, thanks for letting me know! I posted a comment over there with another idea that you might find interesting.

5. John Baker says:

Great blog title. I’ve been studying Haskell lately. It seems there are a fair number of J programmers that find this language interesting. So far so good. I rather like Haskell’s take on outer products and uniform treatment of currying.

• Brent says:

Hmm, I’m not 100% sure I know what you mean by “Haskell’s take on outer products” — are you talking about list comprehensions? In any case, I’m glad you’re finding it interesting! Haskell certainly does make a lot of interesting decisions that are quite different from most mainstream languages.

6. j2kun says:

Very nice blog. I’m looking forward to reading through some of the archives. I’ll be posting some category theoretical posts on my blog in the near future. I’m looking at implementing category theoretic constructions in ML as I go through the mathematical background. Perhaps you might enjoy it :)

• Brent says:

Sounds cool, I’ve just subscribed to your RSS feed! Actually I think I remember seeing a link to some other post on your blog once before but I forget which one.

7. I really like the title of your blog, it was so funny at first. :)

Hi Brent, I think you may be the one who designed this Haskell site: http://www.cis.upenn.edu/~cis194/spring13/lectures/01-intro.html

Just wanted to let you know that, reading this one a Firefox browser, the ‘>’ symbol meant to denote code doesn’t show up on code. Or perhaps it’s not meant to be there in the page, just in the downloadable code?

• Brent says:

Yeah, it’s only supposed to show up in the downloadable code. You can argue about whether that was a good choice, but that is how I designed it. =)

9. S says:

Hi, I just ran across your pages on printing at https://mathlesstraveled.com/2016/01/08/a-new-way-to-read-and-print-double-sided-paper/ and at https://byorgey.wordpress.com/how-to-print-things/ ; I’ve tried the “Möbius” printing and loved it. (Thank you!) For those who may not have pdftk/zsh handy (e.g. someone on a mobile phone!) I made a (trivial) web tool that can be used in place of the shell script: https://shreevatsa.net/mobius-print/

Cheers,

10. Anonymous says: