Links dump
I don't have time to write another big post so I have decided to post several interesting links.
You can use great Copy as RTF TextMate plugin by Dr. Nick If you want to insert highlighted code samples in you Keynote presentation. It allows you to copy code with highlighting from TextMate and paste it directly into the slides.
If you are using Ruby check out slides by Michael Klishin about Rspec patterns shmatterns. We are using all described techniques at Orwik.
Great blog post monoids in Haskell from A Neighborhood of Infinity. Describes Monoids and how to use them with Writer and State monads.
select * from depesz; is a very interesting blog about Postgresql RDBMS. It have posts about new Postgres features and useful tips.
Цитата про Хаскел
The University of Melbourne used to teach Haskell as a first language to all the computer science students (they may still, but I'm not there anymore). This worked superbly well. It worked particularly well as a leveller. Those students who'd come into the computer science degree already knowing some other language were neither advantaged by their previous experience or disadvantaged by the bad habits they'd picked up. It gave a nice, sensible introduction into useful things like commenting your code, using meaningful variable names, indenting code to make it readable, breaking bigger problems up into smaller ones, thinking about types etc.
As someone who tutored those first year students, and ran the lab classes; but who also had experience running lab classes for students going straight into C; I think Haskell made a fantastic first language. I'd happily recommend it to a friend who wanted to learn how to program.
Some thoughts on writing in Haskell
Recently I've written code for solving diophantine equations of type ax + by + cz + dw = f with genetic algorithm. It's my first "real" program in Haskell with I/O and other stuff. It's a great experience, but I have a question and I would like to read you thoughts about it.
Is it ok to name the same datatype in different ways?
type Chromo = Int
type Gene = (Chromo, Chromo, Chromo, Chromo)
type Diophantine = Gene -> Int
--here it goes
type Population = [Gene]
type Breed = [Gene]
--select n species from Population for interbreeding
select :: Int -> Diophantine -> Population -> Breed
I may write signature for select as
select :: Int -> Diophantine -> Population -> Population
but i think, Breed better express the essence of select. Of course select returns a list of Genes, but these genes are "special". But maybe it's a bad style or make compilers work harder? Maybe someone experienced in Haskell may help.
Also i noticed, that it's convenient to make all I/O in a main function, using non-monadic code in it. I've thought about a process of writing a program in Haskell and i think i know the problem with all Haskell tutorials. Cale Gibbard said that learning Haskell is like learning your firs programming language:
While not really any harder to learn in absolute terms than most of the imperative languages that people use (for instance, it’s far less complicated than C++ or Java), it is sufficiently different from them that you don’t have the same kind of leverage you might be used to when learning something very similar to a language you already know. It’s a lot more like the process of learning your first programming language than moving between, say, C# and Python.
And I agree with him. While I was learning my first programming language, I was also learning about a process of writing a program, I've understood some principles and learned them. In all tutorials about Haskell main themes are the language itself and math, which powers him (category theory, monads, etc.). I think it's necessary to teach the principles of the program writing process too. Like: write the basic functions first, using interactive interpreter (GHCi, pugs) and QuickCheck (any of you favorite test tool) for testing, at the end add I/O, using non-monadic code. Maybe i'm wrong and there is the "right" process, but it is based on my little experience with Haskell :)
P.S. Recently I've discovered and read some chapters from the book Real World Haskell. I think it's great. Thanks to the authors. I want to buy a hardcopy.
P.P.S. Sorry for my english, i will be glad if you help me to fix my mistakes by dropping a note here. :)
VCS

Решил попробовать распределенную систему контроля версий взамен svn, потому что хочется иметь возможность работать на ноутбуке, не подключая его к сети, при этом иметь возможность делать коммиты и вести лог. Поcле копания в гугле были наидены
Нашлась статейка про их сравнение. В общем выбор я пока остановил на darcs, т.к. она вся такая хорошая да и написана на Хаскеле, что в моих глазах является плюсом.
Some FP stuff
Haskell прекрасен
length :: [a] → Int
length xs = sum [ 1 | _ ← xs ]