Pandamonial – Amanda Laucher Insights into software development, functional programming, and F#
  • Sep
    8

    A week of FP heaven

    Filed under: Conferences;

    Last week I attended ICFP in Edinburgh. This is a week of many conferences all related to functional programming. I decided to check out DEFUN and CUFP as they seemed most appropriate for what I hoped to achieve which was a deeper understanding of FP languages as well as more information for the book. An entire week surrounded by PHD’s, PHD candidates even real world FP devs put me outside of my comfort zone which was a great way to meet people and be surrounded with new ideas.  Here are just a few of my notes.

    DEFUN Day One:

    Scala tutorial given by Martin Odersky
    This was a great talk that actually changed my opinions a bit about Scala. Not that I didn’t have a healthy respect for the language, but I wasn’t seeing much appeal in the java-like syntax. Martin did a good job of catering the talk for FP developers with Java knowledge. Some of the things I wasn’t already familiar with and I think are worth looking at include:

    Extractors – Sort of like active patterns in F# using apply and unapply methods. The syntax isn’t quite as pretty and they aren’t quite as powerful.

    Implicit conversions -  Martin called them a poor man’s type class

    Case Classes – Sort of like algebraic data types. I used to think these were just ugly but Martin described the why behind them. I still prefer F#’s syntax but I’m less annoyed by them now.

    Martin also described a study about code comprehension suggesting that concise syntax in FP makes code easier to understand regardless of the length of local variable names. This might suggest that x::xs might not be so hard for new fp devs to understand and maintain.

    Erlang in 10 examples by Simon Thompson:
    This was an interesting talk describing how to think and develop in an Erlang style.  He showed some cool slides with benefits of Erlang and describing the linking of processes. More importantly at the beginning of the session he gave a thumbdrive with the Erland installer and slides as well as all of the code examples. This is obviously the best way to do a tutorial. Although with all of the questions we had less time to code than Simon would have liked, we have everything we need to take home. Some great questions form Yaron Minsky (A Jane Street OCaml guy) led to interesting conversations comparing Erlang to ML. This helped to make some correlations to something most of us were more familiar with. I know more about Erlang now than I thought I could after 3 hrs.

    Alt.net:
    There happened to be a meeting for Scotland Alt.net where  Colin Gemmell talked about Castle Windsor and IOC. It was a really good walk through of using Castle Windsor and IOC with everything .NET. He had an example of using dependency injection in just about every way possible so any of the group members could walk away with a basic knowledge. This group seems to have all sorts of events going on! If you are in the area and using .NET, go check them out and join their forward thinking with the MS platform. Afterwards we grabbed a couple of beers at a local pub and discussed a bit of everything. Michael Feathers was also there and he is always good from some great pragmatic tech conversation. He often is able to help me flesh out some idea, sometimes even days after hearing something he’s said.

    CUFP:
    An entire day dedicated to discussions around FP in the commercial world. Francesco Cesarini discussed some numbers around FP development. He suggested that according to Tiobe FP requisitions have seen about a 1000% growth since last year! This became more apparent when speaking to many of the attendees whose companies are hiring!

    Bryan O’Sullivan gave a great speech about his book, Real World Haskell and how it came about. He also suggested that we need to evangelize FP in the commercial world by writing books and giving talks at conferences that include developers from outside the FP world. His slides can be found here. This guy knows how to motivate!

    Adam Granicz did a talk about using F# at TFC. He discussed some of the basic stuff that he likes about F# including discriminated unions and pattern matching. Obviously good stuff!  He also mentioned that he might be working on the second edition of Expert F#. I somehow lost him before a large group of us went to  dinner that evening so we didn’t get to chat very long.

    Christopher Piro and Eugene Letuchy talked about functional programming at Facebook. They are using Erlang as well as some Haskell. They are the main guys at Facebook doing FP because it is in fact the best tool for the job. They didn’t seem to worry that there weren’t others there who could maintain their work and in fact have to spend their own time maintaining the code instead of moving on to new projects. It sounded as though there were some people becoming more interested in learning FP concepts through lunch-n-learns and geek speaks. Good luck to those guys! They have some awesome tasks. The main thing I liked from their talk was hearing about Thrift which allows for true polyglot development.

    Spreadsheets are the most common functional development tool of the non-developer. Gordon Guthrie introduced a spreadsheet programming tool for the web development and Lee Benfield showed FP in Excel and VBA as well as Functional Model Deployment which is a way of writing FP with higher order functions in Excel spreadsheets. These things bring FP to people who are not necessarily devs.

    Lee Momtahan talked about a DSL he built using Scala. He discussed all of the benefits of FP as they apply to scala including removing the need for boiler plate code and a closer match to the domain.

    One thing all of these talks had in common was discussing FP in the real world. Many seemed to be preaching to the choir by saying “yes, FP works” at a functional programmers conference. We know it works. I’d like to see more code from some instead of just telling what they did and that it worked. Some really cool things have been developed using FP and I think those guys should really get to more mainstream conferences and discuss.

    DEFUN Day 2:
    Don Stewart gave a great talk on multicore programming with Haskell. Check out the content here. He did an amazing job of explaining it so that any developer could understand even if they didn’t know Haskell. Sparks, Haskell threads and OS threads were all covered. I found it interesting that Haskell threads share a heap and so they are in fact lighter weight than Erlangs! This is really a must see presentation.

    Kim-Ee Yeoh did a session on developing a twitter game with Haskell. This was one of my favorite sessions. He held it like a design meeting where we sat around writing type signatures and discussing the different ways we could go about designing the application. Very interesting. I may borrow this session idea in the future if he doesn’t mind.

    Anil Madhavapeddy showed an ORM for OCaml. Although I missed part, this is a really cool open source idea. I intend to look at how it can be extended for F#. You can check it out here on github.

    Finally Adam Chlipala presented the Ur web programming language. You can find the content here. This is a work in progress language to add static typing to web programming. Interesting stuff. Go see.

    The sessions were great but the hallway discussions were even better. I don’t have the time to type them all out and you wont get as much out of it anyway. What you will get a lot out of is your trip next year to Baltimore for ICFP/CUFP/DEFUN/Haskell/Erlang/etc conferences. You’ll get so much for so little effort and money on your part. There is no reason not to go!  I’ll certainly be back.

    2 Comments

2 Responses to “A week of FP heaven”

  1. [...] This post was mentioned on Twitter by David Pollak. David Pollak said: RT @al3x: Nice roundup of highlights from last week's ICFP: http://bit.ly/HGT1J. Wish I'd been there! << Me 2 [...]

  2. [...] programming language zoo, a week of FP heaven, rewriting PHP with Haskell and a game for kids of any age to learn the untyped lambda calculus. [...]

Leave a Reply