Thursday, February 23, 2006

P5GD1 CD booting & linux followup

I had just decided it was impossible to boot from an internal CD drive that Linux would recognise, but for some reason I decided to try again.

There are many possible combinations of settings that can be tried with this mobo:
  • Upper or lower IDE connectors
  • Master or slave
  • "Enhanced" or "Compatible" IDE mode
  • "PATA+SATA", "SATA", and "PATA" modes
  • ITE IDE controller "enabled" or "disabled", and if enabled, "quick" or "normal" detection mode
Assuming the distinction between "quick" and "normal" is irrelevant, that makes 48 ways you can set up a single drive on this motherboard, although 12 of those ways won't work at all (one of the IDE connectors is disabled when ITE is disabled.)

Well, I found a configuration that would let me install Kubuntu 5.10 on a "regular" IDE hard disk. I could not install Fedora Core 4 under the following configuration; a kernel panic occurs in FC4 during the kernel init process.
  • IDE hard disk as primary master (attached to upper connector)
  • CD/DVD drive as primary slave
  • "Enhanced" mode, subtype "SATA"
  • ITE can be enabled or disabled. If enabled, drives attached to the lower connector will work in Windows once a special driver is installed. However, as far as I can tell, Linux cannot use these "ITE" devices (lower connector) under any circumstances.
  • Also, a SATA hard drive was attached, although this is probably irrelevant to whether it works or not.

Thursday, February 09, 2006

What is wrong with people who write about functional programming?

A couple years ago, after hearing here and there about "functional programming", I decided to learn about it and got a book from the library. I found a book on OCaml and began to read. An hour or two I gave up, finding the book both dry and hard to understand.

Later I attended a course on "programming paradigms" where I learned basic Haskell. After studying Haskell for a little while, I came across the paper "Why Functional Programming Matters" (WFPM). Its objective was to convince the reader that functional programming is good, and it started off well enough, but utterly failed as soon as it started talking about how to write functional code. I found myself baffled when it introduced the line "sum = reduce add 0" on the fifth page. I examined the paper carefully for several minutes to figure out what it meant, and continued reading. Unfortunately, every new line of code was a new puzzle, and I soon gave up on it.

Now that I know Haskell and lambda calculus a little better, I have tried to learn about Haskell's type system by reading "A Gentle Introduction to Haskell" (GIH). It quickly struck me that this "introduction" wasn't "Gentle" at all! I can't see how anyone could understand it without already having a knowledge of lambda calculus and at least one functional programming language--preferably Haskell.

What strikes me about all these explanatory materials is that they are unaware of their own obtuseness. WFPM uses phrases like "It is now obvious that" and "can be derived just by parameterising the definition" (my emphasis). GIH's very name suggests easiness, and its introduction says it is "for someone who has experience with at least one other language, preferably a functional language". But excluding Haskell, I know at least 5 programming languages, none of which could prepare me for GIH at all.

So to be blunt, I wonder if there is something wrong with the brains of the people who write this stuff. How can they fail to see that their writing cannot be understood without a solid prior understanding of the subject matter, and that it suffers from excessive brevity? Functional programming does matter, and I do believe a gentle introduction to Haskell is possible, but I don't know if there are any writers out there who have explained these things properly.