First Blog Post

Wow, finally I made it. Setting up this page was planned for a long time.

It is using the Pelican static site generation system a system that is processing simple input files written in reStructured Text or Markdown into static HTML pages. In my opinion this is the simplest, easiest and safest way to generate a web page nowadays. It is so safe and fast, because the web server has to only serve static content. There is no dynamic language like PHP, Ruby, or Python running on the server; neither is a database needed.

I keep this blog basically as some kind of note book. Thus, I will post things that I am interested in the moment at irregular occasions.

For testing reasons, some source code, here Python

1 print("Hello World from Python")

And some Haskell, just for fun, taken from the Haskell Wiki.

 1 import Data.List
 2 import Data.Bits
 3 
 4 fibs :: [Integer]
 5 fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
 6 
 7 firstNFibs :: Integer -> [Integer]
 8 firstNFibs n = take n fibs
 9 
10 fib1 n = snd . foldl fib_ (1, 0) . map (toEnum . fromIntegral) $ unfoldl divs n
11     where
12       unfoldl f x = case f x of
13               Nothing     -> []
14               Just (u, v) -> unfoldl f v ++ [u]
15 
16       divs 0 = Nothing
17       divs k = Just (uncurry (flip (,)) (k `divMod` 2))
18 
19       fib_ (f, g) p
20           | p         = (f*(f+2*g), f^2 + g^2)
21           | otherwise = (f^2 + g^2, g*(2*f-g))
22 
23 fib :: Int -> Integer
24 fib n = snd . foldl_ fib_ (1, 0) . dropWhile not $
25             [testBit n k | k <- let s = bitSize n in [s-1, s-2..0]]
26     where
27       fib_ (f, g) p
28           | p         = (f*(f+2*g), ss)
29           | otherwise = (ss, g*(2*f-g))
30           where ss = f*f+g*g
31       foldl_ = foldl' -- '