October 2006


I have started to learn to play the guitar recently, and in order to play freely it’s beneficial to know song texts by heart. Having read about how people on various TV shows manage to remember a huge amount of information in a short time, I decided to try their methods to learn “Hotel California” by the Eagles by heart.

The idea is to remember the text not word by word, but to remember just the key words in each line and build a mental story with these words. The story doesn’t have to be convincing or anything; it’s just a tool to help you remember. Do try this at home! I’ll offer my key words and my mental story for part of this song. I only had time for two stanzas:

(I won’t reproduce the whole text here as it’s probably copyrighted.)

highway
hair
colitas
rising up
distance
shimmering light
head heavy
night

doorway
mission bell
thinking
heaven hell
candle
show way
voices
heard

(refrain)

tiffany
mercedes
pretty
friends
dance
sweet
remember
forget

captain
wine
spirits
1969
voices
night
say

I wrote these words down from memory, about 14 hours after coming up with them in the marshrutka on my way to work. That took me about 15 minutes. Do repeat the text without looking at it after coming up with your words / story. After work I could recall everything. I now have more trouble remembering the 8 accords that you have to play in a stanza than the text :)

The scene (mental story) I imagine for second stanza goes like this: It’s a warm sunny day, some rich women went by car to a street cafe where she sits now. Because she’s rich, pretty guys desire her. She calls them friends, although these guys are only after her money. They dance for her in the courtyard, she finds that sweet and they sweat. It’s summer. Some of the guys dance well (to remember), some not so well (to forget). Then the first-person narrator calls the waiter (the captain is the waiter in my story) to ask him to bring him his wine. Wine contains alcohol — spirits. The waiter tells his story.

I don’t have a story for the last four lines, as they are pretty easy to remember by itself. The words were enough.

I encourage you to try this at home :)

Google Code Search was launched. Let’s listen to a soliloquy:

This is buggy, but I’ll fix it later. It’s also racy, but who cares, I don’t understand why, anyway. Let’s just hope that this will never happen. Or ?!?!

You can also search for buffer overflows.

I read an interesting article about Haskell today, so I tried to learn a little Haskell. It’s a very interesting language. I installed hugs and started. On haskell.org you can read that Haskell means no core dumps. I got a core dump relatively fast. Here’s how:

  • Install hugs
  • Create an empty file foo.hs
  • start hugs
markus@katerina2:~/src/haskell$ touch foo.hs
markus@katerina2:~/src/haskell$ hugs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: 20050308       _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Type :? for help
Hugs.Base> :load foo.hs
Main> :edit

:edit calls the editor with the last loaded file – here foo.hs. Put the following in the file:

times 1 x = x
times n x = times (n-1) x ++ x

This defines a function times which takes two arguments: one from which 1 can be subtracted and another one that can be concatenated with itself. Haskell infers this from how you use the parameters in the function. times concatenates its second argument n times with itself.

Main> times 2 [3]
[3,3]
Main> times 2 [42]
[42,42]

Now in order to produce the seg fault (or core dump) in hugs, you have to call times with a nonpositive number of times:

Main> times 0 [42]
Segmentation fault

Nothing earth-shattering, but I find it interesting to have found a possibility to crash Haskell in half an hour after reading about its core dump immunity.

This is meant humoristically, not as a rant. Take it with a grain of salt :)