Skip to Content »

Michi’s blog » archive for 'Sillyness'

 Repeal the nth amendment

  • March 24th, 2010
  • 8:42 pm

Inspired by this post over at Making Light, here, have a chart:

First, Second, …

1st, 2nd, …

And, because this chart is kinda tricky to read, here’s the log-scaled version of the same chart:

For the log-chart, I stopped stacking the numbers.

ETA: Changed the log-chart from a line-chart to a bar-chart after feedback from the readership of bOINGbOING. Hello and welcome!

 Another kind of sports reporting

  • February 23rd, 2010
  • 8:08 pm

Inspired by John Allen Paulos, who just now tweeted

Obvious, but NBC hasn’t said: Canada, Norway, Germany way ahead of US in Olympic medals per capita. Many ways to rank: Cf. Arrow’s theorem.

I decided to redo the medals list. Here, the number of medals per capita among the top countries.

Country Gold/capita Silver/capita Bronze/capita Total/capita
Norway 1.23E-06 6.17E-07 1.03E-06 2.88E-06
Austria 3.58E-07 3.58E-07 3.58E-07 1.07E-06
Slovenia 0 4.87E-07 4.87E-07 9.74E-07
Switzerland 6.43E-07 0 2.57E-07 9.00E-07
Latvia 0 8.90E-07 0 8.90E-07
Sweden 3.21E-07 2.14E-07 2.14E-07 7.49E-07
Estonia 0 7.46E-07 0 7.46E-07
Slovakia 1.84E-07 1.84E-07 1.84E-07 5.53E-07
Croatia 0 2.25E-07 2.25E-07 4.51E-07
Netherlands 1.81E-07 6.03E-08 6.03E-08 3.01E-07
Canada 1.47E-07 1.18E-07 2.94E-08 2.94E-07
Czech republic 9.51E-08 0 1.90E-07 2.85E-07
Germany 8.56E-08 1.10E-07 6.12E-08 2.57E-07

 looksay – today’s Haskell snippet

  • April 18th, 2007
  • 9:34 am
nextLookSay = foldr (\xs -> ([length xs, head xs]++)) [] . group
lookSay = iterate nextLookSay [1]

Conway’s Look-and-say sequence

 The Order of the Science Scouts of Exemplary Repute and Above Average Physique

  • February 20th, 2007
  • 6:18 pm

These badges are also displayed on my About page, but the explanation why merits a blog post of its own.

For one thing, I blog about the stuff. I also was a radio speaker at the time that Radio Unga Forskare was active.

This blog. Do I really need to say more?

I’m an old boy scout. I came 3rd in the national quals for the International Chemistry Olympiad back when. I do know how to handle a flame in a lab.

Freezer? Sure. Who hasn’t?

Dry ice? Of course. Unga Forskare (the association of Young Scientists) responsible for this.

Liquid nitrogen? Oh yes! Favourite pastime among Unga Forskare.

I really do know more computer languages than quite a few people. Then again, there are some who know more than I do, and sure, most of those end up reading this blog, so .. well .. call it a draw, shall we?

 More silly random text

  • February 9th, 2007
  • 5:34 pm

Syntaxfree writes over at his blog about a silly little toy he wrote, using the PFP library, to generate random text.

Now, his text is unreadable. I mean, it’s even unpronounceable. Why? Because he’s looking at bigram distributions of letter.

Great, I thought, I’ll do him one better. Random text using bigram distributions on words must surely be a LOT better than random text using bigram distributions on letters. At least the words come out readable, and they may even come out in a decent order.

So I sat down with his code, and hacked, tweaked, and monadized it to this

module Test where

import Probability
import Data.Char
import Control.Monad


bigram t = zip ws (tail ws) where
  ws = (words . map toLower . filter (\x -> isAlpha x || isSpace x)) t

distro = uniform . bigram