Is Haskell ready for everyday computing? An informal experience - - PowerPoint PPT Presentation

is haskell ready for everyday computing
SMART_READER_LITE
LIVE PREVIEW

Is Haskell ready for everyday computing? An informal experience - - PowerPoint PPT Presentation

Is Haskell ready for everyday computing? An informal experience report. Jeff Polakow CUFP 2008 Talk Overview My background Job background System description Points of interest Conclusions About Me Theoretical PL


slide-1
SLIDE 1

Is Haskell ready for everyday computing?

Jeff Polakow CUFP 2008

An informal experience report.

slide-2
SLIDE 2

Talk Overview

  • My background
  • Job background
  • System description
  • Points of interest
  • Conclusions
slide-3
SLIDE 3

About Me

  • Theoretical PL research
  • Insecurity about utility of my work
  • Desire to spread use of “good” languages
slide-4
SLIDE 4

About My Job

  • Small credit trading group
  • Credit markets are opaque
  • Information management is main task
  • Quantitative analysis less important
slide-5
SLIDE 5

Why Haskell?

  • Because I can

– My chance to put theory into practice – Curious to know how Haskell fares

  • Easiest way for me to be productive

– Usual typed, higher-order reasons – Nicer syntax than OCaml

slide-6
SLIDE 6

System Overview

  • Database and Web system
  • Scheduler to spawn autonomous tasks
  • Several communicating pieces
  • Distributed over several computers
slide-7
SLIDE 7

System Architecture

HAppS Scheduler Master data server Slave data server Slave data server User User database task task Slave data server task

slide-8
SLIDE 8

First Version

  • GHC 6.6.1 (started with GHC 6.4)
  • HappS 0.8.4, HDBC 1.0.1 (using ODBC)
  • All XP
  • All process (not thread) based

– Issues with -threaded

  • Somewhat primitive, but stable
slide-9
SLIDE 9

Current Version

  • GHC 6.8.3
  • HAppS 0.9.2, HDBC 1.1.5 (using ODBC)
  • XP and Linux
  • Threads (where possible) and processes
  • Nice machinery for logical processes and servers
  • More autonomous pieces talking to each other
slide-10
SLIDE 10

Novelties

  • Statically typed tables with mini SQL DSL

– Manipulate tables in memory – Generates SQL queries to create a table in memory

  • Automatic generation of RPC wrappers
  • Proc monad for logical process machinery
  • Abstract (socket-based) server machinery
slide-11
SLIDE 11

The Good

  • Usual stuff

– Types & type classes for static guarantees – First class (higher-order) functions for code reuse

  • Purity

– Able to upgrade old (poorly documented) code with

relative ease

  • Performance not an issue (for our purposes)
slide-12
SLIDE 12

The Bad

  • Upgrading to 6.8.3 was painful

– Some libraries don't like XP – Some libraries don't like cabal-install

  • Errors / inadequacies of some libraries
  • Most library documentation is poor
slide-13
SLIDE 13

What is everyday computing?

  • Database access tools

– HDBC, Takusen, etc...

  • Web tools

– HAppS, powerful but difficult to install and learn – HSP, WASH, etc... – Curl bindings, FTP lib work pretty well

  • Ability to write stable server-like programs

– Great lightweight threads support – Good socket interface

My very subjective criteria.

slide-14
SLIDE 14
  • Scripting

– ghci as a shell, HSH – Good string processing machinery

  • Foreign library interaction

– FFI, plus helper tools, are good – No easy way to use .NET or Java libs

  • Development Environment

– GHC is easy to install & low maintenance – Libraries are not always easy to install – Available IDEs not adequate for everyone

What is everyday computing?

More very subjective criteria.

slide-15
SLIDE 15
  • if you are

– a seasoned Haskell programmer – comfortable with laziness/strictness trade offs – comfortable reading library source code – capable of understanding and fixing linker errors – ...

  • and, if in a corporate environment, you are

– free to try drastically new things – capable of functioning without IT dept support

Yes

Is Haskell ready for everyday computing?