Michi’s blog » archive for 'Sillyness'

Another kind of sports reporting

  • February 23rd, 2010

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

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

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

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

filename="kjv.genesis"

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

distro = uniform . bigram

post navigation
about
Michi is a recent PhD working in homological algebra and applied algebraic topology. This blog is his outlet for texts with some manner of thought put into them. Over at his LiveJournal intimate details and streams of consciousness might be found.
Not all here is mathematics. All here, though, are my personal thoughts and opinions. Please read the about page (linked above) for more details.
This blog uses statcounter.com for logging and traffic analysis. In order to identify return visitors, this site will issue a cookie on viewing the blog.
RSS Travel plans
Recent Comments
Tags
Categories
Blogroll
Family
Mathematician blogs
Archives
the rdc* theme