2007-09-25

Links: Functional programming ebooks

In a subscribe Spb Haskell User Group I've met several interesting links to files garbage with books on the functional programming.

I've dig out Introduction to Functional Programming by Mike Gordon. Judge by the first chapter a lot of text and samples but less mathematics is expecting further. Such a real programmers book.

I do not understand somehow what do they want...

Find an example to show that if V1=V2 then even if V2 is not free in E1 it is not necessarily the case that
(\V1 V2.E)E1E2 = E[E1/V1][E2/V2]

2007-09-17

Who needs this weather?

I look at gismeteo and do not understand if I live till weekend without a coat or not. Day, evening, morning, wind, rain... a lot of numbers.

I'd like to have a plain and simple site of one page displaying boy or girl dressed according to current weather. Probably, with umbrellas, or in rubbers. Probably, with smiling faces in the sunshine or with wrinkled faces in the wind.

But so that I have a look - and understand how I should dress in the morning.

That's all.

Update 21.09.2007: Thnks to . There is such a service!
Update 07.02.2008: And here is onemore - Predict the weather at cumul.us

For young programmers only...

My little sister has started to study C++ at University.

She is in her second year but in their tasks with big black letters is required to give human readable names to variables and to module code. It's strange... evidently, Pascal at the first year didn't school what is good and how to make job easy first of all to yourself.

I've installed Eclipse to my sister, told about Unit testing a little. It's convenient - to write 5 or 10 lines of code right away tests are running for the checking. It's almost REPL. Testing is a guarantee of not turning program text into one long main function. And if something wrong happens then a couple of key pressing brings you to the debugger to the required place with required data.
It seemed to me she liked it.


I liked to demonstrate the popularity of the approach and was surprised by a huge list of frameworks for tests creation.

As for purpose for student projects there is a tiny file QuickTest.h.

if one is to judge nothing except of three elementary macros QT_TEST(testName),QT_CHECK_EQUAL(value1, value2), and QT_RUN_TESTS is required

P.S The first students C++ sounds in haskell about as follows:

minUncommonWord :: String -> String -> String
minUncommonWord s1 s2 =
foldl1 (\a b -> if length a < length b then a else b)
[x | x <- words s1, x `notElem` words s2]

2007-09-06

Yet another text processor

When the matter is alternative to visual editors ala MS Word and Open Office only TeX and its derivatives are usually mentioned. At link ltu I met yet another interesting project - Lout document formatting system.

The whole range of formatting features in Lout is implemented on the base of 23 primitive operations and hem... an interesting concept Galley.

With this small basis even the concept of page(!) is possible to define. And the marking language itself can be used as an example of why lazy evaluation matters.

I liked one of basic units p - width available to an object mines the object width. I.e. 1p is a margin for right edge alignment and 0.5p is a margin for centering.

I wonder what language problems forced the author to switch to the creation of a new project...

Hem.. whether ideas implemented in Lout can be used for the creation of a new wiki dialect? At first sight tables formatting using // and @Onerow combinators is more pleasant than to edit sheet of <td> and <tr>.