Monday, June 4, 2012

Kids & sauna

Sauna is something very important in Finland. Everyone goes to sauna. It is not obvious everywhere. I remember once I was with my kid in Poland (Warsaw), in a quite good hotel, and they told me I couldn't take my kid to sauna, because he was under 12. I tried to explain that he got used to sauna, since we lived in Finland. It did not help. In Finland I have once been in a real sauna. There were birches there (to hit one's back and shoulders), a cold frozen lake nearby, and, of course, a lot of beer. It was fun. I think I was the only foreigner, everyone was speaking Finnish. In fact I spoke Finnish too, somehow. The Finns do speak a lot, contrary to the common belief, provided the temperature around them is about 100 degrees (Celsius). Many people have a sauna at home (we do not, since our bathroom is really small). It is a common habit to go to sauna after business meetings. I have even heard that in the old days women used to give birth in saunas. I do not know whether it is true, but I think it is likely.

BTW. This is a piece of code I  once wrote in Perl. It is a maze generator. It is supposed to be unreadable ;)))

($w, $h)=(25, 10);%l=map{$_, {map{$_, 0}1..$h}}1..$w;sub t{my($x, $y)=@_;$l{$x}{$y}|=1;my@c=grep{exists($l{$_[0]}{$_[1]})&&!$l{$_[0]}{$_[1]}&1}map{[$x+$_[0], $y+$_[1], $_[2]]}([-1, 0, 2], [1, 0, 2], [0, -1, 4], [0, 1, 4]);@c&&do{$c=$c[int(rand(@c))];$l{$x<$c[0]?$x:$c[0]}{$y<$c[1]?$y:$c[1]}|=$c[2];t(@$c);t($x, $y);}}t(12, 5);print join("", map{$y=$_;"X".join("X", map{$l{$_}{$y}&2?"-":" "}1..$w)."\n".join(" ", map{$l{$_}{$y}&4?"|":" "}1..$w)."\n" }1..$h);

No comments:

Post a Comment