2π better than π?

commentary 21 January 2008 | 0 Comments

I just came across Bob Palais’ article from 2001, entitled Pi is wrong! He makes some very interesting points; however the notation he has chosen is rather unfortunate. The definition of his three-legged ‘2π’ is given as: \def \newpi{{\pi\mskip -7.8 mu \pi}} This, when rendered by pdfLaTeX, gives: Zoomed in, we can see the problems [...]

Tagged in ,

Computing with XSLT

Uncategorized 19 July 2007 | 2 Comments

Since XSLT is basically a pattern-matching functional programming language, we should be able to use it to compute. I’m going to use it to implement one of the most basic functions: Peano-style addition. First of all we have to have an idea of what the numbers look like. We want to simulate this in XSL: [...]

Tagged in , , , , ,

Functors aren’t as hard as they sound

Uncategorized 17 July 2007 | 0 Comments

Suppose we have a functor. Let’s call it “My Functor”, because that’s a nice friendly name. I’ll call it for short. Now, a functor is—according to higher sources—something which takes any type to a type . Let’s see how we can accomplish that with our functor, using Haskell code: data MyFunctor a = Construct a [...]

Tagged in , , ,

Surreal and natural numbers

Uncategorized 18 April 2007 | 0 Comments

After reading a recent post on Good Math, Bad Math concerning surreal numbers, I got to thinking about how to model these in Haskell. I came up with the following formulation: data Surreal = Zero | Plus Surreal | Minus Surreal … which also seems very similar to the usual construction for natural numbers: data [...]

Tagged in , ,