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.
Pages
Categories
- AC
- algorithm
- announcement
- applicative
- art
- axiom of choice
- balanced
- Beeminder
- BFS
- bijection
- binary
- BlogLiterately
- category
- challenge
- combinatorial species
- combinatorics
- competitive
- constructive
- darcs
- data
- design
- diagrams
- dissertation
- drawing
- EDSL
- enumeration
- functional
- functional programming
- functor
- game
- geometry
- GHC
- graph
- graphics
- hackathon
- Hac φ
- haskell
- ICFP
- isomorphism
- Kattis
- library
- log
- monad
- monads
- monoid
- music
- natural
- number
- paper
- parsing
- partitions
- pedagogy
- productivity
- programming
- QuickCheck
- random
- release
- resource
- robot
- sampling
- search
- sets
- species
- subtraction
- Swarm
- talk
- teaching
- theory
- tree
- tutorial
- type-level
- Typeclassopedia
- types
- virtual
- workshop
Archives
- March 2023 (1)
- February 2023 (2)
- January 2023 (3)
- December 2022 (2)
- October 2022 (1)
- September 2022 (1)
- August 2022 (1)
- June 2022 (1)
- November 2021 (2)
- October 2021 (4)
- September 2021 (5)
- August 2021 (1)
- June 2021 (3)
- February 2021 (1)
- July 2020 (2)
- June 2020 (3)
- May 2020 (4)
- April 2020 (2)
- March 2020 (2)
- February 2020 (4)
- December 2019 (1)
- November 2019 (1)
- October 2019 (1)
- July 2019 (1)
- May 2019 (2)
- April 2019 (2)
- March 2019 (1)
- February 2019 (3)
- November 2018 (1)
- October 2018 (3)
- June 2018 (1)
- May 2018 (4)
- April 2018 (1)
- March 2018 (2)
- February 2018 (3)
- January 2018 (1)
- November 2017 (1)
- September 2017 (1)
- June 2017 (1)
- May 2017 (1)
- April 2017 (1)
- March 2017 (1)
- February 2017 (4)
- January 2017 (3)
- November 2016 (2)
- October 2016 (2)
- September 2016 (3)
- August 2016 (4)
- July 2016 (1)
- June 2016 (1)
- May 2016 (3)
- April 2016 (2)
- March 2016 (3)
- February 2016 (1)
- November 2015 (2)
- October 2015 (1)
- August 2015 (2)
- July 2015 (1)
- June 2015 (3)
- May 2015 (2)
- April 2015 (1)
- March 2015 (1)
- August 2014 (3)
- June 2014 (2)
- May 2014 (2)
- January 2014 (2)
- October 2013 (1)
- August 2013 (1)
- July 2013 (1)
- May 2013 (1)
- April 2013 (3)
- March 2013 (2)
- January 2013 (2)
- December 2012 (2)
- November 2012 (4)
- October 2012 (3)
- August 2012 (4)
- July 2012 (5)
- June 2012 (1)
- March 2012 (1)
- January 2012 (1)
- November 2011 (4)
- October 2011 (3)
- September 2011 (2)
- August 2011 (2)
- July 2011 (2)
- June 2011 (1)
- May 2011 (6)
- April 2011 (2)
- March 2011 (1)
- February 2011 (3)
- January 2011 (1)
- December 2010 (2)
- November 2010 (3)
- October 2010 (1)
- September 2010 (1)
- August 2010 (3)
- July 2010 (2)
- June 2010 (3)
- May 2010 (3)
- April 2010 (3)
- March 2010 (2)
- February 2010 (1)
- January 2010 (1)
- December 2009 (2)
- October 2009 (3)
- September 2009 (2)
- August 2009 (4)
- July 2009 (7)
- June 2009 (1)
- May 2009 (2)
- April 2009 (1)
- March 2009 (2)
- February 2009 (3)
- January 2009 (3)
- December 2008 (2)
- September 2008 (2)
- August 2008 (1)
- July 2008 (3)
- June 2008 (1)
- April 2008 (4)
- March 2008 (4)
- February 2008 (4)
- January 2008 (2)
- December 2007 (4)
- October 2007 (2)
- September 2007 (2)
- August 2007 (3)
- June 2007 (2)
Top Posts
Blogroll
Fun
Personal
Meta
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?
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.
Pingback: Differences and Intersections on Infinite Lists. « tech guy in midtown
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/
harfga: Cool, thanks for letting me know! I posted a comment over there with another idea that you might find interesting.
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.
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.
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 :)
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.
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?
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. =)
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,
Do you have a Twitter
No, I have managed to remain uncorrupted.
I have updated your Haskell Wiki user page to link here, I hope you don’t mind: https://wiki.haskell.org/User:Byorgey
Thanks! I’ve now updated it to something even better (my actual new homepage) but I appreciate you noticing the dead link and doing something about it.