CUFP 07 Write-Up now available

A write-up on the Commercial Users of Functional Programming 07 conference is now available here.
It is definitely worth a read for folks who wonder about the “real world” problems that are solved using functional programming. There is a nice mix of both languages and problem domains, and the tone is pretty laid back.

Code Generation and DSLs in Scheme

Over the years, I have heard some pretty outrageous and tantalizing claims made about the programming language Lisp. For example, “It will change you, forever.” and “You write code that writes code.”. Sadly, no further explanation is ever provided. Perhaps it is impossible to capture the essence of that to which these statements allude? This air of mystery around Lisp is both a blessing and a curse. Some folks will find this aura repugnant; others magical. For me, it was the latter. I wanted in on the secret!
Continue reading “Code Generation and DSLs in Scheme”

What is “real code”?

One common complaint about non-mainstream programming languages is that there hasn’t been any “real code” written in that particular language. One response to this is the Practical Common Lisp book.
Whether or not a MP3 database or a spam filter is “real code” is up for debate. Nonetheless, based on the success of the book, people clearly want to see “real code”.
In your mind, what is “real code”? What is it that you need to see in order to believe that a language can do “real work”?

(F Sharp) An Implementation Of The `Map' Function In F Sharp (.NET)

Here is how map may be implemented in F Sharp. (At the very least, it is my attempt at implementing it!)

You can run this in the interactive shell.

let rec my_map fn xs =
    match xs with
    | first::rest -> (fn first) :: (my_map fn rest)
    | [] -> []
my_map (fun x -> x + 1) [1; 2; 3; 4; 5;];;
val it : int list = [2; 3; 4; 5; 6]