Chicago Lambda Jam: The Must-attend Functional Programming Event

The full Lambda Jam Chicago schedule is now available!

July 8-10, 2013

I’m exited to be a part of this great opportunity for idea sharing across functional language communities. In addition to keynote speakers (Joe Armstrong, Gerald Sussman, and David Nolen), every morning will have nine sessions in three concurrent session paths, but what distinguishes this conference is fully half of each day is devoted to active participation in practical application of a half dozen of today’s most influential functional languages. And I have it on good authority there are going to be ground-breaking hands-on F# sessions you do not want to miss.

Look at the great line-up:

Clojure

The Joy of Flying Robots with Clojure – Carin Meier

Monads and Macros – Chris Houser and Jonathan Claggett

Functional composition – Chris Ford

Lisp and Cancer – Ola Bini

Data, Visibility, and Abstraction – Stuart Sierra

Scala

Functional Async Without the Pain – Jim Powers

Journey to the Heart of the For-Yield – Kelsey Innis

Enabling Microservice Architectures with Scala – Kevin Scaldeferri

Functional I/O in Scala – Nilanjan Raychaudhuri

Erlang

Distributed Programming with Riak Core and Pipe – John Daily

Finite State Machines – Why the fear? – Mahesh Paolini-Subramanya

Addressing Network Congestion in Riak Clusters – Steve Vinoski

Let it Crash: Erlang Fault Tolerance – Tristan Sloughter

F#

Functional Mobile Applications in F# – Adam Granicz

Functional Linear Data Structures in F# – Jack Fox

Clarity of Intent: Three Features of F# Which Lead to Better Code – Paulmichael Blasucci

Haskell

Domain Specific Languages and Towers of Abstraction in Haskell – Gershom Bazerman

QuickCheck: A Silver Bullet for testing? – Joseph Wayne Norton

Simile-Free Monad Recipes – Aditya Siram

Others

Functional Reactive Programming in the Netflix API – Ben Christensen

Protocols, Functors and Type Classes – Creighton Kirkendall

Living in a Post-Functional World – Daniel Spiewak

Copious Data, the “Killer App” for Functional Programming – Dean Wampler

Semantics, clarity, and notation: the benefits of expressions over statements – Tracy Harms

Living in Big Data with Vector Functional Programming – Dave Thomas

Functional Coffeescript for Web UIs – Richard Feldman

Redex: Program Your Semantics – Robby Findler

If that’s not enough, every afternoon we roll up our sleeves with your
choice from 5 incredible workshops ($50/each) or an open jam.

Monday workshops

Try F# from Zero to Data Science – Rachel Reese

The Art of Several Interpreters, Quickly – Dan Friedman, Jason Hemann

Hands-on Intro to Haskell – Bartosz Milewski

Top-down TDD in Clojure – Brian Marick

The Seductions of Scala – Dean Wampler

Tuesday workshops

F# on the Web – Ryan Riley and Daniel Mohl

Program Transformations – William Byrd, Nada Amin

Uses Lenses, Folds and Traversals – Edward Kmett

Functional Web Development with Clojure – Clinton N. Driesbach

Building Applications in Erlang – Garrett Smith

Wednesday workshops

Installed to Productive in Julia – Leah Hanson

Macros! – Drew Colthorp

Compilers from Scratch – Daniel Feltey

Functional Web Applications with
Webmachine
– Sean Cribbs, Chris Meiklejohn

Introduction to Summingbird – Sam Ritchie

Come Join the Functional Programming Event

Registration for Lambda Jam Chicago is
now open. Tickets are $400 for regular admission and $50 per workshop.
Register now!

Sponsorships available!

If your company is interested in hiring functional programmers, please
consider sponsoring Lambda Jam – the
sponsorship prospectus is available.

Cascalog on Windows8

I am a complete novice in the *nix world, so running the first query of the first tutorial of Cascalog, a Clojure-based query language for Hadoop, involved considerable learning and debugging for me on Windows8. I’m going to pull together my notes here, because the information I needed was scattered over many places, and perhaps someone else can benefit. I imagine this all applies to Windows7 as well.

The *nix infrastructure you install on Windows is meant to live in an environment where there are no spaces in file paths. So you will save yourself a lot of trouble by installing Java, Cygwin, Maven, and anything else directly in your C:\ root rather than “C:\Program Files”. As we will see there are a whole bunch of OSS projects interacting with each other and version numbers become very important.

1) When the Cascalog documentation says to run on Java 1.6, it really means NOT on 1.7. Be sure to override the install path to “C:\Java”. Install the JRE and JDK. If the install did not already do it, add the User Environment Variable “JAVA_HOME” “C:\Java\jdk1.6.0_41″.

2) Install Apache Maven 3.0.5 to C:\apache-maven-3.0.5. Add the User Environment Variables “M2″ “%M2_HOME%\bin” and “M2_HOME” “C:\apache-maven-3.0.5″. I also added the User Environment Variable “MAVEN_OPTS” “-Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m” while fumbling around, but I do not think it is necessary.

3) Next up is Cygwin, to get that “Linux feeling on Windows” (I installed v1.7.17), and Hadoop (I installed v1.1.2). I’m going to refer you to this tutorial for installing both Cygwin and Hadoop, but skip the part about Eclipse (unless you really want to, then you are on your own). A couple things either missing from the tutorial or I somehow missed. Add the System Environment Variable “CYGWIN” “ntsec tty”, and add C:\cygwin\bin to the path User Environment Variables in addition to the System Environment Variable path.

Cygwin provides a bash shell. Here is the reference manual.

4) A couple of notes whose meaning I have forgotten in regards to the Cygwin install, but they may make sense to you when you are in it:

after setting environment variables: start–>service.msc–>right click on cygwin service and start

now run command: ssh-host-config -y

5) You will need to install this patch for Windows.

…and I referenced this SO article for reasons I have forgotten. If you did not take my advice and installed Java in Program Files, you will need this SO article.

For completeness I will include this article on getting Hadoop to run on Cygwin 1.7 and JDK1.7 x64, but remember: Cascalog is not going to run on JDK 1.7!

6) Now we are up to installing Leiningen, which from my ignorance (and coming from a .NET background) seems to be a combination build environment and REPL for Clojure. Anyway this is a pretty important piece of the puzzle, so I recommend learning what you can about it. Copy “the batch file” (see the installation section of the README.md) to a path with no spaces. In your documents path WindowsPowerShell\Microsoft.PowerShell_profile.ps1 set-alias lein to the lein.bat path. Open PowerShell and run lein self-install. This will install the most recent Leiningen (in my case 2.1.3), which IS NOT going to work with Cygwin and Cascalog.

7) So the next step is rolling back Leiningen to v2.1.0. Edit lein.bat (near the top of the file) “set LEIN_VERSION=2.1.0″. Now go find the file leiningen-2.1.0-standalone.jar on the internet (sorry, I goofed-up and lost my reference to it, but you will find it), and drop it in the folder C:\Users[your user].lein\self-installs. Run lein -v to verify v2.1.0 (and you should now be able to figure out switching Leiningen versions).

8) To create a new Clojure project, just set the CD of your PowerShell to the path you want and run lein new {project name}. Set your CD up to the new folder just created and you are almost ready to run the Leiningen REPL (almost because in about every case you want to edit the project.clj file to do something useful).

9) Last step: none of the current documentation properly addressed editing the project.clj file for running Cascalog under Cygwin. I got this cleared-up on this thread in the very active Google group for cascalog-user.

Here’s the working project.clj:

(defproject mycascalog "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.5.1"]
                [cascalog "1.10.1"]]
  :profiles {
    :provided {
      :dependencies
        [[org.apache.hadoop/hadoop-core "0.20.2-dev"]]
            }}
) 

lein repl and you are ready to launch into the first Cascalog totorial.

The Fastest Functional Data Structures Come to F#

I wasn’t expecting it, but there have been some breakthroughs in available functional data structures for F#. I’m talking about speed and versatility, and as always, composability. Now available in FSharpx.Collections.Experimental (and on NuGet) is by far the fastest linear functional data structure (for what it does), FlatList. It’s been available as an internal type for some time as part of the OS F# compiler code. Now for the first time it’s available as a stand-alone type in a component library with intellisense documentation.

It’s implemented as a struct and uses an array as internal storage, so it is just blazing fast (as fast as an array) at what it does best:

Item get

ofSeq

IEnumerable

rev

…and almost all of the array module members (plus some).

What it’s not so fast at (like array) is append. So it’s best loaded from an IEnumerable object rather than built up one element at a time.

Try it out, and post any feedback to the FSharpx GitHub issues. After sufficient beta testing we will graduate it to the FSharpx.Collections namespace.

More to come

I don’t want to steal his thunder, but there is someone quietly working on some more functional data structures that I hope to see soon in FSharspx.

First there’s a performance improvement to the already fast FSharpx.Collections.Vector (actually a new implementation). The speed increases I’m talking about are in the range of 2:1 to 5:1. And a wider range of module function bindings. Very cool.

Next there’s a unique and very versatile functional structure that does about anything you would ever want from a linear structure. I already have some plans for this one.

I’ve already had my hands on these two. They are real. He’s also working on at least one non-linear functional structure I have not evaluated yet, but based on past performance I have high expectations.